USEPA / IO-Model-Builder

Create environmentally extended input-output models
Other
13 stars 8 forks source link

Should we use metadata files for elementary flows? #1

Closed msrocka closed 7 years ago

msrocka commented 8 years ago

Metadata files of elementary flows are currently not used as all information about a flow is currently also available in the satellite tables. However, it could be useful to extract fields like CAS number, flow UUID, chemical formula, description, etc. from the satellite tables and add them to a metadata file.

This could be also useful when we want to create links to other product flows via the satellite matrix.

WesIngwersen commented 7 years ago

When building the JSON-LD files, the category and subcategory and CAS numbers should be gathered from the satellite table file(s) and used. Currently this is not happening.

msrocka commented 7 years ago

The issue with the CAS number should be solved now (see commit 2bfa9d4). The elementary flow categories are mapped with the compartment_meta_data.csv) file. The direction field in this table indicates the direction of the elementary flow in the process when exporting to JSON-LD (this information is not available in the satellite tables). The default compartment mapping can be replaced when creating a model and unknown compartments should throw an validation error.

However, if the compartment cannot be mapped (like soil/groundwater in the USEEIO model) the flow is exported without a compartment in the export, and even worse, the exchanges are currently not created in the process (because the flow direction is unclear). A quick fix would be to create the missing compartments and set the flow direction to a default (probably output); but we need a better solution for this.

WesIngwersen commented 7 years ago

Thanks, I did't realize that the compartments metadata file could be changed in the call of the model function. This should fix the problem I was having.