Published
Edited
Apr 5, 2021
1 fork
2 stars
Insert cell
Insert cell
viewof searched_counties = Search(await d3.csv(counties_csv))
Insert cell
viewof selected_counties = Table(searched_counties)
Insert cell
md`\`\`\`json
${JSON.stringify(
selected_counties.map(c => [c.NAME, c.GEOID]).slice(0, max_to_show),
null,
2
)}
\`\`\`
${(selected_counties.length > max_to_show &&
`(...truncated, ${selected_counties.length} total)`) ||
''}
`
Insert cell
max_to_show = 5
Insert cell
counties_csv = 'https://us-counties.datasette.io/counties/counties.csv?_stream=on&_size=max'
Insert cell
d3 = require("d3")
Insert cell
import { Search, Table } from "@observablehq/inputs"
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