e-mission / em-public-dashboard

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

🔥 🧹 Bugfix and cleanup for "Adding Surveys" #135

Closed Abby-Wheelis closed 4 months ago

Abby-Wheelis commented 4 months ago

When I checked staging this morning, I realized a change I made to display surveys broke non-survey deployments, fixed this in ensure survey_list is defined

Also addressing comments from review of #124, including refactor of data loading to better match the established convention

Abby-Wheelis commented 4 months ago

After some chaos with prepping the dashboard for demo this afternoon, the error was the result of a mistake that I made:

There was a function to create the color mapping based on the options, but I had defined it twice - once in scaffolding and once in the notebook - when there was an error with Other missing, I fixed it in scaffolding, and, for some reason, this worked through all of my testing yesterday. However, I was using the notebook function to create the map, so the lack of Other fix was breaking 5534293 removes the function from the notebook, and uses the one in scaffolding.

I can now run both survey_responses and survey_metrics for dfc-fermata with the April 24th snapshot -- the May 6th snapshot only has 2 surveys in it :( [I believe I had both loaded on top of each other yesterday, back to just April 24th for now]

Will now test this cleanup so we can get the fix out for dfc-fermata tonight

Abby-Wheelis commented 4 months ago

Testing done:

ran notebooks on the command line for dfc-fermata and washingtoncommons -- all ran as expected, no errors, charts display as expected

Screenshot 2024-05-08 at 4 01 50 PM Screenshot 2024-05-08 at 4 01 33 PM

The metrics also work: Screenshot 2024-05-08 at 4 04 25 PM

Additionally, on staging we see (with a failure to load charts): Screenshot 2024-05-08 at 4 05 08 PM

That error is not present in the console (and charts show, just blank since I have not run them) when I input the study_config as stage-study on my branch

Bugs are resolved, and updates to data loading have been made

shankari commented 4 months ago

I fixed the data issue and pulled new data. This is now generating everything except image

except which I think is expected since they were not even shown image

image image

Since the data has been fixed, I am going to also re-enable the ble_sensed_summary and merge this. There is one nit it would be good to fix in the next round of changes.

shankari commented 4 months ago

Fixed metrics to use the ble_sensed_summary instead of the summary

Most trips are still UNKNOWN since they were taken before the BLE integration was complete. I wonder if we should remove some of them to make this data more meaningful.

image image

shankari commented 4 months ago

Another cleanup that needs to happen is to rework the legends. The limit of 15 characters may be too aggressive, particularly if there is a y label, or maybe we can put it on top where there is no label. And in this case, because there were actually ~ 10 entries, some of them got cutoff. We also needed to use nCols.

I think we will have to think through the various use cases and create the legend accordingly.

From the current staging... image

shankari commented 4 months ago

I also think for multi-label charts, we can change the alt-html to have the tables side by side. Right now, they are one below the other which leaves a lot of empty space.

Screenshot 2024-05-09 at 7 08 56 AM
shankari commented 4 months ago

Also, we have "testers and participants" in some locations, but hardcoded "users" in others. Need to unify.

image image