Weather Variables
Weather Stations
Five population-weighted stations across Spain, selected to represent major demand centers:
| Station | Latitude | Longitude | Weight | Zone |
|---|---|---|---|---|
| Madrid-Barajas | 40.47 | -3.56 | 0.35 | Center/West |
| Barcelona-El Prat | 41.30 | 2.08 | 0.25 | East |
| Valencia-Airport | 39.49 | -0.47 | 0.15 | East |
| Bilbao-Airport | 43.30 | -2.91 | 0.13 | North |
| Sevilla-Airport | 37.42 | -5.90 | 0.12 | South |
Weights reflect approximate metropolitan population distribution. The population-weighted average approximates the national demand-temperature relationship.
Hourly Variables (Open-Meteo)
| Variable | Column | Unit | Description |
|---|---|---|---|
| Temperature | temp_c | °C | 2m air temperature |
| Wind Speed | wind_speed_kmh | km/h | 10m wind speed |
| Precipitation | precipitation_mm | mm | Hourly precipitation |
| Sunshine | sunshine_hours | hours | Sunshine duration (converted from seconds) |
| Cloud Cover | cloud_cover_pct | % | Total cloud cover |
| Direct Radiation | direct_radiation_wm2 | W/m² | Direct normal irradiance |
| Diffuse Radiation | diffuse_radiation_wm2 | W/m² | Diffuse horizontal irradiance |
Derived Weather Features
The feature engineering pipeline computes these from raw weather data:
| Feature | Formula | Purpose |
|---|---|---|
heating_degree_days | max(0, 18 - temp_c) | Heating demand proxy |
cooling_degree_days | max(0, temp_c - 24) | Cooling demand proxy |
cold_x_demand | max(0, 15 - temp_c) × demand | Cold-demand interaction |
wind_x_wind_share | wind_speed × wind_share | Wind generation interaction |
cloud_x_solar | cloud_cover × solar_share | Cloud-solar interaction |
ghi_wm2 | direct + diffuse radiation | Global horizontal irradiance |
clear_sky_index | GHI / theoretical_max | Solar clarity (0-1.5) |
Data Integration
Hourly Open-Meteo data is the sole weather source. The AEMET daily collector was removed in v4.1 when Open-Meteo hourly data was fully integrated. The combine_first strategy prevents partial updates from overwriting existing data.