Notebook 1: Python for Geospatial Data

Hands-on with GeoPandas and Rasterio

Date

November 17, 2025

Session 3 Hands-On Notebook

This notebook accompanies Session 3: Python for Geospatial Data. You’ll learn to work with vector data using GeoPandas and raster data using Rasterio.

Learning Objectives

By completing this notebook, you will:

  • Load and visualize vector data with GeoPandas
  • Work with different vector formats (Shapefiles, GeoJSON, GeoPackage)
  • Perform coordinate reference system transformations
  • Read and process raster data with Rasterio
  • Extract band information and metadata
  • Visualize multi-band imagery
  • Apply the concepts to Philippine data

Getting Started

Option 2: Download Notebook

Download the Jupyter notebook to run locally or upload to your own Colab:

Download .ipynb File

Requirements for local use:

pip install numpy pandas matplotlib geopandas rasterio

Option 3: View Online

You can also view the notebook content below without running any code.


Notebook Preview

NoteInteractive Execution Required

This is a hands-on exercise notebook. For the best learning experience, open it in Google Colab or Jupyter to run the code cells interactively.

Topics Covered

  1. Introduction to GeoPandas
    • Reading vector data
    • Exploring GeoDataFrames
    • Coordinate reference systems
    • Spatial operations
  2. Working with Philippine Data
    • Loading administrative boundaries
    • Filtering regions and provinces
    • Calculating areas and centroids
    • Creating maps
  3. Introduction to Rasterio
    • Reading raster data
    • Understanding raster metadata
    • Extracting bands
    • Visualizing imagery
  4. Palawan Case Study
    • Sentinel-2 imagery analysis
    • Land cover visualization
    • Spectral band combinations
    • NDVI calculation

Prerequisites

Before starting this notebook, ensure you have:

  • Completed the Setup Guide
  • Google account (for Colab)
  • Basic Python knowledge
  • Understanding of Session 3 concepts

Notebook Contents

The full interactive notebook includes:

  • 15+ code cells with detailed explanations
  • 10+ visualizations of vector and raster data
  • Exercises to test your understanding
  • Philippine case studies using real data
  • Troubleshooting tips for common issues

Support

During the Training

  • Ask questions in the live session
  • Consult teaching assistants
  • Work through exercises at your own pace

After the Training


Next Steps

After completing this notebook:

  1. ✅ Practice with your own Philippine data
  2. ✅ Move on to Session 4: Google Earth Engine
  3. ✅ Try Notebook 2: Google Earth Engine

Ready to code? Open the notebook in Colab and start learning!