Public
Edited
Feb 28, 2024
Insert cell
# Assignment 1
Insert cell
d3 = require("d3@5")
Insert cell
topojson = require("topojson-client@3")
Insert cell
schooldistricts = FileAttachment("Iowa_School_Districts_2023-2024.json").json()
Insert cell
schooldistricts_features = topojson.feature(schooldistricts, schooldistricts.objects.Iowa_School_Districts_2023-2024)
Insert cell
csv_data = d3.csvParse(await FileAttachment("Iowa_School_Districts_2023-2024 (1).csv").text(),({SchoolDist, Pop2020, SqMiles}) => [SchoolDist, [+Pop2020/+SqMiles]])
Insert cell
popdensity = Array.from(csv_data.values(), d => d[1])
Insert cell
data = Object.assign(new Map(csv_data), {title: ["Iowa School Districts 2023-2024", "Population Density"]})
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