Published
Edited
Aug 30, 2022
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
filteredByCountryDetail = rn_by_state_and_detailed_birthplace.filter(
(d) => d.birthplace == selectedCountry
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
countries = Array.from(
new Set(rn_by_state_and_detailed_birthplace.map((d) => d.birthplace))
).sort(d3.ascending)
Insert cell
Insert cell
Insert cell
mergedStates = bertin.merge(
statesGeom,
"STATEFP",
filteredByCountryDetail,
"stateFipsString"
)
Insert cell
Insert cell
Insert cell
Insert cell
d3 = require("d3@7", "d3-geo-projection@4")
Insert cell
Insert cell
import { normalizeWindingInPlace } from "@fil/normalize-winding"
Insert cell
usOutlineGeom = FileAttachment("cb_2021_us_state_500k_outline.json").json()
Insert cell
country_population_2019.get("MEX")
Insert cell
country_population_2019 = new Map(
(
await FileAttachment("country_population_2019.csv").csv({
typed: true
})
).map(function (d) {
return [d.iso3_code, d];
})
)
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