From aee77c039ac8e229a66c8b36c816db59d395e016 Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Fri, 20 Jan 2023 14:08:45 +0100 Subject: [PATCH 01/38] changed data source to database --- src/egon/data/datasets.yml | 7 --- .../heavy_duty_transport/__init__.py | 54 +++++++------------ .../emobility/heavy_duty_transport/data_io.py | 29 ++++------ 3 files changed, 28 insertions(+), 62 deletions(-) diff --git a/src/egon/data/datasets.yml b/src/egon/data/datasets.yml index 7916543d3..6b2ff4de5 100755 --- a/src/egon/data/datasets.yml +++ b/src/egon/data/datasets.yml @@ -1169,13 +1169,6 @@ mobility_hgv: file: "Jawe2020.csv" relevant_columns: ["DTV_SV_MobisSo_Q", "Koor_WGS84_E", "Koor_WGS84_N"] srid: 4326 - germany: - url: "https://raw.githubusercontent.com/isellsoap/deutschlandGeoJSON/main/1_deutschland/1_sehr_hoch.geo.json" - NUTS: - url: "https://daten.gdz.bkg.bund.de/produkte/vg/nuts250_1231/aktuell/nuts250_12-31.utm32s.shape.zip" - file: "nuts250_12-31.utm32s.shape.zip" - shp_file: "nuts250_12-31.utm32s.shape/nuts250_1231/250_NUTS1.shp" - NUTS_CODE: "DEF" tables: srid: 3035 srid_buses: 4326 diff --git a/src/egon/data/datasets/emobility/heavy_duty_transport/__init__.py b/src/egon/data/datasets/emobility/heavy_duty_transport/__init__.py index d93ab2703..efcaece25 100644 --- a/src/egon/data/datasets/emobility/heavy_duty_transport/__init__.py +++ b/src/egon/data/datasets/emobility/heavy_duty_transport/__init__.py @@ -7,8 +7,8 @@ **Contents of this module** * Creation of DB tables * Download and preprocessing of vehicle registration data from BAST -* Calculation of hydrogen demand based on a Voronoi distribution of counted truck - traffic among NUTS 3 regions. +* Calculation of hydrogen demand based on a Voronoi distribution of counted + truck traffic among NUTS 3 regions. * Write results to DB * Map demand to H2 buses and write to DB @@ -21,37 +21,38 @@ Assumptions can be changed within the *datasets.yml*. -In the context of the eGon project, it is assumed that e-trucks will be completely -hydrogen-powered and in both scenarios the hydrogen consumption is assumed to be -6.68 kgH2 per 100 km with an additional +In the context of the eGon project, it is assumed that e-trucks will be +completely hydrogen-powered and in both scenarios the hydrogen consumption is +assumed to be 6.68 kgH2 per 100 km with an additional [supply chain leakage rate of 0.5 %]( https://www.energy.gov/eere/fuelcells/doe-technical-targets-hydrogen-delivery). ### Scenario NEP C 2035 -The ramp-up figures are taken from [Scenario C 2035 Grid Development Plan 2021-2035]( +The ramp-up figures are taken from +[Scenario C 2035 Grid Development Plan 2021-2035]( https://www.netzentwicklungsplan.de/sites/default/files/paragraphs-files/ -NEP_2035_V2021_2_Entwurf_Teil1.pdf). According to this, 100,000 e-trucks are expected -in Germany in 2035, each covering an average of 100,000 km per year. In total this means -10 Billion km. +NEP_2035_V2021_2_Entwurf_Teil1.pdf). According to this, 100,000 e-trucks are +expected in Germany in 2035, each covering an average of 100,000 km per year. +In total this means 10 Billion km. ### Scenario eGon100RE -In the case of the eGon100RE scenario it is assumed that the HGV traffic is completely -hydrogen-powered. The total freight traffic with 40 Billion km is taken from the +In the case of the eGon100RE scenario it is assumed that the HGV traffic is +completely hydrogen-powered. The total freight traffic with 40 Billion km is +taken from the [BMWk Langfristszenarien GHG-emission free scenarios (SNF > 12 t zGG)]( https://www.langfristszenarien.de/enertile-explorer-wAssets/docs/ LFS3_Langbericht_Verkehr_final.pdf#page=17). ## Methodology -Using a Voronoi interpolation, the censuses of the BASt data is distributed according to -the area fractions of the Voronoi fields within each mv grid or any other geometries -like NUTS-3. +Using a Voronoi interpolation, the censuses of the BASt data is distributed +according to the area fractions of the Voronoi fields within each mv grid or +any other geometries like NUTS-3. """ from pathlib import Path import csv -import zipfile from loguru import logger import requests @@ -64,7 +65,7 @@ from egon.data.datasets.emobility.heavy_duty_transport.db_classes import ( EgonHeavyDutyTransportVoronoi, ) -from egon.data.datasets.emobility.heavy_duty_transport.h2_demand_distribution import ( +from egon.data.datasets.emobility.heavy_duty_transport.h2_demand_distribution import ( # noqa: E501 run_egon_truck, ) @@ -104,31 +105,12 @@ def download_hgv_data(): logger.debug("Downloaded BAST data.") - if not TESTMODE_OFF: - url = sources["NUTS"]["url"] - - r = requests.get(url, stream=True) - file = WORKING_DIR / sources["NUTS"]["file"] - - with open(file, "wb") as fd: - for chunk in r.iter_content(chunk_size=512): - fd.write(chunk) - - directory = WORKING_DIR / "_".join( - sources["NUTS"]["file"].split(".")[:-1] - ) - - with zipfile.ZipFile(file, "r") as zip_ref: - zip_ref.extractall(directory) - - logger.debug("Downloaded NUTS data.") - class HeavyDutyTransport(Dataset): def __init__(self, dependencies): super().__init__( name="HeavyDutyTransport", - version="0.0.1", + version="0.0.2.dev", dependencies=dependencies, tasks=( { diff --git a/src/egon/data/datasets/emobility/heavy_duty_transport/data_io.py b/src/egon/data/datasets/emobility/heavy_duty_transport/data_io.py index dc61d0660..2f9bec715 100644 --- a/src/egon/data/datasets/emobility/heavy_duty_transport/data_io.py +++ b/src/egon/data/datasets/emobility/heavy_duty_transport/data_io.py @@ -26,29 +26,20 @@ def get_data(): def boundary_gdf(): """ - Read in German Border from geo.json file. + Get outer boundary from database. """ - sources = DATASET_CFG["original_data"]["sources"] srid = DATASET_CFG["tables"]["srid"] - if TESTMODE_OFF: - gdf = gpd.read_file(sources["germany"]["url"]).to_crs(epsg=srid) - - logger.debug("Downloaded germany GeoJSON.") - else: - path = ( - WORKING_DIR - / "_".join(sources["NUTS"]["file"].split(".")[:-1]) - / sources["NUTS"]["shp_file"] - ) - - gdf = gpd.read_file(path).to_crs(epsg=srid) - - gdf = gdf.loc[gdf.NUTS_CODE == sources["NUTS"]["NUTS_CODE"]].dissolve() - - logger.debug("Loaded SH shape file.") + gdf = select_geodataframe( + """ + SELECT id, geometry FROM boundaries.vg250_lan + ORDER BY id + """, + geom_col="geometry", + index_col="id", + ).to_crs(epsg=srid) - return gdf + return gdf.dissolve() def bast_gdf(): From a2794faa73f6331cc7dc41c9e3515ac81df3d3ca Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Thu, 26 Jan 2023 16:25:17 +0100 Subject: [PATCH 02/38] fixed missing clipping for p_min_pu and p_max_pu --- src/egon/data/datasets/DSM_cts_ind.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/egon/data/datasets/DSM_cts_ind.py b/src/egon/data/datasets/DSM_cts_ind.py index 06a791181..5fbc5dd72 100644 --- a/src/egon/data/datasets/DSM_cts_ind.py +++ b/src/egon/data/datasets/DSM_cts_ind.py @@ -526,14 +526,14 @@ def calculate_potentials(s_flex, s_util, s_inc, s_dec, delta_t, dsm): p_max = scheduled_load.copy() for index, liste in scheduled_load.items(): lamb = lam.loc[index] - p_max.loc[index] = [lamb * s_inc - item for item in liste] + p_max.loc[index] = [max(0, lamb * s_inc - item) for item in liste] # P_min p_min = scheduled_load.copy() for index, liste in scheduled_load.items(): lamb = lam.loc[index] - p_min.loc[index] = [-(item - lamb * s_dec) for item in liste] + p_min.loc[index] = [min(0, -(item - lamb * s_dec)) for item in liste] # calculation of E_max and E_min @@ -959,8 +959,10 @@ def delete_dsm_entries(carrier): # buses - sql = f"""DELETE FROM {targets["bus"]["schema"]}.{targets["bus"]["table"]} b - WHERE (b.carrier LIKE '{carrier}');""" + sql = f""" + DELETE FROM {targets["bus"]["schema"]}.{targets["bus"]["table"]} b + WHERE (b.carrier LIKE '{carrier}'); + """ db.execute_sql(sql) # links From ad5a7756a8df6a5e9f62cfa2a5aaa3270e585d59 Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Thu, 26 Jan 2023 16:30:23 +0100 Subject: [PATCH 03/38] minor formatting --- src/egon/data/datasets/DSM_cts_ind.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/egon/data/datasets/DSM_cts_ind.py b/src/egon/data/datasets/DSM_cts_ind.py index 5fbc5dd72..1a1b60791 100644 --- a/src/egon/data/datasets/DSM_cts_ind.py +++ b/src/egon/data/datasets/DSM_cts_ind.py @@ -532,7 +532,6 @@ def calculate_potentials(s_flex, s_util, s_inc, s_dec, delta_t, dsm): p_min = scheduled_load.copy() for index, liste in scheduled_load.items(): lamb = lam.loc[index] - p_min.loc[index] = [min(0, -(item - lamb * s_dec)) for item in liste] # calculation of E_max and E_min From a8cf4fecc0323e9e7ef18fb13a1318d07e69c8b1 Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Fri, 27 Jan 2023 18:30:29 +0100 Subject: [PATCH 04/38] Correct dataset name --- src/egon/data/airflow/dags/pipeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/egon/data/airflow/dags/pipeline.py b/src/egon/data/airflow/dags/pipeline.py index f79d7356f..adcc75a76 100755 --- a/src/egon/data/airflow/dags/pipeline.py +++ b/src/egon/data/airflow/dags/pipeline.py @@ -41,7 +41,7 @@ from egon.data.datasets.fill_etrago_gen import Egon_etrago_gen from egon.data.datasets.fix_ehv_subnetworks import FixEhvSubnetworks from egon.data.datasets.gas_areas import GasAreaseGon100RE, GasAreaseGon2035 -from egon.data.datasets.gas_grid import GasNodesandPipes +from egon.data.datasets.gas_grid import GasNodesAndPipes from egon.data.datasets.gas_neighbours import GasNeighbours from egon.data.datasets.heat_demand import HeatDemandImport from egon.data.datasets.heat_demand_europe import HeatDemandEurope @@ -359,7 +359,7 @@ ) # Import gas grid - gas_grid_insert_data = GasNodesandPipes( + gas_grid_insert_data = GasNodesAndPipes( dependencies=[ data_bundle, foreign_lines, From ee11ee32fb7eaa996f531844bbbe30ff62451406 Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Fri, 27 Jan 2023 18:32:29 +0100 Subject: [PATCH 05/38] Correct dataset name and improve gas_grid.py module documentation --- src/egon/data/datasets/gas_grid.py | 185 +++++++++++++++++++++++------ 1 file changed, 149 insertions(+), 36 deletions(-) diff --git a/src/egon/data/datasets/gas_grid.py b/src/egon/data/datasets/gas_grid.py index 0f87fb5df..12230d415 100755 --- a/src/egon/data/datasets/gas_grid.py +++ b/src/egon/data/datasets/gas_grid.py @@ -1,6 +1,25 @@ # -*- coding: utf-8 -*- """ -The central module containing all code dealing with importing data from SciGRID_gas IGGIELGN data +The module containing code aiming to insert the methane grid into the database + +The central module containing all code dealing with importing data from +SciGRID_gas (IGGIELGN dataset) and inserting the corresponding data, CH4 +buses and links (representing pipelines) into the database for the +scenarios eGon2035 and eGon100RE. + +Dependencies (pipeline) +======================= +* :py:class:`DataBundle ` +* :py:class:`ElectricalNeighbours ` +* :py:class:`Osmtgmod ` +* :py:class:`ScenarioParameters ` +* :py:class:`EtragoSetup ` (more specifically the :func:`create_tables ` task) + +Resulting tables +================ +* :py:class:`grid.egon_etrago_bus ` is extended +* :py:class:`grid.egon_etrago_link ` is extended + """ from pathlib import Path from urllib.request import urlretrieve @@ -23,11 +42,26 @@ from egon.data.datasets.scenario_parameters import get_sector_parameters -class GasNodesandPipes(Dataset): +class GasNodesAndPipes(Dataset): + """Insert the CH4 buses and links into the database + + Insert the CH4 buses and links, which for the case of gas represent + pipelines, into the database for the scenarios eGon2035 and eGon100RE + with the functions :py:func:`insert_gas_data` and :py:func:`insert_gas_data_eGon100RE`, + which extends the :py:class:`grid.egon_etrago_bus ` + and :py:class:`grid.egon_etrago_link ` tables. + + """ + + #: + name: str = "GasNodesAndPipes" + #: + version: str = "0.0.8" + def __init__(self, dependencies): super().__init__( - name="GasNodesandPipes", - version="0.0.8", + name=self.name, + version=self.version, dependencies=dependencies, tasks=(insert_gas_data, insert_gas_data_eGon100RE), ) @@ -37,6 +71,21 @@ def download_SciGRID_gas_data(): """ Download SciGRID_gas IGGIELGN data from Zenodo + The following data for CH4 are downloaded into the folder + ./datasets/gas_data/data: + * Buses (file IGGIELGN_Nodes.csv), + * Pipelines (file IGGIELGN_PipeSegments.csv), + * Productions (file IGGIELGN_Productions.csv), + * Storages (file IGGIELGN_Storages.csv), + * LNG terminals (file IGGIELGN_LNGs.csv). + + For more information on these data refer to the + `SciGRID_gas IGGIELGN documentation `_ + + Returns + ------- + None + """ path = Path(".") / "datasets" / "gas_data" os.makedirs(path, exist_ok=True) @@ -68,12 +117,17 @@ def download_SciGRID_gas_data(): def define_gas_nodes_list(): - """Define list of gas nodes from SciGRID_gas IGGIELGN data + """Define list of CH4 buses from SciGRID_gas IGGIELGN data + + The CH4 nodes are modelled as buses. Therefore the SciGRID_gas nodes + are red from the IGGIELGN_Nodes cvs file previously downloaded in the + function :py:func:`download_SciGRID_gas_data`, corrected (erroneous country), + and returned as dataframe. Returns ------- - gas_nodes_list : dataframe - Dataframe containing the gas nodes (Europe) + gas_nodes_list : pandas.DataFrame + Dataframe containing the gas nodes in Europe """ # Select next id value @@ -110,15 +164,18 @@ def define_gas_nodes_list(): def ch4_nodes_number_G(gas_nodes_list): - """Insert list of CH4 nodes from SciGRID_gas IGGIELGN data - Parameters + """Return the number of CH4 buses in Germany + + Parameters ---------- - gas_nodes_list : dataframe - Dataframe containing the gas nodes (Europe) + gas_nodes_list : pandas.DataFrame + Dataframe containing the gas nodes in Europe + Returns ------- - N_ch4_nodes_G : int - Number of CH4 buses in Germany (independantly from the mode used) + N_ch4_nodes_G : int + Number of CH4 buses in Germany + """ ch4_nodes_list = gas_nodes_list[ @@ -130,14 +187,20 @@ def ch4_nodes_number_G(gas_nodes_list): def insert_CH4_nodes_list(gas_nodes_list): - """Insert list of CH4 nodes from SciGRID_gas IGGIELGN data + """Insert list of German CH4 nodes into the database for eGon2035 - Insert detailled description + Insert the list of German CH4 nodes into the database by executing + the following steps: + * Receive the buses as parameter (from SciGRID_gas IGGIELGN data) + * Add the missing information: scn_name and carrier + * Clean the database table grid.egon_etrago_bus of the + CH4 buses of the specific scenario (eGon2035) in Germany + * Insert the buses in the table grid.egon_etrago_bus Parameters ---------- - gas_nodes_list : dataframe - Dataframe containing the gas nodes (Europe) + gas_nodes_list : pandas.DataFrame + Dataframe containing the gas nodes in Europe Returns ------- @@ -225,22 +288,31 @@ def insert_CH4_nodes_list(gas_nodes_list): def insert_gas_buses_abroad(scn_name="eGon2035"): - """Insert central CH4 buses in foreign countries for eGon2035 - - Detailled description to be completed: - Insert central gas buses in foreign countries to db, same buses - than the foreign AC buses - - Parameters - ---------- - scn_name : str - Name of the scenario + """Insert CH4 buses in neighbouring countries to database for eGon2035 + + For the scenario eGon2035, insert central CH4 buses in foreign + countries to the database. The considered foreign countries are the + direct neighbouring countries, with the addition of Russia that is + considered as a source of fossil CH4. + Therefore, the following steps are executed: + * Definition of the foreign buses with the function + :py:func:`import_central_buses_egon100 ` from + the module :py:mod:`electrical_neighbours ` + * Removal of the superfluous buses in order to have only one bus + in each neighbouring country + * Removal of the the irrelevant columns + * Addition of the missing information: scn_name and carrier + * Attribution of an id to each bus + * Cleaning of the database table grid.egon_etrago_bus of the + CH4 buses of the specific scenario (eGon2035) out of Germany + * Insertion of the neighbouring buses in the table grid.egon_etrago_bus. Returns ------- - gdf_abroad_buses : dataframe - Dataframe containing the CH4 buses in the neighbouring countries + gdf_abroad_buses : pandas.DataFrame + Dataframe containing the gas buses in the neighbouring countries and one in the center of Germany in test mode + """ # Select sources and targets from dataset configuration sources = config.datasets()["electrical_neighbours"]["sources"] @@ -332,16 +404,32 @@ def insert_gas_buses_abroad(scn_name="eGon2035"): def insert_gas_pipeline_list( gas_nodes_list, abroad_gas_nodes_list, scn_name="eGon2035" ): - """Insert list of gas pipelines from SciGRID_gas IGGIELGN data + """Insert list of gas pipelines into the database + + The gas pipelines, modelled as Pypsa links are red from the IGGIELGN_PipeSegments + csv file previously downloded in the function :py:func:`download_SciGRID_gas_data`, + adapted and inserted in the database for the eGon2035 scenario. + The manual corrections allows to: + * Delete gas pipelines disconnected of the rest of the gas grid + * Connect one pipeline (also connected to Norway) disconnected of + the rest of the gas grid + * Correct erroneous country of some pipelines - Insert detailled description + The capacities of the pipelines are determined by the correspondance + table given by the Parameters for the classification of gas pipelines + in `Electricity, heat, and gas sector data for modeling the German system + `_ + related to the pipeline diameter given in the SciGRID_gas dataset. + + The database is cleaned before the insertion of the pipelines. Parameters ---------- gas_nodes_list : dataframe - description missing + Dataframe containing the gas nodes in Europe abroad_gas_nodes_list: dataframe - description missing + Dataframe containing the gas buses in the neighbouring countries + and one in the center of Germany in test mode scn_name : str Name of the scenario @@ -714,7 +802,8 @@ def insert_gas_pipeline_list( def remove_isolated_gas_buses(): - """Delete gas buses which are not connected to the gas grid. + """Delete CH4 buses which are not connected to the CH4 grid for the eGon2035 scenario + Returns ------- None. @@ -740,7 +829,21 @@ def remove_isolated_gas_buses(): def insert_gas_data(): - """Overall function for importing gas data from SciGRID_gas + """Overall function for importing methane data for eGon2035 + + This function import the methane data (buses and pipelines) for + eGon2035, by executing the following steps: + * Download the SciGRID_gas datasets with the function :py:func:`download_SciGRID_gas_data` + * Define CH4 buses with the function :py:func:`define_gas_nodes_list` + * Insert the CH4 buses in Germany into the database with the + function :py:func:`insert_CH4_nodes_list` + * Insert the CH4 buses abroad into the database with the function + :py:func:`insert_gas_buses_abroad` + * Insert the CH4 links representing the CH4 pipeline into the + database with the function :py:func:`insert_gas_pipeline_list` + * Remove the isolated CH4 buses directly from the database using + the function :py:func:`remove_isolated_gas_buses` + Returns ------- None. @@ -757,7 +860,17 @@ def insert_gas_data(): def insert_gas_data_eGon100RE(): - """Overall function for importing gas data from SciGRID_gas + """Overall function for importing methane data for eGon100RE + + This function import the methane data (buses and pipelines) for + eGon100RE, by copying the CH4 buses from the eGon2035 scenario using + the function :py:func:`copy_and_modify_buses ` + from the module :py:mod:`etrago_helpers `. The methane + pipelines are also copied and their capacities are adapted: one + share of the methane grid is retroffited into an hydrogen grid, so + the methane pieplines nominal capacities are reduced from this share + (calculated in the pyspa-eur-sec run). + Returns ------- None. From 5e4bc611f9bfc6ba61b9b1f24476b98d1d593c58 Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Fri, 27 Jan 2023 18:35:30 +0100 Subject: [PATCH 06/38] Improve documentation of industrial_gas_demand.py --- .../data/datasets/industrial_gas_demand.py | 206 +++++++++++++++--- 1 file changed, 173 insertions(+), 33 deletions(-) diff --git a/src/egon/data/datasets/industrial_gas_demand.py b/src/egon/data/datasets/industrial_gas_demand.py index da057575b..84fbeee3e 100755 --- a/src/egon/data/datasets/industrial_gas_demand.py +++ b/src/egon/data/datasets/industrial_gas_demand.py @@ -1,7 +1,25 @@ # -*- coding: utf-8 -*- """ -The central module containing all code dealing with importing gas industrial demand +The central module containing code dealing with gas industrial demand + +In this this module, the functions to import the industrial hydrogen and +methane demands from the opendata.ffe database and to insert them in +the database after modification are to be found. + +Dependencies (pipeline) +======================= +* :py:class:`ScenarioParameters ` +* :py:class:`GasAreaseGon2035 ` +* :py:class:`GasAreaseGon100RE ` +* :py:class:`GasNodesAndPipes ` + +Resulting tables +================ +* :py:class:`grid.egon_etrago_load ` is extended +* :py:class:`grid.egon_etrago_load_timeseries ` is extended + """ + from pathlib import Path import os @@ -24,37 +42,83 @@ class IndustrialGasDemand(Dataset): + """Download the industrial gas demands from the opendata.ffe database + + Data are downloaded in the folder ./datasets/gas_data/demand using + the function :py:func:`download_industrial_gas_demand` and no dataset is resulting. + + """ + + #: + name: str = "IndustrialGasDemand" + #: + version: str = "0.0.4" + def __init__(self, dependencies): super().__init__( - name="IndustrialGasDemand", - version="0.0.4", + name=self.name, + version=self.version, dependencies=dependencies, tasks=(download_industrial_gas_demand), ) class IndustrialGasDemandeGon2035(Dataset): + """Insert the hourly resolved industrial gas demands into the database for eGon2035 + + Insert the industrial methane and hydrogen demands and their + associated time series for the scenario eGon2035 by executing the + function :py:func:`insert_industrial_gas_demand_egon2035` which extends the + :py:class:`grid.egon_etrago_load ` + and :py:class:`grid.egon_etrago_load_timeseries ` tables. + + """ + + #: + name: str = "IndustrialGasDemandeGon2035" + #: + version: str = "0.0.3" + def __init__(self, dependencies): super().__init__( - name="IndustrialGasDemandeGon2035", - version="0.0.3", + name=self.name, + version=self.version, dependencies=dependencies, tasks=(insert_industrial_gas_demand_egon2035), ) class IndustrialGasDemandeGon100RE(Dataset): + """Insert the hourly resolved industrial gas demands into the database for eGon100RE + + Insert the industrial methane and hydrogen demands and their + associated time series for the scenario eGon100RE by executing the + function :py:func:`insert_industrial_gas_demand_egon100RE` which extends the + :py:class:`grid.egon_etrago_load ` + and :py:class:`grid.egon_etrago_load_timeseries ` tables. + + """ + + #: + name: str = "IndustrialGasDemandeGon100RE" + #: + version: str = "0.0.3" + def __init__(self, dependencies): super().__init__( - name="IndustrialGasDemandeGon100RE", - version="0.0.3", + name=self.name, + version=self.version, dependencies=dependencies, tasks=(insert_industrial_gas_demand_egon100RE), ) def read_industrial_demand(scn_name, carrier): - """Read the gas demand data + """Read the industrial gas demand data in Germany + + This function reads the methane or hydrogen industrial demand time + series previously downloaded in :py:func:`download_industrial_gas_demand` for + the scenarios eGon2035 or eGon100RE. Parameters ---------- @@ -65,8 +129,8 @@ def read_industrial_demand(scn_name, carrier): Returns ------- - df : pandas.core.frame.DataFrame - Dataframe containing the industrial demand + df : pandas.DataFrame + Dataframe containing the industrial gas demand time series """ target_file = Path(".") / "datasets/gas_data/demand/region_corr.json" @@ -153,22 +217,31 @@ def read_industrial_demand(scn_name, carrier): def read_and_process_demand( scn_name="eGon2035", carrier=None, grid_carrier=None ): - """Assign the industrial demand in Germany to buses + """Assign the industrial gas demand in Germany to buses + + This function prepares and returns the industrial gas demand time + series for CH4 or H2 and for a specific scenario by executing the + following steps: + + * Read the industrial demand time series in Germany with the + fonction :py:func:`read_industrial_demand` + * Attribute the bus_id to which each load and it associated time + serie is associated by calling the function :py:func:`assign_gas_bus_id ` + from :py:module:`egon.data.db` + * Adjust the columns: add "carrier" and remove useless ones Parameters ---------- scn_name : str Name of the scenario - carrier : str Name of the carrier, the demand should hold - grid_carrier : str Carrier name of the buses, the demand should be assigned to Returns ------- - industrial_demand : + industrial_demand : pandas.DataFrame Dataframe containing the industrial demand in Germany """ @@ -204,12 +277,15 @@ def read_and_process_demand( def delete_old_entries(scn_name): """ - Delete loads and load timeseries. + Delete CH4 and H2 loads and load time series for the specified scenario + + This function cleans the database and has no return. Parameters ---------- scn_name : str Name of the scenario. + """ # Clean tables db.execute_sql( @@ -243,14 +319,31 @@ def delete_old_entries(scn_name): def insert_new_entries(industrial_gas_demand, scn_name): """ - Insert loads. + Insert industrial gas loads into the database + + This function prepares and imports the industrial gas loads, by + executing the following steps: + + * Attribution of an id to each load in the list received as paramater + * Deletion of the column containing the time series (they will be + inserted in another table (grid.egon_etrago_load_timeseries) in + the :py:func:`insert_industrial_gas_demand_time_series`) + * Insertion of the loads into the database + * Return of the dataframe still containing the time series columns Parameters ---------- industrial_gas_demand : pandas.DataFrame - Load data to insert. + Load data to insert (containing the time series) scn_name : str Name of the scenario. + + Returns + ------- + industrial_gas_demand : pandas.DataFrame + Dataframe containing the loads that have been inserted in + the database with their time series + """ new_id = db.next_etrago_id("load") @@ -281,17 +374,25 @@ def insert_new_entries(industrial_gas_demand, scn_name): def insert_industrial_gas_demand_egon2035(): - """Insert list of industrial gas demand (one per NUTS3) in database + """Insert industrial gas demands into the database for eGon2035 - Parameters - ---------- - scn_name : str - Name of the scenario + Insert the industrial CH4 and H2 demands and their associated time + series into the database for the eGon2035 scenario. The data, + previously downloaded in :py:func:`download_industrial_gas_demand` + are adjusted by executing the following steps: + + * Clean the database with the fonction :py:func:`delete_old_entries` + * Read and prepare the CH4 and the H2 industrial demands and their + associated time series in Germany with the fonction :py:func:`read_and_process_demand` + * Aggregate the demands with the same properties at the same gas bus + * Insert the loads into the database by executing :py:func:`insert_new_entries` + * Insert the time series associated to the loads into the database + by executing :py:func:`insert_industrial_gas_demand_time_series` Returns ------- - industrial_gas_demand : Dataframe containing the industrial gas demand - in Germany + None + """ scn_name = "eGon2035" delete_old_entries(scn_name) @@ -322,17 +423,34 @@ def insert_industrial_gas_demand_egon2035(): def insert_industrial_gas_demand_egon100RE(): - """Insert list of industrial gas demand (one per NUTS3) in database - - Parameters - ---------- - scn_name : str - Name of the scenario + """Insert industrial gas demands into the database for eGon100RE + + Insert the industrial CH4 and H2 demands and their associated time + series into the database for the eGon100RE scenario. The data, + previously downloaded in :py:func:`download_industrial_gas_demand` + are adapted by executing the following steps: + + * Clean the database with the fonction :py:func:`delete_old_entries` + * Read and prepare the CH4 and the H2 industrial demands and their + associated time series in Germany with the fonction :py:func:`read_and_process_demand` + * Identify and adjust the total industrial CH4 and H2 loads for Germany + generated by PyPSA-Eur-Sec + * For the CH4, the time serie used is the one from H2, because + the industrial CH4 demand in the opendata.ffe database is 0 + * In test mode, the total values are obtained by + evaluating the share of H2 demand in the test region + (NUTS1: DEF, Schleswig-Holstein) with respect to the H2 + demand in full Germany model (NUTS0: DE). This task has been + outsourced to save processing cost. + * Aggregate the demands with the same properties at the same gas bus + * Insert the loads into the database by executing :py:func:`insert_new_entries` + * Insert the time series associated to the loads into the database + by executing :py:func:`insert_industrial_gas_demand_time_series` Returns ------- - industrial_gas_demand : Dataframe containing the industrial gas demand - in Germany + None + """ scn_name = "eGon100RE" delete_old_entries(scn_name) @@ -437,6 +555,20 @@ def insert_industrial_gas_demand_egon100RE(): def insert_industrial_gas_demand_time_series(egon_etrago_load_gas): """ Insert list of industrial gas demand time series (one per NUTS3) + + These loads are hourly and NUTS3-geographic resolved. + + Parameters + ---------- + industrial_gas_demand : pandas.DataFrame + Dataframe containing the loads that have been inserted in + the database and whose time serie will be inserted into the + database. + + Returns + ------- + None + """ egon_etrago_load_gas_timeseries = egon_etrago_load_gas @@ -460,7 +592,15 @@ def insert_industrial_gas_demand_time_series(egon_etrago_load_gas): def download_industrial_gas_demand(): - """Download the industrial gas demand data from opendata.ffe database.""" + """Download the industrial gas demand data from opendata.ffe database + + The industrial demands for hydrogen and methane are downloaded in + the folder ./datasets/gas_data/demand and the function has no + return. + These loads are hourly and NUTS3-geographic resolved. For more + information on these data, refer to the `Extremos project documentation `_ + + """ correspondance_url = ( "http://opendata.ffe.de:3000/region?id_region_type=eq.38" ) From dbefe10009218ed87382c90befd17cf2c7bb5296 Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Wed, 1 Feb 2023 09:40:33 +0100 Subject: [PATCH 07/38] Add missing dependency in module documentation --- src/egon/data/datasets/industrial_gas_demand.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/egon/data/datasets/industrial_gas_demand.py b/src/egon/data/datasets/industrial_gas_demand.py index 84fbeee3e..7dc6cb450 100755 --- a/src/egon/data/datasets/industrial_gas_demand.py +++ b/src/egon/data/datasets/industrial_gas_demand.py @@ -12,6 +12,7 @@ * :py:class:`GasAreaseGon2035 ` * :py:class:`GasAreaseGon100RE ` * :py:class:`GasNodesAndPipes ` +* :py:class:`HydrogenBusEtrago ` Resulting tables ================ From ad76d8cd8243c245167537b6a8f764433da3105f Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Wed, 1 Feb 2023 09:52:49 +0100 Subject: [PATCH 08/38] adapted tests to respect small differences between individual and aggregated time series due to clipping at zero --- src/egon/data/datasets/DSM_cts_ind.py | 2 +- src/egon/data/datasets/sanity_checks.py | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/egon/data/datasets/DSM_cts_ind.py b/src/egon/data/datasets/DSM_cts_ind.py index 1a1b60791..10cd7b8c6 100644 --- a/src/egon/data/datasets/DSM_cts_ind.py +++ b/src/egon/data/datasets/DSM_cts_ind.py @@ -77,7 +77,7 @@ class DsmPotential(Dataset): def __init__(self, dependencies): super().__init__( name="DsmPotential", - version="0.0.4", + version="0.0.5.dev", dependencies=dependencies, tasks=(dsm_cts_ind_processing), ) diff --git a/src/egon/data/datasets/sanity_checks.py b/src/egon/data/datasets/sanity_checks.py index aedb9ad9c..5df0c68d3 100644 --- a/src/egon/data/datasets/sanity_checks.py +++ b/src/egon/data/datasets/sanity_checks.py @@ -1486,8 +1486,13 @@ def df_from_series(s: pd.Series): index=groups.keys(), ).T - assert np.isclose(p_max_df, individual_p_max_df).all() - assert np.isclose(p_min_df, individual_p_min_df).all() + # due to the fact that time series are clipped at zero (either + # direction) there is a little difference between the sum of the + # individual time series and the aggregated time series as the second + # is generated independent of the others. This makes atol=1e-03 + # necessary. + assert np.allclose(p_max_df, individual_p_max_df, atol=1e-03) + assert np.allclose(p_min_df, individual_p_min_df, atol=1e-03) # e_min and e_max sql = f""" @@ -1537,5 +1542,5 @@ def df_from_series(s: pd.Series): index=groups.keys(), ).T - assert np.isclose(e_max_df, individual_e_max_df).all() - assert np.isclose(e_min_df, individual_e_min_df).all() + assert np.allclose(e_max_df, individual_e_max_df) + assert np.allclose(e_min_df, individual_e_min_df) From ab233eac4a5f7e668fb59bf6a0afa5f484fc91b9 Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Wed, 1 Feb 2023 17:35:48 +0100 Subject: [PATCH 09/38] saving correct p_set time series; saving absolute time series instead of relative --- src/egon/data/datasets/DSM_cts_ind.py | 105 ++++++++------------------ 1 file changed, 30 insertions(+), 75 deletions(-) diff --git a/src/egon/data/datasets/DSM_cts_ind.py b/src/egon/data/datasets/DSM_cts_ind.py index 10cd7b8c6..f91cb8d2a 100644 --- a/src/egon/data/datasets/DSM_cts_ind.py +++ b/src/egon/data/datasets/DSM_cts_ind.py @@ -94,13 +94,11 @@ class EgonEtragoElectricityCtsDsmTimeseries(Base): bus = Column(Integer, primary_key=True, index=True) scn_name = Column(String, primary_key=True, index=True) - p_nom = Column(Float) - e_nom = Column(Float) p_set = Column(ARRAY(Float)) - p_max_pu = Column(ARRAY(Float)) - p_min_pu = Column(ARRAY(Float)) - e_max_pu = Column(ARRAY(Float)) - e_min_pu = Column(ARRAY(Float)) + p_max = Column(ARRAY(Float)) + p_min = Column(ARRAY(Float)) + e_max = Column(ARRAY(Float)) + e_min = Column(ARRAY(Float)) class EgonOsmIndLoadCurvesIndividualDsmTimeseries(Base): @@ -114,13 +112,11 @@ class EgonOsmIndLoadCurvesIndividualDsmTimeseries(Base): osm_id = Column(Integer, primary_key=True, index=True) scn_name = Column(String, primary_key=True, index=True) bus = Column(Integer) - p_nom = Column(Float) - e_nom = Column(Float) p_set = Column(ARRAY(Float)) - p_max_pu = Column(ARRAY(Float)) - p_min_pu = Column(ARRAY(Float)) - e_max_pu = Column(ARRAY(Float)) - e_min_pu = Column(ARRAY(Float)) + p_max = Column(ARRAY(Float)) + p_min = Column(ARRAY(Float)) + e_max = Column(ARRAY(Float)) + e_min = Column(ARRAY(Float)) class EgonDemandregioSitesIndElectricityDsmTimeseries(Base): @@ -135,13 +131,11 @@ class EgonDemandregioSitesIndElectricityDsmTimeseries(Base): scn_name = Column(String, primary_key=True, index=True) bus = Column(Integer) application = Column(String) - p_nom = Column(Float) - e_nom = Column(Float) p_set = Column(ARRAY(Float)) - p_max_pu = Column(ARRAY(Float)) - p_min_pu = Column(ARRAY(Float)) - e_max_pu = Column(ARRAY(Float)) - e_min_pu = Column(ARRAY(Float)) + p_max = Column(ARRAY(Float)) + p_min = Column(ARRAY(Float)) + e_max = Column(ARRAY(Float)) + e_min = Column(ARRAY(Float)) class EgonSitesIndLoadCurvesIndividualDsmTimeseries(Base): @@ -155,13 +149,11 @@ class EgonSitesIndLoadCurvesIndividualDsmTimeseries(Base): site_id = Column(Integer, primary_key=True, index=True) scn_name = Column(String, primary_key=True, index=True) bus = Column(Integer) - p_nom = Column(Float) - e_nom = Column(Float) p_set = Column(ARRAY(Float)) - p_max_pu = Column(ARRAY(Float)) - p_min_pu = Column(ARRAY(Float)) - e_max_pu = Column(ARRAY(Float)) - e_min_pu = Column(ARRAY(Float)) + p_max = Column(ARRAY(Float)) + p_min = Column(ARRAY(Float)) + e_max = Column(ARRAY(Float)) + e_min = Column(ARRAY(Float)) # Code @@ -1308,46 +1300,6 @@ def dsm_cts_ind( data_export(dsm_buses, dsm_links, dsm_stores, carrier="dsm") -def get_p_nom_e_nom(df: pd.DataFrame): - p_nom = [ - max(max(val), max(abs(v) for v in df.p_min_pu.at[idx])) - for idx, val in df.p_max_pu.items() - ] - - e_nom = [ - max(max(val), max(abs(v) for v in df.e_min_pu.at[idx])) - for idx, val in df.e_max_pu.items() - ] - - return df.assign(p_nom=p_nom, e_nom=e_nom) - - -def calc_per_unit(df): - df = get_p_nom_e_nom(df) - - for col in ["p_max_pu", "p_min_pu"]: - rslt = [] - - for idx, lst in df[col].items(): - p_nom = df.p_nom.at[idx] - - rslt.append([v / p_nom for v in lst]) - - df[col] = rslt - - for col in ["e_max_pu", "e_min_pu"]: - rslt = [] - - for idx, lst in df[col].items(): - e_nom = df.e_nom.at[idx] - - rslt.append([v / e_nom for v in lst]) - - df[col] = rslt - - return df - - def create_table(df, table, engine=CON): """Create table""" table.__table__.drop(bind=engine, checkfirst=True) @@ -1362,6 +1314,10 @@ def create_table(df, table, engine=CON): ) +def div_list(lst: list, div: float): + return [v / div for v in lst] + + def dsm_cts_ind_individual( cts_cool_vent_ac_share=CTS_COOL_VENT_AC_SHARE, ind_vent_cool_share=IND_VENT_COOL_SHARE, @@ -1411,19 +1367,22 @@ def dsm_cts_ind_individual( dsm=dsm, ) + dsm = dsm.assign( + p_set=dsm.p_set.apply(div_list, div=cts_cool_vent_ac_share) + ) + base_columns = [ "bus", "scn_name", "p_set", - "p_max_pu", - "p_min_pu", - "e_max_pu", - "e_min_pu", + "p_max", + "p_min", + "e_max", + "e_min", ] cts_df = pd.concat([dsm, *vals], axis=1, ignore_index=True) cts_df.columns = base_columns - cts_df = calc_per_unit(cts_df) print(" ") print("industry per osm-area: cooling and ventilation") @@ -1442,11 +1401,12 @@ def dsm_cts_ind_individual( dsm=dsm, ) + dsm = dsm.assign(p_set=dsm.p_set.apply(div_list, div=ind_vent_cool_share)) + columns = ["osm_id"] + base_columns osm_df = pd.concat([dsm, *vals], axis=1, ignore_index=True) osm_df.columns = columns - osm_df = calc_per_unit(osm_df) # industry sites @@ -1486,7 +1446,6 @@ def dsm_cts_ind_individual( paper_df = pd.concat([dsm_paper, *vals], axis=1, ignore_index=True) paper_df.columns = columns - paper_df = calc_per_unit(paper_df) print(" ") print("industry sites: recycled paper") @@ -1511,7 +1470,6 @@ def dsm_cts_ind_individual( [dsm_recycled_paper, *vals], axis=1, ignore_index=True ) recycled_paper_df.columns = columns - recycled_paper_df = calc_per_unit(recycled_paper_df) print(" ") print("industry sites: pulp") @@ -1532,7 +1490,6 @@ def dsm_cts_ind_individual( pulp_df = pd.concat([dsm_pulp, *vals], axis=1, ignore_index=True) pulp_df.columns = columns - pulp_df = calc_per_unit(pulp_df) # industry sites: cement @@ -1555,7 +1512,6 @@ def dsm_cts_ind_individual( cement_df = pd.concat([dsm_cement, *vals], axis=1, ignore_index=True) cement_df.columns = columns - cement_df = calc_per_unit(cement_df) ind_df = pd.concat( [paper_df, recycled_paper_df, pulp_df, cement_df], ignore_index=True @@ -1590,7 +1546,6 @@ def dsm_cts_ind_individual( ind_sites_df = pd.concat([dsm, *vals], axis=1, ignore_index=True) ind_sites_df.columns = columns - ind_sites_df = calc_per_unit(ind_sites_df) # create tables create_table( From 6b3a5391720105a34d175b2f487a7a78c0c7bd02 Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Thu, 2 Feb 2023 14:59:59 +0100 Subject: [PATCH 10/38] adapted sanity checks to new structure --- src/egon/data/datasets/sanity_checks.py | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/egon/data/datasets/sanity_checks.py b/src/egon/data/datasets/sanity_checks.py index 5df0c68d3..e7ff05850 100644 --- a/src/egon/data/datasets/sanity_checks.py +++ b/src/egon/data/datasets/sanity_checks.py @@ -1453,7 +1453,7 @@ def df_from_series(s: pd.Series): for table in tables: target = targets[table] sql = f""" - SELECT bus, p_nom, e_nom, p_min_pu, p_max_pu, e_max_pu, e_min_pu + SELECT bus, p_min, p_max, e_max, e_min FROM {target["schema"]}.{target["table"]} WHERE scn_name = '{scenario}' ORDER BY bus @@ -1465,9 +1465,8 @@ def df_from_series(s: pd.Series): groups = individual_ts_df[["bus"]].reset_index().groupby("bus").groups - individual_p_max_df = df_from_series(individual_ts_df.p_max_pu).mul( - individual_ts_df.p_nom - ) + individual_p_max_df = df_from_series(individual_ts_df.p_max) + individual_p_max_df = pd.DataFrame( [ individual_p_max_df[idxs].sum(axis=1) @@ -1475,9 +1474,9 @@ def df_from_series(s: pd.Series): ], index=groups.keys(), ).T - individual_p_min_df = df_from_series(individual_ts_df.p_min_pu).mul( - individual_ts_df.p_nom - ) + + individual_p_min_df = df_from_series(individual_ts_df.p_min) + individual_p_min_df = pd.DataFrame( [ individual_p_min_df[idxs].sum(axis=1) @@ -1521,9 +1520,8 @@ def df_from_series(s: pd.Series): e_max_df.columns = meta_df.bus.tolist() e_min_df.columns = meta_df.bus.tolist() - individual_e_max_df = df_from_series(individual_ts_df.e_max_pu).mul( - individual_ts_df.e_nom - ) + individual_e_max_df = df_from_series(individual_ts_df.e_max) + individual_e_max_df = pd.DataFrame( [ individual_e_max_df[idxs].sum(axis=1) @@ -1531,9 +1529,8 @@ def df_from_series(s: pd.Series): ], index=groups.keys(), ).T - individual_e_min_df = df_from_series(individual_ts_df.e_min_pu).mul( - individual_ts_df.e_nom - ) + individual_e_min_df = df_from_series(individual_ts_df.e_min) + individual_e_min_df = pd.DataFrame( [ individual_e_min_df[idxs].sum(axis=1) From 01a3949f5d2a22fcf5d58d6ee3046d8c2056ae59 Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Thu, 2 Feb 2023 15:03:45 +0100 Subject: [PATCH 11/38] adapt dataset version and changelog --- CHANGELOG.rst | 2 ++ src/egon/data/datasets/DSM_cts_ind.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 9c76a8416..da49ef845 100755 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -679,6 +679,8 @@ Bug Fixes * Fix URL of TYNDP scenario dataset * Automatically generated tasks now get unique :code:`task_id`\s. Fixes issue `#985`_ via PR `#986`_. +* Fix faulty DSM time series + `#1088 `_ .. _PR #692: https://github.com/openego/eGon-data/pull/692 .. _#343: https://github.com/openego/eGon-data/issues/343 diff --git a/src/egon/data/datasets/DSM_cts_ind.py b/src/egon/data/datasets/DSM_cts_ind.py index f91cb8d2a..ebf157fa7 100644 --- a/src/egon/data/datasets/DSM_cts_ind.py +++ b/src/egon/data/datasets/DSM_cts_ind.py @@ -77,7 +77,7 @@ class DsmPotential(Dataset): def __init__(self, dependencies): super().__init__( name="DsmPotential", - version="0.0.5.dev", + version="0.0.5", dependencies=dependencies, tasks=(dsm_cts_ind_processing), ) From 2d287f0a78b1fe2faf9ab3b5785f4f47caa7a6e5 Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Mon, 6 Feb 2023 08:55:49 +0100 Subject: [PATCH 12/38] adapt dataset version and changelog --- CHANGELOG.rst | 2 ++ .../data/datasets/emobility/heavy_duty_transport/__init__.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ec21ddea5..2530f3b60 100755 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -470,6 +470,8 @@ Changed created for a single process. This fixes issue `#799`_. * Insert rural heat per supply technology `#1026 `_ +* Change hgv data source to use database + `#1086 `_ .. _#799: https://github.com/openego/eGon-data/issues/799 diff --git a/src/egon/data/datasets/emobility/heavy_duty_transport/__init__.py b/src/egon/data/datasets/emobility/heavy_duty_transport/__init__.py index efcaece25..5699719ed 100644 --- a/src/egon/data/datasets/emobility/heavy_duty_transport/__init__.py +++ b/src/egon/data/datasets/emobility/heavy_duty_transport/__init__.py @@ -90,8 +90,7 @@ def download_hgv_data(): sources = DATASET_CFG["original_data"]["sources"] # Create the folder, if it does not exist - if not WORKING_DIR.is_dir(): - WORKING_DIR.mkdir(parents=True) + WORKING_DIR.mkdir(parents=True, exist_ok=True) url = sources["BAST"]["url"] file = WORKING_DIR / sources["BAST"]["file"] @@ -110,7 +109,7 @@ class HeavyDutyTransport(Dataset): def __init__(self, dependencies): super().__init__( name="HeavyDutyTransport", - version="0.0.2.dev", + version="0.0.2", dependencies=dependencies, tasks=( { From b4342da4f97fa231bb5e6ecb1f23ae62bb464c74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20G=C3=BCnther?= Date: Mon, 6 Feb 2023 18:58:51 +0100 Subject: [PATCH 13/38] Constrain the Sphinx version for building the docs For Pythons < 3.9, the Sphinx version needs to be constrained. Otherwise it errors out with: TypeError: entry_points() got an unexpected keyword argument 'group' due to Sphinx issue #10479. Higher Python versions use Sphinx versions which are so up to date, they get other errors with our documentation. So all in all, we need the constraint to not run in any weird errors when building the documentation for now. [0]: https://github.com/sphinx-doc/sphinx/issues/10479 --- docs/requirements.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 37da9aeed..d4043f312 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,7 @@ -sphinx>=1.3 +# See the accompanying commit message for details on the upper bound +# for Sphinx's version. In short, until Sphinx's issue [10479][0] or our +# issues with Python >= 3.9 are fixed, the upper bound is needed. +# +# [0]: https://github.com/sphinx-doc/sphinx/issues/10479 +sphinx>=1.3,<4.4 sphinx-rtd-theme From 2c8eb7efec77eb728fd88588a0c6106e66151fb3 Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Wed, 8 Feb 2023 19:16:49 +0100 Subject: [PATCH 14/38] Improve documentation of ch4_storages.py --- src/egon/data/datasets/ch4_storages.py | 94 +++++++++++++++++++++----- 1 file changed, 77 insertions(+), 17 deletions(-) diff --git a/src/egon/data/datasets/ch4_storages.py b/src/egon/data/datasets/ch4_storages.py index 14321d4aa..34fa5269b 100755 --- a/src/egon/data/datasets/ch4_storages.py +++ b/src/egon/data/datasets/ch4_storages.py @@ -1,6 +1,21 @@ # -*- coding: utf-8 -*- """ -The central module containing all code dealing with importing gas storages data +The central module containing all code dealing with importing gas stores + +This module contains the functions to import the existing methane stores +in Germany and to insert them into the database. They are modelled as +PyPSA stores and are not extendable. + +Dependencies (pipeline) +======================= +* :py:class:`GasAreaseGon2035 ` +* :py:class:`GasAreaseGon2035 ` +* :py:class:`GasNodesAndPipes ` + +Resulting tables +================ +* :py:class:`grid.egon_etrago_store ` is extended + """ from pathlib import Path from telnetlib import GA @@ -21,17 +36,38 @@ class CH4Storages(Dataset): + """ "Insert the non extendable gas stores in Germany into the database + + Insert the non extendable gas stores into the database in Germany + for the scnenarios eGon2035 and eGon100RE using the function + :py:func:`insert_ch4_storages` + which extends the :py:class:`grid.egon_etrago_store ` table. + + """ + + #: + name: str = "CH4Storages" + #: + version: str = "0.0.2" + def __init__(self, dependencies): super().__init__( - name="CH4Storages", - version="0.0.2", + name=self.name, + version=self.version, dependencies=dependencies, tasks=(insert_ch4_storages), ) def import_installed_ch4_storages(scn_name): - """Define dataframe containing the ch4 storage units in Germany from the SciGRID_gas data + """Define list of CH4 stores from the SciGRID_gas data + + This function reads from the SciGRID_gas dataset the existing CH4 + cavern stores in Germany, adjuts and returns them. + Caverns reference: SciGRID_gas dataset (datasets/gas_data/data/IGGIELGN_Storages.csv + downloaded in :func:`insert_gas_data `). + For more information on these data refer to the + `SciGRID_gas IGGIELGN documentation `_ Parameters ---------- @@ -41,7 +77,7 @@ def import_installed_ch4_storages(scn_name): Returns ------- Gas_storages_list : - Dataframe containing the gas storages units in Germany + Dataframe containing the CH4 cavern stores units in Germany """ target_file = ( @@ -150,20 +186,28 @@ def import_installed_ch4_storages(scn_name): def import_ch4_grid_capacity(scn_name): - """Define dataframe containing the modelling of the CH4 grid storage - capacity. The whole storage capacity of the grid (130000 MWh, estimation of - the Bundesnetzagentur) is split uniformly between all the german CH4 nodes - of the grid. The capacities of the pipes are not considerated. + """Define the gas stores modelling the store capacity of the grid + + Define dataframe containing the modelling of the grid storage + capacity. The whole storage capacity of the grid (130000 MWh, + estimation of the Bundesnetzagentur) is split uniformly between + all the german gas nodes of the grid (without consideration of the + capacities of the pipes). + In eGon100RE, the storage capacity of the grid is split between H2 + and CH4 stores, with the same share than the pipes capacity (value + calculated in the p-e-s run). Parameters ---------- scn_name : str - Name of the scenario. + Name of the scenario + carrier : str + Name of the carrier Returns ------- Gas_storages_list : - Dataframe containing the gas stores in Germany modelling the gas grid storage capacity + List of gas stores in Germany modelling the gas grid storage capacity """ # Select source from dataset configuration @@ -203,14 +247,29 @@ def import_ch4_grid_capacity(scn_name): def insert_ch4_stores(scn_name): """Insert gas stores for specific scenario + + Insert non extendable gas stores for specific scenario in Germany + by executing the following steps: + * Clean the database. + * For CH4 stores, call the functions. + :py:func:`import_installed_ch4_storages` to get the CH4 + cavern stores and :py:func:`import_ch4_grid_capacity` to + get the CH4 stores modelling the storage capacity of the + grid. + * Aggregate of the stores attached to the same bus. + * Add the missing columns: store_id, scn_name, carrier, e_cyclic. + * Insert the stores into the database. + Parameters ---------- scn_name : str Name of the scenario. Returns - ---- - None""" + ------- + None + + """ # Connect to local database engine = db.engine() @@ -263,11 +322,12 @@ def insert_ch4_stores(scn_name): def insert_ch4_storages(): - """Overall function for importing the gas stores for both scenarios + """Overall function for to import non extendable gas stores in Germany + + This function insert the methane stores for the scenarios eGon2035 + and eGon100RE by using the function :py:func:`insert_ch4_stores` + and has no return. - Returns - ------- - None. """ insert_ch4_stores("eGon2035") insert_ch4_stores("eGon100RE") From 24a86c59780d8c6ad3234d26b8557a152b23b17c Mon Sep 17 00:00:00 2001 From: nesnoj Date: Thu, 9 Feb 2023 15:33:06 +0100 Subject: [PATCH 15/38] Drop units after predefined commissioning date and drop non-operating units --- src/egon/data/datasets/power_plants/mastr.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/egon/data/datasets/power_plants/mastr.py b/src/egon/data/datasets/power_plants/mastr.py index cb2ef91f5..6635875ce 100644 --- a/src/egon/data/datasets/power_plants/mastr.py +++ b/src/egon/data/datasets/power_plants/mastr.py @@ -313,6 +313,23 @@ def voltage_levels(p: float) -> int: units = units.loc[units.Land == "Deutschland"] print(f" {len_old-len(units)} units outside of Germany dropped...") + # drop units installed after reference date (eGon2021 scenario) + len_old = len(units) + ts = pd.Timestamp("2022-01-01 00:00:00") + units = units.loc[pd.to_datetime(units.Inbetriebnahmedatum) < ts] + print( + f" {len_old - len(units)} units installed after {ts} dropped..." + ) + + # drop not operating units + len_old = len(units) + units = units.loc[units.EinheitBetriebsstatus.isin( + ["InBetrieb", "VoruebergehendStillgelegt"] + )] + print( + f" {len_old - len(units)} not operating units dropped..." + ) + # filter for SH units if in testmode if not TESTMODE_OFF: print( From 79169d6b0ef5e724a538bf67beba89071eea43ff Mon Sep 17 00:00:00 2001 From: nesnoj Date: Thu, 9 Feb 2023 15:33:29 +0100 Subject: [PATCH 16/38] Update changelog --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5f2e027ec..6da7dc982 100755 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -712,6 +712,9 @@ Bug Fixes * Fix URL of TYNDP scenario dataset * Automatically generated tasks now get unique :code:`task_id`\s. Fixes issue `#985`_ via PR `#986`_. +* Set upper limit on commissioning date for units from MaStR + dataset + `#1098 `_ .. _PR #692: https://github.com/openego/eGon-data/pull/692 .. _#343: https://github.com/openego/eGon-data/issues/343 From d637e1c42e298dde7882211c74f251f792ba31b9 Mon Sep 17 00:00:00 2001 From: nesnoj Date: Thu, 9 Feb 2023 15:35:32 +0100 Subject: [PATCH 17/38] Bump dataset version --- src/egon/data/datasets/power_plants/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egon/data/datasets/power_plants/__init__.py b/src/egon/data/datasets/power_plants/__init__.py index 8b2bdc533..4c1dd3310 100755 --- a/src/egon/data/datasets/power_plants/__init__.py +++ b/src/egon/data/datasets/power_plants/__init__.py @@ -60,7 +60,7 @@ class PowerPlants(Dataset): def __init__(self, dependencies): super().__init__( name="PowerPlants", - version="0.0.16", + version="0.0.17", dependencies=dependencies, tasks=( create_tables, From 763ed4e4ea0cbc5c07a598d12bd4fd1e9b82deb8 Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Thu, 9 Feb 2023 17:35:26 +0100 Subject: [PATCH 18/38] Improve documentation of ch4_prod.py --- src/egon/data/datasets/ch4_prod.py | 88 +++++++++++++++++++++++++++--- 1 file changed, 81 insertions(+), 7 deletions(-) diff --git a/src/egon/data/datasets/ch4_prod.py b/src/egon/data/datasets/ch4_prod.py index e09b4e166..0c8d3fb7d 100755 --- a/src/egon/data/datasets/ch4_prod.py +++ b/src/egon/data/datasets/ch4_prod.py @@ -1,6 +1,24 @@ # -*- coding: utf-8 -*- """ -The central module containing all code dealing with importing CH4 production data +The central module containing code dealing with importing CH4 production data for eGon2035. + +For eGon2035, the gas produced in Germany can be natural gas or biogas. +The source productions are geolocalised potentials described as PyPSA +generators. These generators are not extendable and their overall +production over the year is limited directly in eTraGo by values from +the Netzentwicklungsplan Gas 2020–2030 (36 TWh natural gas and 10 TWh +biogas), also stored in the table +:py:class:`scenario.egon_scenario_parameters `. + +Dependencies (pipeline) +======================= +* :py:class:`GasAreaseGon2035 ` +* :py:class:`GasNodesAndPipes ` + +Resulting tables +================ +* :py:class:`grid.egon_etrago_generator ` is extended + """ from pathlib import Path from urllib.request import urlretrieve @@ -17,17 +35,37 @@ class CH4Production(Dataset): + """Insert the CH4 productions in the database for eGon2035 + + Insert the CH4 productions in the database for eGon2035 by using the + function :py:func:`import_gas_generators`. + + """ + + #: + name: str = "CH4Production" + #: + + version: str = "0.0.7" + def __init__(self, dependencies): super().__init__( - name="CH4Production", - version="0.0.7", + name=self.name, + version=self.version, dependencies=dependencies, tasks=(import_gas_generators), ) def load_NG_generators(scn_name): - """Define the natural CH4 production units in Germany + """Define the fossil CH4 production units in Germany + + This function reads from the SciGRID_gas dataset the fossil CH4 + production units in Germany, adjuts and returns them. + Natural gas production reference: SciGRID_gas dataset (datasets/gas_data/data/IGGIELGN_Production.csv + downloaded in :func:`insert_gas_data `). + For more information on these data, refer to the + `SciGRID_gas IGGIELGN documentation `_. Parameters ---------- @@ -35,7 +73,7 @@ def load_NG_generators(scn_name): Name of the scenario. Returns ------- - CH4_generators_list : + CH4_generators_list : pandas.DataFrame Dataframe containing the natural gas production units in Germany """ @@ -129,13 +167,21 @@ def load_NG_generators(scn_name): def load_biogas_generators(scn_name): """Define the biogas production units in Germany + This function download the Biogaspartner Einspeiseatlas into + (datasets/gas_data/Biogaspartner_Einspeiseatlas_Deutschland_2021.xlsx), + reads the biogas production units in Germany data, adjuts and + returns them. + For more information on these data refer, to the + `Einspeiseatlas website `_. + Parameters ---------- scn_name : str - Name of the scenario. + Name of the scenario + Returns ------- - CH4_generators_list : + CH4_generators_list : pandas.DataFrame Dataframe containing the biogas production units in Germany """ @@ -235,10 +281,38 @@ def load_biogas_generators(scn_name): def import_gas_generators(scn_name="eGon2035"): """Insert list of gas production units in database + To insert the gas production units in the database, the following + steps are followed: + + * cleaning of the database table grid.egon_etrago_generator of the + CH4 generators of the specific scenario (eGon2035), + * call of the functions :py:func:`load_NG_generators` and + :py:func:`load_biogas_generators` that respectively return + dataframes containing the natural- an bio-gas production units + in Germany, + * attribution of the bus_id to which each generator is connected + (call the function :func:`assign_gas_bus_id ` + from :py:mod:`egon.data.db `), + * aggregation of the CH4 productions with same properties at the + same bus. The properties that should be the same in order that + different generators are aggregated are: + * scenario + * carrier + * marginal cost: this parameter differentiates the natural gas + generators from the biogas generators, + * addition of the missing columns: scn_name, carrier and + generator_id, + * insertion of the generators into the database. + Parameters ---------- scn_name : str Name of the scenario. + + Returns + ------- + None + """ # Connect to local database engine = db.engine() From d50d8521b3f12fea864029fb023af6e6548749ad Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Thu, 9 Feb 2023 17:37:18 +0100 Subject: [PATCH 19/38] Minor adjustments in documentation of gas related modules --- src/egon/data/datasets/ch4_storages.py | 14 +++++++------- src/egon/data/datasets/gas_grid.py | 4 ++-- src/egon/data/datasets/industrial_gas_demand.py | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/egon/data/datasets/ch4_storages.py b/src/egon/data/datasets/ch4_storages.py index 34fa5269b..70b87b594 100755 --- a/src/egon/data/datasets/ch4_storages.py +++ b/src/egon/data/datasets/ch4_storages.py @@ -36,7 +36,7 @@ class CH4Storages(Dataset): - """ "Insert the non extendable gas stores in Germany into the database + """Insert the non extendable gas stores in Germany into the database Insert the non extendable gas stores into the database in Germany for the scnenarios eGon2035 and eGon100RE using the function @@ -66,8 +66,8 @@ def import_installed_ch4_storages(scn_name): cavern stores in Germany, adjuts and returns them. Caverns reference: SciGRID_gas dataset (datasets/gas_data/data/IGGIELGN_Storages.csv downloaded in :func:`insert_gas_data `). - For more information on these data refer to the - `SciGRID_gas IGGIELGN documentation `_ + For more information on these data, refer to the + `SciGRID_gas IGGIELGN documentation `_. Parameters ---------- @@ -322,11 +322,11 @@ def insert_ch4_stores(scn_name): def insert_ch4_storages(): - """Overall function for to import non extendable gas stores in Germany + """Overall function to import non extendable gas stores in Germany - This function insert the methane stores for the scenarios eGon2035 - and eGon100RE by using the function :py:func:`insert_ch4_stores` - and has no return. + This function inserts the methane stores in Germany for the + scenarios eGon2035 and eGon100RE by using the function + :py:func:`insert_ch4_stores` and has no return. """ insert_ch4_stores("eGon2035") diff --git a/src/egon/data/datasets/gas_grid.py b/src/egon/data/datasets/gas_grid.py index c947078f6..066dc5c6a 100755 --- a/src/egon/data/datasets/gas_grid.py +++ b/src/egon/data/datasets/gas_grid.py @@ -79,8 +79,8 @@ def download_SciGRID_gas_data(): * Storages (file IGGIELGN_Storages.csv), * LNG terminals (file IGGIELGN_LNGs.csv). - For more information on these data refer to the - `SciGRID_gas IGGIELGN documentation `_ + For more information on these data refer, to the + `SciGRID_gas IGGIELGN documentation `_. Returns ------- diff --git a/src/egon/data/datasets/industrial_gas_demand.py b/src/egon/data/datasets/industrial_gas_demand.py index 7dc6cb450..b34feed24 100755 --- a/src/egon/data/datasets/industrial_gas_demand.py +++ b/src/egon/data/datasets/industrial_gas_demand.py @@ -228,7 +228,7 @@ def read_and_process_demand( fonction :py:func:`read_industrial_demand` * Attribute the bus_id to which each load and it associated time serie is associated by calling the function :py:func:`assign_gas_bus_id ` - from :py:module:`egon.data.db` + from :py:mod:`egon.data.db ` * Adjust the columns: add "carrier" and remove useless ones Parameters From bf756adc9bc16ed8b68e089c27ada5670a05fad7 Mon Sep 17 00:00:00 2001 From: nesnoj Date: Mon, 13 Feb 2023 10:00:24 +0100 Subject: [PATCH 20/38] Move hard-coded commissioning date to dataset cfg --- src/egon/data/datasets.yml | 1 + src/egon/data/datasets/power_plants/mastr.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/egon/data/datasets.yml b/src/egon/data/datasets.yml index a1b1cb6a2..8ba30a2ae 100755 --- a/src/egon/data/datasets.yml +++ b/src/egon/data/datasets.yml @@ -305,6 +305,7 @@ mastr_new: - "biomass" file_basename: "bnetza_mastr" deposit_id: 1132987 + egon2021_date_max: "2021-12-31 23:59:00" re_potential_areas: target: diff --git a/src/egon/data/datasets/power_plants/mastr.py b/src/egon/data/datasets/power_plants/mastr.py index 6635875ce..9109324d1 100644 --- a/src/egon/data/datasets/power_plants/mastr.py +++ b/src/egon/data/datasets/power_plants/mastr.py @@ -313,9 +313,12 @@ def voltage_levels(p: float) -> int: units = units.loc[units.Land == "Deutschland"] print(f" {len_old-len(units)} units outside of Germany dropped...") - # drop units installed after reference date (eGon2021 scenario) + # drop units installed after reference date from cfg + # (eGon2021 scenario) len_old = len(units) - ts = pd.Timestamp("2022-01-01 00:00:00") + ts = pd.Timestamp( + egon.data.config.datasets()["mastr_new"]["egon2021_date_max"] + ) units = units.loc[pd.to_datetime(units.Inbetriebnahmedatum) < ts] print( f" {len_old - len(units)} units installed after {ts} dropped..." From 0502e01763dd4c363e4e8d88eebe8d2ffe16c7e5 Mon Sep 17 00:00:00 2001 From: nesnoj Date: Mon, 13 Feb 2023 10:05:48 +0100 Subject: [PATCH 21/38] Fix operator --- src/egon/data/datasets/power_plants/mastr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egon/data/datasets/power_plants/mastr.py b/src/egon/data/datasets/power_plants/mastr.py index 9109324d1..2402fc36d 100644 --- a/src/egon/data/datasets/power_plants/mastr.py +++ b/src/egon/data/datasets/power_plants/mastr.py @@ -319,7 +319,7 @@ def voltage_levels(p: float) -> int: ts = pd.Timestamp( egon.data.config.datasets()["mastr_new"]["egon2021_date_max"] ) - units = units.loc[pd.to_datetime(units.Inbetriebnahmedatum) < ts] + units = units.loc[pd.to_datetime(units.Inbetriebnahmedatum) <= ts] print( f" {len_old - len(units)} units installed after {ts} dropped..." ) From 7d2f238bcf787fd098600e0c6b01b074188086f3 Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Tue, 14 Feb 2023 14:40:44 +0100 Subject: [PATCH 22/38] Improve documentation for hydrogen_etrago module --- .../data/datasets/hydrogen_etrago/__init__.py | 126 ++++++++++++++++-- 1 file changed, 115 insertions(+), 11 deletions(-) diff --git a/src/egon/data/datasets/hydrogen_etrago/__init__.py b/src/egon/data/datasets/hydrogen_etrago/__init__.py index eba35fc71..98a27f050 100755 --- a/src/egon/data/datasets/hydrogen_etrago/__init__.py +++ b/src/egon/data/datasets/hydrogen_etrago/__init__.py @@ -1,4 +1,31 @@ -"""The central module containing all code dealing with heat sector in etrago +""" +The central module containing the definitions of the datasets linked to H2 + +This module contains the definitions of the datasets linked to the +hydrogen sector in eTraGo in Germany. + +In the eGon2035 scenario, there is no H2 bus abroad, so technologies +linked to the hydrogen sector are present only in Germany. + +In the eGon100RE scenario, the potential and installed capacities abroad +arrise from the PyPSA-eur-sec run. For this reason, this module focuses +only on the hydrogen related components in Germany and the module +:py:mod:`pypsaeursec ` on the hydrogen +related components. + +Dependencies (pipeline) +======================= +* :py:class:`SaltcavernData ` +* :py:class:`GasNodesAndPipes ` +* :py:class:`SubstationVoronoi ` +* :py:class:`GasAreaseGon2035 ` + +Resulting tables +================ +* :py:class:`grid.egon_etrago_store ` is extended +* :py:class:`grid.egon_etrago_bus ` is extended +* :py:class:`grid.egon_etrago_link ` is extended + """ from egon.data.datasets import Dataset from egon.data.datasets.hydrogen_etrago.bus import ( @@ -23,10 +50,25 @@ class HydrogenBusEtrago(Dataset): + """Insert the H2 buses into the database for Germany + + Insert the H2 buses in Germany into the database for the scenarios + eGon2035 and eGon100RE by executing successively the functions + :py:func:`calculate_and_map_saltcavern_storage_potential `, + :py:func:`insert_hydrogen_buses ` and + :py:func:`insert_hydrogen_buses_eGon100RE `. + + """ + + #: + name: str = "HydrogenBusEtrago" + #: + version: str = "0.0.1" + def __init__(self, dependencies): super().__init__( - name="HydrogenBusEtrago", - version="0.0.1", + name=self.name, + version=self.version, dependencies=dependencies, tasks=( calculate_and_map_saltcavern_storage_potential, @@ -37,10 +79,30 @@ def __init__(self, dependencies): class HydrogenStoreEtrago(Dataset): + """Insert the H2 stores into the database for Germany + + Insert the H2 stores in Germany into the database for the scenarios + eGon2035 and eGon100RE: + * H2 overground stores or steel tanks at each H2_grid bus with the + function :py:func:`insert_H2_overground_storage ` + for the scenario eGon2035, + * H2 underground stores or saltcavern stores at each H2_saltcavern + bus with the function :py:func:`insert_H2_saltcavern_storage ` + for the scenario eGon2035, + * H2 stores (overground and underground) for the scenario eGon100RE + with the function :py:func:`insert_H2_storage_eGon100RE `. + + """ + + #: + name: str = "HydrogenStoreEtrago" + #: + version: str = "0.0.3" + def __init__(self, dependencies): super().__init__( - name="HydrogenStoreEtrago", - version="0.0.3", + name=self.name, + version=self.version, dependencies=dependencies, tasks=( insert_H2_overground_storage, @@ -51,10 +113,24 @@ def __init__(self, dependencies): class HydrogenPowerLinkEtrago(Dataset): + """Insert the electrolysis and the fuel cells into the database + + Insert the the electrolysis and the fuel cell links in Germany into + the database for the scenarios eGon2035 and eGon100RE by executing + successively the functions :py:func:`insert_power_to_h2_to_power ` + and :py:func:`insert_power_to_h2_to_power_eGon100RE `. + + """ + + #: + name: str = "HydrogenPowerLinkEtrago" + #: + version: str = "0.0.4" + def __init__(self, dependencies): super().__init__( - name="HydrogenPowerLinkEtrago", - version="0.0.4", + name=self.name, + version=self.version, dependencies=dependencies, tasks=( insert_power_to_h2_to_power, @@ -64,20 +140,48 @@ def __init__(self, dependencies): class HydrogenMethaneLinkEtrago(Dataset): + """Insert the methanisation, feed in and SMR into the database + + Insert the the methanisation, feed in (only in eGon2035) and Steam + Methane Reaction (SMR) links in Germany into the database for the + scenarios eGon2035 and eGon100RE by executing successively the + functions :py:func:`insert_h2_to_ch4_to_h2 ` + and :py:func:`insert_h2_to_ch4_eGon100RE `. + + """ + + #: + name: str = "HydrogenMethaneLinkEtrago" + #: + version: str = "0.0.5" + def __init__(self, dependencies): super().__init__( - name="HydrogenMethaneLinkEtrago", - version="0.0.5", + name=self.name, + version=self.version, dependencies=dependencies, tasks=(insert_h2_to_ch4_to_h2, insert_h2_to_ch4_eGon100RE), ) class HydrogenGridEtrago(Dataset): + """Insert the H2 grid in Germany into the database for eGon100RE + + Insert the H2 links (pipelines) into Germany in the database for the + scenario eGon100RE by executing the function + :py:func:`insert_h2_pipelines `. + + """ + + #: + name: str = "HydrogenGridEtrago" + #: + version: str = "0.0.1" + def __init__(self, dependencies): super().__init__( - name="HydrogenGridEtrago", - version="0.0.1", + name=self.name, + version=self.version, dependencies=dependencies, tasks=(insert_h2_pipelines,), ) From 2fb1731ace8087a208944cf695f712c0dcb20a9e Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Wed, 15 Feb 2023 15:44:02 +0100 Subject: [PATCH 23/38] Fix conversion factor and erroneous function documentation --- src/egon/data/datasets/gas_neighbours/eGon2035.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/egon/data/datasets/gas_neighbours/eGon2035.py b/src/egon/data/datasets/gas_neighbours/eGon2035.py index 5fb9abe12..7637faf2c 100755 --- a/src/egon/data/datasets/gas_neighbours/eGon2035.py +++ b/src/egon/data/datasets/gas_neighbours/eGon2035.py @@ -593,8 +593,8 @@ def calc_global_ch4_demand(Norway_global_demand_1y): .drop(columns=["Parameter", "Year"]) ) - # Conversion GWh/d to MWh/h - conversion_factor = 1000 / 24 + # Conversion GWh/d to MWh/y + conversion_factor = 1000 * 365 df_2035 = pd.concat([df_2040, df_2030], axis=1) df_2035["GlobD_2035"] = ( @@ -603,7 +603,7 @@ def calc_global_ch4_demand(Norway_global_demand_1y): df_2035.loc["NOS0"] = [ 0, 0, - Norway_global_demand_1y / 8760, + Norway_global_demand_1y, ] # Manually add Norway demand grouped_demands = df_2035.drop( columns=["Value_2030", "Value_2040"] @@ -938,8 +938,8 @@ def calc_global_power_to_h2_demand(): Returns ------- - pandas.DataFrame - Global power-to-h2 demand per foreign node + global_power_to_h2_demand : pandas.DataFrame + Global hourly power-to-h2 demand per foreign node """ sources = config.datasets()["gas_neighbours"]["sources"] @@ -1026,12 +1026,12 @@ def insert_power_to_h2_demand(global_power_to_h2_demand): """Insert H2 demands into database for eGon2035 Detailled description - This function insert data in the database and has no return. + This function inserts data in the database and has no return. Parameters ---------- global_power_to_h2_demand : pandas.DataFrame - Global H2 demand per foreign node in 1 year + Global hourly power-to-h2 demand per foreign node """ sources = config.datasets()["gas_neighbours"]["sources"] From b0fc3618e70c8347340f85b7f66381924c99a4c9 Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Wed, 15 Feb 2023 15:45:30 +0100 Subject: [PATCH 24/38] Update CHANGELOG --- CHANGELOG.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 5f2e027ec..15c61a0a1 100755 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -712,6 +712,8 @@ Bug Fixes * Fix URL of TYNDP scenario dataset * Automatically generated tasks now get unique :code:`task_id`\s. Fixes issue `#985`_ via PR `#986`_. +* Fix conversion factor for CH4 loads abroad in eGon2035 + `#1104 `_ .. _PR #692: https://github.com/openego/eGon-data/pull/692 .. _#343: https://github.com/openego/eGon-data/issues/343 From 56d27b068200c82de8e574ac2feb7dade0e97023 Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Wed, 15 Feb 2023 15:45:50 +0100 Subject: [PATCH 25/38] Increase dataset version --- src/egon/data/datasets/gas_neighbours/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/egon/data/datasets/gas_neighbours/__init__.py b/src/egon/data/datasets/gas_neighbours/__init__.py index 8642e48b7..6ede37b10 100755 --- a/src/egon/data/datasets/gas_neighbours/__init__.py +++ b/src/egon/data/datasets/gas_neighbours/__init__.py @@ -16,7 +16,7 @@ class GasNeighbours(Dataset): def __init__(self, dependencies): super().__init__( name="GasNeighbours", - version="0.0.3", + version="0.0.4", dependencies=dependencies, tasks=( {tyndp_gas_generation, tyndp_gas_demand, grid}, From 0525de89a5c7444d98829e991b534133076c6e3d Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Thu, 23 Feb 2023 16:47:53 +0100 Subject: [PATCH 26/38] Improve documentation for gas_area module --- src/egon/data/datasets/gas_areas.py | 60 ++++++++++++++++++++++++++--- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/src/egon/data/datasets/gas_areas.py b/src/egon/data/datasets/gas_areas.py index e1ae47ec4..103090ae8 100755 --- a/src/egon/data/datasets/gas_areas.py +++ b/src/egon/data/datasets/gas_areas.py @@ -1,4 +1,5 @@ -"""The central module containing code to create CH4 and H2 voronoi polygons +""" +The central module containing code to create CH4 and H2 voronoi polygons """ from geoalchemy2.types import Geometry @@ -11,20 +12,58 @@ class GasAreaseGon2035(Dataset): + """Create the gas voronoi table and the gas voronoi areas for eGon2035 + + *Dependencies* + * :py:class:`EtragoSetup ` + * :py:class:`HydrogenBusEtrago ` + * :py:class:`Vg250 ` + * :py:class:`GasNodesAndPipes ` + + *Resulting tables* + * :py:class:`EgonPfHvGasVoronoi ` + + """ + + #: + name: str = "GasAreaseGon2035" + #: + version: str = "0.0.2" + def __init__(self, dependencies): super().__init__( - name="GasAreaseGon2035", - version="0.0.2", + name=self.name, + version=self.version, dependencies=dependencies, tasks=(create_gas_voronoi_table, voronoi_egon2035), ) class GasAreaseGon100RE(Dataset): + """Create the gas voronoi table and the gas voronoi areas for eGon100RE + + *Dependencies* + * :py:class:`EtragoSetup ` + * :py:class:`HydrogenBusEtrago ` + * :py:class:`HydrogenGridEtrago ` + * :py:class:`Vg250 ` + * :py:class:`GasNodesAndPipes ` + * :py:class:`GasAreaseGon2035 ` + + *Resulting tables* + * :py:class:`EgonPfHvGasVoronoi ` + + """ + + #: + name: str = "GasAreaseGon100RE" + #: + version: str = "0.0.1" + def __init__(self, dependencies): super().__init__( - name="GasAreaseGon100RE", - version="0.0.1", + name=self.name, + version=self.version, dependencies=dependencies, tasks=(voronoi_egon100RE), ) @@ -34,16 +73,27 @@ def __init__(self, dependencies): class EgonPfHvGasVoronoi(Base): + """ + Class definition of table grid.egon_gas_voronoi + """ + __tablename__ = "egon_gas_voronoi" __table_args__ = {"schema": "grid"} + #: Name of the scenario scn_name = Column(Text, primary_key=True, nullable=False) + #: Bus of the corresponding area bus_id = Column(BigInteger, primary_key=True, nullable=False) + #: Gas carrier of the voronoi area ("CH4", "H2_grid" or "H2_saltcavern") carrier = Column(Text) + #: Geometry of the corresponding area geom = Column(Geometry("GEOMETRY", 4326)) def create_gas_voronoi_table(): + """ + Create voronoi gas voronoi table + """ engine = db.engine() EgonPfHvGasVoronoi.__table__.drop(bind=engine, checkfirst=True) EgonPfHvGasVoronoi.__table__.create(bind=engine, checkfirst=True) From 5d517d372f7ba5bf554f93ef6ef6a5fb19fd6e22 Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Thu, 23 Feb 2023 17:36:06 +0100 Subject: [PATCH 27/38] Move dependencies and resultings tables documentation from module documentation to dataset documentation --- .../data/datasets/hydrogen_etrago/__init__.py | 65 +++++++++++++++---- .../data/datasets/industrial_gas_demand.py | 49 ++++++++------ 2 files changed, 80 insertions(+), 34 deletions(-) diff --git a/src/egon/data/datasets/hydrogen_etrago/__init__.py b/src/egon/data/datasets/hydrogen_etrago/__init__.py index ffe9b9800..730e319c5 100755 --- a/src/egon/data/datasets/hydrogen_etrago/__init__.py +++ b/src/egon/data/datasets/hydrogen_etrago/__init__.py @@ -13,19 +13,6 @@ :py:mod:`pypsaeursec ` on the hydrogen related components. -Dependencies (pipeline) -======================= -* :py:class:`SaltcavernData ` -* :py:class:`GasNodesAndPipes ` -* :py:class:`SubstationVoronoi ` -* :py:class:`GasAreaseGon2035 ` - -Resulting tables -================ -* :py:class:`grid.egon_etrago_store ` is extended -* :py:class:`grid.egon_etrago_bus ` is extended -* :py:class:`grid.egon_etrago_link ` is extended - """ from egon.data.datasets import Dataset from egon.data.datasets.hydrogen_etrago.bus import ( @@ -58,6 +45,14 @@ class HydrogenBusEtrago(Dataset): :py:func:`insert_hydrogen_buses ` and :py:func:`insert_hydrogen_buses_eGon100RE `. + *Dependencies* + * :py:class:`SaltcavernData ` + * :py:class:`GasNodesAndPipes ` + * :py:class:`SubstationVoronoi ` + + *Resulting* + * :py:class:`grid.egon_etrago_bus ` is extended + """ #: @@ -92,6 +87,17 @@ class HydrogenStoreEtrago(Dataset): * H2 stores (overground and underground) for the scenario eGon100RE with the function :py:func:`insert_H2_storage_eGon100RE `. + *Dependencies* + * :py:class:`SaltcavernData ` + * :py:class:`GasNodesAndPipes ` + * :py:class:`SubstationVoronoi ` + * :py:class:`HydrogenBusEtrago ` + * :py:class:`HydrogenGridEtrago ` + * :py:class:`GasNodesAndPipes ` + + *Resulting* + * :py:class:`grid.egon_etrago_store ` is extended + """ #: @@ -120,6 +126,16 @@ class HydrogenPowerLinkEtrago(Dataset): successively the functions :py:func:`insert_power_to_h2_to_power ` and :py:func:`insert_power_to_h2_to_power_eGon100RE `. + *Dependencies* + * :py:class:`SaltcavernData ` + * :py:class:`GasNodesAndPipes ` + * :py:class:`SubstationVoronoi ` + * :py:class:`HydrogenBusEtrago ` + * :py:class:`HydrogenGridEtrago ` + + *Resulting* + * :py:class:`grid.egon_etrago_link ` is extended + """ #: @@ -148,6 +164,17 @@ class HydrogenMethaneLinkEtrago(Dataset): functions :py:func:`insert_h2_to_ch4_to_h2 ` and :py:func:`insert_h2_to_ch4_eGon100RE `. + *Dependencies* + * :py:class:`SaltcavernData ` + * :py:class:`GasNodesAndPipes ` + * :py:class:`SubstationVoronoi ` + * :py:class:`HydrogenBusEtrago ` + * :py:class:`HydrogenGridEtrago ` + * :py:class:`HydrogenPowerLinkEtrago ` + + *Resulting* + * :py:class:`grid.egon_etrago_link ` is extended + """ #: @@ -171,6 +198,18 @@ class HydrogenGridEtrago(Dataset): scenario eGon100RE by executing the function :py:func:`insert_h2_pipelines `. + *Dependencies* + * :py:class:`SaltcavernData ` + * :py:class:`GasNodesAndPipes ` + * :py:class:`SubstationVoronoi ` + * :py:class:`GasAreaseGon2035 ` + * :py:class:`PypsaEurSec ` + * :py:class:`HydrogenBusEtrago ` + + + *Resulting* + * :py:class:`grid.egon_etrago_link ` is extended + """ #: diff --git a/src/egon/data/datasets/industrial_gas_demand.py b/src/egon/data/datasets/industrial_gas_demand.py index b34feed24..df25ee1a9 100755 --- a/src/egon/data/datasets/industrial_gas_demand.py +++ b/src/egon/data/datasets/industrial_gas_demand.py @@ -6,19 +6,6 @@ methane demands from the opendata.ffe database and to insert them in the database after modification are to be found. -Dependencies (pipeline) -======================= -* :py:class:`ScenarioParameters ` -* :py:class:`GasAreaseGon2035 ` -* :py:class:`GasAreaseGon100RE ` -* :py:class:`GasNodesAndPipes ` -* :py:class:`HydrogenBusEtrago ` - -Resulting tables -================ -* :py:class:`grid.egon_etrago_load ` is extended -* :py:class:`grid.egon_etrago_load_timeseries ` is extended - """ from pathlib import Path @@ -43,11 +30,15 @@ class IndustrialGasDemand(Dataset): - """Download the industrial gas demands from the opendata.ffe database + """ + Download the industrial gas demands from the opendata.ffe database Data are downloaded in the folder ./datasets/gas_data/demand using the function :py:func:`download_industrial_gas_demand` and no dataset is resulting. + *Dependencies* + * :py:class:`ScenarioParameters ` + """ #: @@ -69,9 +60,17 @@ class IndustrialGasDemandeGon2035(Dataset): Insert the industrial methane and hydrogen demands and their associated time series for the scenario eGon2035 by executing the - function :py:func:`insert_industrial_gas_demand_egon2035` which extends the - :py:class:`grid.egon_etrago_load ` - and :py:class:`grid.egon_etrago_load_timeseries ` tables. + function :py:func:`insert_industrial_gas_demand_egon2035`. + + *Dependencies* + * :py:class:`GasAreaseGon2035 ` + * :py:class:`GasNodesAndPipes ` + * :py:class:`HydrogenBusEtrago ` + * :py:class:`IndustrialGasDemand ` + + *Resulting tables* + * :py:class:`grid.egon_etrago_load ` is extended + * :py:class:`grid.egon_etrago_load_timeseries ` is extended """ @@ -94,9 +93,17 @@ class IndustrialGasDemandeGon100RE(Dataset): Insert the industrial methane and hydrogen demands and their associated time series for the scenario eGon100RE by executing the - function :py:func:`insert_industrial_gas_demand_egon100RE` which extends the - :py:class:`grid.egon_etrago_load ` - and :py:class:`grid.egon_etrago_load_timeseries ` tables. + function :py:func:`insert_industrial_gas_demand_egon100RE`. + + *Dependencies* + * :py:class:`GasAreaseGon100RE ` + * :py:class:`GasNodesAndPipes ` + * :py:class:`HydrogenBusEtrago ` + * :py:class:`IndustrialGasDemand ` + + *Resulting tables* + * :py:class:`grid.egon_etrago_load ` is extended + * :py:class:`grid.egon_etrago_load_timeseries ` is extended """ @@ -599,7 +606,7 @@ def download_industrial_gas_demand(): the folder ./datasets/gas_data/demand and the function has no return. These loads are hourly and NUTS3-geographic resolved. For more - information on these data, refer to the `Extremos project documentation `_ + information on these data, refer to the `Extremos project documentation `_. """ correspondance_url = ( From e785a946ef868a3f9335d1ed93e5762ff49acfc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20G=C3=BCnther?= Date: Thu, 23 Feb 2023 13:52:26 +0100 Subject: [PATCH 28/38] Delete rST stubs for removed modules And delete the "__init__.py" marker for the `egon.data.processing` package. The module is no longer used and empty anyway and removing it completely stops the empty documentation stub from getting regenerated. --- docs/reference/egon.data.airflow.tasks.rst | 7 ------- .../reference/egon.data.importing.openstreetmap.rst | 10 ---------- docs/reference/egon.data.processing.rst | 13 ------------- src/egon/data/processing/__init__.py | 0 4 files changed, 30 deletions(-) delete mode 100644 docs/reference/egon.data.airflow.tasks.rst delete mode 100644 docs/reference/egon.data.importing.openstreetmap.rst delete mode 100644 docs/reference/egon.data.processing.rst delete mode 100644 src/egon/data/processing/__init__.py diff --git a/docs/reference/egon.data.airflow.tasks.rst b/docs/reference/egon.data.airflow.tasks.rst deleted file mode 100644 index 3ef30fc47..000000000 --- a/docs/reference/egon.data.airflow.tasks.rst +++ /dev/null @@ -1,7 +0,0 @@ -egon.data.airflow.tasks module -============================== - -.. automodule:: egon.data.airflow.tasks - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/reference/egon.data.importing.openstreetmap.rst b/docs/reference/egon.data.importing.openstreetmap.rst deleted file mode 100644 index a63b2deee..000000000 --- a/docs/reference/egon.data.importing.openstreetmap.rst +++ /dev/null @@ -1,10 +0,0 @@ -egon.data.importing.openstreetmap package -========================================= - -Module contents ---------------- - -.. automodule:: egon.data.importing.openstreetmap - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/reference/egon.data.processing.rst b/docs/reference/egon.data.processing.rst deleted file mode 100644 index f1f65f405..000000000 --- a/docs/reference/egon.data.processing.rst +++ /dev/null @@ -1,13 +0,0 @@ -egon.data.processing namespace -============================== - -Submodules ----------- - -egon.data.processing.openstreetmap module ------------------------------------------ - -.. automodule:: egon.data.processing.openstreetmap - :members: - :undoc-members: - :show-inheritance: diff --git a/src/egon/data/processing/__init__.py b/src/egon/data/processing/__init__.py deleted file mode 100644 index e69de29bb..000000000 From 271f24e63cfb76c58e56782e0a86303497450541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20G=C3=BCnther?= Date: Thu, 23 Feb 2023 09:09:40 +0100 Subject: [PATCH 29/38] Put sphinx-apidoc templates under version control These need to be changed to customize the documentation. Copy them from "sphinx/templates/apidoc/", in order to track the changes. --- docs/_templates/module.rst_t | 8 +++++ docs/_templates/package.rst_t | 57 +++++++++++++++++++++++++++++++++++ docs/_templates/toc.rst_t | 7 +++++ 3 files changed, 72 insertions(+) create mode 100644 docs/_templates/module.rst_t create mode 100644 docs/_templates/package.rst_t create mode 100644 docs/_templates/toc.rst_t diff --git a/docs/_templates/module.rst_t b/docs/_templates/module.rst_t new file mode 100644 index 000000000..49cca84bb --- /dev/null +++ b/docs/_templates/module.rst_t @@ -0,0 +1,8 @@ +{%- if show_headings %} +{{- [basename, "module"] | join(' ') | e | heading }} + +{% endif -%} +.. automodule:: {{ qualname }} +{%- for option in automodule_options %} + :{{ option }}: +{%- endfor %} diff --git a/docs/_templates/package.rst_t b/docs/_templates/package.rst_t new file mode 100644 index 000000000..2229c311b --- /dev/null +++ b/docs/_templates/package.rst_t @@ -0,0 +1,57 @@ +{%- macro automodule(modname, options) -%} +.. automodule:: {{ modname }} +{%- for option in options %} + :{{ option }}: +{%- endfor %} +{%- endmacro %} + +{%- macro toctree(docnames) -%} +.. toctree:: + :maxdepth: {{ maxdepth }} +{% for docname in docnames %} + {{ docname }} +{%- endfor %} +{%- endmacro %} + +{%- if is_namespace %} +{{- [pkgname, "namespace"] | join(" ") | e | heading }} +{% else %} +{{- [pkgname, "package"] | join(" ") | e | heading }} +{% endif %} + +{%- if is_namespace %} +.. py:module:: {{ pkgname }} +{% endif %} + +{%- if modulefirst and not is_namespace %} +{{ automodule(pkgname, automodule_options) }} +{% endif %} + +{%- if subpackages %} +Subpackages +----------- + +{{ toctree(subpackages) }} +{% endif %} + +{%- if submodules %} +Submodules +---------- +{% if separatemodules %} +{{ toctree(submodules) }} +{% else %} +{%- for submodule in submodules %} +{% if show_headings %} +{{- [submodule, "module"] | join(" ") | e | heading(2) }} +{% endif %} +{{ automodule(submodule, automodule_options) }} +{% endfor %} +{%- endif %} +{%- endif %} + +{%- if not modulefirst and not is_namespace %} +Module contents +--------------- + +{{ automodule(pkgname, automodule_options) }} +{% endif %} diff --git a/docs/_templates/toc.rst_t b/docs/_templates/toc.rst_t new file mode 100644 index 000000000..878540cef --- /dev/null +++ b/docs/_templates/toc.rst_t @@ -0,0 +1,7 @@ +{{ header | heading }} + +.. toctree:: + :maxdepth: {{ maxdepth }} +{% for docname in docnames %} + {{ docname }} +{%- endfor %} From a6844d79fb7ab70136e2d4c2c5b4b1084728df9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20G=C3=BCnther?= Date: Thu, 23 Feb 2023 16:50:03 +0100 Subject: [PATCH 30/38] Customize the `sphinx-apidoc` templates Reduce clutter by removing some headings like "Module contents", "Submodules" and "Subpackages". Also, don't differentiate so strictly between modules and packages. Treat packages just as modules which are potentially empty apart from references to sub-modules or sub-packages. Or treat modules as packages with initialization code but no sub-modules or sub-packages. Either way, treat them uniformly as much as possible. Second, use only the last component of the fully qualified module or package name in headings and TOC entries. The fully qualified name should always be reconstructable by looking at the path under which the module's/package's documentation page is accessed. Last but not least, put an empty line at the bottom of "module.rst_t". Otherwise the generated rST stubs would not have a newline at the end the file which would make the pre-commit hooks complain. The empty line at the template is the easiest way to fix this. The correct way would be to initialize the `jinja2.Environment` that renders the template with `keep_trailing_newline=True`, but I don't know how to do that within `sphinx-apidoc`, so using this workaround instead. --- docs/_templates/module.rst_t | 3 ++- docs/_templates/package.rst_t | 30 ++++++++++-------------------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/docs/_templates/module.rst_t b/docs/_templates/module.rst_t index 49cca84bb..aabb72ade 100644 --- a/docs/_templates/module.rst_t +++ b/docs/_templates/module.rst_t @@ -1,8 +1,9 @@ {%- if show_headings %} -{{- [basename, "module"] | join(' ') | e | heading }} +{{- basename.split(".")[-1] | e | heading }} {% endif -%} .. automodule:: {{ qualname }} {%- for option in automodule_options %} :{{ option }}: {%- endfor %} + diff --git a/docs/_templates/package.rst_t b/docs/_templates/package.rst_t index 2229c311b..e27dc3fa5 100644 --- a/docs/_templates/package.rst_t +++ b/docs/_templates/package.rst_t @@ -1,11 +1,13 @@ -{%- macro automodule(modname, options) -%} +{% macro automodule(modname, options) %} + .. automodule:: {{ modname }} {%- for option in options %} :{{ option }}: {%- endfor %} {%- endmacro %} -{%- macro toctree(docnames) -%} +{% macro toctree(docnames) -%} + .. toctree:: :maxdepth: {{ maxdepth }} {% for docname in docnames %} @@ -13,13 +15,10 @@ {%- endfor %} {%- endmacro %} -{%- if is_namespace %} -{{- [pkgname, "namespace"] | join(" ") | e | heading }} -{% else %} -{{- [pkgname, "package"] | join(" ") | e | heading }} -{% endif %} +{{- pkgname.split(".")[-1] | e | heading }} {%- if is_namespace %} + .. py:module:: {{ pkgname }} {% endif %} @@ -27,19 +26,13 @@ {{ automodule(pkgname, automodule_options) }} {% endif %} -{%- if subpackages %} -Subpackages ------------ - -{{ toctree(subpackages) }} -{% endif %} - {%- if submodules %} -Submodules ----------- {% if separatemodules %} -{{ toctree(submodules) }} +{{- toctree(submodules + subpackages) }} {% else %} +{%- if subpackages %} +{{ toctree(subpackages) }} +{% endif %} {%- for submodule in submodules %} {% if show_headings %} {{- [submodule, "module"] | join(" ") | e | heading(2) }} @@ -50,8 +43,5 @@ Submodules {%- endif %} {%- if not modulefirst and not is_namespace %} -Module contents ---------------- - {{ automodule(pkgname, automodule_options) }} {% endif %} From 080a0d524659ac86123bd99dc061d8437a2e6e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20G=C3=BCnther?= Date: Sun, 26 Feb 2023 20:58:55 +0100 Subject: [PATCH 31/38] Add generated API documentation rST files Generated by running: ```sh sphinx-apidoc \ --implicit-namespaces --no-toc -d 1 -e -o docs/reference/ -t docs/_templates \ src/egon/ ``` inside the repository root. --- .../egon.data.airflow.dags.pipeline.rst | 4 +- docs/reference/egon.data.airflow.dags.rst | 18 ++--- docs/reference/egon.data.airflow.rst | 22 +----- docs/reference/egon.data.cli.rst | 4 +- docs/reference/egon.data.config.rst | 7 ++ .../egon.data.dataset_configuration.rst | 7 ++ .../egon.data.datasets.DSM_cts_ind.rst | 7 ++ .../egon.data.datasets.calculate_dlr.rst | 7 ++ .../reference/egon.data.datasets.ch4_prod.rst | 7 ++ .../egon.data.datasets.ch4_storages.rst | 7 ++ .../egon.data.datasets.chp.match_nep.rst | 7 ++ docs/reference/egon.data.datasets.chp.rst | 16 ++++ .../egon.data.datasets.chp.small_chp.rst | 7 ++ .../egon.data.datasets.chp_etrago.rst | 7 ++ .../egon.data.datasets.data_bundle.rst | 10 +++ .../reference/egon.data.datasets.database.rst | 7 ++ ...sets.demandregio.install_disaggregator.rst | 7 ++ .../egon.data.datasets.demandregio.rst | 15 ++++ ...a.datasets.district_heating_areas.plot.rst | 7 ++ ...n.data.datasets.district_heating_areas.rst | 15 ++++ ...on.data.datasets.electrical_neighbours.rst | 7 ++ .../egon.data.datasets.electricity_demand.rst | 15 ++++ ...a.datasets.electricity_demand.temporal.rst | 7 ++ ...ata.datasets.electricity_demand_etrago.rst | 7 ++ ...ricity_demand_timeseries.cts_buildings.rst | 7 ++ ...tricity_demand_timeseries.hh_buildings.rst | 7 ++ ...ctricity_demand_timeseries.hh_profiles.rst | 7 ++ ....electricity_demand_timeseries.mapping.rst | 7 ++ ...datasets.electricity_demand_timeseries.rst | 19 +++++ ...ts.electricity_demand_timeseries.tools.rst | 7 ++ ...y.heavy_duty_transport.create_h2_buses.rst | 7 ++ ...emobility.heavy_duty_transport.data_io.rst | 7 ++ ...bility.heavy_duty_transport.db_classes.rst | 7 ++ ..._duty_transport.h2_demand_distribution.rst | 7 ++ ...atasets.emobility.heavy_duty_transport.rst | 18 +++++ ...motorized_individual_travel.db_classes.rst | 7 ++ ...orized_individual_travel.ev_allocation.rst | 7 ++ ...ty.motorized_individual_travel.helpers.rst | 7 ++ ...zed_individual_travel.model_timeseries.rst | 7 ++ ....emobility.motorized_individual_travel.rst | 19 +++++ ...lity.motorized_individual_travel.tests.rst | 7 ++ ...vel_charging_infrastructure.db_classes.rst | 7 ++ ...frastructure.infrastructure_allocation.rst | 7 ++ ...ividual_travel_charging_infrastructure.rst | 17 +++++ ...avel_charging_infrastructure.use_cases.rst | 7 ++ .../egon.data.datasets.emobility.rst | 6 ++ docs/reference/egon.data.datasets.era5.rst | 7 ++ .../egon.data.datasets.etrago_helpers.rst | 7 ++ .../egon.data.datasets.etrago_setup.rst | 7 ++ .../egon.data.datasets.fill_etrago_gen.rst | 7 ++ ...egon.data.datasets.fix_ehv_subnetworks.rst | 7 ++ .../egon.data.datasets.gas_areas.rst | 7 ++ .../reference/egon.data.datasets.gas_grid.rst | 7 ++ ...data.datasets.gas_neighbours.eGon100RE.rst | 7 ++ ....data.datasets.gas_neighbours.eGon2035.rst | 7 ++ ...ata.datasets.gas_neighbours.gas_abroad.rst | 7 ++ .../egon.data.datasets.gas_neighbours.rst | 17 +++++ .../egon.data.datasets.generate_voronoi.rst | 7 ++ .../egon.data.datasets.heat_demand.rst | 10 +++ .../egon.data.datasets.heat_demand_europe.rst | 7 ++ ....datasets.heat_demand_timeseries.daily.rst | 7 ++ ...tasets.heat_demand_timeseries.idp_pool.rst | 7 ++ ...n.data.datasets.heat_demand_timeseries.rst | 17 +++++ ....heat_demand_timeseries.service_sector.rst | 7 ++ ...n.data.datasets.heat_etrago.hts_etrago.rst | 7 ++ ...ata.datasets.heat_etrago.power_to_heat.rst | 7 ++ .../egon.data.datasets.heat_etrago.rst | 16 ++++ ....datasets.heat_supply.district_heating.rst | 7 ++ ...n.data.datasets.heat_supply.geothermal.rst | 7 ++ ...atasets.heat_supply.individual_heating.rst | 7 ++ .../egon.data.datasets.heat_supply.rst | 17 +++++ ...egon.data.datasets.hydrogen_etrago.bus.rst | 7 ++ ....data.datasets.hydrogen_etrago.h2_grid.rst | 7 ++ ...ata.datasets.hydrogen_etrago.h2_to_ch4.rst | 7 ++ ...a.datasets.hydrogen_etrago.power_to_h2.rst | 7 ++ .../egon.data.datasets.hydrogen_etrago.rst | 19 +++++ ....data.datasets.hydrogen_etrago.storage.rst | 7 ++ ...on.data.datasets.industrial_gas_demand.rst | 7 ++ .../egon.data.datasets.industrial_sites.rst | 10 +++ .../reference/egon.data.datasets.industry.rst | 15 ++++ .../egon.data.datasets.industry.temporal.rst | 7 ++ .../reference/egon.data.datasets.loadarea.rst | 10 +++ .../egon.data.datasets.low_flex_scenario.rst | 10 +++ docs/reference/egon.data.datasets.mastr.rst | 7 ++ .../egon.data.datasets.mv_grid_districts.rst | 7 ++ docs/reference/egon.data.datasets.osm.rst | 10 +++ ...on.data.datasets.osm_buildings_streets.rst | 10 +++ .../reference/egon.data.datasets.osmtgmod.rst | 15 ++++ ...egon.data.datasets.osmtgmod.substation.rst | 7 ++ ....data.datasets.power_etrago.match_ocgt.rst | 7 ++ .../egon.data.datasets.power_etrago.rst | 15 ++++ ...asets.power_plants.assign_weather_data.rst | 7 ++ ...ata.datasets.power_plants.conventional.rst | 7 ++ .../egon.data.datasets.power_plants.mastr.rst | 7 ++ ...atasets.power_plants.pv_ground_mounted.rst | 7 ++ ....data.datasets.power_plants.pv_rooftop.rst | 7 ++ ...sets.power_plants.pv_rooftop_buildings.rst | 7 ++ .../egon.data.datasets.power_plants.rst | 22 ++++++ ....data.datasets.power_plants.wind_farms.rst | 7 ++ ...ta.datasets.power_plants.wind_offshore.rst | 7 ++ .../egon.data.datasets.pypsaeursec.rst | 10 +++ .../egon.data.datasets.re_potential_areas.rst | 10 +++ .../egon.data.datasets.renewable_feedin.rst | 7 ++ docs/reference/egon.data.datasets.rst | 73 +++++++++++++++++++ .../egon.data.datasets.saltcavern.rst | 10 +++ .../egon.data.datasets.sanity_checks.rst | 7 ++ ...egon.data.datasets.scenario_capacities.rst | 7 ++ ...atasets.scenario_parameters.parameters.rst | 7 ++ ...egon.data.datasets.scenario_parameters.rst | 15 ++++ .../egon.data.datasets.society_prognosis.rst | 7 ++ ....data.datasets.storages.home_batteries.rst | 7 ++ ...on.data.datasets.storages.pumped_hydro.rst | 7 ++ .../reference/egon.data.datasets.storages.rst | 16 ++++ .../egon.data.datasets.storages_etrago.rst | 10 +++ .../egon.data.datasets.substation.rst | 10 +++ .../egon.data.datasets.substation_voronoi.rst | 7 ++ docs/reference/egon.data.datasets.tyndp.rst | 7 ++ docs/reference/egon.data.datasets.vg250.rst | 10 +++ ....data.datasets.vg250_mv_grid_districts.rst | 7 ++ docs/reference/egon.data.datasets.zensus.rst | 10 +++ ...data.datasets.zensus_mv_grid_districts.rst | 7 ++ .../egon.data.datasets.zensus_vg250.rst | 7 ++ docs/reference/egon.data.db.rst | 7 ++ docs/reference/egon.data.metadata.rst | 7 ++ docs/reference/egon.data.rst | 23 ++++-- docs/reference/egon.data.subprocess.rst | 7 ++ docs/reference/egon.rst | 6 ++ 127 files changed, 1178 insertions(+), 38 deletions(-) create mode 100644 docs/reference/egon.data.config.rst create mode 100644 docs/reference/egon.data.dataset_configuration.rst create mode 100644 docs/reference/egon.data.datasets.DSM_cts_ind.rst create mode 100644 docs/reference/egon.data.datasets.calculate_dlr.rst create mode 100644 docs/reference/egon.data.datasets.ch4_prod.rst create mode 100644 docs/reference/egon.data.datasets.ch4_storages.rst create mode 100644 docs/reference/egon.data.datasets.chp.match_nep.rst create mode 100644 docs/reference/egon.data.datasets.chp.rst create mode 100644 docs/reference/egon.data.datasets.chp.small_chp.rst create mode 100644 docs/reference/egon.data.datasets.chp_etrago.rst create mode 100644 docs/reference/egon.data.datasets.data_bundle.rst create mode 100644 docs/reference/egon.data.datasets.database.rst create mode 100644 docs/reference/egon.data.datasets.demandregio.install_disaggregator.rst create mode 100644 docs/reference/egon.data.datasets.demandregio.rst create mode 100644 docs/reference/egon.data.datasets.district_heating_areas.plot.rst create mode 100644 docs/reference/egon.data.datasets.district_heating_areas.rst create mode 100644 docs/reference/egon.data.datasets.electrical_neighbours.rst create mode 100644 docs/reference/egon.data.datasets.electricity_demand.rst create mode 100644 docs/reference/egon.data.datasets.electricity_demand.temporal.rst create mode 100644 docs/reference/egon.data.datasets.electricity_demand_etrago.rst create mode 100644 docs/reference/egon.data.datasets.electricity_demand_timeseries.cts_buildings.rst create mode 100644 docs/reference/egon.data.datasets.electricity_demand_timeseries.hh_buildings.rst create mode 100644 docs/reference/egon.data.datasets.electricity_demand_timeseries.hh_profiles.rst create mode 100644 docs/reference/egon.data.datasets.electricity_demand_timeseries.mapping.rst create mode 100644 docs/reference/egon.data.datasets.electricity_demand_timeseries.rst create mode 100644 docs/reference/egon.data.datasets.electricity_demand_timeseries.tools.rst create mode 100644 docs/reference/egon.data.datasets.emobility.heavy_duty_transport.create_h2_buses.rst create mode 100644 docs/reference/egon.data.datasets.emobility.heavy_duty_transport.data_io.rst create mode 100644 docs/reference/egon.data.datasets.emobility.heavy_duty_transport.db_classes.rst create mode 100644 docs/reference/egon.data.datasets.emobility.heavy_duty_transport.h2_demand_distribution.rst create mode 100644 docs/reference/egon.data.datasets.emobility.heavy_duty_transport.rst create mode 100644 docs/reference/egon.data.datasets.emobility.motorized_individual_travel.db_classes.rst create mode 100644 docs/reference/egon.data.datasets.emobility.motorized_individual_travel.ev_allocation.rst create mode 100644 docs/reference/egon.data.datasets.emobility.motorized_individual_travel.helpers.rst create mode 100644 docs/reference/egon.data.datasets.emobility.motorized_individual_travel.model_timeseries.rst create mode 100644 docs/reference/egon.data.datasets.emobility.motorized_individual_travel.rst create mode 100644 docs/reference/egon.data.datasets.emobility.motorized_individual_travel.tests.rst create mode 100644 docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.db_classes.rst create mode 100644 docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.infrastructure_allocation.rst create mode 100644 docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.rst create mode 100644 docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.use_cases.rst create mode 100644 docs/reference/egon.data.datasets.emobility.rst create mode 100644 docs/reference/egon.data.datasets.era5.rst create mode 100644 docs/reference/egon.data.datasets.etrago_helpers.rst create mode 100644 docs/reference/egon.data.datasets.etrago_setup.rst create mode 100644 docs/reference/egon.data.datasets.fill_etrago_gen.rst create mode 100644 docs/reference/egon.data.datasets.fix_ehv_subnetworks.rst create mode 100644 docs/reference/egon.data.datasets.gas_areas.rst create mode 100644 docs/reference/egon.data.datasets.gas_grid.rst create mode 100644 docs/reference/egon.data.datasets.gas_neighbours.eGon100RE.rst create mode 100644 docs/reference/egon.data.datasets.gas_neighbours.eGon2035.rst create mode 100644 docs/reference/egon.data.datasets.gas_neighbours.gas_abroad.rst create mode 100644 docs/reference/egon.data.datasets.gas_neighbours.rst create mode 100644 docs/reference/egon.data.datasets.generate_voronoi.rst create mode 100644 docs/reference/egon.data.datasets.heat_demand.rst create mode 100644 docs/reference/egon.data.datasets.heat_demand_europe.rst create mode 100644 docs/reference/egon.data.datasets.heat_demand_timeseries.daily.rst create mode 100644 docs/reference/egon.data.datasets.heat_demand_timeseries.idp_pool.rst create mode 100644 docs/reference/egon.data.datasets.heat_demand_timeseries.rst create mode 100644 docs/reference/egon.data.datasets.heat_demand_timeseries.service_sector.rst create mode 100644 docs/reference/egon.data.datasets.heat_etrago.hts_etrago.rst create mode 100644 docs/reference/egon.data.datasets.heat_etrago.power_to_heat.rst create mode 100644 docs/reference/egon.data.datasets.heat_etrago.rst create mode 100644 docs/reference/egon.data.datasets.heat_supply.district_heating.rst create mode 100644 docs/reference/egon.data.datasets.heat_supply.geothermal.rst create mode 100644 docs/reference/egon.data.datasets.heat_supply.individual_heating.rst create mode 100644 docs/reference/egon.data.datasets.heat_supply.rst create mode 100644 docs/reference/egon.data.datasets.hydrogen_etrago.bus.rst create mode 100644 docs/reference/egon.data.datasets.hydrogen_etrago.h2_grid.rst create mode 100644 docs/reference/egon.data.datasets.hydrogen_etrago.h2_to_ch4.rst create mode 100644 docs/reference/egon.data.datasets.hydrogen_etrago.power_to_h2.rst create mode 100644 docs/reference/egon.data.datasets.hydrogen_etrago.rst create mode 100644 docs/reference/egon.data.datasets.hydrogen_etrago.storage.rst create mode 100644 docs/reference/egon.data.datasets.industrial_gas_demand.rst create mode 100644 docs/reference/egon.data.datasets.industrial_sites.rst create mode 100644 docs/reference/egon.data.datasets.industry.rst create mode 100644 docs/reference/egon.data.datasets.industry.temporal.rst create mode 100644 docs/reference/egon.data.datasets.loadarea.rst create mode 100644 docs/reference/egon.data.datasets.low_flex_scenario.rst create mode 100644 docs/reference/egon.data.datasets.mastr.rst create mode 100644 docs/reference/egon.data.datasets.mv_grid_districts.rst create mode 100644 docs/reference/egon.data.datasets.osm.rst create mode 100644 docs/reference/egon.data.datasets.osm_buildings_streets.rst create mode 100644 docs/reference/egon.data.datasets.osmtgmod.rst create mode 100644 docs/reference/egon.data.datasets.osmtgmod.substation.rst create mode 100644 docs/reference/egon.data.datasets.power_etrago.match_ocgt.rst create mode 100644 docs/reference/egon.data.datasets.power_etrago.rst create mode 100644 docs/reference/egon.data.datasets.power_plants.assign_weather_data.rst create mode 100644 docs/reference/egon.data.datasets.power_plants.conventional.rst create mode 100644 docs/reference/egon.data.datasets.power_plants.mastr.rst create mode 100644 docs/reference/egon.data.datasets.power_plants.pv_ground_mounted.rst create mode 100644 docs/reference/egon.data.datasets.power_plants.pv_rooftop.rst create mode 100644 docs/reference/egon.data.datasets.power_plants.pv_rooftop_buildings.rst create mode 100644 docs/reference/egon.data.datasets.power_plants.rst create mode 100644 docs/reference/egon.data.datasets.power_plants.wind_farms.rst create mode 100644 docs/reference/egon.data.datasets.power_plants.wind_offshore.rst create mode 100644 docs/reference/egon.data.datasets.pypsaeursec.rst create mode 100644 docs/reference/egon.data.datasets.re_potential_areas.rst create mode 100644 docs/reference/egon.data.datasets.renewable_feedin.rst create mode 100644 docs/reference/egon.data.datasets.rst create mode 100644 docs/reference/egon.data.datasets.saltcavern.rst create mode 100644 docs/reference/egon.data.datasets.sanity_checks.rst create mode 100644 docs/reference/egon.data.datasets.scenario_capacities.rst create mode 100644 docs/reference/egon.data.datasets.scenario_parameters.parameters.rst create mode 100644 docs/reference/egon.data.datasets.scenario_parameters.rst create mode 100644 docs/reference/egon.data.datasets.society_prognosis.rst create mode 100644 docs/reference/egon.data.datasets.storages.home_batteries.rst create mode 100644 docs/reference/egon.data.datasets.storages.pumped_hydro.rst create mode 100644 docs/reference/egon.data.datasets.storages.rst create mode 100644 docs/reference/egon.data.datasets.storages_etrago.rst create mode 100644 docs/reference/egon.data.datasets.substation.rst create mode 100644 docs/reference/egon.data.datasets.substation_voronoi.rst create mode 100644 docs/reference/egon.data.datasets.tyndp.rst create mode 100644 docs/reference/egon.data.datasets.vg250.rst create mode 100644 docs/reference/egon.data.datasets.vg250_mv_grid_districts.rst create mode 100644 docs/reference/egon.data.datasets.zensus.rst create mode 100644 docs/reference/egon.data.datasets.zensus_mv_grid_districts.rst create mode 100644 docs/reference/egon.data.datasets.zensus_vg250.rst create mode 100644 docs/reference/egon.data.db.rst create mode 100644 docs/reference/egon.data.metadata.rst create mode 100644 docs/reference/egon.data.subprocess.rst create mode 100644 docs/reference/egon.rst diff --git a/docs/reference/egon.data.airflow.dags.pipeline.rst b/docs/reference/egon.data.airflow.dags.pipeline.rst index f01f7fa18..cfb6150bf 100644 --- a/docs/reference/egon.data.airflow.dags.pipeline.rst +++ b/docs/reference/egon.data.airflow.dags.pipeline.rst @@ -1,5 +1,5 @@ -egon.data.airflow.dags.pipeline module -====================================== +pipeline +======== .. automodule:: egon.data.airflow.dags.pipeline :members: diff --git a/docs/reference/egon.data.airflow.dags.rst b/docs/reference/egon.data.airflow.dags.rst index 0a73941f8..3e75b8b11 100644 --- a/docs/reference/egon.data.airflow.dags.rst +++ b/docs/reference/egon.data.airflow.dags.rst @@ -1,13 +1,11 @@ -egon.data.airflow.dags namespace -================================ -Submodules ----------- -egon.data.airflow.dags.pipeline module --------------------------------------- +dags +==== -.. automodule:: egon.data.airflow.dags.pipeline - :members: - :undoc-members: - :show-inheritance: +.. py:module:: egon.data.airflow.dags + +.. toctree:: + :maxdepth: 1 + + egon.data.airflow.dags.pipeline diff --git a/docs/reference/egon.data.airflow.rst b/docs/reference/egon.data.airflow.rst index eb9329ec7..dc39c05bc 100644 --- a/docs/reference/egon.data.airflow.rst +++ b/docs/reference/egon.data.airflow.rst @@ -1,26 +1,10 @@ -egon.data.airflow package -========================= -.. automodule:: egon.data.airflow - :members: - :undoc-members: - :show-inheritance: -Subpackages ------------ +airflow +======= -.. toctree:: - :maxdepth: 4 - egon.data.airflow.dags - -Submodules ----------- - -egon.data.airflow.tasks module ------------------------------- - -.. automodule:: egon.data.airflow.tasks +.. automodule:: egon.data.airflow :members: :undoc-members: :show-inheritance: diff --git a/docs/reference/egon.data.cli.rst b/docs/reference/egon.data.cli.rst index ec40e0a54..f679d3916 100644 --- a/docs/reference/egon.data.cli.rst +++ b/docs/reference/egon.data.cli.rst @@ -1,5 +1,5 @@ -egon.data.cli module -==================== +cli +=== .. automodule:: egon.data.cli :members: diff --git a/docs/reference/egon.data.config.rst b/docs/reference/egon.data.config.rst new file mode 100644 index 000000000..17f1a2b94 --- /dev/null +++ b/docs/reference/egon.data.config.rst @@ -0,0 +1,7 @@ +config +====== + +.. automodule:: egon.data.config + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.dataset_configuration.rst b/docs/reference/egon.data.dataset_configuration.rst new file mode 100644 index 000000000..7d3de7314 --- /dev/null +++ b/docs/reference/egon.data.dataset_configuration.rst @@ -0,0 +1,7 @@ +dataset\_configuration +====================== + +.. automodule:: egon.data.dataset_configuration + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.DSM_cts_ind.rst b/docs/reference/egon.data.datasets.DSM_cts_ind.rst new file mode 100644 index 000000000..558a02a6d --- /dev/null +++ b/docs/reference/egon.data.datasets.DSM_cts_ind.rst @@ -0,0 +1,7 @@ +DSM\_cts\_ind +============= + +.. automodule:: egon.data.datasets.DSM_cts_ind + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.calculate_dlr.rst b/docs/reference/egon.data.datasets.calculate_dlr.rst new file mode 100644 index 000000000..e328f3550 --- /dev/null +++ b/docs/reference/egon.data.datasets.calculate_dlr.rst @@ -0,0 +1,7 @@ +calculate\_dlr +============== + +.. automodule:: egon.data.datasets.calculate_dlr + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.ch4_prod.rst b/docs/reference/egon.data.datasets.ch4_prod.rst new file mode 100644 index 000000000..03580b320 --- /dev/null +++ b/docs/reference/egon.data.datasets.ch4_prod.rst @@ -0,0 +1,7 @@ +ch4\_prod +========= + +.. automodule:: egon.data.datasets.ch4_prod + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.ch4_storages.rst b/docs/reference/egon.data.datasets.ch4_storages.rst new file mode 100644 index 000000000..e1d050b76 --- /dev/null +++ b/docs/reference/egon.data.datasets.ch4_storages.rst @@ -0,0 +1,7 @@ +ch4\_storages +============= + +.. automodule:: egon.data.datasets.ch4_storages + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.chp.match_nep.rst b/docs/reference/egon.data.datasets.chp.match_nep.rst new file mode 100644 index 000000000..f0ec7a0c4 --- /dev/null +++ b/docs/reference/egon.data.datasets.chp.match_nep.rst @@ -0,0 +1,7 @@ +match\_nep +========== + +.. automodule:: egon.data.datasets.chp.match_nep + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.chp.rst b/docs/reference/egon.data.datasets.chp.rst new file mode 100644 index 000000000..02970f1ad --- /dev/null +++ b/docs/reference/egon.data.datasets.chp.rst @@ -0,0 +1,16 @@ + + +chp +=== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.chp.match_nep + egon.data.datasets.chp.small_chp + + + +.. automodule:: egon.data.datasets.chp + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.chp.small_chp.rst b/docs/reference/egon.data.datasets.chp.small_chp.rst new file mode 100644 index 000000000..96e013b16 --- /dev/null +++ b/docs/reference/egon.data.datasets.chp.small_chp.rst @@ -0,0 +1,7 @@ +small\_chp +========== + +.. automodule:: egon.data.datasets.chp.small_chp + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.chp_etrago.rst b/docs/reference/egon.data.datasets.chp_etrago.rst new file mode 100644 index 000000000..36ce2265b --- /dev/null +++ b/docs/reference/egon.data.datasets.chp_etrago.rst @@ -0,0 +1,7 @@ +chp\_etrago +=========== + +.. automodule:: egon.data.datasets.chp_etrago + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.data_bundle.rst b/docs/reference/egon.data.datasets.data_bundle.rst new file mode 100644 index 000000000..96adc5abd --- /dev/null +++ b/docs/reference/egon.data.datasets.data_bundle.rst @@ -0,0 +1,10 @@ + + +data\_bundle +============ + + +.. automodule:: egon.data.datasets.data_bundle + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.database.rst b/docs/reference/egon.data.datasets.database.rst new file mode 100644 index 000000000..9db9ab7f7 --- /dev/null +++ b/docs/reference/egon.data.datasets.database.rst @@ -0,0 +1,7 @@ +database +======== + +.. automodule:: egon.data.datasets.database + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.demandregio.install_disaggregator.rst b/docs/reference/egon.data.datasets.demandregio.install_disaggregator.rst new file mode 100644 index 000000000..adf0ac93f --- /dev/null +++ b/docs/reference/egon.data.datasets.demandregio.install_disaggregator.rst @@ -0,0 +1,7 @@ +install\_disaggregator +====================== + +.. automodule:: egon.data.datasets.demandregio.install_disaggregator + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.demandregio.rst b/docs/reference/egon.data.datasets.demandregio.rst new file mode 100644 index 000000000..7fc1f8f0a --- /dev/null +++ b/docs/reference/egon.data.datasets.demandregio.rst @@ -0,0 +1,15 @@ + + +demandregio +=========== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.demandregio.install_disaggregator + + + +.. automodule:: egon.data.datasets.demandregio + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.district_heating_areas.plot.rst b/docs/reference/egon.data.datasets.district_heating_areas.plot.rst new file mode 100644 index 000000000..c0c0fc2d0 --- /dev/null +++ b/docs/reference/egon.data.datasets.district_heating_areas.plot.rst @@ -0,0 +1,7 @@ +plot +==== + +.. automodule:: egon.data.datasets.district_heating_areas.plot + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.district_heating_areas.rst b/docs/reference/egon.data.datasets.district_heating_areas.rst new file mode 100644 index 000000000..75216cf69 --- /dev/null +++ b/docs/reference/egon.data.datasets.district_heating_areas.rst @@ -0,0 +1,15 @@ + + +district\_heating\_areas +======================== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.district_heating_areas.plot + + + +.. automodule:: egon.data.datasets.district_heating_areas + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.electrical_neighbours.rst b/docs/reference/egon.data.datasets.electrical_neighbours.rst new file mode 100644 index 000000000..05a5e1401 --- /dev/null +++ b/docs/reference/egon.data.datasets.electrical_neighbours.rst @@ -0,0 +1,7 @@ +electrical\_neighbours +====================== + +.. automodule:: egon.data.datasets.electrical_neighbours + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.electricity_demand.rst b/docs/reference/egon.data.datasets.electricity_demand.rst new file mode 100644 index 000000000..aefad3cd0 --- /dev/null +++ b/docs/reference/egon.data.datasets.electricity_demand.rst @@ -0,0 +1,15 @@ + + +electricity\_demand +=================== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.electricity_demand.temporal + + + +.. automodule:: egon.data.datasets.electricity_demand + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.electricity_demand.temporal.rst b/docs/reference/egon.data.datasets.electricity_demand.temporal.rst new file mode 100644 index 000000000..a3f41609f --- /dev/null +++ b/docs/reference/egon.data.datasets.electricity_demand.temporal.rst @@ -0,0 +1,7 @@ +temporal +======== + +.. automodule:: egon.data.datasets.electricity_demand.temporal + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.electricity_demand_etrago.rst b/docs/reference/egon.data.datasets.electricity_demand_etrago.rst new file mode 100644 index 000000000..b7edffc6d --- /dev/null +++ b/docs/reference/egon.data.datasets.electricity_demand_etrago.rst @@ -0,0 +1,7 @@ +electricity\_demand\_etrago +=========================== + +.. automodule:: egon.data.datasets.electricity_demand_etrago + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.electricity_demand_timeseries.cts_buildings.rst b/docs/reference/egon.data.datasets.electricity_demand_timeseries.cts_buildings.rst new file mode 100644 index 000000000..acce69189 --- /dev/null +++ b/docs/reference/egon.data.datasets.electricity_demand_timeseries.cts_buildings.rst @@ -0,0 +1,7 @@ +cts\_buildings +============== + +.. automodule:: egon.data.datasets.electricity_demand_timeseries.cts_buildings + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.electricity_demand_timeseries.hh_buildings.rst b/docs/reference/egon.data.datasets.electricity_demand_timeseries.hh_buildings.rst new file mode 100644 index 000000000..da490bfe1 --- /dev/null +++ b/docs/reference/egon.data.datasets.electricity_demand_timeseries.hh_buildings.rst @@ -0,0 +1,7 @@ +hh\_buildings +============= + +.. automodule:: egon.data.datasets.electricity_demand_timeseries.hh_buildings + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.electricity_demand_timeseries.hh_profiles.rst b/docs/reference/egon.data.datasets.electricity_demand_timeseries.hh_profiles.rst new file mode 100644 index 000000000..da6854cd6 --- /dev/null +++ b/docs/reference/egon.data.datasets.electricity_demand_timeseries.hh_profiles.rst @@ -0,0 +1,7 @@ +hh\_profiles +============ + +.. automodule:: egon.data.datasets.electricity_demand_timeseries.hh_profiles + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.electricity_demand_timeseries.mapping.rst b/docs/reference/egon.data.datasets.electricity_demand_timeseries.mapping.rst new file mode 100644 index 000000000..6f1929133 --- /dev/null +++ b/docs/reference/egon.data.datasets.electricity_demand_timeseries.mapping.rst @@ -0,0 +1,7 @@ +mapping +======= + +.. automodule:: egon.data.datasets.electricity_demand_timeseries.mapping + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.electricity_demand_timeseries.rst b/docs/reference/egon.data.datasets.electricity_demand_timeseries.rst new file mode 100644 index 000000000..3244a54e7 --- /dev/null +++ b/docs/reference/egon.data.datasets.electricity_demand_timeseries.rst @@ -0,0 +1,19 @@ + + +electricity\_demand\_timeseries +=============================== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.electricity_demand_timeseries.cts_buildings + egon.data.datasets.electricity_demand_timeseries.hh_buildings + egon.data.datasets.electricity_demand_timeseries.hh_profiles + egon.data.datasets.electricity_demand_timeseries.mapping + egon.data.datasets.electricity_demand_timeseries.tools + + + +.. automodule:: egon.data.datasets.electricity_demand_timeseries + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.electricity_demand_timeseries.tools.rst b/docs/reference/egon.data.datasets.electricity_demand_timeseries.tools.rst new file mode 100644 index 000000000..7d7c2a539 --- /dev/null +++ b/docs/reference/egon.data.datasets.electricity_demand_timeseries.tools.rst @@ -0,0 +1,7 @@ +tools +===== + +.. automodule:: egon.data.datasets.electricity_demand_timeseries.tools + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.create_h2_buses.rst b/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.create_h2_buses.rst new file mode 100644 index 000000000..6c5d5a40c --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.create_h2_buses.rst @@ -0,0 +1,7 @@ +create\_h2\_buses +================= + +.. automodule:: egon.data.datasets.emobility.heavy_duty_transport.create_h2_buses + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.data_io.rst b/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.data_io.rst new file mode 100644 index 000000000..02fb7ff3e --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.data_io.rst @@ -0,0 +1,7 @@ +data\_io +======== + +.. automodule:: egon.data.datasets.emobility.heavy_duty_transport.data_io + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.db_classes.rst b/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.db_classes.rst new file mode 100644 index 000000000..0aede118d --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.db_classes.rst @@ -0,0 +1,7 @@ +db\_classes +=========== + +.. automodule:: egon.data.datasets.emobility.heavy_duty_transport.db_classes + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.h2_demand_distribution.rst b/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.h2_demand_distribution.rst new file mode 100644 index 000000000..cdb5ba8e6 --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.h2_demand_distribution.rst @@ -0,0 +1,7 @@ +h2\_demand\_distribution +======================== + +.. automodule:: egon.data.datasets.emobility.heavy_duty_transport.h2_demand_distribution + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.rst b/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.rst new file mode 100644 index 000000000..3f5cdd3b7 --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.heavy_duty_transport.rst @@ -0,0 +1,18 @@ + + +heavy\_duty\_transport +====================== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.emobility.heavy_duty_transport.create_h2_buses + egon.data.datasets.emobility.heavy_duty_transport.data_io + egon.data.datasets.emobility.heavy_duty_transport.db_classes + egon.data.datasets.emobility.heavy_duty_transport.h2_demand_distribution + + + +.. automodule:: egon.data.datasets.emobility.heavy_duty_transport + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.db_classes.rst b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.db_classes.rst new file mode 100644 index 000000000..81bad92f0 --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.db_classes.rst @@ -0,0 +1,7 @@ +db\_classes +=========== + +.. automodule:: egon.data.datasets.emobility.motorized_individual_travel.db_classes + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.ev_allocation.rst b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.ev_allocation.rst new file mode 100644 index 000000000..44169233c --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.ev_allocation.rst @@ -0,0 +1,7 @@ +ev\_allocation +============== + +.. automodule:: egon.data.datasets.emobility.motorized_individual_travel.ev_allocation + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.helpers.rst b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.helpers.rst new file mode 100644 index 000000000..70228d68f --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.helpers.rst @@ -0,0 +1,7 @@ +helpers +======= + +.. automodule:: egon.data.datasets.emobility.motorized_individual_travel.helpers + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.model_timeseries.rst b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.model_timeseries.rst new file mode 100644 index 000000000..fb933faff --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.model_timeseries.rst @@ -0,0 +1,7 @@ +model\_timeseries +================= + +.. automodule:: egon.data.datasets.emobility.motorized_individual_travel.model_timeseries + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.rst b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.rst new file mode 100644 index 000000000..230ebd7af --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.rst @@ -0,0 +1,19 @@ + + +motorized\_individual\_travel +============================= +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.emobility.motorized_individual_travel.db_classes + egon.data.datasets.emobility.motorized_individual_travel.ev_allocation + egon.data.datasets.emobility.motorized_individual_travel.helpers + egon.data.datasets.emobility.motorized_individual_travel.model_timeseries + egon.data.datasets.emobility.motorized_individual_travel.tests + + + +.. automodule:: egon.data.datasets.emobility.motorized_individual_travel + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.tests.rst b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.tests.rst new file mode 100644 index 000000000..167201b27 --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel.tests.rst @@ -0,0 +1,7 @@ +tests +===== + +.. automodule:: egon.data.datasets.emobility.motorized_individual_travel.tests + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.db_classes.rst b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.db_classes.rst new file mode 100644 index 000000000..29d641ea0 --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.db_classes.rst @@ -0,0 +1,7 @@ +db\_classes +=========== + +.. automodule:: egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.db_classes + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.infrastructure_allocation.rst b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.infrastructure_allocation.rst new file mode 100644 index 000000000..b014db282 --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.infrastructure_allocation.rst @@ -0,0 +1,7 @@ +infrastructure\_allocation +========================== + +.. automodule:: egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.infrastructure_allocation + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.rst b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.rst new file mode 100644 index 000000000..34994eac0 --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.rst @@ -0,0 +1,17 @@ + + +motorized\_individual\_travel\_charging\_infrastructure +======================================================= +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.db_classes + egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.infrastructure_allocation + egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.use_cases + + + +.. automodule:: egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.use_cases.rst b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.use_cases.rst new file mode 100644 index 000000000..ec05c5978 --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.use_cases.rst @@ -0,0 +1,7 @@ +use\_cases +========== + +.. automodule:: egon.data.datasets.emobility.motorized_individual_travel_charging_infrastructure.use_cases + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.emobility.rst b/docs/reference/egon.data.datasets.emobility.rst new file mode 100644 index 000000000..56aed4ca6 --- /dev/null +++ b/docs/reference/egon.data.datasets.emobility.rst @@ -0,0 +1,6 @@ + + +emobility +========= + +.. py:module:: egon.data.datasets.emobility diff --git a/docs/reference/egon.data.datasets.era5.rst b/docs/reference/egon.data.datasets.era5.rst new file mode 100644 index 000000000..19bb6ee7f --- /dev/null +++ b/docs/reference/egon.data.datasets.era5.rst @@ -0,0 +1,7 @@ +era5 +==== + +.. automodule:: egon.data.datasets.era5 + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.etrago_helpers.rst b/docs/reference/egon.data.datasets.etrago_helpers.rst new file mode 100644 index 000000000..44025a5f5 --- /dev/null +++ b/docs/reference/egon.data.datasets.etrago_helpers.rst @@ -0,0 +1,7 @@ +etrago\_helpers +=============== + +.. automodule:: egon.data.datasets.etrago_helpers + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.etrago_setup.rst b/docs/reference/egon.data.datasets.etrago_setup.rst new file mode 100644 index 000000000..f2571f2d2 --- /dev/null +++ b/docs/reference/egon.data.datasets.etrago_setup.rst @@ -0,0 +1,7 @@ +etrago\_setup +============= + +.. automodule:: egon.data.datasets.etrago_setup + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.fill_etrago_gen.rst b/docs/reference/egon.data.datasets.fill_etrago_gen.rst new file mode 100644 index 000000000..026d5cf66 --- /dev/null +++ b/docs/reference/egon.data.datasets.fill_etrago_gen.rst @@ -0,0 +1,7 @@ +fill\_etrago\_gen +================= + +.. automodule:: egon.data.datasets.fill_etrago_gen + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.fix_ehv_subnetworks.rst b/docs/reference/egon.data.datasets.fix_ehv_subnetworks.rst new file mode 100644 index 000000000..392b648a4 --- /dev/null +++ b/docs/reference/egon.data.datasets.fix_ehv_subnetworks.rst @@ -0,0 +1,7 @@ +fix\_ehv\_subnetworks +===================== + +.. automodule:: egon.data.datasets.fix_ehv_subnetworks + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.gas_areas.rst b/docs/reference/egon.data.datasets.gas_areas.rst new file mode 100644 index 000000000..14732b650 --- /dev/null +++ b/docs/reference/egon.data.datasets.gas_areas.rst @@ -0,0 +1,7 @@ +gas\_areas +========== + +.. automodule:: egon.data.datasets.gas_areas + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.gas_grid.rst b/docs/reference/egon.data.datasets.gas_grid.rst new file mode 100644 index 000000000..0fe531656 --- /dev/null +++ b/docs/reference/egon.data.datasets.gas_grid.rst @@ -0,0 +1,7 @@ +gas\_grid +========= + +.. automodule:: egon.data.datasets.gas_grid + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.gas_neighbours.eGon100RE.rst b/docs/reference/egon.data.datasets.gas_neighbours.eGon100RE.rst new file mode 100644 index 000000000..c28273541 --- /dev/null +++ b/docs/reference/egon.data.datasets.gas_neighbours.eGon100RE.rst @@ -0,0 +1,7 @@ +eGon100RE +========= + +.. automodule:: egon.data.datasets.gas_neighbours.eGon100RE + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.gas_neighbours.eGon2035.rst b/docs/reference/egon.data.datasets.gas_neighbours.eGon2035.rst new file mode 100644 index 000000000..214eb68d3 --- /dev/null +++ b/docs/reference/egon.data.datasets.gas_neighbours.eGon2035.rst @@ -0,0 +1,7 @@ +eGon2035 +======== + +.. automodule:: egon.data.datasets.gas_neighbours.eGon2035 + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.gas_neighbours.gas_abroad.rst b/docs/reference/egon.data.datasets.gas_neighbours.gas_abroad.rst new file mode 100644 index 000000000..1e271198f --- /dev/null +++ b/docs/reference/egon.data.datasets.gas_neighbours.gas_abroad.rst @@ -0,0 +1,7 @@ +gas\_abroad +=========== + +.. automodule:: egon.data.datasets.gas_neighbours.gas_abroad + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.gas_neighbours.rst b/docs/reference/egon.data.datasets.gas_neighbours.rst new file mode 100644 index 000000000..6c144c50b --- /dev/null +++ b/docs/reference/egon.data.datasets.gas_neighbours.rst @@ -0,0 +1,17 @@ + + +gas\_neighbours +=============== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.gas_neighbours.eGon100RE + egon.data.datasets.gas_neighbours.eGon2035 + egon.data.datasets.gas_neighbours.gas_abroad + + + +.. automodule:: egon.data.datasets.gas_neighbours + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.generate_voronoi.rst b/docs/reference/egon.data.datasets.generate_voronoi.rst new file mode 100644 index 000000000..3e0efdf1a --- /dev/null +++ b/docs/reference/egon.data.datasets.generate_voronoi.rst @@ -0,0 +1,7 @@ +generate\_voronoi +================= + +.. automodule:: egon.data.datasets.generate_voronoi + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_demand.rst b/docs/reference/egon.data.datasets.heat_demand.rst new file mode 100644 index 000000000..7d3d487d4 --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_demand.rst @@ -0,0 +1,10 @@ + + +heat\_demand +============ + + +.. automodule:: egon.data.datasets.heat_demand + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_demand_europe.rst b/docs/reference/egon.data.datasets.heat_demand_europe.rst new file mode 100644 index 000000000..a3265d68f --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_demand_europe.rst @@ -0,0 +1,7 @@ +heat\_demand\_europe +==================== + +.. automodule:: egon.data.datasets.heat_demand_europe + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_demand_timeseries.daily.rst b/docs/reference/egon.data.datasets.heat_demand_timeseries.daily.rst new file mode 100644 index 000000000..480dec304 --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_demand_timeseries.daily.rst @@ -0,0 +1,7 @@ +daily +===== + +.. automodule:: egon.data.datasets.heat_demand_timeseries.daily + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_demand_timeseries.idp_pool.rst b/docs/reference/egon.data.datasets.heat_demand_timeseries.idp_pool.rst new file mode 100644 index 000000000..6de0adbb1 --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_demand_timeseries.idp_pool.rst @@ -0,0 +1,7 @@ +idp\_pool +========= + +.. automodule:: egon.data.datasets.heat_demand_timeseries.idp_pool + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_demand_timeseries.rst b/docs/reference/egon.data.datasets.heat_demand_timeseries.rst new file mode 100644 index 000000000..e872ce5f2 --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_demand_timeseries.rst @@ -0,0 +1,17 @@ + + +heat\_demand\_timeseries +======================== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.heat_demand_timeseries.daily + egon.data.datasets.heat_demand_timeseries.idp_pool + egon.data.datasets.heat_demand_timeseries.service_sector + + + +.. automodule:: egon.data.datasets.heat_demand_timeseries + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_demand_timeseries.service_sector.rst b/docs/reference/egon.data.datasets.heat_demand_timeseries.service_sector.rst new file mode 100644 index 000000000..ea25968f3 --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_demand_timeseries.service_sector.rst @@ -0,0 +1,7 @@ +service\_sector +=============== + +.. automodule:: egon.data.datasets.heat_demand_timeseries.service_sector + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_etrago.hts_etrago.rst b/docs/reference/egon.data.datasets.heat_etrago.hts_etrago.rst new file mode 100644 index 000000000..241c8f98f --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_etrago.hts_etrago.rst @@ -0,0 +1,7 @@ +hts\_etrago +=========== + +.. automodule:: egon.data.datasets.heat_etrago.hts_etrago + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_etrago.power_to_heat.rst b/docs/reference/egon.data.datasets.heat_etrago.power_to_heat.rst new file mode 100644 index 000000000..af1e37494 --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_etrago.power_to_heat.rst @@ -0,0 +1,7 @@ +power\_to\_heat +=============== + +.. automodule:: egon.data.datasets.heat_etrago.power_to_heat + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_etrago.rst b/docs/reference/egon.data.datasets.heat_etrago.rst new file mode 100644 index 000000000..9353eee1c --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_etrago.rst @@ -0,0 +1,16 @@ + + +heat\_etrago +============ +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.heat_etrago.hts_etrago + egon.data.datasets.heat_etrago.power_to_heat + + + +.. automodule:: egon.data.datasets.heat_etrago + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_supply.district_heating.rst b/docs/reference/egon.data.datasets.heat_supply.district_heating.rst new file mode 100644 index 000000000..e5fd6cc59 --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_supply.district_heating.rst @@ -0,0 +1,7 @@ +district\_heating +================= + +.. automodule:: egon.data.datasets.heat_supply.district_heating + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_supply.geothermal.rst b/docs/reference/egon.data.datasets.heat_supply.geothermal.rst new file mode 100644 index 000000000..a9eb865aa --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_supply.geothermal.rst @@ -0,0 +1,7 @@ +geothermal +========== + +.. automodule:: egon.data.datasets.heat_supply.geothermal + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_supply.individual_heating.rst b/docs/reference/egon.data.datasets.heat_supply.individual_heating.rst new file mode 100644 index 000000000..3e4d70b72 --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_supply.individual_heating.rst @@ -0,0 +1,7 @@ +individual\_heating +=================== + +.. automodule:: egon.data.datasets.heat_supply.individual_heating + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.heat_supply.rst b/docs/reference/egon.data.datasets.heat_supply.rst new file mode 100644 index 000000000..cc3f1e1d0 --- /dev/null +++ b/docs/reference/egon.data.datasets.heat_supply.rst @@ -0,0 +1,17 @@ + + +heat\_supply +============ +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.heat_supply.district_heating + egon.data.datasets.heat_supply.geothermal + egon.data.datasets.heat_supply.individual_heating + + + +.. automodule:: egon.data.datasets.heat_supply + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.hydrogen_etrago.bus.rst b/docs/reference/egon.data.datasets.hydrogen_etrago.bus.rst new file mode 100644 index 000000000..2acd122e3 --- /dev/null +++ b/docs/reference/egon.data.datasets.hydrogen_etrago.bus.rst @@ -0,0 +1,7 @@ +bus +=== + +.. automodule:: egon.data.datasets.hydrogen_etrago.bus + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.hydrogen_etrago.h2_grid.rst b/docs/reference/egon.data.datasets.hydrogen_etrago.h2_grid.rst new file mode 100644 index 000000000..cba121ab8 --- /dev/null +++ b/docs/reference/egon.data.datasets.hydrogen_etrago.h2_grid.rst @@ -0,0 +1,7 @@ +h2\_grid +======== + +.. automodule:: egon.data.datasets.hydrogen_etrago.h2_grid + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.hydrogen_etrago.h2_to_ch4.rst b/docs/reference/egon.data.datasets.hydrogen_etrago.h2_to_ch4.rst new file mode 100644 index 000000000..454ee0bf1 --- /dev/null +++ b/docs/reference/egon.data.datasets.hydrogen_etrago.h2_to_ch4.rst @@ -0,0 +1,7 @@ +h2\_to\_ch4 +=========== + +.. automodule:: egon.data.datasets.hydrogen_etrago.h2_to_ch4 + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.hydrogen_etrago.power_to_h2.rst b/docs/reference/egon.data.datasets.hydrogen_etrago.power_to_h2.rst new file mode 100644 index 000000000..20c7d2c5b --- /dev/null +++ b/docs/reference/egon.data.datasets.hydrogen_etrago.power_to_h2.rst @@ -0,0 +1,7 @@ +power\_to\_h2 +============= + +.. automodule:: egon.data.datasets.hydrogen_etrago.power_to_h2 + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.hydrogen_etrago.rst b/docs/reference/egon.data.datasets.hydrogen_etrago.rst new file mode 100644 index 000000000..0041bf1e6 --- /dev/null +++ b/docs/reference/egon.data.datasets.hydrogen_etrago.rst @@ -0,0 +1,19 @@ + + +hydrogen\_etrago +================ +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.hydrogen_etrago.bus + egon.data.datasets.hydrogen_etrago.h2_grid + egon.data.datasets.hydrogen_etrago.h2_to_ch4 + egon.data.datasets.hydrogen_etrago.power_to_h2 + egon.data.datasets.hydrogen_etrago.storage + + + +.. automodule:: egon.data.datasets.hydrogen_etrago + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.hydrogen_etrago.storage.rst b/docs/reference/egon.data.datasets.hydrogen_etrago.storage.rst new file mode 100644 index 000000000..62c499889 --- /dev/null +++ b/docs/reference/egon.data.datasets.hydrogen_etrago.storage.rst @@ -0,0 +1,7 @@ +storage +======= + +.. automodule:: egon.data.datasets.hydrogen_etrago.storage + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.industrial_gas_demand.rst b/docs/reference/egon.data.datasets.industrial_gas_demand.rst new file mode 100644 index 000000000..9e3b08cfd --- /dev/null +++ b/docs/reference/egon.data.datasets.industrial_gas_demand.rst @@ -0,0 +1,7 @@ +industrial\_gas\_demand +======================= + +.. automodule:: egon.data.datasets.industrial_gas_demand + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.industrial_sites.rst b/docs/reference/egon.data.datasets.industrial_sites.rst new file mode 100644 index 000000000..0521144e3 --- /dev/null +++ b/docs/reference/egon.data.datasets.industrial_sites.rst @@ -0,0 +1,10 @@ + + +industrial\_sites +================= + + +.. automodule:: egon.data.datasets.industrial_sites + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.industry.rst b/docs/reference/egon.data.datasets.industry.rst new file mode 100644 index 000000000..af35c6d31 --- /dev/null +++ b/docs/reference/egon.data.datasets.industry.rst @@ -0,0 +1,15 @@ + + +industry +======== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.industry.temporal + + + +.. automodule:: egon.data.datasets.industry + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.industry.temporal.rst b/docs/reference/egon.data.datasets.industry.temporal.rst new file mode 100644 index 000000000..525448655 --- /dev/null +++ b/docs/reference/egon.data.datasets.industry.temporal.rst @@ -0,0 +1,7 @@ +temporal +======== + +.. automodule:: egon.data.datasets.industry.temporal + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.loadarea.rst b/docs/reference/egon.data.datasets.loadarea.rst new file mode 100644 index 000000000..6a2753ba0 --- /dev/null +++ b/docs/reference/egon.data.datasets.loadarea.rst @@ -0,0 +1,10 @@ + + +loadarea +======== + + +.. automodule:: egon.data.datasets.loadarea + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.low_flex_scenario.rst b/docs/reference/egon.data.datasets.low_flex_scenario.rst new file mode 100644 index 000000000..75a8a256a --- /dev/null +++ b/docs/reference/egon.data.datasets.low_flex_scenario.rst @@ -0,0 +1,10 @@ + + +low\_flex\_scenario +=================== + + +.. automodule:: egon.data.datasets.low_flex_scenario + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.mastr.rst b/docs/reference/egon.data.datasets.mastr.rst new file mode 100644 index 000000000..23b9d1fc8 --- /dev/null +++ b/docs/reference/egon.data.datasets.mastr.rst @@ -0,0 +1,7 @@ +mastr +===== + +.. automodule:: egon.data.datasets.mastr + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.mv_grid_districts.rst b/docs/reference/egon.data.datasets.mv_grid_districts.rst new file mode 100644 index 000000000..a5766e7aa --- /dev/null +++ b/docs/reference/egon.data.datasets.mv_grid_districts.rst @@ -0,0 +1,7 @@ +mv\_grid\_districts +=================== + +.. automodule:: egon.data.datasets.mv_grid_districts + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.osm.rst b/docs/reference/egon.data.datasets.osm.rst new file mode 100644 index 000000000..35bcbe1c6 --- /dev/null +++ b/docs/reference/egon.data.datasets.osm.rst @@ -0,0 +1,10 @@ + + +osm +=== + + +.. automodule:: egon.data.datasets.osm + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.osm_buildings_streets.rst b/docs/reference/egon.data.datasets.osm_buildings_streets.rst new file mode 100644 index 000000000..4b163147e --- /dev/null +++ b/docs/reference/egon.data.datasets.osm_buildings_streets.rst @@ -0,0 +1,10 @@ + + +osm\_buildings\_streets +======================= + + +.. automodule:: egon.data.datasets.osm_buildings_streets + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.osmtgmod.rst b/docs/reference/egon.data.datasets.osmtgmod.rst new file mode 100644 index 000000000..f9111c85b --- /dev/null +++ b/docs/reference/egon.data.datasets.osmtgmod.rst @@ -0,0 +1,15 @@ + + +osmtgmod +======== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.osmtgmod.substation + + + +.. automodule:: egon.data.datasets.osmtgmod + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.osmtgmod.substation.rst b/docs/reference/egon.data.datasets.osmtgmod.substation.rst new file mode 100644 index 000000000..b33ba8627 --- /dev/null +++ b/docs/reference/egon.data.datasets.osmtgmod.substation.rst @@ -0,0 +1,7 @@ +substation +========== + +.. automodule:: egon.data.datasets.osmtgmod.substation + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.power_etrago.match_ocgt.rst b/docs/reference/egon.data.datasets.power_etrago.match_ocgt.rst new file mode 100644 index 000000000..afcc49981 --- /dev/null +++ b/docs/reference/egon.data.datasets.power_etrago.match_ocgt.rst @@ -0,0 +1,7 @@ +match\_ocgt +=========== + +.. automodule:: egon.data.datasets.power_etrago.match_ocgt + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.power_etrago.rst b/docs/reference/egon.data.datasets.power_etrago.rst new file mode 100644 index 000000000..6e7200a05 --- /dev/null +++ b/docs/reference/egon.data.datasets.power_etrago.rst @@ -0,0 +1,15 @@ + + +power\_etrago +============= +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.power_etrago.match_ocgt + + + +.. automodule:: egon.data.datasets.power_etrago + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.power_plants.assign_weather_data.rst b/docs/reference/egon.data.datasets.power_plants.assign_weather_data.rst new file mode 100644 index 000000000..55af17a8b --- /dev/null +++ b/docs/reference/egon.data.datasets.power_plants.assign_weather_data.rst @@ -0,0 +1,7 @@ +assign\_weather\_data +===================== + +.. automodule:: egon.data.datasets.power_plants.assign_weather_data + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.power_plants.conventional.rst b/docs/reference/egon.data.datasets.power_plants.conventional.rst new file mode 100644 index 000000000..c906ab6ab --- /dev/null +++ b/docs/reference/egon.data.datasets.power_plants.conventional.rst @@ -0,0 +1,7 @@ +conventional +============ + +.. automodule:: egon.data.datasets.power_plants.conventional + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.power_plants.mastr.rst b/docs/reference/egon.data.datasets.power_plants.mastr.rst new file mode 100644 index 000000000..472544e7c --- /dev/null +++ b/docs/reference/egon.data.datasets.power_plants.mastr.rst @@ -0,0 +1,7 @@ +mastr +===== + +.. automodule:: egon.data.datasets.power_plants.mastr + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.power_plants.pv_ground_mounted.rst b/docs/reference/egon.data.datasets.power_plants.pv_ground_mounted.rst new file mode 100644 index 000000000..2957214fb --- /dev/null +++ b/docs/reference/egon.data.datasets.power_plants.pv_ground_mounted.rst @@ -0,0 +1,7 @@ +pv\_ground\_mounted +=================== + +.. automodule:: egon.data.datasets.power_plants.pv_ground_mounted + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.power_plants.pv_rooftop.rst b/docs/reference/egon.data.datasets.power_plants.pv_rooftop.rst new file mode 100644 index 000000000..ca7b81206 --- /dev/null +++ b/docs/reference/egon.data.datasets.power_plants.pv_rooftop.rst @@ -0,0 +1,7 @@ +pv\_rooftop +=========== + +.. automodule:: egon.data.datasets.power_plants.pv_rooftop + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.power_plants.pv_rooftop_buildings.rst b/docs/reference/egon.data.datasets.power_plants.pv_rooftop_buildings.rst new file mode 100644 index 000000000..5f1e5ccbc --- /dev/null +++ b/docs/reference/egon.data.datasets.power_plants.pv_rooftop_buildings.rst @@ -0,0 +1,7 @@ +pv\_rooftop\_buildings +====================== + +.. automodule:: egon.data.datasets.power_plants.pv_rooftop_buildings + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.power_plants.rst b/docs/reference/egon.data.datasets.power_plants.rst new file mode 100644 index 000000000..7af4249e8 --- /dev/null +++ b/docs/reference/egon.data.datasets.power_plants.rst @@ -0,0 +1,22 @@ + + +power\_plants +============= +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.power_plants.assign_weather_data + egon.data.datasets.power_plants.conventional + egon.data.datasets.power_plants.mastr + egon.data.datasets.power_plants.pv_ground_mounted + egon.data.datasets.power_plants.pv_rooftop + egon.data.datasets.power_plants.pv_rooftop_buildings + egon.data.datasets.power_plants.wind_farms + egon.data.datasets.power_plants.wind_offshore + + + +.. automodule:: egon.data.datasets.power_plants + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.power_plants.wind_farms.rst b/docs/reference/egon.data.datasets.power_plants.wind_farms.rst new file mode 100644 index 000000000..5a8f64788 --- /dev/null +++ b/docs/reference/egon.data.datasets.power_plants.wind_farms.rst @@ -0,0 +1,7 @@ +wind\_farms +=========== + +.. automodule:: egon.data.datasets.power_plants.wind_farms + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.power_plants.wind_offshore.rst b/docs/reference/egon.data.datasets.power_plants.wind_offshore.rst new file mode 100644 index 000000000..1c167b906 --- /dev/null +++ b/docs/reference/egon.data.datasets.power_plants.wind_offshore.rst @@ -0,0 +1,7 @@ +wind\_offshore +============== + +.. automodule:: egon.data.datasets.power_plants.wind_offshore + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.pypsaeursec.rst b/docs/reference/egon.data.datasets.pypsaeursec.rst new file mode 100644 index 000000000..c2ca9e319 --- /dev/null +++ b/docs/reference/egon.data.datasets.pypsaeursec.rst @@ -0,0 +1,10 @@ + + +pypsaeursec +=========== + + +.. automodule:: egon.data.datasets.pypsaeursec + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.re_potential_areas.rst b/docs/reference/egon.data.datasets.re_potential_areas.rst new file mode 100644 index 000000000..7ad1f0165 --- /dev/null +++ b/docs/reference/egon.data.datasets.re_potential_areas.rst @@ -0,0 +1,10 @@ + + +re\_potential\_areas +==================== + + +.. automodule:: egon.data.datasets.re_potential_areas + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.renewable_feedin.rst b/docs/reference/egon.data.datasets.renewable_feedin.rst new file mode 100644 index 000000000..9592e286e --- /dev/null +++ b/docs/reference/egon.data.datasets.renewable_feedin.rst @@ -0,0 +1,7 @@ +renewable\_feedin +================= + +.. automodule:: egon.data.datasets.renewable_feedin + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.rst b/docs/reference/egon.data.datasets.rst new file mode 100644 index 000000000..286ad1e13 --- /dev/null +++ b/docs/reference/egon.data.datasets.rst @@ -0,0 +1,73 @@ + + +datasets +======== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.DSM_cts_ind + egon.data.datasets.calculate_dlr + egon.data.datasets.ch4_prod + egon.data.datasets.ch4_storages + egon.data.datasets.chp_etrago + egon.data.datasets.database + egon.data.datasets.electrical_neighbours + egon.data.datasets.electricity_demand_etrago + egon.data.datasets.era5 + egon.data.datasets.etrago_helpers + egon.data.datasets.etrago_setup + egon.data.datasets.fill_etrago_gen + egon.data.datasets.fix_ehv_subnetworks + egon.data.datasets.gas_areas + egon.data.datasets.gas_grid + egon.data.datasets.generate_voronoi + egon.data.datasets.heat_demand_europe + egon.data.datasets.industrial_gas_demand + egon.data.datasets.mastr + egon.data.datasets.mv_grid_districts + egon.data.datasets.renewable_feedin + egon.data.datasets.sanity_checks + egon.data.datasets.scenario_capacities + egon.data.datasets.society_prognosis + egon.data.datasets.substation_voronoi + egon.data.datasets.tyndp + egon.data.datasets.vg250_mv_grid_districts + egon.data.datasets.zensus_mv_grid_districts + egon.data.datasets.zensus_vg250 + egon.data.datasets.chp + egon.data.datasets.data_bundle + egon.data.datasets.demandregio + egon.data.datasets.district_heating_areas + egon.data.datasets.electricity_demand + egon.data.datasets.electricity_demand_timeseries + egon.data.datasets.gas_neighbours + egon.data.datasets.heat_demand + egon.data.datasets.heat_demand_timeseries + egon.data.datasets.heat_etrago + egon.data.datasets.heat_supply + egon.data.datasets.hydrogen_etrago + egon.data.datasets.industrial_sites + egon.data.datasets.industry + egon.data.datasets.loadarea + egon.data.datasets.low_flex_scenario + egon.data.datasets.osm + egon.data.datasets.osm_buildings_streets + egon.data.datasets.osmtgmod + egon.data.datasets.power_etrago + egon.data.datasets.power_plants + egon.data.datasets.pypsaeursec + egon.data.datasets.re_potential_areas + egon.data.datasets.saltcavern + egon.data.datasets.scenario_parameters + egon.data.datasets.storages + egon.data.datasets.storages_etrago + egon.data.datasets.substation + egon.data.datasets.vg250 + egon.data.datasets.zensus + + + +.. automodule:: egon.data.datasets + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.saltcavern.rst b/docs/reference/egon.data.datasets.saltcavern.rst new file mode 100644 index 000000000..c27bbd773 --- /dev/null +++ b/docs/reference/egon.data.datasets.saltcavern.rst @@ -0,0 +1,10 @@ + + +saltcavern +========== + + +.. automodule:: egon.data.datasets.saltcavern + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.sanity_checks.rst b/docs/reference/egon.data.datasets.sanity_checks.rst new file mode 100644 index 000000000..3ddb27876 --- /dev/null +++ b/docs/reference/egon.data.datasets.sanity_checks.rst @@ -0,0 +1,7 @@ +sanity\_checks +============== + +.. automodule:: egon.data.datasets.sanity_checks + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.scenario_capacities.rst b/docs/reference/egon.data.datasets.scenario_capacities.rst new file mode 100644 index 000000000..cfdadbe82 --- /dev/null +++ b/docs/reference/egon.data.datasets.scenario_capacities.rst @@ -0,0 +1,7 @@ +scenario\_capacities +==================== + +.. automodule:: egon.data.datasets.scenario_capacities + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.scenario_parameters.parameters.rst b/docs/reference/egon.data.datasets.scenario_parameters.parameters.rst new file mode 100644 index 000000000..abefbf32c --- /dev/null +++ b/docs/reference/egon.data.datasets.scenario_parameters.parameters.rst @@ -0,0 +1,7 @@ +parameters +========== + +.. automodule:: egon.data.datasets.scenario_parameters.parameters + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.scenario_parameters.rst b/docs/reference/egon.data.datasets.scenario_parameters.rst new file mode 100644 index 000000000..4e29ef55a --- /dev/null +++ b/docs/reference/egon.data.datasets.scenario_parameters.rst @@ -0,0 +1,15 @@ + + +scenario\_parameters +==================== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.scenario_parameters.parameters + + + +.. automodule:: egon.data.datasets.scenario_parameters + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.society_prognosis.rst b/docs/reference/egon.data.datasets.society_prognosis.rst new file mode 100644 index 000000000..3ed11ebae --- /dev/null +++ b/docs/reference/egon.data.datasets.society_prognosis.rst @@ -0,0 +1,7 @@ +society\_prognosis +================== + +.. automodule:: egon.data.datasets.society_prognosis + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.storages.home_batteries.rst b/docs/reference/egon.data.datasets.storages.home_batteries.rst new file mode 100644 index 000000000..500dec52a --- /dev/null +++ b/docs/reference/egon.data.datasets.storages.home_batteries.rst @@ -0,0 +1,7 @@ +home\_batteries +=============== + +.. automodule:: egon.data.datasets.storages.home_batteries + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.storages.pumped_hydro.rst b/docs/reference/egon.data.datasets.storages.pumped_hydro.rst new file mode 100644 index 000000000..b709fb9d8 --- /dev/null +++ b/docs/reference/egon.data.datasets.storages.pumped_hydro.rst @@ -0,0 +1,7 @@ +pumped\_hydro +============= + +.. automodule:: egon.data.datasets.storages.pumped_hydro + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.storages.rst b/docs/reference/egon.data.datasets.storages.rst new file mode 100644 index 000000000..025f92316 --- /dev/null +++ b/docs/reference/egon.data.datasets.storages.rst @@ -0,0 +1,16 @@ + + +storages +======== +.. toctree:: + :maxdepth: 1 + + egon.data.datasets.storages.home_batteries + egon.data.datasets.storages.pumped_hydro + + + +.. automodule:: egon.data.datasets.storages + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.storages_etrago.rst b/docs/reference/egon.data.datasets.storages_etrago.rst new file mode 100644 index 000000000..3e62cac09 --- /dev/null +++ b/docs/reference/egon.data.datasets.storages_etrago.rst @@ -0,0 +1,10 @@ + + +storages\_etrago +================ + + +.. automodule:: egon.data.datasets.storages_etrago + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.substation.rst b/docs/reference/egon.data.datasets.substation.rst new file mode 100644 index 000000000..ec21e9517 --- /dev/null +++ b/docs/reference/egon.data.datasets.substation.rst @@ -0,0 +1,10 @@ + + +substation +========== + + +.. automodule:: egon.data.datasets.substation + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.substation_voronoi.rst b/docs/reference/egon.data.datasets.substation_voronoi.rst new file mode 100644 index 000000000..d8830ec4e --- /dev/null +++ b/docs/reference/egon.data.datasets.substation_voronoi.rst @@ -0,0 +1,7 @@ +substation\_voronoi +=================== + +.. automodule:: egon.data.datasets.substation_voronoi + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.tyndp.rst b/docs/reference/egon.data.datasets.tyndp.rst new file mode 100644 index 000000000..25552f526 --- /dev/null +++ b/docs/reference/egon.data.datasets.tyndp.rst @@ -0,0 +1,7 @@ +tyndp +===== + +.. automodule:: egon.data.datasets.tyndp + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.vg250.rst b/docs/reference/egon.data.datasets.vg250.rst new file mode 100644 index 000000000..fb92baf46 --- /dev/null +++ b/docs/reference/egon.data.datasets.vg250.rst @@ -0,0 +1,10 @@ + + +vg250 +===== + + +.. automodule:: egon.data.datasets.vg250 + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.vg250_mv_grid_districts.rst b/docs/reference/egon.data.datasets.vg250_mv_grid_districts.rst new file mode 100644 index 000000000..51e23ae2d --- /dev/null +++ b/docs/reference/egon.data.datasets.vg250_mv_grid_districts.rst @@ -0,0 +1,7 @@ +vg250\_mv\_grid\_districts +========================== + +.. automodule:: egon.data.datasets.vg250_mv_grid_districts + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.zensus.rst b/docs/reference/egon.data.datasets.zensus.rst new file mode 100644 index 000000000..2da2196ef --- /dev/null +++ b/docs/reference/egon.data.datasets.zensus.rst @@ -0,0 +1,10 @@ + + +zensus +====== + + +.. automodule:: egon.data.datasets.zensus + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.zensus_mv_grid_districts.rst b/docs/reference/egon.data.datasets.zensus_mv_grid_districts.rst new file mode 100644 index 000000000..6525638df --- /dev/null +++ b/docs/reference/egon.data.datasets.zensus_mv_grid_districts.rst @@ -0,0 +1,7 @@ +zensus\_mv\_grid\_districts +=========================== + +.. automodule:: egon.data.datasets.zensus_mv_grid_districts + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.datasets.zensus_vg250.rst b/docs/reference/egon.data.datasets.zensus_vg250.rst new file mode 100644 index 000000000..7a82f799f --- /dev/null +++ b/docs/reference/egon.data.datasets.zensus_vg250.rst @@ -0,0 +1,7 @@ +zensus\_vg250 +============= + +.. automodule:: egon.data.datasets.zensus_vg250 + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.db.rst b/docs/reference/egon.data.db.rst new file mode 100644 index 000000000..acd8e201a --- /dev/null +++ b/docs/reference/egon.data.db.rst @@ -0,0 +1,7 @@ +db +== + +.. automodule:: egon.data.db + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.metadata.rst b/docs/reference/egon.data.metadata.rst new file mode 100644 index 000000000..915395bc1 --- /dev/null +++ b/docs/reference/egon.data.metadata.rst @@ -0,0 +1,7 @@ +metadata +======== + +.. automodule:: egon.data.metadata + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.rst b/docs/reference/egon.data.rst index 76d0529c3..596cd46bc 100644 --- a/docs/reference/egon.data.rst +++ b/docs/reference/egon.data.rst @@ -1,9 +1,22 @@ -egon.data -========= -.. testsetup:: - from egon.data import * +data +==== +.. toctree:: + :maxdepth: 1 + + egon.data.cli + egon.data.config + egon.data.dataset_configuration + egon.data.db + egon.data.metadata + egon.data.subprocess + egon.data.airflow + egon.data.datasets + + .. automodule:: egon.data - :members: + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.data.subprocess.rst b/docs/reference/egon.data.subprocess.rst new file mode 100644 index 000000000..0c94c12aa --- /dev/null +++ b/docs/reference/egon.data.subprocess.rst @@ -0,0 +1,7 @@ +subprocess +========== + +.. automodule:: egon.data.subprocess + :members: + :undoc-members: + :show-inheritance: diff --git a/docs/reference/egon.rst b/docs/reference/egon.rst new file mode 100644 index 000000000..e7a8444e1 --- /dev/null +++ b/docs/reference/egon.rst @@ -0,0 +1,6 @@ + + +egon +==== + +.. py:module:: egon From 914154d88c039faf04b97b0bbedf45943ec6959f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20G=C3=BCnther?= Date: Sun, 26 Feb 2023 22:51:22 +0100 Subject: [PATCH 32/38] Modify generated API reference Use "docs/reference/egon.data.rst" instead of "docs/reference/index.rst" as the `toctree` entry for the API reference for better and direct access to the sub-modules and packages of `egon.data`. Change the sidebar entry for the API reference to mention the `egon.data` package and put the reference for `egon.data`'s contents before the listing of sub-modules and packages for this one package only. Remove "docs/reference/index.rst" because it's no longer needed now that "docs/reference/egon.data.rst" takes it's place. Remove "docs/reference/egon.rst" because it's empty and not interesting. It's just an unwanted artifact of running `sphinx-apidoc`. --- docs/index.rst | 2 +- docs/reference/egon.data.rst | 21 ++++++++------------- docs/reference/egon.rst | 6 ------ docs/reference/index.rst | 7 ------- 4 files changed, 9 insertions(+), 27 deletions(-) delete mode 100644 docs/reference/egon.rst delete mode 100644 docs/reference/index.rst diff --git a/docs/index.rst b/docs/index.rst index 63729e563..600622854 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -13,7 +13,7 @@ Contents contributing authors changelog - Module documentation + API Reference: egon.data Indices and tables ================== diff --git a/docs/reference/egon.data.rst b/docs/reference/egon.data.rst index 596cd46bc..c35dbe9ef 100644 --- a/docs/reference/egon.data.rst +++ b/docs/reference/egon.data.rst @@ -1,22 +1,17 @@ +egon.data +========= +.. automodule:: egon.data + :members: + :undoc-members: + :show-inheritance: -data -==== .. toctree:: - :maxdepth: 1 - + egon.data.airflow egon.data.cli egon.data.config egon.data.dataset_configuration + egon.data.datasets egon.data.db egon.data.metadata egon.data.subprocess - egon.data.airflow - egon.data.datasets - - - -.. automodule:: egon.data - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/reference/egon.rst b/docs/reference/egon.rst deleted file mode 100644 index e7a8444e1..000000000 --- a/docs/reference/egon.rst +++ /dev/null @@ -1,6 +0,0 @@ - - -egon -==== - -.. py:module:: egon diff --git a/docs/reference/index.rst b/docs/reference/index.rst deleted file mode 100644 index 6236c5418..000000000 --- a/docs/reference/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -Reference -========= - -.. toctree:: - :glob: - - egon.data* From e35f17c50e8b909fa27a65e14c9f696b2d2b4144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20G=C3=BCnther?= Date: Sun, 26 Feb 2023 23:33:02 +0100 Subject: [PATCH 33/38] Don't use fully qualified names in API reference Since the module structure is relatively deeply nested and contains relatively long module names, displaying fully qualified names is too long an unwieldy. --- docs/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/conf.py b/docs/conf.py index 981d7ef5b..abc5d451e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -44,3 +44,5 @@ napoleon_use_ivar = True napoleon_use_rtype = False napoleon_use_param = False + +add_module_names = False From 91ae14bc85601f484df47f772fd0acae299e3127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20G=C3=BCnther?= Date: Sun, 26 Feb 2023 23:39:52 +0100 Subject: [PATCH 34/38] Make the module index more useful Remove very common prefixes from the modules before indexing them. Otherwise the index wouldn't be very useful as everything would be referenced under a single or very few letters. --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index abc5d451e..975e216b4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -46,3 +46,4 @@ napoleon_use_param = False add_module_names = False +modindex_common_prefix = ["egon.data.", "egon.data.datasets."] From f2261f72bf3f47b4b9e460e3c19bf2e0cf6d13c4 Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Mon, 6 Mar 2023 16:42:17 +0100 Subject: [PATCH 35/38] Move dependencies and resultings tables documentation from module documentation to dataset documentation, and minor adjustments. --- src/egon/data/datasets/ch4_prod.py | 37 +++++------ src/egon/data/datasets/ch4_storages.py | 45 +++++++------- src/egon/data/datasets/gas_grid.py | 85 ++++++++++++++------------ 3 files changed, 91 insertions(+), 76 deletions(-) diff --git a/src/egon/data/datasets/ch4_prod.py b/src/egon/data/datasets/ch4_prod.py index 0c8d3fb7d..cc7f31b6f 100755 --- a/src/egon/data/datasets/ch4_prod.py +++ b/src/egon/data/datasets/ch4_prod.py @@ -10,15 +10,6 @@ biogas), also stored in the table :py:class:`scenario.egon_scenario_parameters `. -Dependencies (pipeline) -======================= -* :py:class:`GasAreaseGon2035 ` -* :py:class:`GasNodesAndPipes ` - -Resulting tables -================ -* :py:class:`grid.egon_etrago_generator ` is extended - """ from pathlib import Path from urllib.request import urlretrieve @@ -35,10 +26,18 @@ class CH4Production(Dataset): - """Insert the CH4 productions in the database for eGon2035 + """ + Insert the CH4 productions into the database for eGon2035 + + Insert the CH4 productions into the database for eGon2035 by using + the function :py:func:`import_gas_generators`. + + *Dependencies* + * :py:class:`GasAreaseGon2035 ` + * :py:class:`GasNodesAndPipes ` - Insert the CH4 productions in the database for eGon2035 by using the - function :py:func:`import_gas_generators`. + *Resulting tables* + * :py:class:`grid.egon_etrago_generator ` is extended """ @@ -58,12 +57,13 @@ def __init__(self, dependencies): def load_NG_generators(scn_name): - """Define the fossil CH4 production units in Germany + """ + Define the fossil CH4 production units in Germany This function reads from the SciGRID_gas dataset the fossil CH4 production units in Germany, adjuts and returns them. Natural gas production reference: SciGRID_gas dataset (datasets/gas_data/data/IGGIELGN_Production.csv - downloaded in :func:`insert_gas_data `). + downloaded in :func:`download_SciGRID_gas_data `). For more information on these data, refer to the `SciGRID_gas IGGIELGN documentation `_. @@ -71,6 +71,7 @@ def load_NG_generators(scn_name): ---------- scn_name : str Name of the scenario. + Returns ------- CH4_generators_list : pandas.DataFrame @@ -165,7 +166,8 @@ def load_NG_generators(scn_name): def load_biogas_generators(scn_name): - """Define the biogas production units in Germany + """ + Define the biogas production units in Germany This function download the Biogaspartner Einspeiseatlas into (datasets/gas_data/Biogaspartner_Einspeiseatlas_Deutschland_2021.xlsx), @@ -279,9 +281,10 @@ def load_biogas_generators(scn_name): def import_gas_generators(scn_name="eGon2035"): - """Insert list of gas production units in database + """ + Insert list of gas production units into the database - To insert the gas production units in the database, the following + To insert the gas production units into the database, the following steps are followed: * cleaning of the database table grid.egon_etrago_generator of the diff --git a/src/egon/data/datasets/ch4_storages.py b/src/egon/data/datasets/ch4_storages.py index 70b87b594..ff84af686 100755 --- a/src/egon/data/datasets/ch4_storages.py +++ b/src/egon/data/datasets/ch4_storages.py @@ -6,16 +6,6 @@ in Germany and to insert them into the database. They are modelled as PyPSA stores and are not extendable. -Dependencies (pipeline) -======================= -* :py:class:`GasAreaseGon2035 ` -* :py:class:`GasAreaseGon2035 ` -* :py:class:`GasNodesAndPipes ` - -Resulting tables -================ -* :py:class:`grid.egon_etrago_store ` is extended - """ from pathlib import Path from telnetlib import GA @@ -36,12 +26,21 @@ class CH4Storages(Dataset): - """Insert the non extendable gas stores in Germany into the database + """ + Insert the non extendable gas stores in Germany into the database Insert the non extendable gas stores into the database in Germany for the scnenarios eGon2035 and eGon100RE using the function - :py:func:`insert_ch4_storages` - which extends the :py:class:`grid.egon_etrago_store ` table. + :py:func:`insert_ch4_storages`. + + *Dependencies* + * :py:class:`GasAreaseGon2035 ` + * :py:class:`GasAreaseGon2035 ` + * :py:class:`GasNodesAndPipes ` + + *Resulting tables* + * :py:class:`grid.egon_etrago_store ` is extended + """ @@ -60,12 +59,13 @@ def __init__(self, dependencies): def import_installed_ch4_storages(scn_name): - """Define list of CH4 stores from the SciGRID_gas data + """ + Define list of CH4 stores from the SciGRID_gas data This function reads from the SciGRID_gas dataset the existing CH4 - cavern stores in Germany, adjuts and returns them. + cavern stores in Germany, adjusts and returns them. Caverns reference: SciGRID_gas dataset (datasets/gas_data/data/IGGIELGN_Storages.csv - downloaded in :func:`insert_gas_data `). + downloaded in :func:`download_SciGRID_gas_data `). For more information on these data, refer to the `SciGRID_gas IGGIELGN documentation `_. @@ -186,12 +186,13 @@ def import_installed_ch4_storages(scn_name): def import_ch4_grid_capacity(scn_name): - """Define the gas stores modelling the store capacity of the grid + """ + Define the gas stores modelling the store capacity of the grid Define dataframe containing the modelling of the grid storage capacity. The whole storage capacity of the grid (130000 MWh, estimation of the Bundesnetzagentur) is split uniformly between - all the german gas nodes of the grid (without consideration of the + all the German gas nodes of the grid (without consideration of the capacities of the pipes). In eGon100RE, the storage capacity of the grid is split between H2 and CH4 stores, with the same share than the pipes capacity (value @@ -219,7 +220,7 @@ def import_ch4_grid_capacity(scn_name): ) # Number of nodes in Germany Store_capacity = ( Gas_grid_capacity / N_ch4_nodes_G - ) # Storage capacity associated to each CH4 node of the german grid + ) # Storage capacity associated to each CH4 node of the German grid sql_gas = f"""SELECT bus_id, scn_name, carrier, geom FROM {source['buses']['schema']}.{source['buses']['table']} @@ -246,7 +247,8 @@ def import_ch4_grid_capacity(scn_name): def insert_ch4_stores(scn_name): - """Insert gas stores for specific scenario + """ + Insert gas stores for specific scenario Insert non extendable gas stores for specific scenario in Germany by executing the following steps: @@ -322,7 +324,8 @@ def insert_ch4_stores(scn_name): def insert_ch4_storages(): - """Overall function to import non extendable gas stores in Germany + """ + Overall function to import non extendable gas stores in Germany This function inserts the methane stores in Germany for the scenarios eGon2035 and eGon100RE by using the function diff --git a/src/egon/data/datasets/gas_grid.py b/src/egon/data/datasets/gas_grid.py index 0f697fc77..27af06b4f 100755 --- a/src/egon/data/datasets/gas_grid.py +++ b/src/egon/data/datasets/gas_grid.py @@ -2,23 +2,17 @@ """ The module containing code aiming to insert the methane grid into the database -The central module containing all code dealing with importing data from -SciGRID_gas (IGGIELGN dataset) and inserting the corresponding data, CH4 -buses and links (representing pipelines) into the database for the -scenarios eGon2035 and eGon100RE. - -Dependencies (pipeline) -======================= -* :py:class:`DataBundle ` -* :py:class:`ElectricalNeighbours ` -* :py:class:`Osmtgmod ` -* :py:class:`ScenarioParameters ` -* :py:class:`EtragoSetup ` (more specifically the :func:`create_tables ` task) - -Resulting tables -================ -* :py:class:`grid.egon_etrago_bus ` is extended -* :py:class:`grid.egon_etrago_link ` is extended +The central module containing all code dealing with the import of data +from SciGRID_gas (IGGIELGN dataset) and with the insertion fo the CH4 +buses and links into the database for the scenarios eGon2035 and eGon100RE. + +The SciGRID_gas data downloaded with :py:func:`download_SciGRID_gas_data` +into the folder ./datasets/gas_data/data are also used by other modules. + +In this module, only the IGGIELGN_Nodes and IGGIELGN_PipeSegments cvs files +are used in the function :py:func:`insert_gas_data` that inserts the CH4 +buses and links, which for the case of gas represent pipelines, into the +database. """ from pathlib import Path @@ -43,13 +37,23 @@ class GasNodesAndPipes(Dataset): - """Insert the CH4 buses and links into the database + """ + Insert the CH4 buses and links into the database. Insert the CH4 buses and links, which for the case of gas represent pipelines, into the database for the scenarios eGon2035 and eGon100RE - with the functions :py:func:`insert_gas_data` and :py:func:`insert_gas_data_eGon100RE`, - which extends the :py:class:`grid.egon_etrago_bus ` - and :py:class:`grid.egon_etrago_link ` tables. + with the functions :py:func:`insert_gas_data` and :py:func:`insert_gas_data_eGon100RE`. + + *Dependencies* + * :py:class:`DataBundle ` + * :py:class:`ElectricalNeighbours ` + * :py:class:`Osmtgmod ` + * :py:class:`ScenarioParameters ` + * :py:class:`EtragoSetup ` (more specifically the :func:`create_tables ` task) + + *Resulting tables* + * :py:class:`grid.egon_etrago_bus ` is extended + * :py:class:`grid.egon_etrago_link ` is extended """ @@ -117,7 +121,8 @@ def download_SciGRID_gas_data(): def define_gas_nodes_list(): - """Define list of CH4 buses from SciGRID_gas IGGIELGN data + """ + Define list of CH4 buses from SciGRID_gas IGGIELGN data The CH4 nodes are modelled as buses. Therefore the SciGRID_gas nodes are red from the IGGIELGN_Nodes cvs file previously downloaded in the @@ -164,7 +169,8 @@ def define_gas_nodes_list(): def ch4_nodes_number_G(gas_nodes_list): - """Return the number of CH4 buses in Germany + """ + Return the number of CH4 buses in Germany Parameters ---------- @@ -187,7 +193,8 @@ def ch4_nodes_number_G(gas_nodes_list): def insert_CH4_nodes_list(gas_nodes_list): - """Insert list of German CH4 nodes into the database for eGon2035 + """ + Insert list of German CH4 nodes into the database for eGon2035 Insert the list of German CH4 nodes into the database by executing the following steps: @@ -288,7 +295,8 @@ def insert_CH4_nodes_list(gas_nodes_list): def insert_gas_buses_abroad(scn_name="eGon2035"): - """Insert CH4 buses in neighbouring countries to database for eGon2035 + """ + Insert CH4 buses in neighbouring countries to database for eGon2035 For the scenario eGon2035, insert central CH4 buses in foreign countries to the database. The considered foreign countries are the @@ -404,7 +412,8 @@ def insert_gas_buses_abroad(scn_name="eGon2035"): def insert_gas_pipeline_list( gas_nodes_list, abroad_gas_nodes_list, scn_name="eGon2035" ): - """Insert list of gas pipelines into the database + """ + Insert list of gas pipelines into the database The gas pipelines, modelled as Pypsa links are red from the IGGIELGN_PipeSegments csv file previously downloded in the function :py:func:`download_SciGRID_gas_data`, @@ -816,11 +825,11 @@ def insert_gas_pipeline_list( def remove_isolated_gas_buses(): - """Delete CH4 buses which are not connected to the CH4 grid for the eGon2035 scenario + """ + Delete CH4 buses which are disconnected of the CH4 grid for the eGon2035 scenario + + This function deletes directly in the database and has no return. - Returns - ------- - None. """ targets = config.datasets()["gas_grid"]["targets"] @@ -843,7 +852,8 @@ def remove_isolated_gas_buses(): def insert_gas_data(): - """Overall function for importing methane data for eGon2035 + """ + Overall function for importing methane data for eGon2035 This function import the methane data (buses and pipelines) for eGon2035, by executing the following steps: @@ -858,9 +868,8 @@ def insert_gas_data(): * Remove the isolated CH4 buses directly from the database using the function :py:func:`remove_isolated_gas_buses` - Returns - ------- - None. + This function inserts data into the database and has no return. + """ download_SciGRID_gas_data() @@ -874,7 +883,8 @@ def insert_gas_data(): def insert_gas_data_eGon100RE(): - """Overall function for importing methane data for eGon100RE + """ + Overall function for importing methane data for eGon100RE This function import the methane data (buses and pipelines) for eGon100RE, by copying the CH4 buses from the eGon2035 scenario using @@ -885,9 +895,8 @@ def insert_gas_data_eGon100RE(): the methane pieplines nominal capacities are reduced from this share (calculated in the pyspa-eur-sec run). - Returns - ------- - None. + This function inserts data into the database and has no return. + """ # copy buses copy_and_modify_buses("eGon2035", "eGon100RE", {"carrier": ["CH4"]}) From 3b6fb55c1b5aa951597148a71c9b43522be2deda Mon Sep 17 00:00:00 2001 From: AmeliaNadal Date: Thu, 9 Mar 2023 11:56:48 +0100 Subject: [PATCH 36/38] Improve documentation of hydrogen_etrago module --- .../data/datasets/hydrogen_etrago/__init__.py | 19 +++++---- src/egon/data/datasets/hydrogen_etrago/bus.py | 37 +++++++++++++++--- .../data/datasets/hydrogen_etrago/h2_grid.py | 39 +++++++++++++++++-- .../datasets/hydrogen_etrago/h2_to_ch4.py | 30 ++++++++++++-- .../datasets/hydrogen_etrago/power_to_h2.py | 29 +++++++++++--- .../data/datasets/hydrogen_etrago/storage.py | 37 ++++++++++++++++-- 6 files changed, 161 insertions(+), 30 deletions(-) mode change 100644 => 100755 src/egon/data/datasets/hydrogen_etrago/bus.py mode change 100644 => 100755 src/egon/data/datasets/hydrogen_etrago/h2_to_ch4.py mode change 100644 => 100755 src/egon/data/datasets/hydrogen_etrago/power_to_h2.py mode change 100644 => 100755 src/egon/data/datasets/hydrogen_etrago/storage.py diff --git a/src/egon/data/datasets/hydrogen_etrago/__init__.py b/src/egon/data/datasets/hydrogen_etrago/__init__.py index 730e319c5..a18264701 100755 --- a/src/egon/data/datasets/hydrogen_etrago/__init__.py +++ b/src/egon/data/datasets/hydrogen_etrago/__init__.py @@ -9,9 +9,9 @@ In the eGon100RE scenario, the potential and installed capacities abroad arrise from the PyPSA-eur-sec run. For this reason, this module focuses -only on the hydrogen related components in Germany and the module +only on the hydrogen related components in Germany, and the module :py:mod:`pypsaeursec ` on the hydrogen -related components. +related components abroad. """ from egon.data.datasets import Dataset @@ -37,7 +37,8 @@ class HydrogenBusEtrago(Dataset): - """Insert the H2 buses into the database for Germany + """ + Insert the H2 buses into the database for Germany Insert the H2 buses in Germany into the database for the scenarios eGon2035 and eGon100RE by executing successively the functions @@ -74,7 +75,8 @@ def __init__(self, dependencies): class HydrogenStoreEtrago(Dataset): - """Insert the H2 stores into the database for Germany + """ + Insert the H2 stores into the database for Germany Insert the H2 stores in Germany into the database for the scenarios eGon2035 and eGon100RE: @@ -119,7 +121,8 @@ def __init__(self, dependencies): class HydrogenPowerLinkEtrago(Dataset): - """Insert the electrolysis and the fuel cells into the database + """ + Insert the electrolysis and the fuel cells into the database Insert the the electrolysis and the fuel cell links in Germany into the database for the scenarios eGon2035 and eGon100RE by executing @@ -156,7 +159,8 @@ def __init__(self, dependencies): class HydrogenMethaneLinkEtrago(Dataset): - """Insert the methanisation, feed in and SMR into the database + """ + Insert the methanisation, feed in and SMR into the database Insert the the methanisation, feed in (only in eGon2035) and Steam Methane Reaction (SMR) links in Germany into the database for the @@ -192,7 +196,8 @@ def __init__(self, dependencies): class HydrogenGridEtrago(Dataset): - """Insert the H2 grid in Germany into the database for eGon100RE + """ + Insert the H2 grid in Germany into the database for eGon100RE Insert the H2 links (pipelines) into Germany in the database for the scenario eGon100RE by executing the function diff --git a/src/egon/data/datasets/hydrogen_etrago/bus.py b/src/egon/data/datasets/hydrogen_etrago/bus.py old mode 100644 new mode 100755 index ca18eebf6..d780551b1 --- a/src/egon/data/datasets/hydrogen_etrago/bus.py +++ b/src/egon/data/datasets/hydrogen_etrago/bus.py @@ -1,4 +1,17 @@ -"""The central module containing all code dealing with heat sector in etrago +""" +The central module containing all code dealing with the hydrogen buses + +In this module, the functions allowing to create the H2 buses in Germany +for eTraGo are to be found. +The H2 buses in the neighbouring countries (only present in eGon100RE) +are defined in :py:mod:`pypsaeursec `. +In both scenarios, there are two types of H2 buses in Germany: + * H2_grid buses: defined in :py:func:`insert_H2_buses_from_CH4_grid`, + these buses are located at the places than the CH4 buses. + * H2_saltcavern buses: defined in :py:func:`insert_H2_buses_from_saltcavern`, + these buses are located at the intersection of AC buses and + potential for H2 saltcavern. + """ from geoalchemy2 import Geometry @@ -12,14 +25,18 @@ def insert_hydrogen_buses(scenario="eGon2035"): - """ Insert hydrogen buses to etrago table + """ + Insert hydrogen buses into the database (in etrago table) - Hydrogen buses are divided into cavern and methane grid attached buses + Hydrogen buses are inserted into the database using the functions: + * :py:func:`insert_H2_buses_from_CH4_grid` for H2_grid buses + * :py:func:`insert_H2_buses_from_saltcavern` for the H2_saltcavern + buses Parameters ---------- scenario : str, optional - Name of the scenario The default is 'eGon2035'. + Name of the scenario, the default is 'eGon2035'. """ sources = config.datasets()["etrago_hydrogen"]["sources"] @@ -41,7 +58,11 @@ def insert_hydrogen_buses(scenario="eGon2035"): def insert_H2_buses_from_saltcavern(gdf, carrier, sources, target, scn_name): - """Insert the H2 buses based saltcavern locations to db. + """ + Insert the H2 buses based saltcavern locations into the database. + + These buses are located at the intersection of AC buses and + potential for H2 saltcavern. Parameters ---------- @@ -104,7 +125,11 @@ def insert_H2_buses_from_saltcavern(gdf, carrier, sources, target, scn_name): def insert_H2_buses_from_CH4_grid(gdf, carrier, target, scn_name): - """Insert the H2 buses based on CH4 grid to db. + """ + Insert the H2 buses based on CH4 grid into the database. + + At each CH4 location, in other words at each intersection of the CH4 + grid, a H2 bus is created. Parameters ---------- diff --git a/src/egon/data/datasets/hydrogen_etrago/h2_grid.py b/src/egon/data/datasets/hydrogen_etrago/h2_grid.py index 4a092400a..3646eac29 100755 --- a/src/egon/data/datasets/hydrogen_etrago/h2_grid.py +++ b/src/egon/data/datasets/hydrogen_etrago/h2_grid.py @@ -1,4 +1,15 @@ -"""The central module containing all code dealing with heat sector in etrago +""" +The central module containing all code dealing with the H2 grid in eGon100RE + +The H2 grid, present only in eGon100RE, is composed of two parts: + * a fixed part with the same topology than the CH4 grid and with + carrier 'H2_retrofit' corresponding to the retrofiting of a share of + the CH4 grid into an hydrogen grid, + * an extendable part with carrier 'H2_gridextension', linking each + H2_salcavern bus to the closest H2_grid bus: this part as no + capacity (p_nom = 0) but it could be extended. +As the CH4 grid, the H2 pipelines are modelled by PyPSA links. + """ from geoalchemy2.types import Geometry from shapely.geometry import MultiLineString @@ -10,7 +21,27 @@ def insert_h2_pipelines(): - """Insert hydrogen grid to etrago table based on CH4 grid.""" + """ + Insert hydrogen grid (H2 links) into the database for eGon100RE. + + Insert the H2 grid by executing the following steps: + * Copy the CH4 links in Germany from eGon2035 + * Overwrite the followings columns: + * bus0 and bus1 using the grid.egon_etrago_ch4_h2 table + * carrier, scn_name + * p_nom: the value attributed there corresponds to the share + of p_nom of the specific pipe that could be retrofited into + H2 pipe. This share is the same for every pipeline and is + calculated in the PyPSA-eur-sec run. + * Create new extendable pipelines to link the existing grid to the + H2_saltcavern buses + * Clean database + * Attribute link_id to the links + * Insert the into the database + + This function inserts data into the database and has no return. + + """ H2_buses = db.select_geodataframe( f""" SELECT * FROM grid.egon_etrago_bus WHERE scn_name = 'eGon100RE' AND @@ -136,7 +167,7 @@ def insert_h2_pipelines(): ) db.execute_sql( - """ + """ select UpdateGeometrySRID('grid', 'egon_etrago_h2_link', 'topo', 4326) ; INSERT INTO grid.egon_etrago_link (scn_name, capital_cost, @@ -153,5 +184,5 @@ def insert_h2_pipelines(): FROM grid.egon_etrago_h2_link; DROP TABLE grid.egon_etrago_h2_link; - """ + """ ) diff --git a/src/egon/data/datasets/hydrogen_etrago/h2_to_ch4.py b/src/egon/data/datasets/hydrogen_etrago/h2_to_ch4.py old mode 100644 new mode 100755 index abf1c738b..1fb80335b --- a/src/egon/data/datasets/hydrogen_etrago/h2_to_ch4.py +++ b/src/egon/data/datasets/hydrogen_etrago/h2_to_ch4.py @@ -1,6 +1,16 @@ # -*- coding: utf-8 -*- """ -Module containing the definition of the CH4 grid to H2 links +Module containing the definition of the links between H2 and CH4 buses + +In this module the functions used to define and insert into the database +the links between H2 and CH4 buses are to be found. +These links are modelling: + * Methanisation (carrier name: 'H2_to_CH4'): technology to produce CH4 + from H2 + * H2_feedin: Injection of H2 into the CH4 grid + * Steam Methane Reaction (SMR, carrier name: 'CH4_to_H2'): techonology + to produce CH4 from H2 + """ from geoalchemy2.types import Geometry @@ -13,10 +23,21 @@ def insert_h2_to_ch4_to_h2(): """ - Define methanisation, feed in and SMR capacities and insert in etrago_link. + Inserts methanisation, feed in and SMR links into the database + + Define the potentials for methanisation and Steam Methane Reaction + (SMR) modelled as extendable links as well as the H2 feedin + capacities modelled as non extendable links and insert all of them + into the database. + These tree technologies are connecting CH4 and H2_grid buses only. + + The capacity of the H2_feedin links is considerated as constant and + calculated as the sum of the capacities of the CH4 links connected + to the CH4 bus multiplied by the H2 energy share allowed to be fed. + This share is calculated in the function :py:func:`H2_CH4_mix_energy_fractions`. + + This function inserts data into the database and has no return. - The potentials for methanisation and SMR are created between CH4 and H2 - buses of the CH4 grid. """ # Connect to local database engine = db.engine() @@ -148,6 +169,7 @@ def H2_CH4_mix_energy_fractions(x, T=25, p=50): ------- float Fraction of H2 in mixture with respect to energy (LHV) + """ # molar masses diff --git a/src/egon/data/datasets/hydrogen_etrago/power_to_h2.py b/src/egon/data/datasets/hydrogen_etrago/power_to_h2.py old mode 100644 new mode 100755 index ddd40e5b0..72fdc6738 --- a/src/egon/data/datasets/hydrogen_etrago/power_to_h2.py +++ b/src/egon/data/datasets/hydrogen_etrago/power_to_h2.py @@ -1,6 +1,15 @@ # -*- coding: utf-8 -*- """ Module containing the definition of the AC grid to H2 links + +In this module the functions used to define and insert into the database +the links between H2 and AC buses are to be found. +These links are modelling: + * Electrolysis (carrier name: 'power_to_H2'): technology to produce H2 + from AC + * Fuel cells (carrier name: 'H2_to_power'): techonology to produce + power from H2 + """ from geoalchemy2.types import Geometry from pyproj import Geod @@ -15,15 +24,23 @@ def insert_power_to_h2_to_power(scn_name="eGon2035"): - """Define power-to-H2-to-power capacities and insert in etrago_link table. + """ + Insert electrolysis and fuel cells capacities into the database. + + The potentials for power-to-H2 in electrolysis and H2-to-power in + fuel cells are created between each H2 bus (H2_grid and + H2_saltcavern) and its closest HV power bus. + These links are extendable. For the electrolysis, if the distance + between the AC and the H2 bus is > 500m, the maximum capacity of + the installation is limited to 1 MW. - The potentials for power-to-h2 in electrolysis and h2-to-power in fuel - cells are created between each H2 bus and its closest HV power bus. + This function inserts data into the database and has no return. Parameters ---------- scn_name : str - Name of the scenario. + Name of the scenario + """ # Connect to local database @@ -161,7 +178,8 @@ def insert_power_to_h2_to_power(scn_name="eGon2035"): def map_buses(scn_name): - """Map H2 buses to nearest HV AC bus. + """ + Map H2 buses to nearest HV AC bus. Parameters ---------- @@ -172,6 +190,7 @@ def map_buses(scn_name): ------- gdf : geopandas.GeoDataFrame GeoDataFrame with connected buses. + """ # Create dataframes containing all gas buses and all the HV power buses sql_AC = f"""SELECT bus_id, geom diff --git a/src/egon/data/datasets/hydrogen_etrago/storage.py b/src/egon/data/datasets/hydrogen_etrago/storage.py old mode 100644 new mode 100755 index 617f7b8e6..55f6f7161 --- a/src/egon/data/datasets/hydrogen_etrago/storage.py +++ b/src/egon/data/datasets/hydrogen_etrago/storage.py @@ -1,4 +1,15 @@ -"""The central module containing all code dealing with heat sector in etrago +""" +The central module containing all code dealing with H2 stores in Germany + +This module contains the functions used to insert the two types of H2 +store potentials in Germany: + * H2 overground stores (carrier: 'H2_overground'): steel tanks at + every H2_grid bus + * H2 underground stores (carrier: 'H2_underground'): saltcavern store + at every H2_saltcavern bus. + NB: the saltcavern locations define the H2_saltcavern buses locations. +All these stores are modelled as extendable PyPSA stores. + """ from geoalchemy2 import Geometry import geopandas as gpd @@ -10,7 +21,13 @@ def insert_H2_overground_storage(scn_name="eGon2035"): - """Insert H2 steel tank storage for every H2 bus.""" + """ + Insert H2_overground stores into the database. + + Insert extendable H2_overground stores (steel tanks) at each H2_grid + bus. This function inserts data into the database and has no return. + + """ # The targets of etrago_hydrogen also serve as source here ಠ_ಠ sources = config.datasets()["etrago_hydrogen"]["sources"] targets = config.datasets()["etrago_hydrogen"]["targets"] @@ -69,7 +86,14 @@ def insert_H2_overground_storage(scn_name="eGon2035"): def insert_H2_saltcavern_storage(scn_name="eGon2035"): - """Insert H2 saltcavern storage for every H2_saltcavern bus in the table.""" + """ + Insert H2_underground stores into the database. + + Insert extendable H2_underground stores (saltcavern potentials) at + every H2_saltcavern bus.This function inserts data into the database + and has no return. + + """ # Datatables sources and targets sources = config.datasets()["etrago_hydrogen"]["sources"] @@ -155,7 +179,12 @@ def insert_H2_saltcavern_storage(scn_name="eGon2035"): def calculate_and_map_saltcavern_storage_potential(): - """Calculate site specific storage potential based on InSpEE-DS report.""" + """ + Calculate site specific storage potential based on InSpEE-DS report. + + This function inserts data into the database and has no return. + + """ # select onshore vg250 data sources = config.datasets()["bgr"]["sources"] From 6340b0ee3fd0da13fd212fdb3fb4e0c2100f68cf Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Thu, 16 Mar 2023 11:34:59 +0100 Subject: [PATCH 37/38] set higher tolerance --- src/egon/data/datasets/sanity_checks.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/egon/data/datasets/sanity_checks.py b/src/egon/data/datasets/sanity_checks.py index e7ff05850..859bcec5c 100644 --- a/src/egon/data/datasets/sanity_checks.py +++ b/src/egon/data/datasets/sanity_checks.py @@ -1488,10 +1488,11 @@ def df_from_series(s: pd.Series): # due to the fact that time series are clipped at zero (either # direction) there is a little difference between the sum of the # individual time series and the aggregated time series as the second - # is generated independent of the others. This makes atol=1e-03 + # is generated independent of the others. This makes atol=1e-01 # necessary. - assert np.allclose(p_max_df, individual_p_max_df, atol=1e-03) - assert np.allclose(p_min_df, individual_p_min_df, atol=1e-03) + atol = 1e-01 + assert np.allclose(p_max_df, individual_p_max_df, atol=atol) + assert np.allclose(p_min_df, individual_p_min_df, atol=atol) # e_min and e_max sql = f""" From 5d2bf3e4403bd4252a1499fcc8bbf7599c4fd877 Mon Sep 17 00:00:00 2001 From: Kilian Helfenbein Date: Thu, 16 Mar 2023 11:43:02 +0100 Subject: [PATCH 38/38] add notice about differences between individual and aggregated time series --- src/egon/data/datasets/DSM_cts_ind.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/egon/data/datasets/DSM_cts_ind.py b/src/egon/data/datasets/DSM_cts_ind.py index ebf157fa7..4990ccb9a 100644 --- a/src/egon/data/datasets/DSM_cts_ind.py +++ b/src/egon/data/datasets/DSM_cts_ind.py @@ -1,3 +1,13 @@ +""" +Currently, there are differences in the aggregated and individual DSM time +series. These are caused by the truncation of the values at zero. + +The sum of the individual time series is a more accurate value than the +aggregated time series used so far and should replace it in the future. Since +the deviations are relatively small, a tolerance is currently accepted in the +sanity checks. See [#1120](https://github.com/openego/eGon-data/issues/1120) +for updates. +""" from sqlalchemy import ARRAY, Column, Float, Integer, String from sqlalchemy.ext.declarative import declarative_base import geopandas as gpd