
In this lecture, you will install the main Python library we are going to use throughout the course: Geopandas. You will also install an optional library related but not used in the course but which will be helpful to know about: Osmnx.
In this lecture, you will be introduced to Geopandas, its similarities to the classical Pandas library you know about, as well as its differences, particularly how Geopandas stores spatial objects. You will learn how to load the city into a GeoDataframe in a Jupyter Notebook and how to start working with it.
You will also learn how to use the Osmnx library for downloading and visualising spatial geometries from OpenStreetMap's APIs. Finally, you will be introduced to spatial coordinate reference systems and learn why they are important when working with spatial data.
In this video, you will learn how to access the spatial geometry in a GeoDataframe and how to subdivide the city geometry into grid cells of your desired resolution. You will use this subdivided city territory to model the epidemic spreading from some cells to others in later lectures.
In this lecture, you will learn how to plot the subdivided city with the grid cells annotated with numbers so you can keep track of which cell you are working with later.
In this video, you will continue plotting the subdivided city, but this time with a map in the background!
In this video, you will load a real dataset of population densities in each of the city grid cells and use them to create a choropleth map.
When plotting maps with Geopandas, the default legend colorbar looks often not the way we would like to. In this lecture, you will learn how to use Matplotlib functionalities to customize the colorbar and make it look nice!
In this lecture, you will obtain a good intuition behind the maths of the spatial epidemic models.
In this lecture, I will walk you through the equations of the spatial epidemiological model, explaining every detail step-by-step, to make sure you completely understand. After this lecture, the seemingly complicated equations will seem a piece of cake for you!
In this lecture, you will set up the Jupyter Notebook for coding the equations and will conduct a quick exploratory data analysis of the spatio-temporal Origin-Destination matrices and population densities so that you have a firm understanding of the structure of the arrays containing them. This will enable you to use them in the epidemic modelling to capture spatio-temporal urban mobility.
In this video, I will teach you how to initialize the variables to be used in the spatial epidemic equations and how to randomly insert infections into the city!
In this lecture, you will be introduced to coding the lockdown strength and learn why normalising matrices by rows can often be very useful!
In this video, you will learn the solution to the previous exercise and learn important Numpy tricks and tips for writing more efficient code!
In this lecture, you will code the epidemic equations themselves, understanding how the spatio-temporal movements in a city can be represented with efficient Numpy operations.
In this video, you will finish up coding the SEIR equations and will get ready for using the script you have created to run simulations in the next section!
In this video, you will start with the Jupyter Notebook for the spatial simulations of the epidemic in a city, and will learn how to set up the model with the correct parameters corresponding to Covid-19.
In this lecture, you will run the simulation of the Covid-19 epidemic spreading in the city and will visualise the first aggregated results by plotting the epidemiological curves.
You will also gain a more in-depth understanding of the model parameter specifying the lockdown strength and see why it's tricky.
In this video, you will start preparing everything for the animated spatial visualisation. In particular, you will load the city grid file and change its coordinate reference system for plotting. I will also walk you step-by-step through understanding how the Numpy arrays storing the simulation results are structured so you have a clear idea of how to use them in your visualisations!
In this video, you will start writing the code for the spatio-temporal visualisation of the urban epidemic! You will learn how to set up the initial plotting parameters and how to make sure the colors in the final animation are anchored to the same color intensities!
In this video, you will learn how to use Matplotlib methods to create custom colormaps that fade into transparency for nice visualisations to obtain a smooth and nice effect in the final animated map.
In this video, you will continue writing the code for plotting the epidemic dynamics. You will learn how to use the Contextily library to add a nice neutral map in the background.
In this video, you will start building an inset plot in the corner of the animated map for tracking the evolution of the epidemiological curves over time.
In this video, you will improve the inset plot by adding small graphical elements to make the curves look nicer!
In this video, you will finish the code for the animated spatial visualisation and start collecting the image frames for making the final animation in the next video!
In this final video, you will learn how to use the imageio Python library to create animated gifs from a collection of images and will thus obtain the final spatio-temporal visualisation of the Covid-19 epidemic spreading in a city!
In this extra video, you will be introduced to the field of urban data science, get a taste of what kind of problems it addresses, see some visualisations, and be encouraged to stay tuned for future courses on these topics. Enjoy!
Interested in learning how to create spatial animated visualisations in Python? Want to learn it on the example of the Covid-19 coronavirus epidemic spreading in a real city with a real human mobility dataset? Then this course is for you!
You will learn how to use basic Python (3 or higher) to model the Covid-19 epidemic spreading in a city, do data analysis of real urban mobility data, run simulations of the epidemic in Jupyter Notebooks, and create beautiful complex animated visualisations on a city map. We will do this using the example of Yerevan city.
Covid-19 is a great case example for learning how to use Python for spatial analysis and visualisation. After completing this course you will be able to apply the techniques from this course to many other types of projects dealing with spatial data analysis and visualisation.
Assuming just a basic familiarity with Python numpy and matplotlib libraries, we will go step-by-step through using real urban mobility data for modelling, simulating and visualising the spread of the epidemic in an urban environment. On the way, you will learn lots of tricks and tips for enhancing your Python coding skills and making even more compelling and complex data visualisations.
The course consists of the following sections:
Introduction, where you will learn about the Python GeoPandas library and how to use it for making nice spatial visualisations right in the Jupyter Notebook
Understanding the spatial epidemiological models, in which you will get a firm intuition and a solid understanding of the maths behind the spatial epidemiological models
Coding the spatial epidemiological model in Python, where you will learn how to use Python and numpy to write efficient code for the epidemic simulation engine
Simulating the Covid-19 epidemic in a city, in which you will use the epidemic model code and a real dataset of urban mobility flows to run simulations of the Covid-19 epidemic in a city
Covid-19 urban spatio-temporal visualisation, where you will put all the acquired knowledge to create a beautiful animated spatial visualisation on a city map, showing how the virus spreads in the city!
This course is a hands-on, practical course, making sure you can immediately apply the acquired skills to your own projects. The acquired spatial modelling, data visualisation, and spatial data science skills will be a valuable addition to your data science toolbox.
I will be there for you throughout this journey for any questions and doubts, so don't hesitate to begin and have a successful and satisfying experience!