Making a case for the value of state parks involves understanding how they serve various populations. GreenInfo was asked to develop analysis and mapping that showed who lived farthest from large parks in California.
Geospatial distance calculations can be done with varying degrees of complexity and accuracy:
a. Point-to-point and as-the-crow-flies.
b. Polygon-to-polygon, selecting the most desirable point on each polygon.
c. Either of the above, routed along roads instead of as-the-crow-flies.
To get the most accurate distance and travel times we did (c), using a combination of desktop GIS, web-scraping shell scripts, and the Google Maps Directions Service API:
1. Scrape the latitude/longitude coordinates for park entrances from the maps on their web pages.
2. Compute the lat/lon for census tract centroids.
3. Find the closest park to each tract using a spatial join. (This uses the quickest and coarsest distance calculation: as-the-crow-flies)
4. Write a script to request the travel distance and time routed along roads via the Google Maps API.
5. Join the script results back to the census tracts data in order to color-code the distances on the map.