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:
voltage_level: inferred based on nominal power (capacity) using the ranges from https://redmine.iks.cs.ovgu.de/oe/projects/ego-n/wiki/Definition_of_thresholds_for_voltage_level_assignment which results in True in column voltage_level_inferred. Remaining datasets are set to -1 (which only occurs if capacity is empty).
supply.egon_power_plants_*.bus_id: set to -1 (only if not within grid districts or no geom available, e.g. for units with nom. power <30 kW)
supply.egon_power_plants_hydro.plant_type: NaN
The data is used especially for the generation of status quo grids by ding0.
- 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.