
In this introductory video, I welcome you and get you on board with this chapter, including how we will learn about the different types of geospatial data and how vector and raster data structures compare. Additionally, you will be introduced to the geospatial data platform OSM and explore some of its core functionalities.
March 2026 Update
The first big course update was rolled out in March 2026. Updated notebooks are available as a downloadable zip file attached to this lecture. I recommend to use each correponsding file from this archive instead of the original ones, which were kept there for the sake of consistency. Changes by section:
Setup: New environment setup command, consolidated imports with version check, and requirements.txt with exact library versions
2.4: Fixed invalid Polygon example Polygon([(0, 0), (1, 1), (2, 2)])
3.2: Lighter Overpass API query parameters + timeout guard added
4.5: Removed intentionally wrong CRS example gdf.crs = 1 — no longer supported
5.3: geometries_from_place replaced with features_from_place throughout
5.4: File path corrections
This lecture briefly overviews the concept and possible categorizations of geospatial data, focusing on structural aspects - how vector and raster data compare, with the future goal of analyzing vector data across this course in mind. Hence, here, you will learn how to recognize and differentiate vector and raster spatial data.
This lecture aims to overview the free crowd-sourced map platform OpenStreetMap as a rich source of geospatial data via its online interface. In this video, you will learn to manually search for data and browse information on OSM using your web browser.
This lecture aims to provide a theoretical overview of the OSM data platform, including an overview of different types of data entities and the OSM tags system used to store (and acquire) data.
This video briefly wraps up this introductory section containing information about geospatial data types, vector and raster data, and an exploration of OpenStreetMap as a crowd-sourced geospatial data platform.
By introducing Section 2, I briefly summarize what you should expect here - which are the main Pythonic tools and libraries we will use throughout this course.
In this lecture, we overview the most foundational steps needed to get your Python environment ready, including an overview of the libraries and the versions they use. Additionally, for more early-career Pythonists, this lecture references a free set-up guide from me.
In this lecture, we overview the different types of geometry objects that you may encounter while working with geospatial data collected from OSM. Hence, here you learn how to recognize and categorize such data.
After the theoretical introduction, you will learn how to implement the most common geometry types using the Shapely library. This way, you will gain the mandatory knowledge to be able to read and interpret spatial data collected from OSM in different spatial structures.
GeoPandas will be our go-to data storage and manipulation library. We will use it to store, manipulate, and visualize geospatial data collected from OSM. Here, we do a very brief theoretical introduction to cover enough materials to get on with this course (the longer introduction will be covered by another course).
After the brief theoretical introduction, here we learn how to create a GeoDataFrame using previously defined geometry objects. This lecture will teach you how to use the GeoDataFrame and what a GeoDataFrame looks like to be able to recognize and use it later.
In this section, we overviewed the basic Python that is needed to kick off your urban analytics in Python - from installation and library overviews to getting on-board with the major pillars of spatial analytics in Python - Shapely and GeoPandas.
The primary goal of this section is to get you on board with acquiring various types of spatial and urban data from OpenStreetMap. We will touch base on the OverPy package connecting to the OverPass API and extensively collect data using the OSMNx package as well.
In this lecture, you will learn about the most fundamental Pyhton-based OpenStreetMap data collection technique - sending queries to the official Overpass API via the Python wrapper package called Overpy. For the sake of simplicity, we will focus on how to collect node-level data. Additionally, we will explore the types of information stored in the OSM data structure and learn how to transform the raw downloaded data into GeoDataFrames.
In this lecture, we are going to learn how to download point data from OpenStreetMap using the OSMNx package, making it very easy and quick to collect POI information and POI-level urban that is well-structured in GeoDataFrames.
By the end of this lecture, you will be able to download specific administrative areas and enclosing polygons from OpenStreetMap using OSMNx, including the boundaries of cities and countries. Additionally, you will get on board with how to use Matplotlib to create simple geospatial visualizations based on GeoDataFrames.
The goal of this lecture is to teach you how to download and visualize polygon-level urban features from OpenStreetMap using OSMNx - namely, how to get detailed information on green areas and building footprints.
The last lecture of this chapter covers the topic of graph data - teaching you how to use OSMNx to download road network data stored as NetworkX Graphs. Additionally, you will learn how to convert the graph data into the well-known GeoPandas structure, fitting into the tools and sets of commands we already learned in these cores, and how to visualize them.
In this section, we overviewed OpenStreetMap as a data source and learned how to collect various data relevant to an urban context using Python libraries.
In this section, we will cover several more advanced spatial analytics topics that will equip you with methodological and data exploration skills that will be essential for complex urban analytics projects in the closing chapter.
Using base-maps is a great way to provide more context to your geospatial data visualization, especially if the data set you study is placed in a dense urban setting. In this lecture, we will review how to incorporate such base-maps in your visualizations using Python.
The aim of this lecture is to guide you through a complete urban setting visualization using Python. This will include collecting and showcasing administrative boundaries, polygon and POI-level data, and a base map of your choice. The ability to create such visualizations will allow you to explore any urban data set you have in great detail and put it in a detailed urban context.
The concept of map projection covers the technical instructions and methods to transform the 3D surface of the globe to 2D planar maps represented on screens and printed maps alike. In this video, you will learn the basic theoretical foundations of map projections to get practical on map projections in the upcoming lecture.
Building on the previous lecture's theoretical introduction, you will learn the basics of using map projections and coordinate reference systems (CRS) in Python with GeoPandas. This includes querying, reading, defining, comparing, and reprojecting the CRS of GeoDataFrames.
This lecture focuses on using geospatial data science tools to access and briefly analyze various features of road networks of a given target area. By completing this lecture, you will have the right quantitative tools to profile and visualize the network connectivity of selected urban areas.
This lecture focuses on using geospatial data science tools to access and briefly analyze various polygon-level urban features, namely, building footprints equipped with various properties sources from OpenStreetMap. By completing this lecture, you will have the right quantitative tools to profile and visualize selected urban areas' building profiles and characteristics.
In this section, we covered multiple advanced topics, such as map projection and detailed road network data analysis using OpenStreetMap and Python. This way, you acquire practical skills to carry out more complex data manipulation, transformation, and analytics tasks, unlocking the next chapter on complex urban analytics.
Welcome to the last section of this course. In this course, we are going to combine everything we have learned before and add some urban concepts to it as well. Namely, we will define a very simple theoretical framework to derive an urban quality of life index and then collect data from OpenStreetMap and use that data to quantify the values of this index to compare the quality of life across several districts of Budapest. While we will use the districts of Budapest as an example, the methods presented here are easily adaptable to any other city worldwide present on OpenStreetMap.
The primary goal of this section is to derive an urban livability index using OpenStreetMap data. In this lecture, we review the theoretical foundations that we are going to rely on and propose a plan for a simple pilot livability index.
In this lecture, following our plan to create an urban livability index, we will use the previously learned OpenStreetMap data acquisition techniques to collect a wide range of urban data. First, we will do so for a single urban district and then develop an automatic pipeline collecting multiple data files for 10+ different districts, showing practical examples of how to collect multiple data from OpenStreetMap covering an entire city and a number of smaller urban units.
In this lecture, we read and processed the previously collected geospatial data files covering five different urban dimensions for each district of the sample city. Then, we learn how to turn these raw data sets into relevant KPIs contributing to the quality of life in each target area, expressed by single numbers as topic-specific indicators or urban features.
In this final lecture, we keep working on the previously prepared urban features. Namely, we turn each urban feature (KPI) into a simple scale ranging from 1 to 10 and then assign weights to each variable at which they affect the overall livability index. In the final step, we summarize these weights and indices to compute and visualize the overall unified quality of life index.
In this closing lecture and also the closing section of the course, we learned how to combine all the bits and pieces of knowledge you acquired throughout this course to carry out a multi-step project focusing on how to use OpenStreetMap data to tackle an urban analytics question with real-world implications. Namely, you learned how to quickly propose a theoretical framework to quantify livability, how to build a simple data pipeline to acquire multiple data from OpenStreetMap, how to derive various urban KPIs from that data, and how to turn that selection of KPIs into one summarized index. This process shows a great example of how to build an urban data science project from data collection to final presentation and visualization, unlocking the way of using spatial data in your business decision-making and academic research as well.
Introduction
Welcome to "Urban Analytics with Python: Geospatial Data Science and OpenStreetMap"! In this course, you'll dive deep into the world of urban data analysis with a hands-on Python coding approach. This isn't just a theoretical overview – it's a practical course where you'll actively write code to manipulate, analyze, and visualize geospatial data from OpenStreetMap (OSM).
The course starts with an introduction to geospatial data, including the distinctions between vector and raster data types, while offering a foundation in using OSM as a robust data source. As you move forward, we'll guide you through setting up your Python environment and introduce essential geospatial libraries like GeoPandas and Shapely. You’ll begin coding right away, working with geometric data types and handling geospatial data structures.
Once you’re comfortable with Python and geospatial basics, we’ll focus on acquiring different urban datasets from OSM using powerful Python packages like OSMNx and OverPy. You’ll learn how to collect and work with point, polygon, and graph data, from building footprints to road networks. Every step will involve Python coding, ensuring you gain the technical skills to handle real-world geospatial data tasks.
Finally, we’ll wrap up with advanced urban analytics techniques. You’ll engage in practical projects, analyzing road networks, building profiles, and creating visualizations to explore urban areas. The course concludes with a comprehensive mini-project, where you’ll apply all the techniques you’ve learned to create a livability index for a city, combining various urban KPIs using Python.
By the end, you'll have a solid grasp of geospatial data science and be able to use Python and OSM data to conduct advanced urban analytics projects. Let’s get coding and unlock the power of urban data together!
And what you get here:
- Chapter intro and summary videos directly with the author
- Presentations with PDF supplementary slides
- Coding videos with screen sharing, which comes with the recorded live code files as well as cleaned-up version fo the odes in Jupyter Notebook formats