Published
Edited
Jan 3, 2022
Insert cell
Insert cell
Insert cell
viewof selectedCountry = Inputs.select(countries, {label: "Select a Country", value:"United States"})
Insert cell
Insert cell
Insert cell
Insert cell
Inputs.table(selectedData)
Insert cell
selectedVariants = ['Alpha', 'Beta', "Delta", 'Epsilon', 'Eta', 'Gamma', 'Iota', 'Kappa', 'Lambda', 'Mu', 'Omicron', 'non_who']
Insert cell
selectedData = _data.filter(d => d.date > new Date("2020-09-14") && d.location ==selectedCountry && selectedVariants.findIndex(v => d.variant ==v) > -1)
Insert cell
countries = Array.from(new Set(_data.map(d => d.location)))
Insert cell
_data = d3.csv("https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/variants/covid-variants.csv", d3.autoType)
Insert cell
Type JavaScript, then Shift-Enter. Ctrl-space for more options. Arrow ↑/↓ to switch modes.

Insert cell
import {addTooltips} from "@mkfreeman/plot-tooltip"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more