Analysis
Figures
Overview of implemented figures
Note
You may set global matplotlib setting in a .plt file specified by settings.data.plt_settings (default is plotting/config_plt_unik.yaml).
Figure labels
Labels of figures work via l18n, using python’s gettext feature, i.e. figures can be labeled by any translation which is defined by the setting AHOI_EVAL__LANGUAGE.
Update new labels from code
Update the Portable Object Template (POT) file (call in AHOIS’ root folder):
python setup.py extract_messages
--output-file=src/helpers/ahoi_parsed.pot
Combine (automatically) created POT-file with (manually) defined POT file with outside-code-strings (e.g. defined in settings):
Hint
xgettext is shipped with POedit (see below). To make it available at the command line add the bin folder (e.g. C:\Program Files (x86)\Poedit\GettextTools\bin) to your PATH-variable.
xgettext src/helpers/ahoi_parsed.pot
src/helpers/ahoi_manual.pot
-o src/helpers/ahoi.pot
xgettext.exe src/helpers/ahoi_parsed.pot
src/helpers/ahoi_manual.pot
-o src/helpers/ahoi.pot
Editing Labels
Often it makes sense to create a separate language/label set per project to label figures with project-specific terms. New languages can be added as follows:
Create a .po file for the new language/label set:
python setup.py init_catalog -l en_GB
Hint
Often it is useful to build upon existing translations. To do so copy the desired translation (ahid.po) to the new translation’s place: building_stock_model/locale/<LOCALE>/LC_MESSAGES/ahid.po
Fill the translations within the newly created .po file at src/helpers/<LOCALE>/LC_MESSAGES by either using a text editor or POedit. Using POedit the required machine readable versions of the .po files (.mo) files are created automatically when saving. Otherwise call:
python setup.py compile_catalog
Note
Many labels for subsamples of result data such as building types, owner types, energy carriers, or building parts are defined in an excel file (default: FigureLabels.xlsx). To translate these, store the excel file with a langauge specific name (e.g. “FigureLabels_en_GB.xlsx”) according to eval.language and edit the label columns within the excel sheets.
Compare Scenarios
Choose scenarios/files_prefixes to compare:
[scenario_comparison] active = true scenarios = ["Scenario_mix_pellet_heat_pump"] files_prefixes = ["DEZ_Baseline", "DEZ_Beraterkampagne"]
Select plots to create:
[scenario_comparison] compare_fulfillment = false compare_emissions = false compare_energy_demand = false compare_optimality = false compare_opex = false compare_total_expenses = false compare_total_effort = false compare_heating_systems_distribution = false compare_hs_knowledge = false compare_obstacles_counts = true compare_obstacles_step = -1 compare_attributes = true
Execute python Built_plots.py