Public
Edited
Feb 9, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
raw = FileAttachment("dataset-9-vr-successful-closures-by-occupation-and-county-sfy-14-15-through-sfy-17-18.csv").csv({typed: true})
Insert cell
Insert cell
rehab = raw.filter(row => row.Occupation != "Not Reported")
Insert cell
Insert cell
rehabFlattened = d3.flatRollup(rehab, D => d3.sum(D, d => d["Successful Closures"]), d => d.Year, d => d.Occupation)
Insert cell
closuresByOccupationByYear = rehabFlattened.map(row => ({year: row[0], occupation: row[1], closure: row[2]}))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
years = [2014, 2015, 2016, 2017]
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