Unlisted
Edited
Jan 14
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
map-metadata-compact (2).csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
mapMetadataCompact
X
date
Y
Color
Size
Facet X
Facet Y
Mark
Auto
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.plot({
marks: [
Plot.rectY(
mapMetadataCompact,
Plot.binX({ y: "count" }, { x: "date", tip: true })
),
Plot.ruleY([0])
]
})
Insert cell
mapMetadataCompact
X
date
Y
Color
Size
Facet X
Facet Y
Mark
Auto
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
mapMetadata = FileAttachment("map-metadata-compact (2).csv").csv({typed: true})
Insert cell
mapMetadata
Insert cell
Insert cell
viewof search_metadata = Inputs.search(mapMetadata, {placeholder: "Search Map Metadata"})
Insert cell
search_metadata // See results below!
Insert cell
viewof rows = Inputs.table(search_metadata)
Insert cell
### Full Text Search of Title Field Only
Insert cell
Insert cell
Insert cell
viewof maxDaterows = Inputs.table(search_title)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.barY(mapMetadata, {filter: d => d.pub_date_normalized < 2025, x: "area", y: "num_labels"})
Insert cell
Insert cell
Plot.plot({
title: "Labels per map by area of map",
marks: [
Plot.dot(mapMetadata, {x: "area", y: "num_labels" })
],
x: {
domain: pinMapAxes ? [0, 300000] : undefined
},
y: {
domain: pinMapAxes ? [0, 80000] : undefined
}
})
Insert cell
Plot.barY(mapMetadata, {filter: d => d.pub_date_normalized < 2025, x: "pub_date_normalized", y: "num_labels"})
Insert cell
viewof minDate = Inputs.range(d3.extent(mapMetadata, d => d["pub_date_normalized"]), {label: "Min Date", step: 1, value: d3.min(mapMetadataCompact, d => d["pub_date_normalized"])})
Insert cell
viewof maxDate = Inputs.range(d3.extent(mapMetadata, d => d["pub_date_normalized"]), {label: "Max Date", step: 1, value: d3.max(mapMetadata, d => d["pub_date_normalized"])})
Insert cell
viewof pinMapAxes = Inputs.toggle({label: "Pin Axes", value: true})
Insert cell
Insert cell
Plot.plot({
title: "Labels per map over time",
marks: [
Plot.dot(mapMetadata, {x: "pub_date_normalized", y: "num_labels" })
],
x: {
domain: pinMapAxes ? [1500, 2025] : undefined
},
y: {
domain: pinMapAxes ? [0, 80000] : undefined
}
})
Insert cell
Insert cell
maps_metadata_filtered = mapMetadata.filter(d => d["normalized_pub_date"] >= minDate && d["normalized_pub_date"] <= maxDate)
Insert cell
Insert cell
import {Plot} from "@mkfreeman/plot-tooltip"
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