In this week we will see how to easily retrieve OpenStreetMap data and how to do simple network analysis such analyze different network statistics and calculate shortest paths along street network in Python.

  1. Retrieving OpenStreetMap data
  2. Network analysis in Python
  3. Exercise 7
  4. Exercise 7 hints

Learning goals

After this week’s lesson you should be able to:

  • Retrieve and save data from OpenStreetMap using Python
  • Extract simple street network properties and statistics (centrality measures etc.)
  • Do simple route optimization using shortest path algorithm in osmnx / networkx


This week’s lecture materials are based on documentation of osmnx, networkx and OpenStreetMap.