GeoPandas provides easy methods to explore geodata and visualize geodata with static and interactive maps
Pandas is probably the most popular Python library for data analysis. GeoPandas extends pandas’s datatypes to allow us to work with geospatial data in python easier. It currently has two data types structures: GeoSeries
and GeoDataFrame
, which are the subclasses of pandas.Series
and pandas.DataFrame
, respectively.
The GeoDataFrame
is the core data structure in GeoPandas, which can store geometry columns and perform spatial operations. The GeoSeries
data structure can contain any geometry type, such as points, lines, polygons etc.
In general, GeoDataFrame is a combination of pandas.Series
and geopandas.GeoSeries
.
GeoDataFrame Structure. Source: GeoPandas developers
In order to follow the methods in this article, you need to download a Shapefile of world countries from ArcGIS Hub. You can your own Shapefile data if you have one.