motorized_individual_travel
Main module for preparation of model data (static and timeseries) for motorized individual travel (MIT).
- Contents of this module
Creation of DB tables
Download and preprocessing of vehicle registration data from KBA and BMVI
Calculate number of electric vehicles and allocate on different spatial levels.
Extract and write pre-generated trips to DB
- class MotorizedIndividualTravel(dependencies)[source]
Bases:
DatasetClass to set up static and timeseries data for motorized individual travel (MIT).
For more information see data documentation on Motorized individual travel.
- Dependencies
- Resulting Tables
EgonEvPoolis created and filledEgonEvTripis created and filledEgonEvCountRegistrationDistrictis created and filledEgonEvCountMunicipalityis created and filledEgonEvCountMvGridDistrictis created and filledEgonEvMvGridDistrictis created and filledEgonEvMetadatais created and filled
Configuration
The config of this dataset can be found in datasets.yml in section emobility_mit.
- name: str = 'MotorizedIndividualTravel'
- sources: DatasetSources = DatasetSources(tables={}, files={'trips_status2019': 'mit_trip_data/eGon2035_RS7_min2k_2022-06-01_175429_simbev_run.tar.gz', 'trips_status2023': 'mit_trip_data/eGon2035_RS7_min2k_2022-06-01_175429_simbev_run.tar.gz', 'trips_eGon2035': 'mit_trip_data/eGon2035_RS7_min2k_2022-06-01_175429_simbev_run.tar.gz', 'trips_eGon100RE': 'mit_trip_data/eGon100RE_RS7_min2k_2022-06-01_175444_simbev_run.tar.gz', 'original_data': {'original_data': {'sources': {'RS7': {'url': 'https://www.bmv.de/SharedDocs/DE/Anlage/G/regiostar-referenzdateien.xlsx?__blob=publicationFile', 'file': 'regiostar-referenzdateien.xlsx', 'file_processed': 'regiostar-referenzdateien_preprocessed.csv', 'sheet': 'ReferenzGebietsstand2020'}, 'KBA': {'url': 'https://www.kba.de/SharedDocs/Downloads/DE/Statistik/Fahrzeuge/FZ1/fz1_2021.xlsx?__blob=publicationFile&v=2', 'file': 'fz1_2021.xlsx', 'file_processed': 'fz1_2021_preprocessed.csv', 'sheet': 'FZ1.1', 'columns': 'D, J:N', 'skiprows': 8}, 'trips': {'status2019': {'file': 'eGon2035_RS7_min2k_2022-06-01_175429_simbev_run.tar.gz', 'file_metadata': 'metadata_simbev_run.json'}, 'status2023': {'file': 'eGon2035_RS7_min2k_2022-06-01_175429_simbev_run.tar.gz', 'file_metadata': 'metadata_simbev_run.json'}, 'eGon2035': {'file': 'eGon2035_RS7_min2k_2022-06-01_175429_simbev_run.tar.gz', 'file_metadata': 'metadata_simbev_run.json'}, 'eGon100RE': {'file': 'eGon100RE_RS7_min2k_2022-06-01_175444_simbev_run.tar.gz', 'file_metadata': 'metadata_simbev_run.json'}}}}, 'scenario': {'variation': {'status2019': 'status2019', 'status2023': 'status2023', 'eGon2035': 'NEP C 2035', 'eGon100RE': 'Reference 2050'}, 'lowflex': {'create_lowflex_scenario': True, 'names': {'eGon2035': 'eGon2035_lowflex', 'eGon100RE': 'eGon100RE_lowflex'}}}, 'model_timeseries': {'reduce_memory': True, 'export_results_to_csv': True, 'parallel_tasks': 10}, 'demand_timeseries_mvgd': {'parallel_tasks': 10}}}, urls={'KBA': 'https://www.kba.de/SharedDocs/Downloads/DE/Statistik/Fahrzeuge/FZ1/fz1_2021.xlsx?__blob=publicationFile&v=2', 'RS7': 'https://www.bmv.de/SharedDocs/DE/Anlage/G/regiostar-referenzdateien.xlsx?__blob=publicationFile'})
The sources used by the datasets. Could be tables, files and urls
- targets: DatasetTargets = DatasetTargets(tables={'ev_pool': 'emobility.egon_ev_pool', 'ev_trip': 'emobility.egon_ev_trip', 'ev_count_reg_district': 'emobility.egon_ev_count_registration_district', 'ev_count_municipality': 'emobility.egon_ev_count_municipality', 'ev_count_mv_grid': 'emobility.egon_ev_count_mv_grid_district', 'ev_mv_grid': 'emobility.egon_ev_mv_grid_district', 'ev_metadata': 'emobility.egon_ev_metadata'}, files={'KBA_download': 'motorized_individual_travel/fz1_2021.xlsx', 'KBA_processed': 'motorized_individual_travel/fz1_2021_preprocessed.csv', 'RS7_download': 'motorized_individual_travel/regiostar-referenzdateien.xlsx', 'RS7_processed': 'motorized_individual_travel/regiostar-referenzdateien_preprocessed.csv'})
The targets created by the datasets. Could be tables and files
- version: str = '0.0.11'
- download_and_preprocess()[source]
Downloads and preprocesses data from KBA and BMVI
- Returns:
pandas.DataFrame – Vehicle registration data for registration district
pandas.DataFrame – RegioStaR7 data