message_ix_models.model.transport.files.ExogenousDataFile
- class message_ix_models.model.transport.files.ExogenousDataFile(*, name: str, units: str, key: KeyLike | None = None, dims: tuple[str, ...] | None = None, path: str | tuple[str, ...] | None = None, description: str | None = None, required: bool = True)[source]
Bases:
objectExogenous/input data for MESSAGEix-Transport expected in a file.
Todo
Generate documentation (docstrings or snippets) in reStructuredText format.
Accept an argument that sets
dfddirectly; skip handling other arguments.Annotate certain dimensions as optional; expand
add_tasks()to automatically handle insertion of these dimensions.Merge with, or make a subclass of,
ExoData.
- Parameters:
name (
str) – Name of the data flow.units (
str) – Units for observations in the data flow.key (
KeyLike, optional) – Key at which the data from the file will be present in aComputer.path (
strortupleofstr, optional) – Path at which the file is located. If not supplied,pathis constructed from key, dims, and the tag “exo”.description (
str, optional) – Human-readable description of the data flow, including any notes about required properties or contents or methods used to handle the data.required (
bool, optional) – IfTrue(the default), the file must be present for the build to succeed.
- __init__(*, name: str, units: str, key: KeyLike | None = None, dims: tuple[str, ...] | None = None, path: str | tuple[str, ...] | None = None, description: str | None = None, required: bool = True)[source]
Methods
__init__(*, name, units[, key, dims, path, ...])add_tasks(c, *args, context)Prepare c to read data from a file like
path.Generate a CSV template file.
Attributes
genno.Key, including preferred dimensions.Path fragment for the location of a file containing the data.
Trueif the data must be present fortransport.build.main().Preferred units.
sdmx.Dataflowdescribing the input data flow.- add_tasks(c: genno.Computer, *args, context: Context) tuple[KeyLike, ...][source]
Prepare c to read data from a file like
path.
- df: sdmx.model.common.BaseDataflow
sdmx.Dataflowdescribing the input data flow.
- property path: Path
Path fragment for the location of a file containing the data.
- property required: bool
Trueif the data must be present fortransport.build.main().