Published
Edited
Feb 9, 2021
Insert cell
Insert cell
Insert cell
// Set map pitch
context.maps.getMap('map1').then(map => map.mapboxMap.setPitch(60))
Insert cell
// Use Turf.buffer to calculate polygons from points
context.state.compute('polygons', state =>
turf.buffer(state.queries.airquality.results, 300, { units: 'metres' })
)
Insert cell
// Register query to retrieve airquality point data
context.state.registerQuery('queries.airquality', state => ({
datasetId: 'airquality',
format: 'geojson'
}))
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
turf = require("@turf/turf")
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