accessing area type and region vocabularies #397
Replies: 3 comments 2 replies
-
The html is not the source, though I’m not CC sure where the actual source is. I’m sure someone else can answer your question directly, but there are at least a couple cf-checkers available: https://github.com/cf-convention/cf-convention.github.io/blob/main/software.md I’d take a look at their code to see where they are getting the vocabularies. |
Beta Was this translation helpful? Give feedback.
-
Nice lead, @PythonCHB. In the checker the paths are given as: STANDARDNAME = 'http://cfconventions.org/Data/cf-standard-names/current/src/cf-standard-name-table.xml' And the xml's are fairly simply structured. For example, here's the beginning of the area types xml:
So I suppose, you just need to ingest the xml. Have I got that right? Do we all agree that those xml's are the reference controlled vocabularies? |
Beta Was this translation helpful? Give feedback.
-
I'm curious why "xml" is perferred to "json" as a format. I've always found the json files easier for humans to read and also trivial to ingest using python. I suppose there is some historical reason. |
Beta Was this translation helpful? Give feedback.
-
Question
From a code, say written in python, can one directly read the list of area types (found here) or the list of regions (found here)? I see they are displayed as html files, but is that built on a reference source, or is that the reference source.
We're writing a code that needs to check the input provided by a user against the CF controlled vocabularies.
I guess I'd be curious also how one would check whether a standard_name provided by a user is in the CF list of standard names.
Beta Was this translation helpful? Give feedback.
All reactions