Last active
January 19, 2021 23:34
-
-
Save zouppen/7ab6fc143865f9aa1a9f1ad3c72112b0 to your computer and use it in GitHub Desktop.
Sources for generating covid-19 vaccines to total cases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh -eu | |
curl -o vaccines.json https://dynamic.hs.fi/2020/corona-embed-grid/vaccinesGlobalLatest.json | |
curl -o overview.json https://dynamic.hs.fi/2020/corona-embed-grid/overviewData.json | |
jq -r --slurpfile overview overview.json -f vaccines_to_cases_ratio.jq vaccines.json >ratios.csv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
. | map(.iso_code as $c | $overview[0][$c].latest["Varmennetut"] as $cases | .latestPeopleVaccinated | if $cases == null then empty else [.location, .people_vaccinated, $cases, .people_vaccinated / $cases] end | @csv ) | (["country", "vaccinated", "cases", "ratio"] | @csv), join("\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment