Fetch NREL's Electrification Futures Study the transportation sector and build a data frame giving the VMT for a specified scenario and several technologies
What the code is doing
Load data hosted by NREL, store data in memory as a data frame, filter the data frame and return the annual VMT for a user-specified scenario as a combination of year and vehicle type in each state
Testing
Existing unit tests
Where to look
one function load the data and return a data frame for a specified sector
the other function returns a dict where keys are state abbreviations and values are data frames giving the miles traveled by a vehicle type (technology) in a given year for a user-specified range of electrification futures (scenario)
Usage Example/Visuals
>>> from prereise.gather.demanddata.transportation_electrification.generate_scaling_factors import get_vmt_projection_for_state
>>> from prereise.gather.demanddata.nrel_efs.get_efs_annual_data import get_efs_annual_data, nrel_annual_efs_url
>>> efs = get_efs_annual_data(nrel_annual_efs_url, "TRANSPORTATION")
>>> vmt_projection = get_vmt_projection_for_state(efs)
>>> vmt_projection["CA"]
DEMAND_TECHNOLOGY YEAR VALUE
0 BATTERY ELECTRIC MEDIUM-DUTY VEHICLE 2017 1.935348e+07
1 BATTERY ELECTRIC MEDIUM-DUTY VEHICLE 2018 3.346116e+07
2 BATTERY ELECTRIC MEDIUM-DUTY VEHICLE 2019 5.122918e+07
3 BATTERY ELECTRIC MEDIUM-DUTY VEHICLE 2020 7.713368e+07
4 BATTERY ELECTRIC MEDIUM-DUTY VEHICLE 2021 1.135307e+08
.. ... ... ...
267 ELECTRIC LIGHT-DUTY TRUCK - 300 MILE RANGE 2046 3.263052e+10
268 ELECTRIC LIGHT-DUTY TRUCK - 300 MILE RANGE 2047 3.775862e+10
269 ELECTRIC LIGHT-DUTY TRUCK - 300 MILE RANGE 2048 4.318907e+10
270 ELECTRIC LIGHT-DUTY TRUCK - 300 MILE RANGE 2049 4.886458e+10
271 ELECTRIC LIGHT-DUTY TRUCK - 300 MILE RANGE 2050 5.471126e+10
[272 rows x 3 columns]
The 272 rows corresponds to 34 years [2017, 2050] and 8 technologies
Pull Request doc
Purpose
Fetch NREL's Electrification Futures Study the transportation sector and build a data frame giving the VMT for a specified scenario and several technologies
What the code is doing
Load data hosted by NREL, store data in memory as a data frame, filter the data frame and return the annual VMT for a user-specified scenario as a combination of year and vehicle type in each state
Testing
Existing unit tests
Where to look
dict
where keys are state abbreviations and values are data frames giving the miles traveled by a vehicle type (technology) in a given year for a user-specified range of electrification futures (scenario)Usage Example/Visuals
The 272 rows corresponds to 34 years [2017, 2050] and 8 technologies
Time estimate
15min