Reading-eScience-Centre / pycovjson

Create CovJSON files from common scientific data formats
BSD 3-Clause "New" or "Revised" License
12 stars 7 forks source link

Support for categorical/flag variables (flag_values, flag_meanings) #27

Open letmaik opened 8 years ago

letmaik commented 8 years ago

The CF conventions support so-called flag variables which can be regarded as categorical variables. It would be good if this was supported.

The CovJSON specification has an example of a categorical parameter. To derive the category/flag labels from the flag_meanings attribute of the netCDF file, the typical way is to replace underscores with whitespace and uppercase each word. For example "outside_valid_range" would be the ID of the category, and the label would be "Outside Valid Range".