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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more