datasets
- DSM_cts_ind
- calculate_dlr
- ch4_prod
- ch4_storages
- chp_etrago
- database
- electrical_neighbours
- electricity_demand_etrago
- era5
- etrago_helpers
- etrago_setup
- fill_etrago_gen
- fix_ehv_subnetworks
- gas_areas
- gas_grid
- generate_voronoi
- heat_demand_europe
- industrial_gas_demand
- mastr
- mv_grid_districts
- renewable_feedin
- sanity_checks
- scenario_capacities
- society_prognosis
- substation_voronoi
- tyndp
- vg250_mv_grid_districts
- zensus_mv_grid_districts
- zensus_vg250
- chp
- data_bundle
- demandregio
- district_heating_areas
- electricity_demand
- electricity_demand_timeseries
- emobility
- gas_neighbours
- heat_demand
- heat_demand_timeseries
- heat_etrago
- heat_supply
- hydrogen_etrago
- industrial_sites
- industry
- loadarea
- low_flex_scenario
- osm
- osm_buildings_streets
- osmtgmod
- power_etrago
- power_plants
- pypsaeursec
- re_potential_areas
- saltcavern
- scenario_parameters
- storages
- storages_etrago
- substation
- vg250
- zensus
The API for configuring datasets.
- class Dataset(name: 'str', version: 'str', dependencies: 'Dependencies' = (), tasks: 'Tasks' = ())[source]
Bases:
object- dependencies: Dependencies = ()
The first task(s) of this
Datasetwill be marked as downstream of any of the listed dependencies. In case of bareTask, a direct link will be created whereas for aDatasetthe link will be made to all of its last tasks.
- name: str
The name of the Dataset
- register()[source]
Register dataset sources and targets in a single transaction. Only writes if sources or targets have changed. Creates table if it doesn’t exist yet.
- sources: DatasetSources
The sources used by the datasets. Could be tables, files and urls
- targets: DatasetTargets
The targets created by the datasets. Could be tables and files
- tasks: Tasks = ()
The tasks of this
Dataset. ATaskGraphwill automatically be converted toTasks_.
- version: str
The
Dataset’s version. Can be anything from a simple semantic versioning string like “2.1.3”, to a more complex string, like for example “2021-01-01.schleswig-holstein.0” for OpenStreetMap data. Note that the latter encodes theDataset’s date, region and a sequential number in case the data changes without the date or region changing, for example due to implementation changes.
- class DatasetSources(tables: 'Dict[str, str]' = <factory>, files: 'Dict[str, str]' = <factory>, urls: 'Dict[str, str]' = <factory>)[source]
Bases:
object- files: Dict[str, str]
- tables: Dict[str, str]
- urls: Dict[str, str]
- class DatasetTargets(tables: 'Dict[str, str]' = <factory>, files: 'Dict[str, str]' = <factory>)[source]
Bases:
object- files: Dict[str, str]
- tables: Dict[str, str]
- Dependencies
A dataset can depend on other datasets or the tasks of other datasets.
alias of
Iterable[Dataset|Callable[[],None] |BaseOperator]
- Task
A
Taskis an AirflowOperatoror anyCallabletaking no arguments and returningNone.Callableswill be converted toOperatorsby wrapping them in aPythonOperatorand setting thetask_idto theCallable’s__name__, with underscores replaced with hyphens. If theCallable’s __module__ attribute contains the string"egon.data.datasets.", thetask_idis also prefixed with the module name, followed by a dot and with"egon.data.datasets."removed.alias of
Callable[[],None] |BaseOperator
- TaskGraph
A graph of tasks is, in its simplest form, just a single node, i.e. a single
Task. More complex graphs can be specified by nestingsetsandtuplesofTaskGraphs. A set ofTaskGraphsmeans that they are unordered and can be executed in parallel. Atuplespecifies an implicit ordering so atupleofTaskGraphswill be executed sequentially in the given order.alias of
Callable[[],None] |BaseOperator|Set[TaskGraph] |Tuple[TaskGraph, …]
- Tasks
A type alias to help specifying that something can be an explicit
Tasks_object or aTaskGraph, i.e. something that can be converted toTasks_.alias of
Tasks_|Callable[[],None] |BaseOperator|Set[TaskGraph] |Tuple[TaskGraph, …]
- class Tasks_(graph: 'TaskGraph')[source]
Bases:
dict- first: Set[Callable[[], None] | BaseOperator]
- graph: Callable[[], None] | BaseOperator | Set[TaskGraph] | Tuple[TaskGraph, ...] = ()
- last: Set[Callable[[], None] | BaseOperator]
- export_dataset_io_to_json(output_path: str = 'dataset_io_overview.json') None[source]
Export all sources and targets of datasets to a JSON file. :Parameters: output_path (str) – Path to the output JSON file.
- load_sources_and_targets(name: str) tuple[DatasetSources, DatasetTargets][source]
Load DatasetSources and DatasetTargets from dataset_sources_targets table.
- Parameters:
name (str) (Name of the dataset.)
- Returns:
Tuple[DatasetSources, DatasetTargets]