Skip to content

Commit

Permalink
docs: remove sec_cats from documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mikapfl committed Oct 22, 2024
1 parent 61ea33e commit fcd7d63
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
20 changes: 10 additions & 10 deletions docs/source/data_format/data_format_details.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ For all dimensions, defined names have to be used and additional metadata about
dimensions is stored in the datasets `attrs`.
The dimensions are:

| dimension | dimension key | req. | notes | attrs |
|-----------------|-----------------------|------|---------------------------|---------------------------------------|
| time | time || for periods, the start | |
| area | area (<category-set>) || pre-defined category sets | `'area': 'area (<category set>)'` |
| category | category (<c-set>) | | primary category | `'cat': 'category (<c-set>)'` |
| sec. categories | <type> (<c-set>) | | there can be multiple | `'sec_cats': ['<type> (<c-set>)', …]` |
| scenario | scenario (<c-set>) | | | `'scen': 'scenario (<c-set>)'` |
| provenance | provenance | | values from fixed set | |
| model | model | | | |
| source | source || a short source identifier | |
| dimension | dimension key | req. | notes | attrs |
|-----------------|-------------------------|------|---------------------------|-----------------------------------|
| `time` | `time` || for periods, the start | |
| `area` | `area (<category-set>)` || pre-defined category sets | `'area': 'area (<category set>)'` |
| `category` | `category (<c-set>)` | | primary category | `'cat': 'category (<c-set>)'` |
| sec. categories | `<type> (<c-set>)` | | there can be multiple | |
| `scenario` | `scenario (<c-set>)` | | | `'scen': 'scenario (<c-set>)'` |
| `provenance` | `provenance` | | values from fixed set | |
| `model` | `model` | | | |
| `source` | `source` || a short source identifier | |

For some dimensions, the meaning of the data is directly visible from the data type
(`time` uses an xarray datetime data type) or the values come from a pre-defined list
Expand Down
10 changes: 3 additions & 7 deletions docs/source/data_format/data_format_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,6 @@ opulent = xr.Dataset(
"entity_terminology": "primap2",
"area": "area (ISO3)",
"cat": "category (IPCC 2006)",
"sec_cats": ["animal (FAOSTAT)", "product (FAOSTAT)"],
"scen": "scenario (FAOSTAT)",
"references": "doi:10.1012",
"rights": "Use however you want.",
Expand Down Expand Up @@ -205,11 +204,8 @@ Compared to the minimal example, this data set has a lot more to unpack:
specific set of
categories given in parentheses and with appropriate metadata in the `attrs`.
The `scenario` is a standard dimension, and the metadata in `attrs` is given using
the `scen` key. The `animal` and `product` dimensions are nonstandard, and are
included in the
secondary categories at `attrs['sec_cats']`. Note that `sec_cats` contains a list, so
that multiple nonstandard dimensions can be included if needed.
* There is also s coordinate which is not defining a dimensions, `category names`. It
the `scen` key. The `animal` and `product` dimensions are nonstandard.
* There is also a coordinate which is not defining a dimension, `category names`. It
gives additional information about categories, which can be helpful for humans
trying to make sense of the category codes without looking them up. Note that
because this coordinate is not used as an index for a dimension, the category
Expand All @@ -218,7 +214,7 @@ Compared to the minimal example, this data set has a lot more to unpack:
the population data does not use all dimensions. For each data variable, only the
dimensions which make sense have to be used.
* In the `attrs`, the terminology for the entities is explicitly defined, so that the
meaning of the entity attributes is unambigously defined.
meaning of the entity attributes is unambiguously defined.
* In the `attrs`, additional metadata useful for humans is included: citable
`references`, usage `rights`, a descriptive `title`, a long-form `comment`,
an email address to `contact` for questions about the data set, and the `publication_date`.
Expand Down
3 changes: 0 additions & 3 deletions docs/source/data_format/interchange_format_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ They are listed as secondary columns in the metadata dict.
Column names correspond to the dimension key of the xarray format, i.e. they contain
the terminology in parentheses (e.g. `area (ISO3)`).

Additional columns are currently not possible, but the option will be added
in a future release ([#25](https://github.com/pik-primap/primap2/issues/25)).

The metadata dict has an `attrs` entry, which corresponds to the `attrs` dict of the
xarray format (see [Data format details](data_format_details.md)).
Additionally, the metadata dict contains information on the `dimensions` of the
Expand Down

0 comments on commit fcd7d63

Please sign in to comment.