ev_allocation
Calculate number of electric vehicles and allocate on different spatial levels:
allocate_evs_numbers()Allocate specific EVs to MV grid districts:
allocate_evs_to_grid_districts()
- allocate_evs_numbers()[source]
Allocate electric vehicles to different spatial levels.
Allocation 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_grid_districts()[source]
Allocate EVs to MV grid districts for all scenarios and scenario variations.
Each grid district in
egon.data.datasets.mv_grid_districts.MvGridDistrictsis assigned a list of electric vehicles from the EV pool inEgonEvPoolbased on the RegioStar7 region and the counts per EV type inEgonEvCountMvGridDistrict. Results are written toEgonEvMvGridDistrict.
- calc_evs_per_grid_district(ev_data_muns)[source]
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
- Parameters:
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
- Parameters:
scenario_variation_parameters (dict) – Parameters of scenario variation
kba_data (pandas.DataFrame) – Vehicle registration data for registration district
- Returns:
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.
- Parameters:
muns (pandas.DataFrame) – Municipality data
rs7_data (pandas.DataFrame) – RegioStaR7 data
- Returns:
pandas.DataFrame – Fixed RegioStaR7 data