Public
Edited
Aug 20, 2024
Paused
1 fork
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
tables_wiki_history_of_computing_augmented@7.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
Insert cell
function plot_between(year) {
const dat_f = comp_hist.filter(d => d.year >= year[0] && d.year <= year[1])
const dat_f_w_lab = dat_f.filter(d => d.label !== "NA")

const link_dat = year[1] >= 1969 & year[0] <= 1990 ? links[1969].map(project).concat(links[1970].map(project)).concat(links[1973].map(project)) : ""
return addTooltips(Plot.plot({
width: 1200,
height: 550,
projection: "equal-earth",
color: {legend: true},
marks: [
// Plot.geo(dat_f, { fill: "currentColor" }),
Plot.geo(land, { fill: "currentColor" }),
Plot.graticule(),
Plot.link(link_dat, { x1: "x1", y1: "y1", x2: "x2", y2: "y2", stroke: "gold", strokeWidth: 2 }),
Plot.dot(dat_f, {
x: d => +d.lng, y: d => +d.lat, r: 4, fill: d => d.year, opacity: 0.8,
stroke: "black",
title: d => `${d.year}: ${addNewlines(d.Event)} (associated figures: ${d.figures !== "NA" ? d.figures : ""})\n ${d.label !== "NA" ? d.label : ""}`
}),
Plot.sphere()
]
}), { fill: "gray", opacity: 0.5, "stroke-width": "3px", stroke: "blue" }
)
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
world = FileAttachment("land-110m.json").json()
Insert cell
us = FileAttachment("us-counties-10m.json").json()
Insert cell
land = topojson.feature(world, world.objects.land)
Insert cell
// nation = topojson.feature(us, us.objects.nation)
Insert cell
// world.objects.land.geometries.
Insert cell
counties48 = us.objects.counties.geometries.filter(
({ id }) =>
!["02", "15", "60", "66", "69", "72", "78"].includes(id.slice(0, 2)) // removes Alaska, Hawaii etc.
)
Insert cell
states48 = topojson.merge(us, counties48)
Insert cell
comp_hist = raw_dat.filter(d => d.ORG_lat !== null && d.year !== null)
Insert cell
import {addTooltips} from "@mkfreeman/plot-tooltip"
Insert cell
import {interval} from '@mootari/range-slider@1781'
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