October 2019
Beginner to intermediate
674 pages
16h 43m
English
We can use the GeoPandas library to read many GIS file formats (relying on the fiona library, which is an interface to GDAL/OGR) using the geopandas.read_file function.
Data can be read through shapefiles as well. In this section, we will look at an example of working with GeoPandas. We will explain how to read a shapefile that contains geospatial data, performing aggregations on it, sorting it, and finally plotting the required Geo DataFrame.
Use the following code to call in the required prerequisites libraries:
import pandas as pd
import geopandas
import matplotlib as plt
Use the following code to read a shapefile that has geospatial information data:
countries = geopandas.read_file("ne_110m_admin_0_countries.shp") ...Read now
Unlock full access