Logo Lanfrica

galaa1/MEGA

Domaine:

environment and energyclimate

Type de record:

software
Créateur:
gal
HĂ´te:
MEGA — Make Ethiopia Green Again # Ethiopia Restoration Priority Map 🌍 Interactive web app for visualizing restoration priority zones across Ethiopia. Zones are colored red/yellow/green based on a weighted score calculated from environmental and demographic factors. ## Quick Start ```bash # Frontend npm install npm run dev # API Server (in a separate terminal) cd server npm install OPENAI_API_KEY=sk-your-key-here npm start ``` Frontend: localhost API: localhost ## How It Works ### Scoring Factors Each zone is scored on these factors (0–1 scale): - **Deforestation Recency** — more recently deforested = higher urgency - **Ground Moisture** — wetter soil = better for regrowth - **Carbon Storage Potential** — higher potential = more climate impact - **Biodiversity** — higher existing biodiversity = more to protect - **Climate Suitability** — favorable climate for restoration - **Soil Type Quality** — better soil composition for planting - **Low Population Density** — less human pressure ### Disqualification Rule Zones deforested **more than 10 years ago** are automatically disqualified (shown in gray). ### Color Scale - 🟢 **Green** (score ≥ 0.7) — High restoration priority - 🟡 **Yellow** (score 0.4–0.7) — Medium priority - 🔴 **Red** (score < 0.4) — Low priority - ⬛ **Gray** — Disqualified ## Tech Stack - React 18 + Vite - Leaflet + react-leaflet for mapping - CARTO dark basemap tiles - Custom weighted scoring algorithm ## Data Currently uses **mock data** with approximate zone boundaries. Replace `src/data/zones.js` with real GeoJSON and factor data when ready. ## Team Notes To swap in real data, maintain the same data shape in `src/data/zones.js`: ```js { id: 'zone-id', name: 'Zone Name', deforestationYearsAgo: 5, factors: { groundMoisture: 0.75, // 0–1 carbonStorage: 0.85, // 0–1 biodiversity: 0.82, // 0–1 climate: 0.78, // 0–1 soilType: 0.80, // 0–1 populationDensity: 0.35, // 0–1 (inverted: lower density = higher score) }, geometry: …