Public
Edited
Jul 19, 2022
2 forks
Importers
10 stars
Insert cell
Insert cell
Insert cell
Insert cell
viewof table = Inputs.table(faaLaserStrikes)
Insert cell
Insert cell
faaLaserStrikes.length
Insert cell
Insert cell
allStates = faaLaserStrikes.map(row => row.State)
Insert cell
Insert cell
distinctStates = new Set(allStates.sort(d3.ascending))
Insert cell
Insert cell
fixStates = ({FLorida: "Florida", DC: "D.C.", "District of Columbia": "D.C.", "Marina Islands": "Mariana Islands", Massachussets: "Massachusetts", "Northern Marianas Is": "Mariana Islands", "Northern Marina Islands": "Mariana Islands", Oho: "Ohio", Teas: "Texas", VA: "Virginia", "Virgin Islands": "U.S. Virgin Islands", Miami: "Florida", "North Hampshire": "New Hampshire", Mexico: "New Mexico"})
Insert cell
Insert cell
fixedStates = faaLaserStrikes.map(row => {
return {
...row,
State: row.State in fixStates ? fixStates[row.State] : row.State
}
})
Insert cell
Insert cell
new Set(fixedStates.map(row => row.State).sort(d3.ascending))
Insert cell
Insert cell
Insert cell
Insert cell
import {fiveyears as faaLaserStrikes} from "@observablehq/faa-laser-reports-data"
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