This project demonstrates how to create a 2D bivariate map of Tanzania showing the spatial relationship between mean annual temperature and average monthly precipitation using CHELSA Bioclimatic data. The entire workflow is done using QGIS only β no coding or Python console is required.
- QGIS 3.28 or later
- Enabled QGIS plugins:
- β Processing Toolbox
- β SAGA (for raster reclassification)
- β QuickOSM (optional, to obtain Tanzania boundary)
| Dataset | Description |
|---|---|
CHELSA_bio10_01.tif |
Mean annual temperature (Β°C Γ 10) |
CHELSA_bio10_12.tif |
Total annual precipitation (mm) |
Tanzania_boundary.shp |
Tanzania national boundary (level 0) |
π Download CHELSA data from: https://chelsa-climate.org/downloads/
Raster > Extraction > Clip Raster by Mask Layer
Repeat for both:
CHELSA_bio10_01.tifβ save astemp_clipped.tifCHELSA_bio10_12.tifβ save asprec_clipped.tif
Raster > Raster Calculator
Expression:
"prec_clipped@1" / 30
Save as: prec_avg.tif
Processing > Toolbox > Warp (Reproject)
- Target CRS:
EPSG:21037(UTM Zone 37S - Tanzania) - Resampling: Bilinear
- Align cell size and extent between rasters
Raster > Miscellaneous > Raster Layer Statistics
Record min, max, and compute class breaks manually.
Processing > Toolbox > Reclassify by Table
-
Use defined quantile breaks
-
Assign:
- Class 1 = Low
- Class 2 = Medium
- Class 3 = High
Save as:
temp_class.tifprec_class.tif
Raster > Raster Calculator
Expression:
"temp_class@1" * 10 + "prec_class@1"
Save as: bivariate.tif
This produces values from 11 to 33 representing each temperature-precipitation class combo.
Layer Properties > Symbology
- Change Render type:
Singleband pseudocolor - Switch to Categorized
- Click Classify to list values
11to33 - Manually assign colors using the palette below
| Bivariate Value | Class Combo | Color Hex |
|---|---|---|
| 11 | Low Temp, Low Precipitation | #e8e8e8 |
| 12 | Low Temp, Medium Precip | #dfb0d6 |
| 13 | Low Temp, High Precip | #be64ac |
| 21 | Medium Temp, Low Precip | #ace4e4 |
| 22 | Medium Temp, Medium Precip | #a5add3 |
| 23 | Medium Temp, High Precip | #8c62aa |
| 31 | High Temp, Low Precip | #5ac8c8 |
| 32 | High Temp, Medium Precip | #5698b9 |
| 33 | High Temp, High Precip | #3b4994 |
Assign these manually in the categorized symbology panel in QGIS.
Project > New Print Layout
-
Add Map Frame
-
Optional: Add custom bivariate legend (3Γ3 grid)
-
Add:
- Title:
Tanzania: Temperature and Precipitation - Subtitle:
CHELSA Bioclim (1981β2010), Monthly Avg. Precipitation - Caption:
Source: CHELSA | Author: Your Name
- Title:
-
Export as
.png,.svg, or.pdf
tanzania_bivariate_map/
βββ CHELSA_bio10_01.tif
βββ CHELSA_bio10_12.tif
βββ Tanzania_boundary.shp
βββ temp_clipped.tif
βββ prec_clipped.tif
βββ prec_avg.tif
βββ temp_class.tif
βββ prec_class.tif
βββ bivariate.tif
βββ qgis_project.qgz
βββ README.md
- CHELSA Data: https://chelsa-climate.org
- QGIS: https://qgis.org
- Bivariate Colors: Inspired by
biscale::bi_pal("DkBlue") - Mapping Credits: Adapted by Milos Popovic (original R workflow)
A clean 2D bivariate raster map showing the spatial co-distribution of temperature and precipitation across Tanzania.