Add a function to calculate VMT share for each day of the year.
What the code is doing
Two data files are added, moves_daily.csv and moves_monthly.csv, which contain exactly the data as it's presented in the report on MOVES. The 2010 version of the report is used in the Attribution file since it contains the monthly distributions for both regular years and leap years.
A helper function is added which takes a year and an area type (either "urban" or "rural") and returns a pandas Series where the index is each day of the year and the values are the fraction of VMT that are estimated to occur in that day.
Testing
Tested manually for leap years and regular years, and for urban vs. rural. Values are spot checked against the previous values, which are relevant for a regular year that begins on a Sunday, and values for other combinations are checked to ensure that the year sums to one (subject to floating point precision).
Purpose
Add a function to calculate VMT share for each day of the year.
What the code is doing
Two data files are added,
moves_daily.csv
andmoves_monthly.csv
, which contain exactly the data as it's presented in the report on MOVES. The 2010 version of the report is used in the Attribution file since it contains the monthly distributions for both regular years and leap years.A helper function is added which takes a year and an area type (either
"urban"
or"rural"
) and returns a pandas Series where the index is each day of the year and the values are the fraction of VMT that are estimated to occur in that day.Testing
Tested manually for leap years and regular years, and for urban vs. rural. Values are spot checked against the previous values, which are relevant for a regular year that begins on a Sunday, and values for other combinations are checked to ensure that the year sums to one (subject to floating point precision).
Usage Example/Visuals
Time estimate
15 minutes.