Geospatial analysis in Python

In this weekโ€™s workshop, we will use the GeoPandas library to explore geospatial data. We will load vector boundaries, convert data with coordinates into a GeoDataFrame, run a spatial join and create a choropleth map.

Lab Logo Introduction

Live Logo Live coding

Review the material that we explored in Week 7โ€™s live-coding session.

Lab Logo Lab

Exercise: Which state had the highest underemployment rate in 2023?

Your task is to create a choropleth map showing the underemployment rate for each state using data from the 2023 Labour Force Survey (Table 13).

  1. Load the necessary libraries
  2. Read the underemployment CSV file
  3. Read the nigeria GeoJSON file
  4. Merge the datasets using the state joining variable
  5. Create a choropleth map

Lab Logo Further reading

Other useful resources

  • ColorBrewer - for colour-blind friendly palettes
  • mapshaper.io - for simplifying vector data and exporting to different file types
  • geojson.io - for inspecting GeoJSON files