Skip to content
 
 

Repository files navigation

ARFW0501 2026 D: UHI in Rotterdam and Guangzhou.

This repository contains the code, data pipelines, and report on our findings for a spatial analysis of urban heat island effect between Rotterdam (Netherlands) and Guangzhou (China).

The project investigates the intersection of urban morphology (Local Climate Zones - LCZ), thermal environments (Land Surface Temperature - LST), vegetation (NDVI), and potential for street network use (Space Syntax), alongside some secondary metrics. A combination of quantitative (data processing and clustering) and qualitative (interpreting the clustering outcome and suggestion of appropriate nature-based solutions) methods are utilised to perform the analysis.

Repository Structure

  • code/: Contains all data acquisition, processing, and visualization scripts (Python & R).
  • components/: Contains all HTML files embedded within the Quarto document.
  • data/: acts as the storage for Earth Engine tile downloads, rasters, and enriched GeoPackages. Some data (in particular rotterdam/wijkenbuurten_2024.gpkg) may be missing from the repository and needs to be downloaded from https://surfdrive.surf.nl/s/aqgEpftfT7bXpX4?dir=/group-d/data.
  • out/maps/: Directory for exported publication-ready maps generated by the R scripts.
  • qgis-project/: QGIS workspace files, primarily used for manual Place Syntax Tool (PST) network analysis.
  • Report data/: Datasets and assets specifically formatted or isolated for the Quarto reports.
  • report.qmd & report.html: Quarto markdown file and resulting compiled HTML for the report.
  • asa2025-report.Rproj: RStudio project file for managing relative paths and environments.

Dependencies & Installation

To run the scripts in this repository, you will need both a Python and an R environment set up.

Python Dependencies

The Earth Engine, spatial data processing, and machine learning scripts require Python 3.x. You can install all required packages using pip:

pip install earthengine-api geemap geopandas rasterio rasterstats osmnx shapely numpy pandas fiona tqdm scikit-learn requests joblib

R Dependencies

The mapping and visualization scripts require R. Open your R console or RStudio and run the following to install the necessary packages:

install.packages(c("sf", "tidyverse", "ggplot2", "viridis", "scales"))

External Software

Methodology & Pipeline

The project follows a sequential pipeline applied to both Rotterdam and Guangzhou. Note that for Guangzhou, there are 2 separate .ipynb notebooks: one for neighbourhoods (code/guagnzhou.ipynb) and one for the street network in the city centre (code/guangzhou-centre.ipynb), as these are processed independently at different scales. We advise running code/guangzhou-centre.ipynb first.

  1. Data Acquisition (Earth Engine & OSM)
    • Multispectral satellite imagery is fetched via the Earth Engine API, calculating normalized LST and NDVI medians across the 2023–2025 summer months.
    • WUDAPT Local Climate Zone (LCZ) global maps are clipped to the Areas of Interest (AOIs).
    • Administrative boundaries and walking street networks are extracted via OpenStreetMap.
  2. Network Analysis (Manual QGIS Step)
    • Street networks are exported to GeoPackage format.
    • Before proceeding, calculate Network Betweenness using PST pluging in QGIS, using 1000m walking radius and disabling normalisation
  3. Spatial Enrichment & Zonal Statistics
    • Python scripts calculate the mean raster values (LST, NDVI) "under the line" for street segments and extract the LCZ class at starting nodes.
    • Neighborhood polygons (Buurten/Subdistricts) are enriched with dominant LCZ classes and road cluster distributions.
  4. Unsupervised Machine Learning
    • scikit-learn's MiniBatchKMeans is used to cluster street segments into 6 distinct spatial typologies based on their thermal, NDVI, and network characteristics.
  5. Visualization & Reporting
    • R scripts generate maps used in the report.
    • Findings are compiled into Quarto reports.

How to Run

  1. Environment Setup: Install all the prerequsites mentioned in the dependencies or the code files itself.
  2. Earth Engine Authentication: Run the first cell of either Jupyter notebook. You will be prompted to authenticate your Google account to use the Earth Engine API.
  3. Generate Rasters & Raw Networks: Execute Code/rotterdam.ipynb and Code/guangzhou.ipynb up to the QGIS intervention warning.
  4. Process Space Syntax:
    • Open QGIS.
    • Upload the generated street edges.
    • Run "Split with lines" and "Multipart to singleparts".
    • Use the PST plugin to create a segment map and perform Network Betweenness (walking distance, 1000m radius).
    • Save the output exactly as specified in the notebooks (e.g., rotterdam_roads_PST.gpkg).
  5. Run Clustering & Zonal Stats: Resume the Jupyter notebooks to perform the K-Means clustering and aggregate the statistics into the neighborhood boundaries.
  6. Generate Maps: Run Code/rotterdam-maps.R and Code/guangzhou-maps.R to output the final PNG maps to out/maps/.
  7. Compile Report: Render the .qmd file using Quarto to generate the final HTML report.

About

applied-spatial-analytics-2026-create-your-report-asa2026-report created by GitHub Classroom

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages