Overview
This module performs data manipulation operations to filter and merge power generation data with master data, focusing on EMGESA plants and calculating aggregated metrics.Data Sources
Master Data (Excel)
- Contains plant metadata and agent information
- Includes plant types (Hydro, Thermal, etc.)
- Links OFEI identifiers to plant names
Generation Data (TXT)
- dDEC file format with hourly generation
- 24 columns representing hours (H1-H24)
- Plant-level generation data
Loading Master Data
Filtering by Agent and Type
Filter Criteria
- Agents: EMGESA or EMGESA S.A.
- Plant Types:
- H = Hydro (Hidroeléctrica)
- T = Thermal (Termoeléctrica)
Loading Generation Data
Data Cleaning for Merge
- Removing leading/trailing whitespace
- Converting to uppercase
- Standardizing plant names
Merging Datasets
Join Operation
- Type: Inner join
- Key: Plant name (CENTRAL)
- Result: Combined dataset with master data + generation data
Calculating Aggregates
Suma_Total column represents the total daily generation across all 24 hours.
Filtering Active Plants
Final Dataset Structure
| Column | Source | Description |
|---|---|---|
| Nombre visible Agente | Master | Display name |
| AGENTE (OFEI) | Master | Official agent name |
| CENTRAL | Master/dDEC | Plant identifier |
| Tipo de central | Master | Plant type (H/T) |
| H1-H24 | dDEC | Hourly generation (MW) |
| Suma_Total | Calculated | Daily total generation |