IndEcol / IE_data_commons

Code and documentation for a commons of structured industrial ecology data
MIT License
23 stars 2 forks source link

How to insert correspondences between classifications? #18

Open stefanpauliuk opened 5 years ago

stefanpauliuk commented 5 years ago

Correspondence tables contain info about which classification items correspond to which ones in another classification. There can be 1:1, n:1, and 1:n correspondences and a mix thereof.

In the IEDC, they could be stored in two new correspondence_definition and correspondence_items tables, or a new data type 7_CT (correspondence table), with a simple data model: aspect1: First classification, aspect2: second classification.

Additional correspondence properties are:

symmetric | Can be used in both directions class1_all | All classification 1 items are covered class2_all | All classification 2 items are covered one_to_one | Not 1:1 correspondence between classifications one_to_n | Not 1:n correspondence between classifications (disaggregation from class1 to class2) n_to_one | n:1 correspondence between classifications (aggregation from class 1 to class 2)

Those can be stored in a Python dictionary under reserve1 in datasets, if we go for the 7_CT_option, else as separate columns in correspondence.definitions.