deflex.get_converter_balance

deflex.get_converter_balance(results, cat=None, tag=None, subtag=None, region=None)[source]

Get the balance around the converters of the system.

The converters can be restricted by the label fields (cat, tag, subtag, region). Only converters with the same label fields will be shown.

Parameters:
  • results (dict) – Deflex results dictionary.
  • cat (str) – Category of the buses.
  • tag (str) – Tag of the buses.
  • subtag (str) – Subtag of the buses.
  • region (str) – Region of the buses
Returns:

Return type:

pandas.DataFrame

Examples

>>> import deflex as dflx
>>> fn = dflx.fetch_test_files("de03_fictive.dflx")
>>> my_results = dflx.restore_results(fn)
>>> hc49 = get_converter_balance(
...     my_results, cat="power plant", tag="hard coal_049").sum()
>>> round(float((hc49["out"] / hc49["in"])), 2)
0.49