BengalGrid: A Decade-Scale Hourly Dataset of Bangladesh Power Supply by Source Type, Including Cross-Border Imports from India and Nepal
Description
BengalGrid is a dataset of electricity generation records in Bangladesh, collected from the public Power Grid Company of Bangladesh (PGCB) ERP portal using a Python-based web scraping pipeline. It covers April 17, 2015, to October 7, 2026, and contains 104,134 records after cleaning. The dataset provides historical information on total electricity generation, fuel-wise generation, cross-border electricity imports, and operational peak-period annotations. **Column Descriptions** **datetime** – Date and time of observation in ISO 8601 format (YYYY-MM-DDTHH:MM:SS). **Generation_MW** – Total reported electricity generation in megawatts (MW). **Gas** – Electricity generation from gas-fired power plants (MW). **Liquid Fuel** – Electricity generation from liquid-fuel-based power plants (MW). **Coal** – Electricity generation from coal-fired power plants (MW). **Hydro** – Electricity generation from hydropower sources (MW). **Solar** – Electricity generation from solar power sources (MW). **Wind** – Electricity generation from wind power sources (MW). **India_Bheramara_HVDC** – Electricity imported through the Bheramara high-voltage direct-current (HVDC) interconnection with India (MW). **India_Tripura** – Electricity imported through the Tripura interconnection with India (MW). **India_Adani** – Electricity imported through the Adani power supply connection with India (MW). **Nepal** – Electricity imports attributed to Nepal (MW). **Remarks** – Source-provided operational annotations, including “Day Peak” and “Evening Peak.” The dataset includes hourly observations and half-hour readings at selected times, including 18:30 and 19:30. Missing values are retained rather than automatically replaced with zero. The cleaning process standardizes timestamps, converts applicable fields to numeric values, removes invalid timestamps and records outside the configured year range, resolves duplicate timestamps by retaining the last occurrence in file order, and sorts records chronologically. No imputation, interpolation, or outlier correction is performed. **Potential Research Applications** The dataset supports research in electricity generation forecasting, time-series analysis, fuel-mix assessment, trend and seasonality analysis, cross-border electricity import analysis, peak-period generation patterns, and anomaly detection. Researchers can develop statistical or machine learning models for generation forecasting, compare energy-source contributions over time, and investigate renewable generation patterns. Studies requiring electricity demand or load-shedding measurements will need additional datasets, as these are not dedicated variables in BengalGrid. **Data Collection and Processing Files** 1. `scrape_bengalgrid.py` – Data collection script. 2. `clean_bengalgrid.py` – Data cleaning script. 3. `pgcb_hourly_generation_full.csv` – Original dataset. 4. `BengalGrid_data.csv` – Final cleaned dataset.
Files
Steps to reproduce
1. **Data Source:** Electricity generation records were collected from the official PGCB ERP portal, covering April 2015–October 2026: https://erp.powergrid.gov.bd/w/generations/view_generations 2. **Web Scraping:** Python 3, `requests`, and `pandas.read_html()` were used to extract HTML tables from pages 1–2051. A browser-like User-Agent and one-second delay were used. Data were saved incrementally to `pgcb_hourly_generation_full.csv`. 3. **Raw Dataset:** The collected data contained 104,582 rows and 14 columns. 4. **Numeral Conversion:** Bangla digits (০–৯) in `Date` and `Time` were converted to ASCII digits using `str.maketrans()` and `str.translate()`. 5. **Datetime Processing:** Date and time were combined into an ISO 8601 `datetime` field (`YYYY-MM-DDTHH:MM:SS`). Times in HH:MM format were extended with `:00`. 6. **Date Filtering:** Unparseable dates and records outside 2015–2026 were removed. 7. **Deduplication:** Duplicate timestamps were removed, retaining the last occurrence in file order. A total of 438 duplicate rows were removed. 8. **Type Conversion:** Measurement columns were converted to numeric types using pandas. Invalid numeric entries became missing values, and records were sorted chronologically. 9. **Final Dataset:** `BengalGrid_data.csv` contains 104,134 records spanning April 17, 2015, to October 7, 2026. 10. **Peak Readings:** Half-hour readings at 18:30 and 19:30 were retained as published. Strictly hourly analysis can exclude records whose minute component is not `00`. 11. **Missing Data:** Blank values in `Solar`, `Wind`, `India_Adani`, and `Nepal` were preserved without zero-filling or imputation. 12. **Outlier Handling:** No interpolation, imputation, or outlier correction was performed. Outlier values require validation before analysis.
Institutions
- East West UniversityDhaka Division, Dhaka