Skip to content
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 help about coloring types #224

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/learn/augur-to-auspice.rst
Original file line number Diff line number Diff line change
Expand Up @@ -517,9 +517,18 @@ metadata is to be found) to a title (how the key is to be presented in Auspice)
and a type (how should the color scale be constructed).
Setting the type to one of “continuous”, “temporal”, “ordinal”, “categorical”
or “boolean” lets Auspice use the appropriate color scale.

To use these categories the data should be in the format:

- "boolean" - values should all be within ``["false", "true", "1.0", "0.0", "1", "0", "yes", "no"]``; coloring will be binary
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[not blocking, especially as this list already existed in the previous version of the docs]

Actual numbers/booleans (as opposed to just strings) will work in Auspice but they don't always make it through augur export v2 (and I don't think we've documented which do / don't). The auspice code is:

if (["true", "1", "yes"].includes(String(val).toLowerCase()))

- "continuous" - values should be numeric; coloring will be a range between the minimum & maximum values
- "temporal" - values should be dates in decimal date format (``2022.365``); coloring will be a range, and the legend will display human-readable dates
- "ordinal" - values should be integers; coloring will be a range but all displayed values will be integers
- "categorical" - each unique value will receive a different color, the color wheel will be repeated if necessary

If the type is not provided, it will be inferred in this order:

#. "boolean" if all values are within ``["false", "true", "1.0", "0.0", "1", "0", "yes", "no"]``.
#. "boolean" if all values are within boolean values defined above.
#. "continuous" if all values are numeric.
#. "categorical" if none of the above are satisfied.

Expand Down
Loading