cmu-delphi / www-covidcast

Front end for interactive visualizations powering the COVIDcast website.
https://delphi.cmu.edu/covidcast/
MIT License
13 stars 2 forks source link

Age Groups #1165

Closed sgratzl closed 2 years ago

sgratzl commented 2 years ago

closes #1138

Prerequisites:

Summary

image

similar to the representation of how other regions (neighboring, state, ...) are shown.

netlify[bot] commented 2 years ago

✔️ Preview link ready!

🔨 Explore the source changes: 9087fc24c8071268fa965f9e01954b9dae6851f5

🔍 Inspect the deploy log: https://app.netlify.com/sites/cmu-delphi-covidcast/deploys/622189c8cfb6b100082db4aa

😎 Browse the preview: https://deploy-preview-1165--cmu-delphi-covidcast.netlify.app

ryantibs commented 2 years ago

Thanks for getting started on this! Really cool to finally get to see these signals and play with them on the dashboard.

As per the design itself. Could you try implementing what I mocked up in #1138? The reason I suggested that (and that I like that idea) is that it separates out the way we show multiple curves across locations (bottom legend) from multiple curves across age groups (right legend).

Also, the way it is now, there is just a lot of space taken up below the plot by the age group legend.

sgratzl commented 2 years ago

As per the design itself. Could you try implementing what I mocked up in #1138? The reason I suggested that (and that I like that idea) is that it separates out the way we show multiple curves across locations (bottom legend) from multiple curves across age groups (right legend).

the reason why I reused the existing layout was that if you click the "Show All Dates" the line plot will take up all the horizontal space, thus no space for the age groups. Moreover, this version allows you get the actual value while a simple legend doesn't.

Moreover, adding it right next to the chart isn't trivial since it is outside the normal margin flow. The space on the left/right side are adapting based on the screen size, so might creating some unexpected results if I put something there.

krivard commented 2 years ago

I agree with Ryan that we want to visually distinguish between regional and age group stratification, but I also agree with Sam that this should display at the bottom so that we avoid screwing with the margin flow. I know mobile aren't our first priority users but I'd rather not destroy their experience if it's easily avoidable. We're also losing the orderedness by splitting into two columns.

We can stay in the same family of visual styles while highlighting the region-agegroup hierarchy and maintaining orderedness using something like

image

ryantibs commented 2 years ago

Thanks for the discussion. If we want to stick to something beneath the plot then I'd be happy to see Katie's second suggested implemented.

I also like the idea of being able to click on/off the legend to select which curves you want to show (part of my suggestion in #1138). Currently you can't do that and you only see the one that you hover over in the legend. But for multiple age group curves, with my playing around so far, it's not so easy in the current implementation if you want to compare closely the behavior of several of them over time.

sgratzl commented 2 years ago

what about:

image

ryantibs commented 2 years ago

I think it looks great!!

sgratzl commented 2 years ago

I think it looks great!!

is there then anything missing for this PR to be approved?

ryantibs commented 2 years ago

I didn't realize you had already implemented it --- I assumed that was just a graphic or screenshot of work in progress.

Thanks Sam. I approved it.