-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes on generic_metric and mode_specific_metrics in relation to Mo… #91
Changes on generic_metric and mode_specific_metrics in relation to Mo… #91
Conversation
…de_confirm mapping with dynamic labels.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please indicate testing done as well.
How do you know that this works?
I have executed manual testing, by modifying the year and month parameter to run for different notebooks.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
almost there. the requested changes are fairly minor.
Please remember to resolve the merge conflict.
We need the most improvement in the "Testing done"
Your existing testing:
- does not touch
generate_plots.py
- does not actually test the new custom label functionality (I don't see any entries for the one new mode = 'Moped')
- does not compare the same metric with and without dynamic labels to illustrate the difference with and without using custom labels
Code review is not a substitute for testing. It focuses on readability and code structure. We still need to actually test to make sure that the code works (aka "if it is not tested, it is broken" 😄 )
…enced from example-study-label-options.json
Some testing cases:
The difference which is apparent, is the difference in mapping label for Replaced Mode on Y-axis - "Gas Car, Others" vs "Gas Car Shared Ride". |
Executed all these testing, mentioned above. |
High level feedback: instead of a one-time update saying "I did X", it would be good to record what you did in this "lab notebook" - aka I did X in this way. As you can see from my PR, that helps maintain a record of exactly what was done for reproducibility, and also helps others who want to achieve the same goal.
High level feedback: Please don't put code into issues in screenshots. Screenshots are not searchable, or copy-pasteable or zoomable... Please replace with markdown code blocks.
Yes, you should have more entries of Moped data - neither of your tests shows any actual data. I don't understand why you didn't just replace all entries of a mode that is present - e.g. walk -> moped and then check that the graph was the same, only with the moped label instead of walk
Both of these are calling the same script in the same way with the same config file. Running tests by editing the code between tests is not principled - you are not testing the code that is going to be committed. Please run the code with different configurations to verify. |
**Updated Testing scenario:**
Testing done: With the default settings: STUDY_CONFIG:stage-program Results are: generic_metrics.ipynb:
With the change: STUDY_CONFIG:dev-emulator-study
Results are: generic_metrics.ipynb
Test Done Manually:
Next:
Current Representation Next:
For generic_metrics notebook - Miles per chosen transport mode (mode_confirm:"moped"). Changed the mode_confirm back to "walk" using the following code (for comparison with the above chart).
For generic_metrics notebook - Miles per chosen transport mode (mode_confirm:"walk") These show that the "moped" label has been properly shown on the pie-chart representation. |
For the record, I don't see the old "walk" value for comparison in this figure.
For the record, this is using the mongo shell. This works and I don't think you should change this now. |
I have updated the above comment with a figure for the "walk" value for comparative reference to "moped" value for "Miles per chosen transport mode". |
…ted changes for DYNAMIC_CONFIG back to STUDY_CONFIG from generate_plots.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there - please clean up the whitespace and extraneous changes as below.
Also, I don't understand the reason for the difference between these:
Before any changes (1) | walk -> moped, default mapping (2) | walk -> moped, custom mapping (3) |
---|---|---|
I can understand the subtle difference between (1) and (2), since the "moped" and the original "other" get merged. But why are the percentages for (3) so different from (1) and (2)?
…g_labels() function. Refactored compute_CO2_impact_dynamic() and compute_CO2_footprint_dynamic() to compute the CO2 emission in compute_CO2_footprint_dynamic() function and differentiate between Mode_confirm and Replaced_mode CO2 emission in compute_CO2_impact_dynamic().
…l_lb_CO2 emission in Dynamic Label case, and total_kg_CO2_emission in default config case.
…avoid code duplication for dynamic labels and default mapping cases.
…Re-added the removed comments.
…d prefix to the new functions to reflect its functionality.
I have given justification for the math I am using for the computation of CO2 emission - which is lb_CO2/ trip or kg_CO2/trip. Please let me know if that adds up rightfully.
Yes, I did realize that. I have re-factored both |
@iantei you need to fix your markdown. I have edited #91 (comment) and #91 (comment), for example, to be correct. |
viz_scripts/generic_timeseries.ipynb
Outdated
" \n", | ||
" # Add 7-day rolling avg smoothing to better see trends\n", | ||
" mode_counts['trip_count_smooth'] = mode_counts.groupby(['user_id','Mode_confirm'])['trip_count'].apply(lambda x: x.rolling(7,1).mean())\n", | ||
" mode_distance[f'{distance_unit}smooth'] = mode_distance.groupby(['user_id','Mode_confirm'])[f'{distance_unit}'].apply(lambda x: x.rolling(7,1).mean())\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is actually correct. How did you test this? I don't see how it can work without the underscore.
" mode_distance[f'{distance_unit}smooth'] = mode_distance.groupby(['user_id','Mode_confirm'])[f'{distance_unit}'].apply(lambda x: x.rolling(7,1).mean())\n", | |
" mode_distance[f'{distance_unit}_smooth'] = mode_distance.groupby(['user_id','Mode_confirm'])[f'{distance_unit}'].apply(lambda x: x.rolling(7,1).mean())\n", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested the generic_timeseries
notebook with both default mapping
and dynamic config
through running Jupyter notebook automatically as mentioned above.
Interestingly, we don't use mode_distance
after we have called mode_distance[f'{distance_unit}_smooth']
. This is an existing code changes. I am not sure if this was written to handle future things, but at the moment, it does not execute anything over mode_distance
.
Still, updated the above code to use mode_distance[f'{distance_unit}_smooth']
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do use it to compute "Emissions per mile per day"
try:
# Emissions per mile per day across all users (travel efficiency)
# Note that the energy plot will be identical to this one since scale factor is divided out
emissions['CO2_per_mile'] = emissions['Mode_confirm_lb_CO2'] / emissions['distance_miles_smooth']
emissions['CO2_per_mile'] = emissions['CO2_per_mile'].fillna(0)
plot_data = emissions.groupby(['date_time'])['CO2_per_mile'].agg(['mean']).reset_index()
Is this not in the new codebase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see, that uses emissions['distance_miles_smooth']
and not mode_distance[f'{distance_unit}_smooth']
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is used in mode_specific_timeseries
, though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And I don't see any related changes in mode_specific_timeseries
. Ah but that is because mode_specific_timeseries
does not appear to have any code related to emission calculations.
@iantei I would like to see such investigation and clarification/documentation in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only correctness issue here is the one with the underscore. But since you have to fix that anyway, you might as well fix the formatting/cleanliness issues as well.
viz_scripts/scaffolding.py
Outdated
def print_CO2_emission_calculations(data_eb, ebco2_lb, ebco2_kg, dynamic_labels): | ||
|
||
filtered_taxi_data = data_eb[data_eb['Replaced_mode'] == "Taxi/Uber/Lyft"] | ||
filtered_bus_data = data_eb[data_eb['Replaced_mode'] == "Bus"] | ||
filtered_freeshuttle_data = data_eb[data_eb['Replaced_mode'] == "Free Shuttle"] | ||
filtered_walk_data = data_eb[data_eb['Replaced_mode'] == "Walk"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some notes here about the particular dynamic config that this works with. Because we have at least two production (non-example) dynamic configs now (Laos and CA e-bike) and the second is even in English. So people might be confused while debugging and not know why this doesn't work.
…CO2_footprint_default() and compute_CO2_footprint_dynamic().
…cs() in generic_timeseries notebook.
Accounting to above changes the Notebook: `Generic Timeseries` with STUDY_CONFIG=`dev-emulator-program` | Dynamic Config
Steps executed:
Notebook: `Generic Timeseries` with STUDY_CONFIG=`stage-program` | Default Mapping
Execution steps:
Results comparison between Default Mapping and Dynamic Config in Generic Timeseries:
Timeseries of Emissions
Timeseries of Emissions per mile/kilometer
Timeseries of active users
Timeseries of all mode shares
|
@iantei thank you for putting the test results into the PR as "Details". |
@iantei looking through my prior comments to make sure that they are all resolved, I ran into this comment.
As justified where? The sensed notebooks should not be config specific since we don't use user labels in them. |
I am provisionally marking this as approved. Congratulations, it only took 2 months 😄 Before I merge, I want to see:
|
Comparison of generic metrics notebook outputs:
Executed the notebook "Generic Metrics" for both the STUDY_CONFIG for comparison between default mapping and dynamic config. Steps executed: A. For Default Mapping (STUDY_CONFIG=stage-program) (emission) root@d7768840b5c9:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py generic_metrics.ipynb default
/usr/src/app/saved-notebooks/bin/generate_plots.py:30: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if r.status_code is not 200:
About to download config from https://raw.githubusercontent.com/e-mission/nrel-openpath-deploy-configs/main/configs/stage-program.nrel-op.json
Successfully downloaded config with version 1 for Staging environment for testing programs only and data collection URL https://openpath-stage.nrel.gov/api/
label_options is unavailable for the dynamic_config in stage-program
Running at 2023-11-20T19:11:35.554525+00:00 with args Namespace(plot_notebook='generic_metrics.ipynb', program='default', date=None) for range (<Arrow [2020-09-01T00:00:00+00:00]>, <Arrow [2023-11-01T00:00:00+00:00]>)
Running at 2023-11-20T19:11:35.592872+00:00 with params [Parameter('year', int), Parameter('month', int), Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('dynamic_labels', dict, value={})]
Running at 2023-11-20T19:11:51.849538+00:00 with params [Parameter('year', int, value=2020), Parameter('month', int, value=9), Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('dynamic_labels', dict, value={})]
Running at 2023-11-20T19:11:58.706112+00:00 with params [Parameter('year', int, value=2020), Parameter('month', int, value=10), Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('dynamic_labels', dict, value={})]
Running at 2023-11-20T19:12:05.421774+00:00 with params [Parameter('year', int, value=2020), Parameter('month', int, value=11), Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('dynamic_labels', dict, value={})]
Running at 2023-11-20T19:12:12.831446+00:00 with params [Parameter('year', int, value=2020), Parameter('month', int, value=12), Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('dynamic_labels', dict, value={})] B. For Dynamic Config (STUDY_CONFIG=dev-emulator-program): (emission) root@4f0d3eb39c2e:/usr/src/app/saved-notebooks# ls
Dockerfile auxiliary_files docker generic_metrics_sensed.ipynb mode_specific_metrics.ipynb run_from_host variation_across_individuals.ipynb
Program_trip_characteristics.ipynb bin energy_calculations.ipynb generic_timeseries.ipynb mode_specific_timeseries.ipynb scaffolding.py
__pycache__ conf generic_metrics.ipynb mapping_dictionaries.ipynb plots.py tests
(emission) root@4f0d3eb39c2e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/update_mappings.py mapping_dictionaries.ipynb
(emission) root@4f0d3eb39c2e:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py generic_metrics.ipynb default
/usr/src/app/saved-notebooks/bin/generate_plots.py:30: SyntaxWarning: "is not" with a literal. Did you mean "!="?
if r.status_code is not 200:
About to download config from https://raw.githubusercontent.com/e-mission/nrel-openpath-deploy-configs/main/configs/dev-emulator-program.nrel-op.json
Successfully downloaded config with version 1 for Development environment (program) and data collection URL default
Dynamic labels download was successful for nrel-openpath-deploy-configs: dev-emulator-program
Running at 2023-11-20T17:05:28.739809+00:00 with args Namespace(plot_notebook='generic_metrics.ipynb', program='default', date=None) for range (<Arrow [2020-09-01T00:00:00+00:00]>, <Arrow [2023-11-01T00:00:00+00:00]>)
Running at 2023-11-20T17:05:28.779264+00:00 with params [Parameter('year', int), Parameter('month', int), Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=False), Parameter('dynamic_labels', dict, value={'MODE': [{'value': 'walk', 'baseMode': 'WALKING', 'met_equivalent': 'WALKING', 'kgCo2PerKm': 0}, {'value': 'e-bike', 'baseMode': 'E_BIKE', 'met': {'ALL': {'range': [0, -1], 'mets': 4.9}}, 'kgCo2PerKm': 0.00728}, {'value': 'bike', 'baseMode': 'BICYCLING', 'met_equivalent': 'BICYCLING', 'kgCo2PerKm': 0}, {'value': 'bikeshare', 'baseMode': 'BICYCLING', 'met_equivalent': 'BICYCLING', 'kgCo2PerKm': 0}, {'value': 'scootershare', 'baseMode': 'E_SCOOTER', 'met_equivalent': 'IN_VEHICLE', 'kgCo2PerKm': 0.00894}, {'value': 'drove_alone', 'baseMode': 'CAR', 'met_equivalent': 'IN_VEHICLE', 'kgCo2PerKm': 0.22031}, {'value': 'shared_ride', 'baseMode': 'CAR', 'met_equivalent': 'IN_VEHICLE', 'kgCo2PerKm': 0.11015}, {'value': 'e_car_drove_alone', 'baseMode': 'E_CAR', 'met_equivalent': 'IN_VEHICLE', 'kgCo2PerKm': 0.08216}, {'value': 'e_car_shared_ride', 'baseMode': 'E_CAR', 'met_equivalent': 'IN_VEHICLE', 'kgCo2PerKm': 0.04108}, {'value': 'moped', 'baseMode': 'MOPED', 'met_equivalent': 'IN_VEHICLE', 'kgCo2PerKm': 0.05555}, {'value': 'taxi', 'baseMode': 'TAXI', 'met_equivalent': 'IN_VEHICLE', 'kgCo2PerKm': 0.30741}, {'value': 'bus', 'baseMode': 'BUS', 'met_equivalent': 'IN_VEHICLE', 'kgCo2PerKm': 0.20727}, {'value': 'train', 'baseMode': 'TRAIN', 'met_equivalent': 'IN_VEHICLE', 'kgCo2PerKm': 0.12256}, {'value': 'free_shuttle', 'baseMode': 'BUS', 'met_equivalent': 'IN_VEHICLE', 'kgCo2PerKm': 0.20727}, {'value': 'air', 'baseMode': 'AIR', 'met_equivalent': 'IN_VEHICLE', 'kgCo2PerKm': 0.09975}, {'value': 'not_a_trip', 'baseMode': 'UNKNOWN', 'met_equivalent': 'UNKNOWN', 'kgCo2PerKm': 0}, {'value': 'other', 'baseMode': 'OTHER', 'met_equivalent': 'UNKNOWN', 'kgCo2PerKm': 0}], 'PURPOSE': [{'value': 'home'}, {'value': 'work'}, {'value': 'at_work'}, {'value': 'school'}, {'value': 'transit_transfer'}, {'value': 'shopping'}, {'value': 'meal'}, {'value': 'pick_drop_person'}, {'value': 'pick_drop_item'}, {'value': 'personal_med'}, {'value': 'access_recreation'}, {'value': 'exercise'}, {'value': 'entertainment'}, {'value': 'religious'}, {'value': 'other'}], 'REPLACED_MODE': [{'value': 'no_travel'}, {'value': 'walk'}, {'value': 'bike'}, {'value': 'bikeshare'}, {'value': 'scootershare'}, {'value': 'drove_alone'}, {'value': 'shared_ride'}, {'value': 'e_car_drove_alone'}, {'value': 'e_car_shared_ride'}, {'value': 'taxi'}, {'value': 'bus'}, {'value': 'train'}, {'value': 'free_shuttle'}, {'value': 'other'}], 'translations': {'en': {'walk': 'Walk', 'e-bike': 'E-bike', 'bike': 'Regular Bike', 'bikeshare': 'Bikeshare', 'scootershare': 'Scooter share', 'drove_alone': 'Gas Car Drove Alone', 'shared_ride': 'Gas Car Shared Ride', 'e_car_drove_alone': 'E-Car Drove Alone', 'e_car_shared_ride': 'E-Car Shared Ride', 'moped': 'Moped', 'taxi': 'Taxi/Uber/Lyft', 'bus': 'Bus', 'train': 'Train', 'free_shuttle': 'Free Shuttle', 'air': 'Air', 'not_a_trip': 'Not a trip', 'no_travel': 'No travel', 'home': 'Home', 'work': 'To Work', 'at_work': 'At Work', 'school': 'School', 'transit_transfer': 'Transit transfer', 'shopping': 'Shopping', 'meal': 'Meal', 'pick_drop_person': 'Pick-up/ Drop off Person', 'pick_drop_item': 'Pick-up/ Drop off Item', 'personal_med': 'Personal/ Medical', 'access_recreation': 'Access Recreation', 'exercise': 'Recreation/ Exercise', 'entertainment': 'Entertainment/ Social', 'religious': 'Religious', 'other': 'Other'}, 'es': {'walk': 'Caminando', 'e-bike': 'e-bicicleta', 'bike': 'Bicicleta', 'bikeshare': 'Bicicleta compartida', 'scootershare': 'Motoneta compartida', 'drove_alone': 'Coche de Gas, Condujo solo', 'shared_ride': 'Coche de Gas, Condujo con otros', 'e_car_drove_alone': 'e-coche, Condujo solo', 'e_car_shared_ride': 'e-coche, Condujo con ontras', 'moped': 'Ciclomotor', 'taxi': 'Taxi/Uber/Lyft', 'bus': 'Autobús', 'train': 'Tren', 'free_shuttle': 'Colectivo gratuito', 'air': 'Avión', 'not_a_trip': 'No es un viaje', 'no_travel': 'No viajar', 'home': 'Inicio', 'work': 'Trabajo', 'at_work': 'En el trabajo', 'school': 'Escuela', 'transit_transfer': 'Transbordo', 'shopping': 'Compras', 'meal': 'Comida', 'pick_drop_person': 'Recoger/ Entregar Individuo', 'pick_drop_item': 'Recoger/ Entregar Objeto', 'personal_med': 'Personal/ Médico', 'access_recreation': 'Acceder a Recreación', 'exercise': 'Recreación/ Ejercicio', 'entertainment': 'Entretenimiento/ Social', 'religious': 'Religioso', 'other': 'Otros'}}})] Results: Overall Comparison:
Individual Comparisons: Number of Trips
Number of commute Trips
Trip count by purpose
Trip count under 10 miles
Trip miles by mode
Average Trip Length
Trip Frequency
Trip Frequency (Weekday)
Note: There is no mapping for "pilot_ebike" to "E-bike". Therefore, these mapping has been transformed into "Others" in "Number of Commute Trips" and "Trip count by Purpose" charts above. Overall the charts looks identical. UPDATE: There is some disparity in the charts depicted above, which has been explained below: |
I am observing some errors with sensed notebook for Lao case. Changes:
I am getting the following errors: Error Details/usr/src/app/saved-notebooks/bin/generate_plots.py:30: SyntaxWarning: "is not" with a literal. Did you mean "!="? if r.status_code is not 200: About to download config from https://raw.githubusercontent.com/e-mission/nrel-openpath-deploy-configs/main/configs/usaid-laos-ev.nrel-op.json Successfully downloaded config with version 1 for USAID-NREL Support for Electric Vehicle Readiness and data collection URL https://USAID-laos-EV-openpath.nrel.gov/api/ Running at 2023-11-21T00:26:03.065634+00:00 with args Namespace(plot_notebook='generic_metrics_sensed.ipynb', program='default', date=None) for range (, ) Running at 2023-11-21T00:26:03.105566+00:00 with params [Parameter('program', str, value='default'), Parameter('study_type', str, value='study'), Parameter('include_test_users', bool, value=True), Parameter('sensed_algo_prefix', str, value='cleaned')] Traceback (most recent call last): File "/usr/src/app/saved-notebooks/bin/generate_plots.py", line 84, in compute_for_date(None, None) File "/usr/src/app/saved-notebooks/bin/generate_plots.py", line 81, in compute_for_date nbclient.execute(new_nb) File "/root/miniconda-23.1.0/envs/emission/lib/python3.9/site-packages/nbclient/client.py", line 1305, in execute return NotebookClient(nb=nb, resources=resources, km=km, **kwargs).execute() File "/root/miniconda-23.1.0/envs/emission/lib/python3.9/site-packages/jupyter_core/utils/__init__.py", line 166, in wrapped return loop.run_until_complete(inner) File "/root/miniconda-23.1.0/envs/emission/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete return future.result() File "/root/miniconda-23.1.0/envs/emission/lib/python3.9/site-packages/nbclient/client.py", line 705, in async_execute await self.async_execute_cell( File "/root/miniconda-23.1.0/envs/emission/lib/python3.9/site-packages/nbclient/client.py", line 1058, in async_execute_cell await self._check_raise_for_error(cell, cell_index, exec_reply) File "/root/miniconda-23.1.0/envs/emission/lib/python3.9/site-packages/nbclient/client.py", line 914, in _check_raise_for_error raise CellExecutionError.from_cell_and_msg(cell, exec_reply_content) nbclient.exceptions.CellExecutionError: An error occurred while executing the following cell: ------------------ expanded_ct, file_suffix, quality_text, debug_df = scaffolding.load_viz_notebook_sensor_inference_data(year, month, program, include_test_users, sensed_algo_prefix) ------------------ ----- stdout -----
|
The conversation was documented in Issue section, #89 (comment) |
…xample-program-label-options for print_CO2_emission_calculations().
Not really. I still see differences in:
I see your comment around
But "Trip count by Purpose" does not display modes, so a difference in the e-bike label should not make any difference. And there is no "other" in the purpose charts anyway. It does cause the large "other" in "Number of trips", so I have not flagged that.
Also, "generic_metrics" as an example (note the e.g. before it). I would like to see at least a few metrics from the mode specific and energy/emission notebooks.
|
Comparison of mode specific metrics outputs:
Executed the notebook "Mode Specific Metrics" for both the STUDY_CONFIG for comparison between default mapping and dynamic config. Steps executed:
B. For Dynamic Config (STUDY_CONFIG=dev-emulator-program):
Results: Overall Comparison
'e-bike' specific trip count by purpose All data Default
'e-bike' specific trip miles by replaced mode All data Default
Average Miles for each replaced mode (w/Other) All data Default
'e-bike' specific Trip frequency All data
'e-bike' specific Trips per weekday
All the charts in both |
Comparison of energy calculations notebook chartsExecuted the notebook "Energy Calculations" for both the STUDY_CONFIG for comparison between default mapping and dynamic config. Steps executed:
B. For Dynamic Config (STUDY_CONFIG=dev-emulator-program):
Results: Sketch of 'e-bike' specific emission Impact All data Default
The computation for The difference in these emissions have been documented here in the Issue section. The explanation for this is documented above. |
Response for the above comments are provided below [Generic Metrics Notebook Charts Difference Explaination]
For Trip count by Purpose, we have the following labels (identical in both Default Mapping and Dynamic Config) with the numeric representation of each labels
All these labels are available on both Further clarification showing comparison between two chart's label and it's value representation.
As mentioned above, "Home", "Recreation/ Exercise", "Work" - "To Work", "Entertainment/Social", "Shopping", "Personal/Medical" and "Meal" have same corresponding values. Lets understand the 'Other' label in the pie-chart.
For Dynamic Config, we have distinct new labels represented on the chart as:
I understand this comment is in reference with "Mode choice for Trips under 10 miles". There was a wrong comparison in the charts above, which I have already updated. Now, explanation for the different in representation of the charts. Code snippet to show we're using
The difference in representation is because of the following reasons.
while with the
in the reference example of config which I used to test. https://github.com/e-mission/nrel-openpath-deploy-configs/blob/main/label_options/example-program-label-options.json Comparing labels and their corresponding values:
All the labels have same values except This shows that because of the change in label for
The addition of Comparison of Average (miles) for
The Y-axis represents of Average(miles), with the Mode_confirm represented on the X-axis. As we can see from above, we have difference in Re-checking, the total miles in both of these charts. Adding up the total
The representation includes
Updated the comparison charts between mode specific and energy emissions notebooks above. |
I am not going to hold up the merge for this, but in the future, please test on a dataset with > 1 user and > 25 confirmed e-bike trips. #91 (comment) I am not sure we would have caught all the errors earlier with such a small dataset. Please also note that I am squash-merging here, so please account for that while pulling post-merge. |
…de_confirm mapping with dynamic labels.