Public
Edited
Mar 27
3 forks
Insert cell
md`# Assignment 1`
Insert cell
d3 = require("d3@5")
Insert cell
topojson = require("topojson-client@3")
Insert cell
states = FileAttachment("US_state_1850@1.json").json()
Insert cell
states_features = topojson.feature(states, states.objects.US_state_1850)
Insert cell
csv_data = d3.csvParse(
await FileAttachment("nhgis0003_ds9_1850_state(in)@1.csv").text(),
({ STATENAM, ADK001, ADK006 }) => [STATENAM, [+ADK001, +ADK006 / +ADK001]]
)
Insert cell
data = Object.assign(new Map(csv_data), {
title: ["Horses", "Sheep per Horse"]
})
Insert cell
sheepPerHorse = Array.from(data.values(), d => d[1])
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