Published
Edited
May 11, 2021
1 star
Marriage & Birth Control (CFPS dataset)
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
md`## Utils`
Insert cell
d3.extent(birth_age, d => d.birthAge)
Insert cell
height = 400
Insert cell
margin = ({top: 20, right: 30, bottom: 30, left: 40})
Insert cell
md`## Data`
Insert cell
d3.extent(birth_age, d=> d.count)
Insert cell
d3.extent(firstBirthSum, d=> d.count)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
firstBirthDistribution = tidy(personalData,
groupBy(['firstBirth', 'role', 'region'], [
summarize({
count: n()
})
]
))
Insert cell
personalData = daughter_mother.filter(d => d.firstBirthMother>15).map(d => ({role: "mother", firstBirth: d.firstBirthMother, region: d.region})).concat(daughter_mother.filter(d => d.firstBirthDaughter>15).map(d=>({role: "daughter", firstBirth: d.firstBirthDaughter, region:d.region})))
Insert cell
Insert cell
journalize = require("journalize")
Insert cell
Insert cell
import {Plot, d3} from "@observablehq/plot"
Insert cell
import {slider} from "@jashkenas/inputs"
Insert cell
import {swatches as Swatches} from "@d3/color-legend"
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