Public
Edited
Apr 4, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width,
height,
projection: projection,
marks: [
Plot.geo(berlin_geo),
// Plot.dot(stops, {
// x: "stop_lon",
// y: "stop_lat",
// r: 1,
// stroke: "red"
// }),
// Plot.geo(shapes_geo, {
// stroke: "green"
// })
Plot.dot(
stops,
Plot.hexbin(
{
r: "count",
fill: "count"
},
{
x: "stop_lon",
y: "stop_lat",
inset: 0,
interval: 0.005
}
)
)
]
})
Insert cell
Plot.plot({
width,
height,
projection: projection,
marks: [
Plot.geo(berlin_po_geo, {
// fill
})
// Plot.dot(stops, {
// x: "stop_lon",
// y: "stop_lat",
// r: 1,
// stroke: 'red',
// }),
// Plot.geo(resample(shapes_geo), {
// stroke: "red"
// // fill: ""
// })
]
})
Insert cell
height = 800
Insert cell
projection = d3.geoAzimuthalEqualArea()
.fitExtent(
[[0, 0], [width, height]],
berlin_geo
);
Insert cell
Insert cell
berlin = FileAttachment("berlin_bezirke.topojson").json()
Insert cell
berlin_geo = topojson.feature(berlin, berlin.objects.states)
Insert cell
berlin_po = FileAttachment("berlin_postleitzahlen.topojson").json()
Insert cell
berlin_po_geo = topojson.feature(
berlin_po,
berlin_po.objects.berlin_postleitzahlen
)
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
shapes_geo = topojson.feature(shapes, shapes.objects.geo)
Insert cell
topojson.feature(shapes, shapes.objects.geo)
Insert cell
Insert cell
Insert cell
Insert cell
topojson = require("topojson")
Insert cell
d3 = require("d3@7")
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