Learn practical skills, build real-world projects, and advance your career

What is GeoPandas?

  • It's a package/library made for working with geospatial data in Python
  • Extends the pandas package to work with geographic objects and spatial operations
  • Combines the power of a whole ecosystem of geotools: geos, shapely, gdal, pyproj, etc.

Documentation: http://geopandas.org/

!pip install pygeos
!pip install rtree
Collecting pygeos Downloading pygeos-0.10.2-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.8 MB) |████████████████████████████████| 1.8 MB 8.4 MB/s eta 0:00:01 Requirement already satisfied: numpy>=1.13 in /usr/local/lib/python3.7/dist-packages (from pygeos) (1.19.5) Installing collected packages: pygeos Successfully installed pygeos-0.10.2 Collecting rtree Downloading Rtree-0.9.7-cp37-cp37m-manylinux2010_x86_64.whl (994 kB) |████████████████████████████████| 994 kB 8.3 MB/s Installing collected packages: rtree Successfully installed rtree-0.9.7
!pip install geopandas
Collecting geopandas Downloading geopandas-0.10.0-py2.py3-none-any.whl (1.0 MB) |████████████████████████████████| 1.0 MB 10.1 MB/s eta 0:00:01 Requirement already satisfied: pandas>=0.25.0 in /usr/local/lib/python3.7/dist-packages (from geopandas) (1.1.5) Collecting fiona>=1.8 Downloading Fiona-1.8.20-cp37-cp37m-manylinux1_x86_64.whl (15.4 MB) |████████████████████████████████| 15.4 MB 38 kB/s Requirement already satisfied: shapely>=1.6 in /usr/local/lib/python3.7/dist-packages (from geopandas) (1.7.1) Collecting pyproj>=2.2.0 Downloading pyproj-3.2.1-cp37-cp37m-manylinux2010_x86_64.whl (6.3 MB) |████████████████████████████████| 6.3 MB 77.1 MB/s Requirement already satisfied: attrs>=17 in /usr/local/lib/python3.7/dist-packages (from fiona>=1.8->geopandas) (21.2.0) Collecting cligj>=0.5 Downloading cligj-0.7.2-py3-none-any.whl (7.1 kB) Requirement already satisfied: setuptools in /usr/local/lib/python3.7/dist-packages (from fiona>=1.8->geopandas) (57.4.0) Collecting click-plugins>=1.0 Downloading click_plugins-1.1.1-py2.py3-none-any.whl (7.5 kB) Collecting munch Downloading munch-2.5.0-py2.py3-none-any.whl (10 kB) Requirement already satisfied: click>=4.0 in /usr/local/lib/python3.7/dist-packages (from fiona>=1.8->geopandas) (7.1.2) Requirement already satisfied: six>=1.7 in /usr/local/lib/python3.7/dist-packages (from fiona>=1.8->geopandas) (1.15.0) Requirement already satisfied: certifi in /usr/local/lib/python3.7/dist-packages (from fiona>=1.8->geopandas) (2021.5.30) Requirement already satisfied: python-dateutil>=2.7.3 in /usr/local/lib/python3.7/dist-packages (from pandas>=0.25.0->geopandas) (2.8.2) Requirement already satisfied: numpy>=1.15.4 in /usr/local/lib/python3.7/dist-packages (from pandas>=0.25.0->geopandas) (1.19.5) Requirement already satisfied: pytz>=2017.2 in /usr/local/lib/python3.7/dist-packages (from pandas>=0.25.0->geopandas) (2018.9) Installing collected packages: munch, cligj, click-plugins, pyproj, fiona, geopandas Successfully installed click-plugins-1.1.1 cligj-0.7.2 fiona-1.8.20 geopandas-0.10.0 munch-2.5.0 pyproj-3.2.1

import libraries