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 key to match colors displayed in map #3216

Closed
1 task
Tracked by #156
JonellaCulmer opened this issue Oct 2, 2019 · 1 comment · Fixed by #3229
Closed
1 task
Tracked by #156

Update key to match colors displayed in map #3216

JonellaCulmer opened this issue Oct 2, 2019 · 1 comment · Fixed by #3229
Assignees
Milestone

Comments

@JonellaCulmer
Copy link
Contributor

What we're after: As part of the improvements needed prior to the WCCF feature release, the key needs to be updated to accurately match the colors shown in the map for each candidate/election year. This is specific to states with money. At this time, we will not include a color category for states that are colored "white" and have no funds to display.

Completion criteria:

  • Update key to automatically display all applicable colors shown in the map for a given candidate/election year

Screenshot

Screen Shot 2019-10-02 at 11 45 42 AM

@rfultz
Copy link
Contributor

rfultz commented Oct 3, 2019

After investigating deeper yesterday, some discoveries:

  • The current map ("Individual contributions" section, "State" button/tab) has the same issue.

  • The states and legend are using the same color scale.

  • Though they're sometimes very close, none of the states are the same color as any other state.*

  • The color scale is a kind of number line with the smallest value on the left being represented with the lightest color and the highest value on the right being represented by the darkest color.

  • States' colors are chosen based on where their value would put them on that number line.

  • The legend reflects the colors at specific milestones along the scale—each quantile will be its corresponding color without regard to any of the states' individual values. (e.g., if the range of values can be divided neatly into quantiles of $10M, we'll have markers at $20M, $30M, and $40M even if there are no states at the same place on the number line. The legend colors will be chosen based on where $20M, $30M, and $40M fall on the number line.)

*They could be if their value's position on the scale were the same as another state's. e.g., if two states were exactly 5.678% of the way between the minimum and maximum value of the scale, they would be exactly the same color.

Next Steps

After discussing with @patphongs and @JonellaCulmer yesterday, we've decided to corral the states' colors to fit into the legend's selected colors. (i.e., states' colors will be "rounded" to the next highest legend color.)

We don't currently plan to apply the updated functionality to the existing map.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants