district_heating_areas

Central module containing all code creating with district heating areas.

This module obtains the information from the census tables and the heat demand densities, demarcates so the current and future district heating areas. In the end it saves them in the database.

class DistrictHeatingAreas(dependencies)[source]

Bases: egon.data.datasets.Dataset

Create district heating grids for all scenarios

This dataset creates district heating grids for each scenario based on a defined district heating share, annual heat demands calcultaed within HeatDemandImport and information on existing heating grids from census ZensusMiscellaneous

First the tables are created using create_tables(). Afterwards, the distict heating grids for each scenario are created and inserted into the database by applying the function district_heating_areas()

Dependencies
Resulting tables
name = 'district-heating-areas'
version = '0.0.1'
class EgonDistrictHeatingAreas(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

area_id
geom_polygon
id
residential_and_service_demand
scenario
class MapZensusDistrictHeatingAreas(**kwargs)[source]

Bases: sqlalchemy.ext.declarative.api.Base

area_id
id
scenario
zensus_population_id
add_metadata()[source]

Writes metadata JSON string into table comment.

area_grouping(raw_polygons, distance=200, minimum_total_demand=None, maximum_total_demand=None)[source]

Group polygons which are close to each other.

This function creates buffers around the given cell polygons (called “raw_polygons”) and unions the intersecting buffer polygons. Afterwards, it unions the cell polygons which are within one unified buffer polygon. If requested, the cells being in areas fulfilling the minimum heat demand criterium are selected.

Parameters:
  • raw_polygons (geopandas.geodataframe.GeoDataFrame) – polygons to be grouped.
  • distance (integer) – distance for buffering
  • minimum_total_demand (integer) – optional minimum total heat demand to achieve a minimum size of areas
  • maximal_total_demand (integer) – optional maximal total heat demand per area, if demand is higher the area is cut at nuts3 borders
Returns:

join (geopandas.geodataframe.GeoDataFrame) – cell polygons with area id

Notes

None

create_tables()[source]

Create tables for district heating areas

Returns:None
demarcation(plotting=True)[source]

Load scenario specific district heating areas with metadata into database.

This function executes the functions that identifies the areas which will be supplied with district heat in the two eGo^n scenarios. The creation of heat demand density curve figures is optional. So is also the export of scenario specific Prospective Supply Districts for district heating (PSDs) as shapefiles including the creation of a figure showing the comparison of sorted heat demand densities.

The method was executed for 2015, 2035 and 2050 to find out which scenario year defines the PSDs. The year 2035 was selected and the function was adjusted accordingly. If you need the 2015 scenario heat demand data, please have a look at the heat demand script commit 270bea50332016447e869f69d51e96113073b8a0, where the 2015 scenario was deactivated. You can study the 2015 PSDs in the study_prospective_district_heating_areas function after un-commenting some lines.

Parameters:plotting (boolean) – if True, figure showing the heat demand density curve will be created
Returns:None

Notes

None

district_heating_areas(scenario_name, plotting=False)[source]

Create scenario specific district heating areas considering on census data.

This function loads the district heating share from the scenario table and demarcate the scenario specific district heating areas. To do so it uses the census data on flats currently supplied with district heat, which are supplied selected first, if the estimated connection rate >= 30%.

All scenarios use the Prospective Supply Districts (PSDs) made for the eGon2035 scenario to identify the areas where additional district heating supply is feasible. One PSD dataset is to defined which is constant over the years to allow comparisons. Moreover, it is assumed that the eGon2035 PSD dataset is suitable, even though the heat demands will continue to decrease from 2035 to 2050, because district heating systems will be to planned and built before 2050, to exist in 2050.

It is assumed that the connection rate in cells with district heating will be a 100%. That is because later in project the number of buildings per cell will be used and connection rates not being 0 or 100% will create buildings which are not fully supplied by one technology.

The cell polygons which carry information (like heat demand etc.) are grouped into areas which are close to each other. Only cells with a minimum heat demand density (e.g. >100 GJ/(ha a)) are considered when creating PSDs. Therefore, the select_high_heat_demands() function is used. There is minimum heat demand per PSDs to achieve a certain size. While the grouping buffer for the creation of Prospective Supply Districts (PSDs) is 200m as in the sEEnergies project, the buffer for grouping census data cell with an estimated connection rate >= 30% is 500m. The 500m buffer is also used when the resulting district heating areas are grouped, because they are built upon the existing district heating systems.

To reduce the final number of district heating areas having the size of only one hectare, the minimum heat demand critrium is also applied when grouping the cells with census data on district heat.

To avoid huge district heating areas, as they appear in the Ruhr area, district heating areas with an annual demand > 4,000,000 MWh are split by nuts3 boundaries. This as set as maximum_total_demand of the area_grouping function.

Parameters:
  • scenario_name (str) – name of scenario to be studies
  • plotting (boolean) – if True, figure showing the heat demand density curve will be created
Returns:

None

Notes

None

load_census_data()[source]

Load the heating type information from the census database table.

The census apartment and the census building table contains information about the heating type. The information are loaded from the apartment table, because they might be more useful when it comes to the estimation of the connection rates. Only cells with a connection rate equal to or larger than 30% (based on the census apartment data) are included in the returned district_heat GeoDataFrame.

Parameters:None
Returns:
  • district_heat (geopandas.geodataframe.GeoDataFrame) – polygons (hectare cells) with district heat information
  • heating_type (geopandas.geodataframe.GeoDataFrame) – polygons (hectare cells) with the number of flats having heating type information

Notes

The census contains only information on residential buildings. Therefore, also connection rate of the residential buildings can be estimated.

load_heat_demands(scenario_name)[source]

Load scenario specific heat demand data from the local database.

Parameters:scenario_name (str) – name of the scenario studied
Returns:heat_demand (geopandas.geodataframe.GeoDataFrame) – polygons (hectare cells) with heat demand data
select_high_heat_demands(heat_demand)[source]

Take heat demand cells and select cells with higher heat demand.

Those can be used to identify prospective district heating supply areas.

Parameters:heat_demand (geopandas.geodataframe.GeoDataFrame) – dataset of heat demand cells.
Returns:high_heat_demand (geopandas.geodataframe.GeoDataFrame) – polygons (hectare cells) with heat demands high enough to be potentially high enough to be in a district heating area
study_prospective_district_heating_areas()[source]

Get information about Prospective Supply Districts for district heating.

This optional function executes the functions so that you can study the heat demand density data of different scenarios and compare them and the resulting Prospective Supply Districts (PSDs) for district heating. This functions saves local shapefiles, because these data are not written into database. Moreover, heat density curves are drawn. This function is tailor-made and includes the scenarios eGon2035 and eGon100RE.

Parameters:None
Returns:None

Notes

None