Street Trees by Zone in Cambridge, MA

Dylan Kelly
Dylan Kelly

November 13, 2024

Street Trees by Zone in Cambridge, MA

This project was a fun way to practice some of my geospatial Python skills. I chose to use data from my home city of Cambridge, Massachusetts available through the fantastic Cambridge GIS website.

I used the city’s base zoning districts and grouped them into the broad categories provided here. I also obtained point data representing street trees. I then used the OSMnx and GeoPandas Python libraries to calculate the total road length in each district using OpenStreetMap data. Finally, I calculated the number of street trees per meter of road for each zone category and extracted the most common tree species.

This was a fun way to practice working with vector layers and creating geospatial graphics using only Python. I took inspiration for this project from the great Python Foundation series by Spatial Thoughts and Luigi Carboni’s project Retrieving and Visualizing Data from OpenStreetMap.

View my code here

View the Street trees data here

View the zones data here


Tools used

JupyterLabPython

Plug-ins used

geopandasMatplotlibosmnx

tags

GEOPANDASOpenStreetMapPythonSpatial AnalysisZoning

You might also like

Join the community!

We're a place where geospatial professionals showcase their works and discover opportunities.