Skip to content

Jupyter notebook demonstrating how to create isocrhones using Python and some helpful spatial APIs

Notifications You must be signed in to change notification settings

ghing/isochrones-python-apis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creating Isochrones with Python and Distance APIs

A Jupyter notebook showing how to use free spatial APIs to create isochrone maps.

I made this for a training session at City Bureau's inaugural Design-A-Thon.

You can view slides for the training here.

Assumptions

Installation

Install Python dependencies

pipenv --three
pipenv install

Running the notebook

pipenv shell
jupyter-notebook Isochrones\ with\ Python\ and\ APIs.ipynb

Geocoding an address

If you just want to geocode one address really quickly, the U.S. Census Bureau Geocoder has a web form. They have another form that lets you geocode all addresses in a CSV file.

There's also an API that lets you geocode individual addresses, or a batch of addresses as CSV.

This API is free to use, but only works for U.S. addresses.

It also seems to be broken right now.

Texas A&M University Geocoder

If you just want to geocode one address, there is an interactive geocoder.

Some API options

Google Maps Distance Matrix API

Developer's Guide

Pros:

  • Supports transit

Cons:

  • Can only be used to display information on a Google Map
  • Have to make multiple queries to query distances along a radius to build isocrhone

HERE Routing API

Quick Start Guide API Reference

Pros:

  • API returns the isochrone itself

Cons:

  • Only supports car and pedestrian modes of transport

Mapbox Distance API

API Documentation

Pros:

  • More permissive uses than Google's API

Cons:

  • Have to make multiple queries to query distances along a radius to build isocrhone
  • Doesn't support transit

Mapzen Isochrone Service

Service description

API documentation

Pros:

  • More permissive uses than Google's API
  • Supports Driving, Cycling, Walking and Transit
  • Response is GeoJSON

Cons:

  • Doesn't incorporate traffic in driving times
  • Doesn't (yet) support arrival time for transit directions

Thanks

To Sahil Chinoy who made these awesome isochrones of leaving metro areas for the weekend and told me about the HERE API.

About

Jupyter notebook demonstrating how to create isocrhones using Python and some helpful spatial APIs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published