Published
Edited
Oct 10, 2021
2 stars
Insert cell
# Cloud Optimized GeoSpatial Statistics
### quickly calculate statistics for areas within GB+ GeoTIFFs
#### - City of Boston Boundaries from https://data.boston.gov/dataset/city-of-boston-boundary
#### - Population Data from https://ghsl.jrc.ec.europa.eu/ghs_pop2019.php
#### - Link to Visualization of the Population Data: https://geotiff.github.io/georaster-layer-for-leaflet-example/examples/population.html
Insert cell
geojson = fetch("https://geoblaze.s3.amazonaws.com/City_of_Boston_Boundary.geojson").then(response => response.json())
Insert cell
geoblaze = require("geoblaze")
Insert cell
// calculate the sum of the population within the GeoJSON
// only fetches the pixels (5.3MB) from the raster (1.5GB) within the bounding box of the GeoJSON
// geoblaze then crops out the pixels within the boundary from the fetched box
geoblaze.sum("https://georaster-layer-for-leaflet.s3.amazonaws.com/GHS_POP_E2015_GLOBE_R2019A_4326_9ss_V1_0.tif", geojson)
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