Allocate electric vehicles to different spatial levels.

Accocation uses today’s vehicles registration data per registration district from KBA and scales scenario’s EV targets (BEV and PHEV) linearly using population. Furthermore, a RegioStaR7 code (BMVI) is assigned.

Levels: * districts of registration * municipalities * grid districts


Allocate EVs to MV grid districts for all scenarios and scenario variations.

Each grid district in egon.data.datasets.mv_grid_districts.MvGridDistricts is assigned a list of electric vehicles from the EV pool in EgonEvPool based on the RegioStar7 region and the counts per EV type in EgonEvCountMvGridDistrict. Results are written to EgonEvMvGridDistrict.


Calculate EVs per grid district by using population weighting

Parameters:ev_data_muns (pandas.DataFrame) – EV data for municipalities
Returns:pandas.DataFrame – EV data for grid districts
calc_evs_per_municipality(ev_data, rs7_data)[source]

Calculate EVs per municipality

  • ev_data (pandas.DataFrame) – EVs per regstration district
  • rs7_data (pandas.DataFrame) – RegioStaR7 data
calc_evs_per_reg_district(scenario_variation_parameters, kba_data)[source]

Calculate EVs per registration district

  • scenario_variation_parameters (dict) – Parameters of scenario variation
  • kba_data (pandas.DataFrame) – Vehicle registration data for registration district

pandas.DataFrame – EVs per registration district

fix_missing_ags_municipality_regiostar(muns, rs7_data)[source]

Check if all AGS of municipality dataset are included in RegioStaR7 dataset and vice versa.

As of Dec 2021, some municipalities are not included int the RegioStaR7 dataset. This is mostly caused by incorporations of a municipality by another municipality. This is fixed by assigning a RS7 id from another municipality with similar AGS (most likely a neighboured one).

Missing entries in the municipality dataset is printed but not fixed as it doesn’t result in bad data. Nevertheless, consider to update the municipality/VG250 dataset.

  • muns (pandas.DataFrame) – Municipality data
  • rs7_data (pandas.DataFrame) – RegioStaR7 data

pandas.DataFrame – Fixed RegioStaR7 data