pymrio.load

pymrio.load(path, include_core=True, path_in_arc='')

Loads a IOSystem or Extension previously saved with pymrio

This function can be used to load a IOSystem or Extension specified in a metadata file (as defined in DEFAULT_FILE_NAMES[‘filepara’]: metadata.json)

The format of DataFrames (tables) are determined by the file extension. Avaialble formats are defined in constant.py - STORAGE_FORMAT. If using the save/save_all functionality from the mriosystem it just works.

Parameters
  • path (pathlib.Path or string) – Path or path with para file name for the data to load. This must either point to the directory containing the uncompressed data or the location of a compressed zip file with the data. In the later case the parameter ‘path_in_arc’ need to be specific to further indicate the location of the data in the compressed file.

  • include_core (boolean, optional) – If False the load method does not include A, L and Z matrix. This significantly reduces the required memory if the purpose is only to analyse the results calculated beforehand.

  • path_in_arc (string, optional) – Path to the data in the zip file (where the fileparameters file is located). path_in_arc must be given without leading dot and slash; thus to point to the data in the root of the compressed file pass ‘’, for data in e.g. the folder ‘emissions’ pass ‘emissions/’. Only used if parameter ‘path’ points to an compressed zip file.

Returns

  • IOSystem or Extension class depending on systemtype in the json file

  • None in case of errors