Most of the time is taken up by the get_formatted_data() function, because the data is natively stored at the unit level. However, most plots only care about data aggregated up to a certain geographic region. It would be much quicker to do that aggregation once in the formatter step, rather than each time you plot.
Proposed solution:
Save a seperate dataset within each *_{solution}_formatted.h5 file, in which each property (e.g. generator_Generation) is aggregated to each level as defined by the columns in the region_mapping file.