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

First Attempt at USA 'Per Country' Page #136

Merged
merged 15 commits into from
Apr 23, 2021
Merged

First Attempt at USA 'Per Country' Page #136

merged 15 commits into from
Apr 23, 2021

Conversation

emmahodcroft
Copy link
Collaborator

@emmahodcroft emmahodcroft commented Mar 30, 2021

There is likely a lot to get upset about here in terms of programming, but I couldn't resist trying to put together a page that shows the per-country graphs but for... US states!

This is a work-in progress.

Things Emma can do, but needs to do:

  • Actually integrate scripts/try_state_data.py into the main running script, or at least one that more formally branches from the main script
  • Create a PerStateIntro.md and have this go into the page header instead of PerCountryIntro.md

Things Emma doesn't know how to do:

  • How do we give colours to Variants that aren't normally plotted (on main page), but which I've included here?
    image
  • How to best add colours to the dots next to states (Currently grey) without messing up country colors?

Things to think about:

  • How to eventually surface this page? I'd like to have the option of adding something similar for Switzerland, but the header is going to get too crowded. Should any additional 'breakdowns' just be links at the top of the 'per-country' page? (I'm not imagining maintaining a ton of these, and they really have to be interpreted with caution as a lot of the numbers get very small.)

@ivan-aksamentov I'm sorry in advance for the fact that I'm sure this could be done much more neatly! I mostly copied and adapted. Please do tidy what should be tidier! 😬

@vercel
Copy link

vercel bot commented Mar 30, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/hodcroftlab/covariants/G6JY2HcqFTymbdaN7MBoauGC3xwP
✅ Preview: https://covariants-git-usapage-hodcroftlab.vercel.app

@emmahodcroft emmahodcroft marked this pull request as draft March 30, 2021 18:29
@ivan-aksamentov
Copy link
Collaborator

I removed duplicated components and added "Region switcher" component with buttons

01

Merged US data into countries JSON. They now contain "regions" array as top level, and "World", "United States" and "Switzerland" being regions. New regions can be added here:

REGIONS = {
"World": "EUClusters_data.json",
"United States": "USAClusters_data.json",
"Switzerland": None # Will be shown as a disabled "teaser" / "Coming soon!" button in the UI
}

@emmahodcroft emmahodcroft marked this pull request as ready for review April 21, 2021 09:57
@emmahodcroft
Copy link
Collaborator Author

Did not mean to do that. Trying to undo.

@emmahodcroft emmahodcroft marked this pull request as draft April 21, 2021 09:58
@emmahodcroft
Copy link
Collaborator Author

The last issue remaining here is to make the grey dots for states have colors. However, I don't think this need hold up the merge. I'm hoping we might still get the country flags worked in as pictures by modifications to PR #135 - and if that comes through, then we can do the same here!

@emmahodcroft emmahodcroft marked this pull request as ready for review April 23, 2021 13:54
@emmahodcroft emmahodcroft merged commit 6df185c into master Apr 23, 2021
@emmahodcroft emmahodcroft deleted the usa_page branch April 23, 2021 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants