Public
Edited
Aug 3, 2023
Insert cell
# Slates
Insert cell
Plot.carto({
color: { scheme: "orrd", type: "pow", exponent: 1 / 2 },
marks: [
Plot.features(precincts_features, {
fill: (d) =>
(gig.get(d.properties.full_text) || 0) / d.properties.Shape_Area,
stroke: "grey",
strokeWidth: 0.2
})
]
})
Insert cell
Plot.carto({
color: { scheme: "orrd", type: "pow", exponent: 1 / 2 },

marks: [
Plot.features(precincts_features, {
fill: (d) =>
(ccdc.get(d.properties.full_text) || 0) / d.properties.Shape_Area,
stroke: "grey",
strokeWidth: 0.2
})
]
})
Insert cell
ccdc = new Map(ccdc_raw.map((d) => [d.id, Number(d.cnt)]))
Insert cell
ccdc_raw = FileAttachment("ccdc.csv").csv(d3.autoType)
Insert cell
gig = new Map(gig_raw.map((d) => [d.id, Number(d.cnt)]))
Insert cell
gig_raw = FileAttachment("gig@2.csv").csv()
Insert cell
precincts_features = topojson.feature(
precincts,
precincts.objects["2022_precincts"]
)
Insert cell
topojson = require("topojson-client@3")
Insert cell
precincts = FileAttachment("2022_precincts@4.topo.json").json()
Insert cell
import { Plot } from "@fil/plot-carto-0-5"
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