Public
Edited
Nov 26, 2023
Insert cell
Insert cell
electricityData = FileAttachment("electricity.csv").csv({typed: true})
Insert cell
seatsData = FileAttachment("seats.csv").csv({typed: true})
Insert cell
Plot.plot({
marginBottom: 60,
marginLeft: 60,
marginTop: 60,
style: {fontSize: 24},
x: {tickFormat: n => ""+n, grid: true, label: "", labelArrow: false},
y: {domain: [0,100], grid: true, label: "Access to electricity (% of population)", labelArrow: false},
marks: [
Plot.ruleY([0]),
Plot.lineY(electricityData, {x: "year", y: "electricity", marker: "dot", strokeWidth: 2, stroke: "blue"})
]
})
Insert cell
Plot.plot({
marginBottom: 60,
marginLeft: 60,
marginTop: 60,
style: {fontSize: 24},
x: {tickFormat: n => ""+n, grid: true, label: "", labelArrow: false},
y: {domain: [0,50], grid: true, label: "Proportion of seats held by women in national parliaments (%)", labelArrow: false},
marks: [
Plot.ruleY([0]),
Plot.lineY(seatsData, {x: "year", y: "seats", marker: "dot", strokeWidth: 2, stroke: "blue"})
]
})
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