Categories
Data

OSMnx and Street Network Elevation Data

Check out the journal article about OSMnx.

OSMnx can now download street network elevation data for anywhere in the world. In one line of code it downloads the elevation in meters of each network node, and in one more line of code it can calculate every street (i.e., edge) grade. Here is the complete street network of San Francisco, California, with nodes colored according to their elevation:

OSMnx street network elevation data for San Francisco, California to calculate street grade and steepness

Here we find that the average street grade in San Francisco is 4.0% and the median street grade is 2.6%. OSMnx uses the Google Maps Elevation API to determine the elevation of each node in the network, given their latitude-longitude coordinates. For full details and demonstration, check out this notebook in the OSMnx GitHub repo or read the documentation.

10 replies on “OSMnx and Street Network Elevation Data”

Geoff,
(I am sending this message in this comment section because I could not find your personal email. This comment is not in reference to this specific research.)

Zillow CEO announced on cbs this morning that zillow is offering a one million dollar prize for an algorithm to improve their estimations of home value. For competition info, try googling key words.
I suggest to you creating an algorithm that includes population of locale, wage spectrums of locale, etc., so that affordability for all ranges of local working residents is calculated. Currently, properties are being bought up by wealthy investors who raise rents and make housing not affordable for the majority of working class people living within the region…
We’ve had similar discussions following your 2016 AAG presentation in SF.

Hi Geoff,

OSMnx is awesome. Then you very much. I have used to make same simulations where I try to test some methods to assist tourists in their search of places to visit.
I would like to test the methods with real data. I have the GPS coordinates in a CSV file of persons captured while walking by the streets of a city. Some coordinates will be repeated because or one person has passed several times over the same area, or more people has passed for that location.
I would like to get a heat map similar of the example above showing the altitude but in my case showing the frequency of passes by a place. Is there any form to use OSMnx to plot this type of map or any other way I could use? Thank you very much.

Thank you, is a good solution. To color the nodes by count, may I use Networkx?.

If I would want to color the links having the node’s count, is there a way to draw a color gradient between the two nodes of a link?

This has been a huge help in getting grade-accessibiity stats for cities but the handling of the google API key seems to have stopped working as of the past few days (July 16-17. 2018). Has something changed with the change of Google API terms of use?

Hi Geoff.
I would like to use a raster of landslide hazard to use it as you do with the elevation.
Do you have a suggestion on how to do it?
Thanks

excellent Geoff
Congratulations

as always just to consult you excuse us to take advantage of your knowledge
How could I find the lowest and highest points in a city and graph them only that group of nodes

Cheers

Leave a Comment