Logo Lanfrica

Bachirou06/bn-electrification

Domain:

environment and energygeospatial

Record type:

software
Creator:
Bac
Host:
Benin Least-Cost Electrification Analysis β€” VIDA Assignment # πŸ‡§πŸ‡― Benin Least-Cost Electrification Analysis A Python electrification planning model comparing Grid, Mini-Grid, and Solar Home Systems across **17,205 settlements** in Benin over a 15-year horizon (2025–2040), built on VIDA satellite settlement data. --- SHS is the dominant technology in **all 17 sensitivity scenarios** (42–49%). The mini-grid demand threshold is the most influential assumption. --- ## Installation & Setup ### 1. Clone the repository ```bash git clone github.com cd benin-electrification ``` ### 2. Create and activate a virtual environment **Option A β€” using `venv` (recommended):** ```bash # Create the environment python -m venv bn-electrification # Activate β€” Windows bn-electrification\Scripts\activate # Activate β€” macOS / Linux source bn-electrification/bin/activate ``` **Option B β€” using `conda`:** ```bash conda create -n bn-electrification python=3.11 conda activate bn-electrification ``` ### 3. Install dependencies ```bash pip install -r requirements.txt ``` > If `requirements.txt` is missing, install manually: > ```bash > pip install geopandas pandas numpy scipy rasterio pyyaml > pip install streamlit plotly jupyter notebook seaborn > ``` ### 4. Verify the install ```bash python -c "import geopandas, streamlit, plotly; print('All good βœ“')" ``` --- ## Running the Analysis Run the notebooks in order β€” each one depends on the output of the previous: ```bash jupyter notebook ``` | Notebook | What it does | |---|---| | `00_gis_layer_extraction.ipynb` | Attaches GHI, slope, hydro, nightlights to settlements | | `01_data_exploration.ipynb` | EDA and data quality checks | | `02_demand_model.ipynb` | Demand estimation per settlement | | `03_lcoe_model.ipynb` | LCOE computation + technology selection | | `04_sensitivity_analysis.ipynb` | 17-scenario parametric sensitivity | NB03 produces the CSV needed by the dashboard. Run its save cell (last cell) before launching Streamlit. --- …