Closed shankari closed 1 year ago
@iantei for visibility. As part of your change, you can change the newly added pie_chart_sensed_mode
to use the basemodes in the custom options. However, you don't have to, since the basemodes are not actually changeable by partners - the travel diary algorithms only support a small set of base modes
Testing done: Notebook runs manually
Number of trips | Number of trips under 10 miles |
---|---|
Notebook runs through automation
(emission) root@9f89cbe6c5e7:/usr/src/app# source setup/activate.sh
(emission) root@9f89cbe6c5e7:/usr/src/app/saved-notebooks# PYTHONPATH=.. python bin/generate_plots.py generic_metrics_sensed.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/
Running at 2023-09-10T15:18:26.800512+00:00 with args Namespace(plot_notebook='generic_metrics_sensed.ipynb', program='default', date=None) for range (<Arrow [2020-09-01T00:00:00+00:00]>, <Arrow [2023-09-01T00:00:00+00:00]>)
Running at 2023-09-10T15:18:26.856780+00:00 with params [Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('sensed_algo_prefix', str, value='cleaned')]
Running at 2023-09-10T15:18:33.259898+00:00 with params [Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('sensed_algo_prefix', str, value='cleaned')]
Running at 2023-09-10T15:18:39.184856+00:00 with params [Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('sensed_algo_prefix', str, value='cleaned')]
Running at 2023-09-10T15:18:45.390538+00:00 with params [Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('sensed_algo_prefix', str, value='cleaned')]
Running at 2023-09-10T15:18:51.392699+00:00 with params [Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('sensed_algo_prefix', str, value='cleaned')]
Running at 2023-09-10T15:18:57.682321+00:00 with params [Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('sensed_algo_prefix', str, value='cleaned')]
Running at 2023-09-10T15:19:03.812305+00:00 with params [Parameter('program', str, value='default'), Parameter('study_type', str, value='program'), Parameter('include_test_users', bool, value=True), Parameter('sensed_algo_prefix', str, value='cleaned')]
@iantei would you like to review this PR? Regardless, I will merge it on Monday morning so that it will be included in the next release
@iantei please resolve the conversations in your review I can then merge this and get it ready for staging mid-week.
…oard
sensed_algo_prefix
sensed_mode
pie charts, which is a duplicate of the existingpie_chart_mode
, but with a different set of labels - Refactorpie_chart_mode
to pull out thefunc
and rename itformat_pct
so that we can reuse it in both functionsgenerate_plots
to read in thesensed_algo_prefix
from the config and pass it in to the notebooks - with a default ofcleaned
since none of the configs have this prefix defined yetThis is the bulk of the heavy lifting.
Remaining commits are: