Public
Edited
Apr 7, 2024
1 star
Insert cell
Insert cell
Insert cell
Plot.plot({
projection: "albers-usa",
width,
marks: [
Plot.geo(nation, { strokeOpacity: 0.25 }),
Plot.geo(states, { strokeOpacity: 0.25 }),
// Directly use the `range` in your plotting logic
Plot.dot(
tornados.filter((d) => {
// Assuming `d.year` represents the year of the tornado
// You would need to adjust this if your data uses a different structure
return d.yr === range;
}),
{
x: "slon",
y: "slat",
fill: "#33658a",
r: "mag",
stroke: "#dee2e6"
}
)
]
})
Insert cell
filteredTornados = tornados.filter((d) => d.year === range)
Insert cell
import {us} from "@observablehq/us-geographic-data"
Insert cell
nation = topojson.feature(us, us.objects.nation)
Insert cell
counties = topojson.feature(us, us.objects.counties)
Insert cell
states = topojson.feature(us, us.objects.states)
Insert cell
tornados.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
tornados.csv
SELECT slat, slon, st,yr
from tornados
where slat between 32.5 and 35.5
Insert cell
import { Plot } from "@mkfreeman/plot-tooltip"
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