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

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