Code reference¶
Utilities for sdmx
.
Functions
|
Annotate the obj with information about how it was generated. |
|
Helper function for making |
|
Read or adapt SDMX-CSV from path. |
- transport_data.util.sdmx.anno_generated(obj: sdmx.model.common.AnnotableArtefact) None [source]¶
Annotate the obj with information about how it was generated.
- transport_data.util.sdmx.make_obs(row: pd.Series, dsd: sdmx.model.v21.DataStructureDefinition) sdmx.model.v21.Observation [source]¶
Helper function for making
sdmx.model.Observation
objects.
- transport_data.util.sdmx.read_csv(path: pathlib.Path, structure: sdmx.model.v30.Dataflow | sdmx.model.v30.DataStructureDefinition, adapt: dict | None = None) sdmx.message.DataMessage [source]¶
Read or adapt SDMX-CSV from path.
- Parameters:
path – A file in SDMX-CSV or CSV format.
structure – Data flow or data structure describing the contents of path.
adapt – Keyword arguments to
CSVAdapter
. If given, the contents of path are adapted from a ‘simplified’ or ‘reduced’ CSV format to SDMX-CSV on-the-fly. See the class documentation for details.
Classes
|
Adapt CSV content from path into SDMX-CSV. |