Skip to content

Commit

Permalink
Add STOCK DSD and constraint; expand descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Feb 21, 2021
1 parent 5f7a24b commit ae25f68
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion item/sdmx.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,22 @@ def generate() -> msg.StructureMessage:
DataStructureDefinition(id="PRICE_FUEL", **_annotate(_dimensions="FUEL")),
DataStructureDefinition(id="PRICE_POLLUTANT", **_annotate(_dimensions="POLLUTANT")),
DataStructureDefinition(
id="LOAD_FACTOR", **_annotate(_dimensions="SERVICE MODE VEHICLE")
id="LOAD_FACTOR",
description=(
"The current version of this structure does not distinguish by powertrain "
"technology. Implicitly TECHNOLOGY is 'ALL', so the observations measure "
"the average load factor across all powertrain technologies."
),
**_annotate(_dimensions="SERVICE MODE VEHICLE"),
),
DataStructureDefinition(
id="STOCK",
description=(
"The current version of this structure does not distinguish by FLEET. "
"Implicitly FLEET is 'ALL', so the observations measure the total of new "
"and used vehicles."
),
**_annotate(_dimensions="SERVICE MODE VEHICLE TECHNOLOGY"),
),
DataStructureDefinition(
id="HISTORICAL",
Expand Down Expand Up @@ -542,4 +557,13 @@ def generate() -> msg.StructureMessage:
role=_allowable,
**_annotate(_data_content_keys={"POLLUTANT": ["GHG"]}),
),
ContentConstraint(
id="STOCK",
description=(
"The current iTEM:STOCK data structure is only specified for road transport"
" vehicles. It excludes e.g. stock of aircraft or ships."
),
role=_allowable,
**_annotate(_data_content_keys={"MODE": ["ROAD"]}),
),
)

0 comments on commit ae25f68

Please sign in to comment.