Plot.plot({
projection: {
type: "mercator",
domain: {
type: "MultiPoint",
coordinates: [[-122.434469, 47.495315], [-122.224433, 47.495315], [-122.434469, 47.734151], [-122.224433, 47.734151]]}
},
facet: { data: collisions, x: "quarterx", y: "quarter" },
marks: [
Plot.sphere({fill: "lightblue"}),
Plot.geo(states, { fill: "black", stroke: "black", opacity: 1}),
Plot.dot(collisions, {x: "X", y: "Y", r: 2, fill: "red", opacity: .1, title: "Y", filter: d=>d.year == 2019}),
Plot.dot(collisions, {x: "X", y: "Y", r: .5, fill: "yellow", opacity: .3, filter: d=>d.year == 2019}),
Plot.text(collisions, {x:-122.2, y: 47.612, text: d=>d.hrampmtext, frameAnchor: "middle", fontSize: 13, fontStyle: "oblique", lineWidth: 70, textAnchor: "start", lineHeight: 1.2, clip: false, fill: "gray", opacity: .1}),
],
insetBottom: 20,
insetTop: 20,
height: 600,
width: 1200,
})