Rewrite the lighting and occupancy pie chart plotters so that they both inherit from a new class, 'Generic_Pie_Chart_Plotter'. This will have two benefits.
Separate plotting logic from data generation logic.
Make it easier to create future pie chart visualizations (simply subclass Generic_Pie_Chart_Plotter)!
The problem of data generation logic popping up in the plotting functions happens in several places in the code. This should be removed. A short (possibly incomplete list of the places that this happens is below):
Rewrite the lighting and occupancy pie chart plotters so that they both inherit from a new class, 'Generic_Pie_Chart_Plotter'. This will have two benefits.