Skip to content

Commit

Permalink
Merge pull request #149 from openego/features/#101-import-heat-demand…
Browse files Browse the repository at this point in the history
…-data

Features/#101 import heat demand data
  • Loading branch information
EvaWie authored Mar 10, 2021
2 parents 1acf057 + 70c553a commit 09bf81f
Show file tree
Hide file tree
Showing 9 changed files with 850 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Added
`#9 <https://github.com/openego/eGon-data/issues/9>`_
* RE potential areas data import
`#124 <https://github.com/openego/eGon-data/issues/124>`_
* Heat demand data import
`#101 <https://github.com/openego/eGon-data/issues/101>`_

Changed
-------
Expand Down
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ packages are required too. Right now these are:
On recent Ubuntu version you can install it via
:code:`sudo apt install osm2pgsql`.

* `postgis <https://postgis.net/>`_
On recent Ubuntu version you can install it via
:code:`sudo apt install postgis`.


Installation
============
Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,17 @@ def read(*names, **kwargs):
],
python_requires=">=3.6.*",
install_requires=[
# eg: 'aspectlib==1.1.1', 'six>=1.7',
"apache-airflow<2.0",
"click",
"disaggregator @ git+https://github.com/openego/disaggregator.git@features/pip_install",
"geopandas",
"importlib-resources",
"oedialect==0.0.8",
"pyaml",
"psycopg2",
"sqlalchemy",
"geopandas",
"disaggregator @ git+https://github.com/openego/disaggregator.git@features/pip_install"
# eg: 'aspectlib==1.1.1', 'six>=1.7',
"rasterio",
"sqlalchemy"
],
extras_require={
"dev": ["black", "flake8", "isort>=5", "pre-commit", "pytest", "tox"]
Expand Down
10 changes: 9 additions & 1 deletion src/egon/data/airflow/dags/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import egon.data.importing.mastr as mastr
import egon.data.processing.substation as substation
import egon.data.importing.re_potential_areas as re_potential_areas
import egon.data.importing.heat_demand_data as import_hd

# Prepare connection to db for operators
airflow_db_connection()
Expand Down Expand Up @@ -193,7 +194,6 @@
substation_functions >> hvmv_substation_extraction
substation_functions >> ehv_substation_extraction


# Import potential areas for wind onshore and ground-mounted PV
download_re_potential_areas = PythonOperator(
task_id="download_re_potential_area_data",
Expand All @@ -210,3 +210,11 @@
)
setup >> download_re_potential_areas >> create_re_potential_areas_tables
create_re_potential_areas_tables >> insert_re_potential_areas

# Future heat demand calculation based on Peta5_0_1 data
heat_demand_import = PythonOperator(
task_id="import-heat-demand",
python_callable=import_hd.future_heat_demand_data_import
)
vg250_clean_and_prepare >> heat_demand_import
population_import >> heat_demand_import
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
CREATE EXTENSION hstore;
CREATE EXTENSION postgis;
CREATE EXTENSION postgis_raster;
30 changes: 30 additions & 0 deletions src/egon/data/datasets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ demandregio:
- 2018
- 2035
- 2050

hvmv_substation:
original_data:
source:
Expand Down Expand Up @@ -138,3 +139,32 @@ re_potential_areas:
"potentialarea_pv_agriculture.gpkg": "egon_re_potential_area_pv_agriculture"
"potentialarea_pv_road_railway.gpkg": "egon_re_potential_area_pv_road_railway"
"potentialarea_wind.gpkg": "egon_re_potential_area_wind"

peta5_0_1_res_heat_demands:
original_data:
source:
# In case the link breaks (hopefully it does not), you are able to download
# the data manually. Here you also find background information:
# https://s-eenergies-open-data-euf.hub.arcgis.com/search?categories=seenergies_buildings
# https://www.arcgis.com/home/item.html?id=d7d18b63250240a49eb81db972aa573e
url: "https://arcgis.com/sharing/rest/content/items/d7d18b63250240a49eb81db972aa573e/data"
target:
path: "Peta5_0_1_HD_res.zip"
processed:
schema: "demand"
file_table_map:
table: # 2015 heat demand data not stored in database
peta5_0_1_ser_heat_demands:
original_data:
source:
# In case the link breaks (hopefully it does not), you are able to download
# the data manually. Here you also find background information:
# https://s-eenergies-open-data-euf.hub.arcgis.com/search?categories=seenergies_buildings
# https://www.arcgis.com/home/item.html?id=52ff5e02111142459ed5c2fe3d80b3a0
url: "https://arcgis.com/sharing/rest/content/items/52ff5e02111142459ed5c2fe3d80b3a0/data"
target:
path: "Peta5_0_1_HD_ser.zip"
processed:
schema: "demand"
file_table_map:
table: # 2015 heat demand data not stored in database
Loading

0 comments on commit 09bf81f

Please sign in to comment.