-
Notifications
You must be signed in to change notification settings - Fork 162
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
Update frequencies tooltips and include projection pivot #777
Conversation
This commit: 1. Makes the vertical tooltip line follow the frequency bin rather than taking up the entire vertical. 2. Makes the tooltip aligned with the pivot rather than the mouse point. This prevents the tooltip from occluding the marker line. 3. Makes the tooltip styling match the dark background / white text used in tree tooltips. This increases aesthetic consistency.
Looks good -- excited to see what @huddlej's cooking up Tested and confirmed no regressions with current datasets (i.e. those lacking Did you investigate changing the color / opacity of the streams to the right of the |
Thanks for the feedback James. I agree that the fact this is a projection is opaque. I'll experiment with strategies to visually distinguish before and after. |
This commit updates two aspects of projection frequencies: 1. Adds a "Projection" label centered over the projected portion of the frequencies streamgraph 2. Changes tooltip labeling to "Projected frequency" when appropriate
@jameshadfield: I'm going to merge this. Thanks again. Any additional aesthetic changes can happen on top of |
@jameshadfield, @rneher ---
This PR is motivated by @huddlej's recent flu forecasting work. We thought it best to not mess with the underlying data structure of
tip-frequencies.json
. We've kept this JSON structure exactly as before but just included an additional attribute ofprojection_pivot
:This way the frequency streamplot can be drawn as before, but we just mark down with a dashed line what derives from empirical
augur frequencies
and what derives from a forecast.I've added
state.frequencies.projection_pivot
to redux to accomplish this. If you want a dataset to demo this with use: https://nextstrain.org/staging/flu/seasonal/h3n2/ha/2yImportantly, this is backward compatible with previous versions of auspice. The forecast will still show correctly, but we just won't get the dashed projection pivot.
Additionally, this improves frequencies tooltips to be specific to the frequency bin rather than show a full vertical line, as so:
And makes a few aesthetic improvements (white text on black background and tooltip placement).