First Assignment for Geographic Data Science
# Africa Population Change 2015-2025
This repository maps population density across Africa in 2025 and population change from 2015 to 2025 using ADM1 boundaries, global population rasters, GeoPandas, Rasterio, rasterstats, and Folium.
The main analysis is in `Africa_Maps.ipynb`. A rendered HTML copy is provided as `Africa_Maps.html` because GitHub does not reliably render interactive Folium maps inside notebooks.
## View the maps
Open `Africa_Maps.html` in a browser to view the interactive maps. If viewing on GitHub, download the file or open it from a local clone so the embedded Folium JavaScript can run.
## Setup
Create and activate the Conda environment:
```bash
conda env create -f envs363-563.yml
conda activate envs363-563
```
Download the required rasters and shapefile components:
```bash
bash download_data.sh
```
This creates `data/` with:
- `global_pop_2015.tif`
- `global_pop_2025.tif`
- the extracted geoBoundaries shapefile components
## Run the notebook
Start JupyterLab:
```bash
jupyter lab Africa_Maps.ipynb
```
The notebook defaults to reading inputs from `data/` and writing generated maps/rasters to `outputs_africa/`. To use a different data folder:
```bash
DATA_DIR=/path/to/data OUT_DIR=/path/to/outputs jupyter lab Africa_Maps.ipynb
```
## Export the HTML
After running the notebook, regenerate the browser-viewable HTML with:
```bash
jupyter nbconvert --to html Africa_Maps.ipynb
```
The notebook also saves standalone Folium map files in `outputs_africa/`.