1. Air Quality Data Analysis

Duration2h30 x 2 AI Banned

Introduction

This practical session introduces advanced concepts of time series data analysis and predictive modeling using Python through a real-world air quality monitoring case study. You’ll work with authentic PM2.5 measurement data from African cities to develop essential data science skills for temporal and geospatial datasets using Pandas, NumPy, Matplotlib, and Scikit-learn.

Through hands-on exercises, you will learn to:

  • Data Loading & Exploration: Import time series datasets and explore temporal patterns, seasonal trends, and city-specific variations
  • Missing Data Handling: Apply forward/backward fill strategies specifically designed for time-dependent data with proper temporal ordering
  • Feature Engineering: Extract temporal components (month, year, quarter), create location-based features, and handle categorical encoding
  • Time Series Preprocessing: Understand data grouping by geographic locations and temporal correlation considerations
  • Statistical Modeling: Build predictive models with proper cross-validation strategies for time-dependent data using GroupKFold
  • Model Evaluation: Apply appropriate metrics (RMSE, MSE, R²) and visualization techniques for time series prediction assessment

This session uses a real air quality dataset containing PM2.5 measurements across multiple African cities with temporal dependencies, emphasizing practical application of data science techniques to environmental monitoring and public health insights.

Getting Started

You have access to a JupyterHub environment that already contains all the necessary data, notebooks, and required Python libraries. Simply access the environment and start working immediately!

Access JupyterHub

Local Installation

If you prefer to work locally, please refer to the activity Setup your first Data Science project first to ensure you have all the necessary Python packages installed.

You can download the notebook for this practical session using the link below:

Download Notebook (Right-click → Save as…)