Closed isond closed 2 years ago
Not related to this PR: should we regenerate the existing immediate charing profiles in the Dropbox folder with this fix?
Not related to this PR: should we regenerate the existing immediate charing profiles in the Dropbox folder with this fix?
I think it would be a good idea to regenerate the existing profiles that way they're up-to-date.
@isond This is good to go and I will press the button once the linter doesn't complain. Thanks!
Pull Request doc
Purpose
What is the larger goal of this change? To update the dwell time calculation in the original data processing code.
What the code is doing
How is the purpose executed? The dwell times are calculated by subtracting the current trip's end time from the next trip's start time. The last trip's dwell time is calculated by subtracting it's end time from the first trip's start time. This updated calculation also handles when start times begin past 12AM for all trips, which the previous version didn't handle and outputted negative times.
Testing
How did you test this change (unit/functional testing, manual testing, etc.)? Since the output should not contain negative values (which the original code produced), some of the trips with the negative values were manually recalculated. Those were then used as test cases to compare against the updated code output.
Where to look
It's helpful to clarify where your new code lives if you moved files around or there could be confusion/ PreREISE/prereise/gather/demanddata/transportation_electrification/data_process.py
What files are most important? data_process.py
Usage Example/Visuals
How the code can be used and/or images of any graphs, tables or other visuals (not always applicable).
Time estimate
How long will it take for reviewers and observers to understand this code change? It should take maybe 15 minutes to 30 minutes to understand.