Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

brad-kipkoech/africa-energy-data

Domain:

environment and energy
Creator:
bra
Host:
project where I scraped data from africa energy data portal and saved in mongodb # Africa Energy Data Pipeline This project automates the collection, cleaning, transformation, and storage of energy-related data across African countries. Data is scraped from the **Africa Energy Portal** using **Selenium**, cleaned and transformed with **Pandas**, and then stored in **MongoDB Atlas** for analysis and visualization. # Project Workflow ## Data Collection - Tool: **Selenium** - Source: Africa Energy Portal - Script: `scripts/scrape_africa_energy.py` - Output: `data/raw_data.csv` ## Data Cleaning & Formatting - Tool: **Pandas** - Notebook: `notebooks/cleaning_notebook.ipynb` - Steps: - Handle missing values - Standardize metric names and units - Reshape data into the required format: ``` ["country", "country_serial", "metric", "unit", "sector", "sub_sector", "sub_sub_sector", "source_link", "source", "2000", "2001", ..., "2024"] ``` - Output: `data/cleaned.csv` ## MongoDB Integration - Script: `scripts/upload_formatted_data.py` - Database: **MongoDB Atlas** - Collection: `energy_db.africa_energy` - Schema example: ```json { "id": "kenya_26_energy_power_generation_general_installed_capacity_mw", "country": "Kenya", "data_points": { "2015": 2300, "2016": 2400, "2024": 3778.5 }, "metric": "Installed Capacity", "sector": "Energy", "unit": "MW", "source_link": "ENERGY & PETROLEUM STATISTICS REPORT", "sources": "Epra 2023-2024 FY Reports" } ``` # Technologies Used Python 3.10+ Selenium Pandas PyMongo MongoDB Atlas dotenv # setup instructions git clone github.com cd africa-energy-data python -m venv venv linux (source venv/bin/activate) (Windows: venv\Scripts\activate) pip install -r requirements.txt

Visit

github.com

Similar

energy-data/africa-grid-explorerDerrickthedesigner/Africa-Energy-Data-PipelineRenewable Energy Zones for the Africa Clean Energy Corridor DataTowards Sustainable Energy-Efficient Data Centers in AfricaHydro Share Energy | Africa (Our World in Data)Consumption Based Energy Per Capita | Africa (Our World in Data)

energy-data/africa-grid-explorer

A visualization of the electricity grid in Sub Saharan Africa. # Africa Electricity Grids Explorer

Derrickthedesigner/Africa-Energy-Data-Pipeline

# Africa Energy Data Scraper ## Overview This project is a modular ETL (Extract–Transform–Load) p

Renewable Energy Zones for the Africa Clean Energy Corridor Data

Wind, solar PV, and concentrated solar power renewable energy zones for eastern and southern Africa.

Towards Sustainable Energy-Efficient Data Centers in Africa

Developing nations are particularly susceptible to the adverse effects of global warming. By 2040, 1

Hydro Share Energy | Africa (Our World in Data)

🌍 240 observations · 4 Africa countries · 1965–2024 · Repackaged by Electric Sheep Africa This data

Consumption Based Energy Per Capita | Africa (Our World in Data)

🌍 26 observations · 1 Africa countries · 1995–2020 · Repackaged by Electric Sheep Africa This datas