-
Notifications
You must be signed in to change notification settings - Fork 4
Description
🧊 Peru Minimum Temperature (Tmin) Raster Analysis + Public Policy + Streamlit
Purpose. Use a minimum temperature (Tmin) GeoTIFF to extract zonal statistics (by department/province/district), analyze climate risks (frost/cold surges), and propose evidence-based public policies. Deliver a public Streamlit app at the end.
Template repository. For environment setup and reproducibility, please use the same model and setup provided in this repository:
👉 Rodrigo Grijalba – Python Dashboard Class
Repository Name: Minimum-Temperature-Raster
Structure
- Data description → Sources, context, etc.
- Raster data analysis → Zonalstats plots.
- Public policy proposals → Insight generation to mitigate the impact of friaje (cold surges) Text.
📦 Dataset (Raster)
Primary raster for the assignment (Google Drive folder):
Tmin Peru GeoTIFF
If the raster is multiband (months/years), iterate over bands. You may assume Band 1 = year 2020 and so on.
✅ Deliverables
-
GitHub repository containing:
/app/→ Streamlit app ready to deploy./data/→ Raster (if small) or a script that downloads/loads it + required shapefiles/GeoJSON./notebooks/→ EDA and calculations (Jupyter, optional but recommended).requirements.txtorpyproject.toml.README.mdwith instructions and the deployment link.
-
Public Streamlit app (Streamlit Community Cloud) including:
- Raster upload or use of the bundled raster.
- Zonal stats (at least:
mean,min,max,std,p10,p90) + one custom metric. - At least 3 plots: distribution, ranking, and a static map.
- Downloadable tables (CSV).
- Public Policy section: diagnosis + 3 prioritized measures (target population/territory, estimated budget, KPIs).
🧮 Rubric (10 pts)
- Data & Reproducibility (2 pts): clear structure,
requirements.txt, relative paths, data-prep script. - Zonal Stats (3 pts): correct use of
rasterstats/rioxarraywith ≥6 metrics; proper CRS & geometry handling (buffer/fix, dissolve). - Visualizations (2 pts): ≥3 well-labeled plots; one ranking (top/bottom districts) and one distribution.
- Map (1 pt): static choropleth (GeoPandas) or pre-rendered PNG with legend & appropriate color scale.
- Streamlit App (1 pt): clear UI, filters (region/threshold), results download.
- Public Policy (1 pt): 3 concrete proposals with reasonable costs and KPIs aligned to the diagnosis.
Penalties: non-public app; absolute paths (−0.5); missing README (−0.5); major inconsistencies.
🛠️ Technical Requirements
- Python 3.10+
- Packages:
geopandas,rasterio,rasterstats,rioxarray,shapely,pyproj,matplotlib,pandas,numpy,streamlit - Vectors: shapefiles/GeoJSON of districts or provinces (consistent with your analysis).
- CRS: read/work in EPSG:4326; if computing areas, reproject to an appropriate UTM zone.
🔁 Recommended Workflow
3.1 Data preparation
- Load boundary shapes and ensure name/UBIGEO fields are uppercase and without diacritics.
- Load the Tmin GeoTIFF. If multiband (months/years), iterate over bands (assume Band 1 = 2020, etc.).
3.2 Zonal statistics
- Units: if the raster is scaled (°C × 10), rescale to actual °C.
- Minimum metrics:
count,mean,min,max,std,percentile_10,percentile_90(+1 custom). - Territorial level: district (preferred); use province/department if limited by hardware.
3.3 Analysis & visualizations
- Distribution: histogram/KDE of district-level mean Tmin.
- Ranking: Top 15 districts with lowest mean Tmin (frost risk) and top 15 highest.
- Map: static choropleth with GeoPandas; save PNG for the app and provide a downloadable table.
3.4 Public policy (guide) -- Text
Focus on high-Andean frost (Puno, Cusco, Ayacucho, Huancavelica, Pasco, etc.) and Amazon cold surges (Loreto, Ucayali, Madre de Dios). For each proposal include:
- Specific objective (e.g., reduce ILI/ARI, agricultural losses, missed school days).
- Target population/territory (districts ≤ Tmin p10).
- Intervention (e.g., thermal housing/ISUR, anti-frost kits, agricultural calendars, livestock shelters).
- Estimated cost (simple assumptions; S/ per household/school/clinic).
- KPI (e.g., −X% ARI cases in ESSALUD/MINSA; −X% alpaca mortality; +X% school attendance).
📤 Submission (Repository & Dashboard Links)
Deadline:28 September 23:59
Please submit both your:
- GitHub repository URL, and
- Deployed Streamlit dashboard URL
in the following Google Sheet:
👉 [Submission Excel – Repository & Dashboard Links]
Your Streamlit app must be deployed (e.g., Streamlit Community Cloud) and linked in the sheet above.