Public
Edited
Nov 28, 2023
Insert cell
Insert cell
Insert cell
Plot.plot({
insetTop: 10,
width: 600,
projection: {type: "mercator", domain: {
type: "MultiPoint", coordinates: [[ -125.0117, 45.5335 ],[ -116.9060, 45.5335 ], [ -125.0117, 49.0125 ], [ -116.9060, 49.0125 ]]}},
marks: [
Plot.geo( counties.features, { fill: d => pop_input_year.get(d.id), stroke: "black", title: d=> d.properties.name, }),
Plot.text(typeinput,{text: d=> 'Washington ' + typeinput,
x:-123.5117, y: 49.0125, dy: -50, fontSize: 30,
fontStyle: "italic", fontWeight: "bold", textAnchor: "start",
fill: "#340002", opacity: 1, lineHeight: 1.2}),
Plot.text(['Date: ofm.wa.gov | Design: Deepsha Menghani | Threads: IandLoveandData | Mastodon: Deepsha'],{x:-116.9060, y:45.5335, dy: 30, fontSize: 14, fill: "#00063f", opacity: .71, lineHeight: 1.2, textAnchor: "end"}),
],
color: {type: "linear", legend: false, scheme: "Reds",
//range: ["white", "black"],
style: {fontSize: 20}, width: 700, ticks: 7}
})
Insert cell
wapoplandvals@2.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
pop_year = wapoplandvals.filter(d => d.type === typeinput)
Insert cell
pop_input_year = new Map(pop_year.map(({id, value}) => [id, value]))
Insert cell
pop_input_year.get(53001)
Insert cell
pop_input_year.get("53001")
Insert cell
import {counties} from "ff0a83b495637684"
Insert cell
counties
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