message_ix_models.tools.iea.web.IEA_EWEB
- class message_ix_models.tools.iea.web.IEA_EWEB(source, source_kw)[source]
Bases:
ExoDataSourceProvider of exogenous data from the IEA Extended World Energy Balances.
To use data from this source, call
exo_data.prepare_computer()with thesource_kw:“provider”: Either “IEA” or “OECD”. See
FILES.“edition”: one of “2021”, “2022”, or “2023”. See
FILES.
The returned data have the extra dimensions “product” and “flow”, and are not aggregated by year.
Example
>>> keys = prepare_computer( ... context, ... computer, ... source="IEA_EWEB", ... source_kw=dict( ... provider="OECD", edition="2022", product="CHARCOAL", flow="RESIDENT" ... ), ... ) >>> result = computer.get(keys[0])
Methods
__init__(source, source_kw)Initialize the data source.
raise_on_extra_kw(kwargs)Helper for subclasses to handle the source_kw argument.
transform(c, base_key)Aggregate only; do not interpolate on "y".
Attributes
Trueiftransform()should aggregate data on the \(n\) dimension.Optional additional dimensions for the returned
Key/Quantity.Identifier for this particular source.
Trueiftransform()should interpolate data on the \(y\) dimension.- aggregate: bool = True
Trueiftransform()should aggregate data on the \(n\) dimension.
- extra_dims: Tuple[str, ...] = ('product', 'flow')
Optional additional dimensions for the returned
Key/Quantity. If not set by__init__(), the dimensions are \((n, y)\).
- interpolate: bool = True
Trueiftransform()should interpolate data on the \(y\) dimension.
- name: str = ''
Optional name for the returned
Key/Quantity. If not set by__init__(), then the “measure” keyword is used.
- raise_on_extra_kw(kwargs) None
Helper for subclasses to handle the source_kw argument.
Store
aggregateandinterpolate, if they remain in kwargs.Raise
ValueErrorif there are any other, unhandled keyword arguments in kwargs.
- transform(c: genno.Computer, base_key: genno.Key) genno.Key[source]
Aggregate only; do not interpolate on “y”.