mastr

Import MaStR dataset and write to DB tables

Data dump from Marktstammdatenregister (2022-11-17) is imported into the database. Only some technologies are taken into account and written to the following tables:

  • PV: table supply.egon_power_plants_pv

  • wind turbines: table supply.egon_power_plants_wind

  • biomass/biogas plants: table supply.egon_power_plants_biomass

  • hydro plants: table supply.egon_power_plants_hydro

Handling of empty source data in MaStr dump:

The data is used especially for the generation of status quo grids by ding0.

import_mastr() None[source]

Import MaStR data into database

infer_voltage_level(units_gdf: GeoDataFrame) GeoDataFrame[source]

Infer nan values in voltage level derived from generator capacity to the power plants.

Parameters:

units_gdf (geopandas.GeoDataFrame) – GeoDataFrame containing units with voltage levels from MaStR

Returns:

geopandas.GeoDataFrame – GeoDataFrame containing units all having assigned a voltage level.

isfloat(num: str)[source]

Determine if string can be converted to float.

Parameters:

num (str) – String to parse.

Returns:

bool – Returns True in string can be parsed to float.

zip_and_municipality_from_standort(standort: str) tuple[str, bool][source]

Get zip code and municipality from Standort string split into a list.

Parameters:

standort (str) – Standort as given from MaStR data.

Returns:

str – Standort with only the zip code and municipality as well a ‘, Germany’ added.