marmot.metamanagers.read_metadata.MetaData#

class MetaData(HDF5_folder_in: pathlib.Path, read_from_formatted_h5: bool = True, region_mapping: pandas.core.frame.DataFrame = Empty DataFrame Columns: [] Index: [], partition_number: int = 0)[source]#

Bases: object

Handle the retrieval of metadata from the formatted or original solution h5 files.

Parameters
  • HDF5_folder_in (Path) – Folder containing h5 file.

  • read_from_formatted_h5 (bool, optional) – Boolean for whether the metadata is being read from the formatted hdf5 file or the original PLEXOS solution file. Defaults to True.

  • region_mapping (pd.DataFrame, optional) – DataFrame of extra regions to map. Defaults to pd.DataFrame().

  • partition_number (int, optional) – Which temporal partition of h5 data to retrieve metadata from in the formatted h5 file. Defaults to 0.

Methods

close_h5()

Closes h5 file open in memory.

generator_category(filename)

Generator categories mapping.

generator_node(filename)

generator node mapping.

generator_storage(filename)

Generator Storage mapping.

interface_lines(filename)

Interface to lines mapping.

lines(filename)

Line objects.

node_region(filename)

Node Region mapping.

node_zone(filename)

Node zone mapping.

region_batteries(filename)

Region batteries mapping.

region_exporting_lines(filename)

Region exporting lines mapping.

region_generator_category(filename)

Region generators category mapping.

region_generators(filename)

Region generators mapping.

region_importing_lines(filename)

Region importing lines mapping.

region_interregionallines(filename)

Region inter-regional lines mapping.

region_intraregionallines(filename)

Region intra-regional lines mapping.

region_lines(filename)

Region to Lines mapping.

region_regions(filename)

Region-region mapping.

regions(filename)

Region objects.

reserves(filename)

Reserves objects.

reserves_generators(filename)

Reserves to generators mapping.

reserves_regions(filename)

Reserves to regions mapping.

reserves_zones(filename)

Reserves to zones mapping.

zone_exporting_lines(filename)

Zone exporting lines mapping.

zone_generator_category(filename)

Zone generators category mapping.

zone_generators(filename)

Zone generators mapping.

zone_importing_lines(filename)

Zone importing lines mapping.

zone_interzonallines(filename)

Zone inter-zonal lines mapping.

zone_intrazonallines(filename)

Zone intra-zonal lines mapping.

zone_lines(filename)

Zone to Lines mapping.

zones(filename)

Zone objects.

Attributes

filename

The name of the h5 file to retrieve data from.

h5_data

h5 file loaded in memory.

h5_filepath

The path to the h5 file

filename: str = None#

The name of the h5 file to retrieve data from.

h5_filepath: pathlib.Path = None#

The path to the h5 file

h5_data: h5py._hl.files.File = None#

h5 file loaded in memory.

classmethod close_h5() None[source]#

Closes h5 file open in memory.

generator_category(filename: str) pandas.core.frame.DataFrame[source]#

Generator categories mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

region_generators(filename: str) pandas.core.frame.DataFrame[source]#

Region generators mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

region_generator_category(filename: str) pandas.core.frame.DataFrame[source]#

Region generators category mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

zone_generators(filename: str) pandas.core.frame.DataFrame[source]#

Zone generators mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

zone_generator_category(filename: str) pandas.core.frame.DataFrame[source]#

Zone generators category mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

region_batteries(filename: str) pandas.core.frame.DataFrame[source]#

Region batteries mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

generator_storage(filename: str) pandas.core.frame.DataFrame[source]#

Generator Storage mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

node_region(filename: str) pandas.core.frame.DataFrame[source]#

Node Region mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

node_zone(filename: str) pandas.core.frame.DataFrame[source]#

Node zone mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

generator_node(filename: str) pandas.core.frame.DataFrame[source]#

generator node mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

regions(filename: str) pandas.core.frame.DataFrame[source]#

Region objects.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

zones(filename: str) pandas.core.frame.DataFrame[source]#

Zone objects.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

lines(filename: str) pandas.core.frame.DataFrame[source]#

Line objects.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

region_regions(filename: str) pandas.core.frame.DataFrame[source]#

Region-region mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

region_interregionallines(filename: str) pandas.core.frame.DataFrame[source]#

Region inter-regional lines mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

region_intraregionallines(filename: str) pandas.core.frame.DataFrame[source]#

Region intra-regional lines mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

region_exporting_lines(filename: str) pandas.core.frame.DataFrame[source]#

Region exporting lines mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

region_importing_lines(filename: str) pandas.core.frame.DataFrame[source]#

Region importing lines mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

zone_interzonallines(filename: str) pandas.core.frame.DataFrame[source]#

Zone inter-zonal lines mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

zone_intrazonallines(filename: str) pandas.core.frame.DataFrame[source]#

Zone intra-zonal lines mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

zone_exporting_lines(filename: str) pandas.core.frame.DataFrame[source]#

Zone exporting lines mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

zone_importing_lines(filename: str) pandas.core.frame.DataFrame[source]#

Zone importing lines mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

interface_lines(filename: str) pandas.core.frame.DataFrame[source]#

Interface to lines mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

region_lines(filename: str) pandas.core.frame.DataFrame[source]#

Region to Lines mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

zone_lines(filename: str) pandas.core.frame.DataFrame[source]#

Zone to Lines mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

reserves(filename: str) pandas.core.frame.DataFrame[source]#

Reserves objects.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

reserves_generators(filename: str) pandas.core.frame.DataFrame[source]#

Reserves to generators mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

reserves_regions(filename: str) pandas.core.frame.DataFrame[source]#

Reserves to regions mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.

reserves_zones(filename: str) pandas.core.frame.DataFrame[source]#

Reserves to zones mapping.

Parameters

filename (str) – The name of the h5 file to retreive data from. If retreiving from fromatted h5 file, just pass scenario name.