Public
Edited
Nov 4, 2023
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
width: 920,
height: 610,
margin: 20,
projection: { type: "reflect-y", domain: jakarta },
color: {
legend: true,
scheme: "Plasma",
label: "Bus trips in Jakarta"
// transform: (d) => 111.2 * d, // degrees to km

// zero: true
},
marks: [
Plot.frame({ fill: "black" }),
Plot.geo(jakarta, { strokeOpacity: 0.8, stroke: "grey" }),
Plot.geo(jakarta_boundary, {
stroke: "white",
strokeWidth: 1,
strokeOpacity: 0.8
// strokeWidth: (d) => Math.round(d / 10)
}),
Plot.geo(gtfs_routes, {
stroke: "#FFD700",
strokeWidth: 2,
strokeOpacity: 0.1
// strokeWidth: (d) => Math.round(d / 10)
}),
Plot.geo(gtfs_routes, {
stroke: (d) => d.properties.tripsCount,
strokeWidth: (d) => Math.round(d.properties.tripsCount / 250)
})
]
})
Insert cell
Insert cell
Insert cell
Insert cell
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