Created
November 2, 2020 23:50
-
-
Save joninvski/72aa03d7dc3748df5437a37f93468556 to your computer and use it in GitHub Desktop.
Vega-Lite spec from Mon Nov 02 2020
This file contains 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
{ | |
"$schema": "https://vega.github.io/schema/vega-lite/v4.json", | |
"data": { | |
"url": "https://covid.ourworldindata.org/data/owid-covid-data.csv", | |
"format": {"parse": {"date": "date"}} | |
}, | |
"transform": [ | |
{ | |
"filter": { | |
"or": [ | |
{"field": "iso_code", "equal": "PRT"}, | |
{"field": "iso_code", "equal": "USA"}, | |
{"field": "iso_code", "equal": "ESP"}, | |
{"field": "iso_code", "equal": "NOR"}, | |
{"field": "iso_code", "equal": "DNK"}, | |
{"field": "iso_code", "equal": "NLD"}, | |
{"field": "iso_code", "equal": "ITA"}, | |
{"field": "iso_code", "equal": "DEU"}, | |
{"field": "iso_code", "equal": "BRA"}, | |
{"field": "iso_code", "equal": "SWE"} | |
] | |
} | |
} | |
], | |
"repeat": ["total_deaths_per_million","new_deaths_smoothed_per_million", "total_cases_per_million", "new_cases_smoothed_per_million", "positive_rate"], | |
"columns": 2, | |
"spec": { | |
"width": 600, | |
"height": 400, | |
"encoding": { | |
"x": {"field": "date", "type": "temporal"}, | |
"y": {"field": {"repeat": "repeat"}, "type": "quantitative"}, | |
"color": {"field": "iso_code", "type": "nominal"} | |
}, | |
"mark": "line" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment