Course #1 (Active) β€’ Unabridged Automate-the-Boring-Stuff Edition

Fundamental Python for Environmental Engineers & Scientists

Complete, unabridged 14-week hands-on curriculum written in an approachable Automate the Boring Stuff with Python style for undergraduate Environmental Engineering & Earth Science studentsβ€”with 41 fully executed interactive notebooks, 29 diagnostic Matplotlib plots, and 14 real open-sourced UCI ML Repository & cross-course datasets bridging LCA I & II, Material Flow Analysis, Solar Thermal, Fluid Mechanics, Heat & Mass Transfer, and Leak-Free Machine Learning.

$$V\frac{dC}{dt} = Q(C_{\text{in}} - C) - kCV, \qquad D(t) = \frac{k_d L_0}{k_r - k_d}\left(e^{-k_d t} - e^{-k_r t}\right), \qquad C(x,y,z) = \frac{Q}{2\pi u \sigma_y \sigma_z}\exp\left(-\frac{y^2}{2\sigma_y^2}\right)$$
🌐 Open Interactive Web Book (41 Lessons + .ipynb Downloads) πŸ“‘ Complete Blank Lecture Slides (Modules 00–12, 130 Slides PDF) πŸš€ Data-Driven ML Capstones
Detailed 14-Week Syllabus

Module-by-Module Curriculum & Environmental Science Integration

Modules 00–09 follow the shared 70/30 foundation defined in Coursebooks_project, while Modules 10–12 specialize in Pandas hydrology time series, water/air quality systems, geostatistics, and environmental machine learning. All materials are maintained in 0-engineering/2-envEng/1-Fundamental_Python_for_Environmental_Eng_Students.

Launch All 41 Notebooks β†’
Module / Week Python & Computational Topic Integrated Math, Physics & Environmental Engineering/Science Concept Interactive Lessons & .ipynb
Module 00
Week 1 (Shared)
Environment Setup, Anaconda/Miniconda, JupyterLab Workflow, Markdown & LaTeX Equations Environmental Mass Balance Intro: Conservative vs. reactive control volumes ($\frac{dM}{dt} = \dot{m}_{\text{in}} - \dot{m}_{\text{out}} \pm R$), pollutant loading ($\dot{m} = QC$), and reproducible regulatory reporting. Lesson 01 Lesson 02 Lesson 03 πŸ“‘ Slides
Module 01
Week 2 (Shared)
Variables, Numeric Types (`int`, `float`), String Manipulation, `f`-String Reports & Unit Conversions Atmospheric & Aqueous Chemistry Units: Ideal gas trace gas conversion ($\text{mg/m}^3 = \text{ppm}_v \cdot \frac{\text{MW}\cdot P}{RT}$), molarity/normality, $\text{pH} = -\log_{10}[\text{H}^+]$, and hydraulic retention time ($\theta = V/Q$). Lesson 04 Lesson 05 Lesson 06 πŸ“‘ Slides
Module 02
Week 3 (Shared)
Control Flow: `if-elif-else` Conditionals, `for` Parametric Sweeps, `while` Equilibrium Solvers EPA Air/Water Compliance & Decay: EPA Air Quality Index (AQI) piece-wise breakpoint classification, multi-day first-order BOD decay ($L(t) = L_0 e^{-k_d t}$), and iterative charge-balance pH root finding. Lesson 07 Lesson 08 Lesson 09 πŸ“‘ Slides
Module 03
Week 4 (Shared)
Modular Functions (`def`), Default/Keyword Arguments, Multi-Value Returns, Docstrings & Packages Atmospheric Dispersion & River Mixing: Reusable functions for point-source river mixing ($C_{\text{mix}} = \frac{Q_r C_r + Q_w C_w}{Q_r + Q_w}$), Pasquill-Gifford dispersion coefficients ($\sigma_y(x), \sigma_z(x)$), and Stokes settling velocity ($v_s = \frac{g(\rho_p-\rho_w)d^2}{18\mu}$). Lesson 10 Lesson 11 Lesson 12 πŸ“‘ Slides
Module 04
Week 5 (Shared)
Data Structures: Lists, 2D Matrices, Immutable Coordinate Tuples, Sets & Nested Contaminant Dictionaries Spatial Monitoring & Regulatory Databases: GPS station coordinate tuples $(\text{lat}, \text{lon}, z)$, unique watershed pollutant sets, and EPA Maximum Contaminant Level (`MCL`), Henry's constant ($K_H$), and $K_{ow}$ lookup dictionaries. Lesson 13 Lesson 14 Lesson 15 πŸ“‘ Slides
Module 05
Week 6 (Shared)
NumPy Numerical Computing: Vectorized Array Math, 2D/3D Meshgrids, Linear Algebra (`np.linalg.solve`) Gaussian Plumes & Coupled Lake Mass Balances: 2D/3D vectorized Gaussian plume ground-level concentration grids $C(x,y,0)$, steady-state coupled multi-lake mass-balance matrix systems ($\mathbf{A}\mathbf{c} = \mathbf{w}$), and 2D groundwater Darcy head arrays. Lesson 16 Lesson 17 Lesson 18 πŸ“‘ Slides
Module 06
Week 7 (Shared)
Matplotlib Environmental Visualization: Dual-Axis Plots, Filled Contours, Wind Roses & Spatial Maps Hydrographs, DO Sag & Plume Contours: Inverted rainfall hyetographs paired with storm hydrographs, Streeter-Phelps dissolved oxygen sag curves with critical deficit $D_c$, and 2D contaminant isopleth contour maps. Lesson 19 Lesson 20 Lesson 21 πŸ“‘ Slides
Module 07
Week 8 (Shared)
File I/O & Sensor Data Workflows: Parsing `.txt`, `.csv`, `.xlsx`, Handling Missing Flags (`-9999`, `NaN`) & QA/QC USGS, NOAA & EPA Sensor Ingestion: Automated ingestion and quality-control filtering of USGS NWIS river discharge files, NOAA ISD hourly meteorology logs, and EPA AirNow $\text{PM}_{2.5}/\text{O}_3$ CSV feeds. Lesson 22 Lesson 23 Lesson 24 πŸ“‘ Slides
Module 08
Week 9 (Shared)
SciPy Scientific Computing: Constrained Optimization (`minimize`), Coupled ODEs (`solve_ivp`) & Curve Fitting Streeter-Phelps, Monod Kinetics & Isotherms: Coupled BOD–DO river ODEs, Monod microbial substrate growth ($\mu = \mu_{\max}\frac{S}{K_s + S}$), Freundlich/Langmuir adsorption isotherm parameter fitting, and least-cost WWTP design. Lesson 25 Lesson 26 Lesson 27 πŸ“‘ Slides
Module 09
Week 10 (Shared)
SymPy Symbolic Mathematics: Symbolic Algebra, Differentiation, Integration, ODEs & Analytical Solutions Carbonate Chemistry & Analytical Transport: Symbolic speciation of open/closed carbonate systems ($\text{H}_2\text{CO}_3^*, \text{HCO}_3^-, \text{CO}_3^{2-}$), analytical derivation of critical time $t_c$ in Streeter-Phelps, and 1D advection-dispersion integrals. Lesson 28 Lesson 29 Lesson 30 πŸ“‘ Slides
Module 10
Week 11 (Env Specialized)
Pandas Environmental Data Science: `DataFrame` Indexing, GroupBy Aggregation & Datetime Resampling Hydrology & Climate Time-Series Analysis: Multi-decade precipitation/streamflow resampling, rolling 8-hour $\text{O}_3$ and 24-hour $\text{PM}_{2.5}$ NAAQS exceedance detection, and seasonal nutrient flux aggregation. Lesson 31 Lesson 32 Lesson 33 πŸ“‘ Slides
Module 11
Week 12 (Env Specialized)
Spatial Data Modeling, Geostatistics & Integrated Multi-Media Environmental Systems Water Quality Index (WQI), Air Dispersion & Variograms: Composite Water Quality Index calculation, multi-stack Gaussian plume superposition, spatial variogram fitting $\gamma(h)$, and Inverse Distance Weighting (IDW) / Ordinary Kriging. Lesson 34 Lesson 35 Lesson 36 πŸ“‘ Slides
Module 12
Weeks 13–14 (Env Capstones)
Environmental System Design & Applied Machine Learning (`Scikit-Learn`, `TensorFlow`, `Torchvision`, `Torchtext`) Full-Scale Environmental Modeling & ML Capstones: Drinking water treatment plant sizing, urban air quality network analytics, 2D Ogata-Banks groundwater plume transport, global carbon/temperature trend modeling, and ML capstones. Lesson 37 Lesson 38 Lesson 39 Lesson 40 Lesson 41 πŸ“‘ Slides
Deliverable 4 β€’ Applied Capstone Specs

Data-Driven Environmental Engineering & Science Capstone Projects

Applied capstone modules combining environmental physics governing equations with real open-sourced datasets from the UCI Machine Learning Repository (archive.ics.uci.edu/datasets: Beijing Multi-Site PM2.5, Italy Urban Air Quality, Urban Wastewater Treatment Plant, QSAR Aquatic Toxicity, Low-Carbon Concrete SCMs, Gas Turbine CO/NOx Emissions) and companion courses on this portal (LCA I & II, Material Flow Analysis, Solar Thermal, Fluid Mechanics, Heat & Mass Transfer). Every notebook executes end-to-end in standard NumPy, Pandas, SciPy, SymPy, and Matplotlib!

Capstone 1 β€’ Atmospheric Modeling & Deep Learning

Urban Airshed $\text{PM}_{2.5}$ Dispersion & Spatio-Temporal Forecasting

Environmental Physics: Advection-diffusion-reaction equation ($\frac{\partial C}{\partial t} + \vec{u}\cdot\nabla C = \nabla\cdot(\mathbf{K}\nabla C) + S - kC$), Gaussian plume point/line source baseline, and planetary boundary-layer mixing height.

Datasets:

  • UCI ML Repository: Beijing Multi-Site Air-Quality Dataset (420,768 hourly records of $\text{PM}_{2.5}, \text{PM}_{10}, \text{SO}_2, \text{NO}_2, \text{CO}, \text{O}_3, T, P, \text{WSPM}$ across 12 stations).
  • Government Websites & DataHub: US EPA AirNow API daily AQS summaries & DataHub Mauna Loa $\text{CO}_2$ baseline.
Python ML Stack: Scikit-Learn (`HistGradientBoostingRegressor`, `StandardScaler`, spatial cross-validation) + TensorFlow (1D-CNN + Bidirectional LSTM 24-hour $\text{PM}_{2.5}$ sequence forecaster).

Capstone 2 β€’ Water Quality & Geostatistics

Watershed Potability Classification, Nutrient Loading & Kriging

Environmental Physics: Electroneutrality charge balance ($\sum z_i C_i = 0$), Langelier Saturation Index (LSI), carbonate buffering alkalinity, and spatial semivariogram modeling $\gamma(h) = \frac{1}{2N(h)}\sum [Z(x_i)-Z(x_i+h)]^2$.

Datasets:

  • Kaggle & OpenML: Water Quality & Potability Dataset (3,276 water bodies with $\text{pH}$, Hardness, TDS, Chloramines, Sulfate, Conductivity, TOC, Trihalomethanes, Turbidity).
  • Government Websites (USGS NWIS & EPA WQP): Real-time USGS gauge discharge ($Q$) and dissolved oxygen/nitrate sensor records via Google Dataset Search.
Python ML Stack: Scikit-Learn (`KNNImputer`, `RandomForestClassifier`, `GaussianProcessRegressor` spatial Kriging with MatΓ©rn kernel, ROC-AUC).

Capstone 3 β€’ Remote Sensing Vision & Climate NLP

Satellite Land-Use Change Detection & Environmental Policy NLP

Environmental Science: Surface energy balance albedo ($\alpha$), Normalized Difference Vegetation/Water Indices ($\text{NDVI}, \text{NDWI}$), SCS Curve Number ($CN$) runoff shifts from deforestation, and ESG disclosure verification.

Datasets:

  • Papers With Code / Hugging Face / Torchvision: EuroSAT Sentinel-2 Satellite Dataset (27,000 geo-referenced images across 10 land-use classes: Industrial, Forest, River, PermanentCrop, etc.).
  • Hugging Face & Awesome Public Datasets: `climatebert/climate_sentiment` & NOAA Storm Events narrative reports.
Python ML Stack: Torchvision (`ResNet-50` / `MobileNetV3` satellite classifier) + Torchtext (vocabulary tokenization & text classification of environmental hazard reports).