Published
Edited
Mar 31, 2021
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
covidData = d3.csv("https://raw.githubusercontent.com/owid/covid-19-data/master/public/data/owid-covid-data.csv",d3.autoType)
Insert cell
notCountries = ["Africa","Asia","Europe","European Union","International","North America","South America","Oceania","World"]
Insert cell
covidDataClean = covidData.filter(row => !new Set(notCountries).has(row.location))
Insert cell
covidTimelineDataGroupedByCountry = d3.group(covidDataClean, d => d["location"])
Insert cell
covidTimelineDataGroupedByDateAndCountry = d3.group(covidDataClean, d => new Date(d["date"]))
Insert cell
covidTimelineDataGroupedByDateAndContinent = d3.group(covidDataClean, d => new Date(d["date"]),d=>d.continent)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
countries = [...covidDataGroupedByCountry.keys()]
Insert cell
countryGeo = d3.csv("https://raw.githubusercontent.com/DoTorr/UCF/main/countries_codes_and_coordinates.csv",d3.autoType,)
Insert cell
countryLat = d3.rollup(countryGeo, c => c[0].Latitude, d => d["Alpha-3-code"])
Insert cell
countryLong = d3.rollup(countryGeo, c => c[0].Longitude, d => d["Alpha-3-code"])
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
md`#### Date Information`
Insert cell
viewof days = Input(42)
Insert cell
dates = Array.from(covidTimelineDataGroupedByDateAndCountry.keys()).sort((a, b) => a - b)
Insert cell
Insert cell
date=dates[dayIndex]
Insert cell
dateContinent=dates[days]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {Input, Range, bind, html} from "@observablehq/inputs"
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