Public
Edited
Nov 2, 2023
1 star
Insert cell
Insert cell

Plot.plot({
insetBottom: 100,
insetTop: 40,
width: 700,
projection: { type: "mercator", domain: greenwayTrails},
marks: [
Plot.geo(greenwayTrails.features, {stroke: d=>d.properties.length,
strokeWidth: 1,
strokeOpacity: .4,
title: d=>d.properties.name}),
Plot.geo(greenwayTrails.features, {stroke: d=>d.properties.length,
strokeWidth: d=>d.properties.length,
title: d=>d.properties.name}),
Plot.text(['Town of Cary, North Carolina'], {x: -78.81, y: 35.83, dx: -120, dy:-80, fontSize: 25, fill: "#301934", opacity: 1, textAnchor: "start", lineHeight: 1.2, clip: false, fontWeight: "bold", fontStyle: "italic"}),
Plot.text(['Cary’s current and proposed greenway system, including connectors and street side trails.\n\nA greenway is a linear parcel of land set aside to preserve open space. Greenways protect important habitat and provide corridors for people and wildlife.'], {x: -78.81, y: 35.83, dx: -390, dy:380, fontSize: 19, fill: "#00563b", opacity: 1, textAnchor: "start", lineHeight: 1.2, lineWidth: 25, clip: false, fontStyle: "italic"}),
Plot.text(['data.townofcary.org | Design: Deepsha Menghani | Threads: @IandLoveandData | Mastodon: @Deepsha'], {x: -78.81, y: 35.83, dx: -410, dy:490, fontSize: 15, fill: "#00563b", opacity: .6, textAnchor: "start", lineHeight: 1.2, clip: false}),
],
color: {type: "sequential", legend: true, scheme: "Viridis", reverse: true, style: {fontSize: 15}, width: 640, ticks: 5, label: "Length of proposed trail (miles) ->"}
})
Insert cell
greenwayTrails
Insert cell
greenwayTrails = FileAttachment("greenway-trails.json").json()
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more