Public
Edited
Feb 7, 2024
Insert cell
Insert cell
Insert cell
ageData = [
{
"person": "Mary",
"age": 52
},
{
"person": "Jane",
"age": 52
}
]
Insert cell
Insert cell
Insert cell
gunDeathsInFloridaFile = FileAttachment("gun_deaths_by_firearm_florida_statistical_analysis_center@1.csv")
Insert cell
Insert cell
gunDeathsInFlorida = gunDeathsInFloridaFile.csv()
Insert cell
//gunDeathsInFlorida = gunDeathsInFloridaFile.csv()

printTable(gunDeathsInFlorida.slice(0, 5), ["Year", "Population", "Total Murders", "Total by Firearm"])
Insert cell
// year on x, total by firearm by y
vl.markArea({clip: true, fill: "#C01927"})
.data(gunDeathsInFlorida)
.encode(
vl.x().fieldT('Year').timeUnit('year').scale({domain: [1990, 2010]}),
vl.y().fieldQ('Total by Firearm')
)
.render()
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