-
Notifications
You must be signed in to change notification settings - Fork 4
Units
Liz Dobbins edited this page Jul 16, 2024
·
2 revisions
To add some notation of units to the metadata.json file.
There are standards for units - but several of them
- units should be machine readable, so we need a standard
- the standard should include the derived units we need to express
- the standard should be acceptable to tools/languages that will want to read the data
- Python and R
- collaborators like Catalyst
Things to look at:
-
UDUNITS2
-
https://cran.r-project.org/web/packages/units/vignettes/measurement_units_in_R.html says works in R
- " udunits on the other hand is the units standard of choice by the climate science community, and is adopted by the CF (Climate and Forecast) conventions, which mostly uses NetCDF"
- there are python language packages too
-
https://cran.r-project.org/web/packages/units/vignettes/measurement_units_in_R.html says works in R
-
pint
- is python for sure but R = ??
- used by Catalyst and Datacette. Well, maybe not
-
UCUM Unified Code for Units of Measure is maybe dead?
- that R ref says "... links seem to be dead. UCUM is the preferred encoding for standards from the Open Geospatial Consortium"
- https://cf-xarray.readthedocs.io/en/latest/units.html extends pint to be like UDUNITS1
- https://github.com/frictionlessdata/specs/issues/216 and also https://github.com/frictionlessdata/specs/issues/537
-
https://www.qudt.org/doc/DOC_VOCAB-UNITS.html
- QUDT is a non-profit charity that is derived from the NASA Exploration Initiatives Ontology Models (NExIOM) project.
- it is under active development
- java libraries. https://github.com/eigendude/pyqudt is 4 years old. But it is RDF and JSON so we might be able to work something out.
-
https://github.com/annotated-types/annotated-types?tab=readme-ov-file#unit that would annotate a value
- "Please note that annotated_types itself makes no attempt to parse or validate the unit string in any way. That is left entirely to downstream libraries, such as pint or astropy.units."
Because the choice of standard was unclear, Ian just picked one from R