Lesson 5 Overview¶
This week we will focus on learning how to create beautiful maps in Python and how to share them on GitHub using GitHub Pages.
We already covered the basics of plotting in Python during the Geo-Python course week 7. As you might remember from that lesson, there are many different Python modules that can be used for making visualizations, and many of them also allows you to create different kinds of maps.
During this lesson, we will the use of these modules for plotting static and interactive maps:
Matplotlib (static maps, integrated into Geopandas)
Folium (interactive Web maps on Leaflet)
mplleaflet (converts Matplotlib plots easily to interactive Leaflet maps)
`contextily <https://github.com/darribas/contextily>`__(for adding basemaps)
- Other useful modules to check out (not covered in these course materials):
Plotly Dash (interactive analytics dashboards)
Bokeh (interactive plots)
Learning goals¶
After this weeks lesson you should be able to:
Create a static map using Geopandas / matplotlib
Create a simple interactive map using Folium (or matplotlib + mplleaflet).
Share your maps (static / interactive) on GitHub using GitHub pages.
Lecture videos¶
Lesson 5 - Visualizing spatial data in Python: static maps
Vuokko Heikinheimo, University of Helsinki @ AutoGIS channel on Youtube.
Contents:
Intro for lesson 5 0:00
Excamples for exercise 5 00:47
Static maps in geopandas 04:40
Adding a basemap using contextily 22:50
Subsetting the data 35:05
Cropping the map 40:10
Lesson 5 - Visualizing spatial data in Python: interactive maps
Vuokko Heikinheimo, University of Helsinki @ AutoGIS channel on Youtube.
Contents:
Mplleaflet 01:30
Folium map 10:10
Adding a marker (folium) 21:27
Adding a point layer (folium) 27:00
Layer control (folium) 31:00
Heatmap (folium) 31:50
Clustered point map (folium) 37:15
Choropleth map (folium) 38:33
Exercise 5 intro 50:00
Publishing the maps using GitHub pages 52:55