The problem is really two problems.
1. Averaging. Talked about above.
2. Display. I see you have a LED every 5 degrees. What do you do if the average gives you a number of 2.5 and you have 0 and 5 (no 2.5)?
A. You could turn on both 0 and 5 to indicate 2.5.
B. For a reading of 4 you cold turn LED-5 on bright and LED-0 on dim. (using PWM).
C. You could slow down this process. If you are fast the LEDs will blink. If you choose a slower speed and modulate the brightness of the LEDs your eye will not see flicker.
D. you could speed up the process and let your eye do the averaging. (no average in software) If you can measure the angle and turn on the LED 1000 time a second and LED-5 is on most of the readings but LED-0 is on 10% of the time your eye will see a bright 5 and a dim 0.
E. In the case above where the angle is 2.5 you can build in hysteresis. If LED-0 is on then LED-5 will not light with numbers of 1,2,3, or 4 but will light at 5. Now that LED-5 is on, LED-0 will not light with a 4,3,2 or 1.