# plant_fuel_mapping.csv Methodology

## Source
- **File**: `energy_databank_generation_by_plant.csv`
- **Document**: Nigerian Energy Data Bank – Power Plant Generation
- **Publisher**: Nigerian Energy Data Bank (databank.energy.gov.ng)
- **URL/Path**: `C:\Users\HP\palmgrove\NEFDB\datasets\grid_electricity\energy_databank_generation_by_plant.csv`

## Extraction steps
1. Read CSV with columns `code`, `description`, `year`, `value`, `unit`.
2. For each unique `code` (plant identifier), select the latest calendar year available.
3. Derive `plant_name` as the part of `description` before ` - `.
4. Derive `raw_fuel_type` as the part of `description` after ` - ` (e.g., 'Generation', 'Gas Used', 'Water Used').
5. Normalize fuel:
   - **gas**: code/description contains AFAM, ALAOJI, CALABAR, GBARAIN, GEREGU, IHOVBOR, OGORODE, OLORUNSOGO, OMOTOSHO, or 'Gas'.
   - **hydro**: code/description contains JEBBA, KAINJI, NESCO, SHIRORO, 'Hydro', 'Water', or 'Reservoir'.
   - **other**: everything else.
6. Report `generation_mwh_latest_year` as the `value` for that latest year (blank where the record is not a generation metric).
7. `capacity_mw` is not available in the source and is left blank.

## Number of plants
30 unique plant codes.

## Confidence
medium (capacity unavailable; some non-generation rows such as 'Water Used' are mapped to hydro as auxiliary data)
