Published
Edited
May 8, 2021
1 fork
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
htm = (await require("htm@1/dist/htm.js")).bind(Preact.h)
Insert cell
Preact = require("preact@8/dist/preact.min.js").catch(() => window.preact)
Insert cell
CountryList = ['China', 'USA', 'Japan', 'Turkey', 'UK', 'India']
Insert cell
YearList = [1990, 1995, 2000, 2005, 2011, 2017]
Insert cell
import {select} from "@jashkenas/inputs"
Insert cell
dataLineC = []
Insert cell
dataLineC
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
gdpSeries = d3.csvParse(await FileAttachment("gdp2@1.csv").text(),({CountryCode, CountryName, GDP1990, GDP1995, GDP2000, GDP2005, GDP2011, GDP2017}) => [CountryCode, [CountryName, +GDP1990, +GDP1995, +GDP2000, +GDP2005, +GDP2011, +GDP2017]])
Insert cell
gdpSeries_dic.get('ABW').slice(1)
Insert cell
gdpSeries_dic = Object.assign(new Map(gdpSeries))
Insert cell
airSeries = d3.csvParse(await FileAttachment("Air_quality@3.csv").text(),({CountryCode, CountryName, A1990, A1995, A2000, A2005, A2011, A2017}) => [CountryCode, [CountryName, +A1990, +A1995, +A2000, +A2005, +A2011, +A2017]])
Insert cell
airSeries_dic = Object.assign(new Map(airSeries))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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