-
Notifications
You must be signed in to change notification settings - Fork 403
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
Annotate epiweek as color and filter option #703
Conversation
Thanks @huddlej - this looks good. I expanded the notes
|
e77d3b2
to
9377673
Compare
I think this looks fantastic with @jameshadfield's edits! I also agree that reusing color after 30 weeks is no problem. You could potentially choose an even fewer number of colors (20 or so) as is color's are distinguishable, but barely, and I'm not sure how much this would be improved by 10 fewer colors. |
Thank you for the improved color scale, @jameshadfield and for the review, @cassiawag! The annotations look much better now. I'm going to merge this and release it as a major version, since it does require users to update their software environment to include the epiweeks package. |
Although we plan to eventually support custom start and end date values through Auspice's filter interface, this commit some similar information that is also relevant to epidemiologists in the form of CDC-style epiweeks. We add a new script to calculate epiweeks using the Python library of the same name and produce a node data JSON representation of those values. Note that while this commit updates the Conda environment file to represent the new dependency on the "epiweeks" package, we would also need to include this library in the Docker base image, if we end up merging this code. We would also need to update all auspice configs to include "epiweek" as a color-by and filter. This commit updates only the default auspice config.
This expands our `finalize` rule to dynamicallly generate a scale for datasets which use a coloring for (CDC) epiweek. The resulting dataset coloring will have an ordered legend spanning the observed time frame.
Since we're already forcing an update to the conda environment with `--use-conda`, use the latest Augur and same some memory during augur filter steps.
We require new software in the user's workflow environment, so we should at least note this with a major release and provide instructions on how to update their software.
Description of proposed changes
Although we plan to eventually support custom start and end date values through Auspice's filter interface, this commit some similar information that is also relevant to epidemiologists in the form of CDC-style epiweeks. We add a new script to calculate epiweeks using the Python library of the same name and produce a node data JSON representation of those values.
Note that while this commit updates the Conda environment file to represent the new dependency on the "epiweeks" package, we would also need to include this library in the Docker base image, if we end up merging this code.
We would also need to update all auspice configs to include "epiweek" as a color-by and filter. This commit updates only the default auspice config.
The resulting annotations (for the Nextstrain CI build) look like this:
I think we need to use the fancy new Auspice legends syntax for this type of annotation that is both numerical and not a floating point value.
Testing
Release checklist
If this pull request introduces backward incompatible changes, complete the following steps for a new release of the workflow:
docs/change_log.md
in this pull request to document these changes and the new version number.Additional context
Thank you to @BryanTegomoh for requesting this feature and @josephfauver for implementing the original version in his builds.