Enable different datasets as input to OQT #4
Labels
enhancement
New feature or request
priority:high
Should be addressed as soon as possible (next release)
Milestone
Currently it is only possible to use the custom regions as input dataset. For those regions the feature ids is the unique identifier and also the parameter name. E.g.
oqt create-indicator --dataset regions --feature-id 1
Expected is that it should be possible to choose a different dataset like GADM or ISEA (hexagonal cells).
For GADM there are multiple unique IDs such as country ISO3 codes (https://gadm.org/metadata.html). In addition it would be quite nice to be able to use english country names as identifier as well.
Solution: I propose to use the parameters 'dataset' and 'id' to identify single features of a specific dataset. Every dataset will have a default unique id field associated with it (fid in case of the oqt-regions, GID_0 (ISO3) in case of GADM). This mapping could be defined as dictionary in
definitions.py
. E.g.oqt create-indicator --dataset gadm --id deu
In addition we could provide a way to change the id field which is used by OQT (E.g. to NAME_0 in case of GADM). This could be archived by either adding a new option to CLI (
oqt create-indicator --dataset gadm --id-field NAME_0 --id Germany
) or changing the syntax of the given id (create-indicator --dataset gadm -id "NAME_0:Germany"
).The text was updated successfully, but these errors were encountered: