e-mission / em-public-dashboard

A simple and stupid public dashboard prototype.
BSD 3-Clause "New" or "Revised" License
0 stars 23 forks source link

✨ Add support for displaying sensor-based metrics to the public dashb… #92

Closed shankari closed 1 year ago

shankari commented 1 year ago

…oard

This is the bulk of the heavy lifting.

Remaining commits are:

shankari commented 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

shankari commented 1 year ago

Testing done: Notebook runs manually

Number of trips Number of trips under 10 miles
image image

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')]
shankari commented 1 year ago

@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

shankari commented 1 year ago

@iantei please resolve the conversations in your review I can then merge this and get it ready for staging mid-week.