playground explore freely · no grades
SQL Playground
Explore any Runtime dataset with SQL. Nothing here affects course progress.
Hourly electricity demand, forecasts, generation and interchange for twelve major U.S. balancing authorities, January–June 2024, with daily fuel mix and flows between neighbouring grids.
138,556 rows8 tables2024-01 – 2024-06
tables
Open a table to see what one row means, its columns and keys, and a preview. Start from hourly_demand: it is the dataset's central table.
regions15 rows · 4 columns
One power-grid region or neighbouring country.
- region_code
Region code (CAN and MEX for neighbouring countries)
- region_name
Region name
- country
ISO country code: US, CA or MX
- interconnection
U.S. interconnection: Eastern, Western or ERCOT; NULL outside the U.S.
balancing_authorities62 rows · 6 columns
One grid operator (balancing authority). Twelve have hourly detail; the rest appear only as interchange partners.
- ba_code
Grid operator code
- ba_name
Balancing authority name
- time_zone
Reporting time zone (Eastern, Central, Mountain, Arizona, Pacific)
- region_code
Region
- generation_only
1 for generation-only BAs with no load
- hourly_detail
1 for the twelve BAs whose hourly demand and generation are included
fuel_types9 rows · 5 columns
One energy source used for generation (for example coal, natural gas, or wind).
- fuel_code
Fuel code
- fuel_name
Fuel name
- is_renewable
1 for hydro, solar and wind
- is_fossil
1 for coal, natural gas and petroleum
- is_variable
1 for weather-dependent sources (solar, wind)
calendar182 rows · 7 columns
One calendar date, January–June 2024.
- date
Calendar date (YYYY-MM-DD)
- month
Month number
- day_of_week
0 = Sunday … 6 = Saturday
- is_weekend
1 on Saturday and Sunday
- holiday_name
U.S. federal holiday, NULL otherwise
- day_of_month
Day of the month, 1–31
- day_name
Sunday … Saturday
hourly_demand52,405 rows · 9 columns
One hour for one grid operator: electricity demand and the day-ahead forecast.
- ba_code
Balancing authority
- hour_ending_utc
End of the hour in UTC (YYYY-MM-DD HH:MM)
- hour_ending_local
End of the hour in the BA’s local time; repeats or skips at daylight-saving changes
- demand_mw
Reported demand in MW (= MWh over the hour); NULL when not reported
- forecast_mw
Day-ahead demand forecast in MW; NULL when not reported
- local_date
The BA’s local operating date the hour belongs to (YYYY-MM-DD)
- hour_number
Hour of the local operating day, 1–24 (23 or 25 hours on daylight-saving change days)
- adjusted_demand_mw
Cleaned demand with anomalies replaced; NULL when unavailable
- demand_imputed
1 if this hour’s demand was filled in
generation52,405 rows · 15 columns
One hour for one grid operator: power generated, power traded with neighbours, and generation by fuel.
- ba_code
Balancing authority
- hour_ending_utc
End of the hour in UTC
- net_generation_mw
Net generation in MW; NULL when not reported
- total_interchange_mw
Net flow out of the BA in MW (positive = exporting); NULL when not reported
- adjusted_net_generation_mw
Cleaned net generation; NULL when unavailable
- adjusted_total_interchange_mw
Cleaned total interchange; NULL when unavailable
- coal_mw
Net generation from coal; NULL when not reported
- natural_gas_mw
Net generation from natural gas; NULL when not reported
- nuclear_mw
Net generation from nuclear; NULL when not reported
- petroleum_mw
Net generation from petroleum products; NULL when not reported
- hydro_mw
Net generation from hydropower and pumped storage (negative while pumping); NULL when not reported
- solar_mw
Net generation from solar; NULL when not reported
- wind_mw
Net generation from wind; NULL when not reported
- other_mw
Net generation from other sources; NULL when not reported
- unknown_mw
Net generation from unknown sources; NULL when not reported
generation_by_fuel15,824 rows · 5 columns
One day for one grid operator and one fuel: total generation that day.
- ba_code
Balancing authority
- date
Local calendar date of the BA
- fuel_code
Energy source
- generation_mwh
Sum of reported hourly MW, i.e. MWh; can be negative (pumping, station use)
- hours_reported
Hours with a reported value (23 or 25 on daylight-saving days)
interchange17,654 rows · 5 columns
One day of scheduled power flow from one grid operator to another.
- from_ba
Reporting balancing authority
- to_ba
Directly interconnected balancing authority
- date
Local calendar date of from_ba
- interchange_mwh
Positive = flow from from_ba to to_ba; NULL when no hour was reported
- hours_reported
Hours with a reported value
relationships
How to join these tables. Left column matches the right column.
- balancing_authorities.region_code joins to regions.region_code
- hourly_demand.ba_code joins to balancing_authorities.ba_code
- hourly_demand.local_date joins to calendar.date
- generation.ba_code joins to balancing_authorities.ba_code
- generation_by_fuel.ba_code joins to balancing_authorities.ba_code
- generation_by_fuel.fuel_code joins to fuel_types.fuel_code
- generation_by_fuel.date joins to calendar.date
- interchange.from_ba joins to balancing_authorities.ba_code
- interchange.to_ba joins to balancing_authorities.ba_code
- interchange.date joins to calendar.date