IndEcol / IE_data_commons

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

Can TABLE data files with a dedicated units sheet have denominators? #17

Closed nheeren closed 5 years ago

nheeren commented 5 years ago

I am not sure how a data contributor would be able to contribute nominator and denominator units.

Until I receive further feedback on this issue, I am assuming the Unit sheet in 1_F_WIO_Japan_Nakamura_Kondo_2002.xlsx contains only a nominator, i.e. denominator is always '1'.

stefanpauliuk commented 5 years ago

For the file 1_F_WIO... this issue has now been resolved: the file has both, a unit_nominator and unit_denominator sheet.

General: We split units into unit nominators and denominators to drastically reduce the number of different units we have to deal with. E.g., Mt/yr is split into Mt and yr. If somebody would enter now a dataset of electricity generation in MWh/d (MWh per day), no new unit needs to be created, because MWh (nominator) and d (denominator) are already defined.

nheeren commented 5 years ago

Half-serious, half-teasing question: What happens if someone uses a combined unit like MWh/(d*kg)?

nheeren commented 5 years ago

Another question: Is it now a requirement for data contributors to provide both sheets (can I assume both have to exist) or can there be only one sheet?

stefanpauliuk commented 5 years ago

For compound units such as MWh/(dkg) or kWh/(m2a) we would then define nominator = MWh and kWh, and denominator is dkg and m2a.

To reduce the number of options, I suggest that either TABLE units are GLOBAL, then both nominator and denominator are global OR TABLE, then both have to be table.

nheeren commented 5 years ago

For compound units such as MWh/(dkg) or kWh/(m2a) we would then define nominator = MWh and kWh, and denominator is dkg and m2a.

That means a new unit would need to be added to the units table?

To reduce the number of options, I suggest that either TABLE units are GLOBAL, then both nominator and denominator are global OR TABLE, then both have to be table.

Fully agree

konstantinstadler commented 5 years ago

Hi you both Just b/c I sometimes get these messages: did you check https://pint.readthedocs.io It also allows to define own units if necessary. Perhaps it helps to not inventing the wheel again in a square shape...

stefanpauliuk commented 5 years ago

Thanks Konstantin for the link! Will check this out next time I have a unit-messy calculation to do.

For the compound units: Yes, with the current setup one needs to define d.kg or m2.a. as separate units.