In this recipe, we will show how to load and display geographical data in the Shapefile format. Specifically, we will use data from Natural Earth (http://www.naturalearthdata.com) to display the countries of Africa, color coded with their population and Gross Domestic Product (GDP). This type of graph is called a choropleth map.
Shapefile (https://en.wikipedia.org/wiki/Shapefile) is a popular geospatial vector data format for GIS software. It can be read by Cartopy
, a GIS package in Python.
You need Cartopy, available at http://scitools.org.uk/cartopy/. You can install it with conda install -c conda-forge cartopy
.