Plot.plot({
width: 920,
height: 610,
margin: 20,
projection: { type: "reflect-y", domain: jakarta },
color: {
legend: true,
scheme: "Plasma",
label: "Bus trips in Jakarta"
},
marks: [
Plot.frame({ fill: "black" }),
Plot.geo(jakarta, { strokeOpacity: 0.8, stroke: "grey" }),
Plot.geo(jakarta_boundary, {
stroke: "white",
strokeWidth: 1,
strokeOpacity: 0.8
}),
Plot.geo(gtfs_routes, {
stroke: "#FFD700",
strokeWidth: 2,
strokeOpacity: 0.1
}),
Plot.geo(gtfs_routes, {
stroke: (d) => d.properties.tripsCount,
strokeWidth: (d) => Math.round(d.properties.tripsCount / 250)
})
]
})