Public
Edited
Mar 17, 2023
Importers
Insert cell
Insert cell
Insert cell
Insert cell
tiles = Promise.all(tile().map(async (d) => {
const [x, y, z] = d;
const response = await fetch(`https://tile.nextzen.org/tilezen/vector/v1/256/all/${z}/${x}/${y}.json?api_key=${API_KEY}`);
d.data = await response.json();
return d;
}))
Insert cell
tile = d3.tile()
.size([width, height])
.scale(projection.scale() * 2 * Math.PI)
.translate(projection([0, 0]))
Insert cell
path = d3.geoPath(projection)
Insert cell
projection = d3.geoMercator().rotate([112, 0, 0]).fitExtent([[20, 20], [width - 20, height - 20]], tempe);
Insert cell
height = 610
Insert cell
width = 975
Insert cell
tempe = FileAttachment("City_of_Tempe_Boundary.geojson").json()
Insert cell
d3 = require("d3-geo@2", "d3-selection@1", "d3-tile@1", "d3-array@2", "d3-scale@v2", "d3-scale-chromatic@2")
Insert cell
API_KEY = "NDrEVuDTRu2JAZkwe7mfdQ"
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