What is Grid Status?#

gridstatus logo

Tests Code Coverage PyPI Version

gridstatus is a standardized Python API to electricity supply, demand, and pricing data for the major Independent System Operators (ISOs) in the United States.

Currently gridstatus supports CAISO, SPP, ISONE, MISO, Ercot, NYISO, and PJM.

We’d love to answer any usage or data access questions! Please let us know by posting a GitHub issue.

5 Minute Overview#

First, we can see all of the ISOs that are supported

import gridstatus
gridstatus.list_isos()
Name Id Class
0 Midcontinent ISO miso MISO
1 California ISO caiso CAISO
2 PJM pjm PJM
3 Electric Reliability Council of Texas ercot Ercot
4 Southwest Power Pool spp SPP
5 New York ISO nyiso NYISO
6 ISO New England isone ISONE
7 Independent Electricity System Operator ieso IESO

Next, we can select an ISO we want to use

caiso = gridstatus.CAISO()

Fuel Mix#

All ISOs have the same API to methods like get_fuel_mix, get_load, and get_status, etc. Here is how we can get the fuel mix

caiso.get_fuel_mix("today")
Time Interval Start Interval End Solar Wind Geothermal Biomass Biogas Small Hydro Coal Nuclear Natural Gas Large Hydro Batteries Imports Other
0 2024-02-20 00:00:00-08:00 2024-02-20 00:00:00-08:00 2024-02-20 00:05:00-08:00 47 2448 621 190 194 299 0 2257 9225 2925 -885 4034 0
1 2024-02-20 00:05:00-08:00 2024-02-20 00:05:00-08:00 2024-02-20 00:10:00-08:00 50 2487 624 193 195 294 0 2257 9240 2583 -559 4154 0
2 2024-02-20 00:10:00-08:00 2024-02-20 00:10:00-08:00 2024-02-20 00:15:00-08:00 49 2473 624 192 195 274 0 2256 9153 2454 -514 4429 0
3 2024-02-20 00:15:00-08:00 2024-02-20 00:15:00-08:00 2024-02-20 00:20:00-08:00 47 2437 622 193 195 273 0 2256 9194 2450 -480 4345 0
4 2024-02-20 00:20:00-08:00 2024-02-20 00:20:00-08:00 2024-02-20 00:25:00-08:00 51 2448 623 191 196 273 0 2258 9219 2509 -507 4244 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
164 2024-02-20 13:40:00-08:00 2024-02-20 13:40:00-08:00 2024-02-20 13:45:00-08:00 6603 1334 769 253 194 263 0 2257 9250 1869 -152 2280 0
165 2024-02-20 13:45:00-08:00 2024-02-20 13:45:00-08:00 2024-02-20 13:50:00-08:00 6487 1334 768 252 194 263 0 2256 9332 1841 -53 2235 0
166 2024-02-20 13:50:00-08:00 2024-02-20 13:50:00-08:00 2024-02-20 13:55:00-08:00 6403 1307 768 253 194 262 0 2256 9365 1844 87 2263 0
167 2024-02-20 13:55:00-08:00 2024-02-20 13:55:00-08:00 2024-02-20 14:00:00-08:00 6348 1330 768 253 193 262 0 2257 9369 1852 108 2147 0
168 2024-02-20 14:00:00-08:00 2024-02-20 14:00:00-08:00 2024-02-20 14:05:00-08:00 5984 1364 768 255 192 262 0 2258 9430 1918 162 2400 0

169 rows × 16 columns

Load#

or the energy demand throughout the current day as a Pandas DataFrame

caiso.get_load("today")
Time Interval Start Interval End Load
0 2024-02-20 00:00:00-08:00 2024-02-20 00:00:00-08:00 2024-02-20 00:05:00-08:00 20697.0
1 2024-02-20 00:05:00-08:00 2024-02-20 00:05:00-08:00 2024-02-20 00:10:00-08:00 20734.0
2 2024-02-20 00:10:00-08:00 2024-02-20 00:10:00-08:00 2024-02-20 00:15:00-08:00 20734.0
3 2024-02-20 00:15:00-08:00 2024-02-20 00:15:00-08:00 2024-02-20 00:20:00-08:00 20713.0
4 2024-02-20 00:20:00-08:00 2024-02-20 00:20:00-08:00 2024-02-20 00:25:00-08:00 20690.0
... ... ... ... ...
164 2024-02-20 13:40:00-08:00 2024-02-20 13:40:00-08:00 2024-02-20 13:45:00-08:00 24467.0
165 2024-02-20 13:45:00-08:00 2024-02-20 13:45:00-08:00 2024-02-20 13:50:00-08:00 24486.0
166 2024-02-20 13:50:00-08:00 2024-02-20 13:50:00-08:00 2024-02-20 13:55:00-08:00 24527.0
167 2024-02-20 13:55:00-08:00 2024-02-20 13:55:00-08:00 2024-02-20 14:00:00-08:00 24441.0
168 2024-02-20 14:00:00-08:00 2024-02-20 14:00:00-08:00 2024-02-20 14:05:00-08:00 24545.0

169 rows × 4 columns

Load Forecast#

Another dataset we can query is the load forecast

nyiso = gridstatus.NYISO()
nyiso.get_load_forecast("today")
Time Interval Start Interval End Forecast Time Load Forecast
0 2024-02-20 00:00:00-05:00 2024-02-20 00:00:00-05:00 2024-02-20 01:00:00-05:00 2024-02-20 00:00:00-05:00 16140
1 2024-02-20 01:00:00-05:00 2024-02-20 01:00:00-05:00 2024-02-20 02:00:00-05:00 2024-02-20 00:00:00-05:00 15814
2 2024-02-20 02:00:00-05:00 2024-02-20 02:00:00-05:00 2024-02-20 03:00:00-05:00 2024-02-20 00:00:00-05:00 15634
3 2024-02-20 03:00:00-05:00 2024-02-20 03:00:00-05:00 2024-02-20 04:00:00-05:00 2024-02-20 00:00:00-05:00 15631
4 2024-02-20 04:00:00-05:00 2024-02-20 04:00:00-05:00 2024-02-20 05:00:00-05:00 2024-02-20 00:00:00-05:00 15907
... ... ... ... ... ...
139 2024-02-25 19:00:00-05:00 2024-02-25 19:00:00-05:00 2024-02-25 20:00:00-05:00 2024-02-20 00:00:00-05:00 18416
140 2024-02-25 20:00:00-05:00 2024-02-25 20:00:00-05:00 2024-02-25 21:00:00-05:00 2024-02-20 00:00:00-05:00 17984
141 2024-02-25 21:00:00-05:00 2024-02-25 21:00:00-05:00 2024-02-25 22:00:00-05:00 2024-02-20 00:00:00-05:00 17339
142 2024-02-25 22:00:00-05:00 2024-02-25 22:00:00-05:00 2024-02-25 23:00:00-05:00 2024-02-20 00:00:00-05:00 16561
143 2024-02-25 23:00:00-05:00 2024-02-25 23:00:00-05:00 2024-02-26 00:00:00-05:00 2024-02-20 00:00:00-05:00 15827

144 rows × 5 columns

Historical Data#

When supported, you can use the historical method calls to get data for a specific day in the past. For example,

caiso.get_load("Jan 1, 2020")
Time Interval Start Interval End Load
0 2020-01-01 00:00:00-08:00 2020-01-01 00:00:00-08:00 2020-01-01 00:05:00-08:00 21533
1 2020-01-01 00:05:00-08:00 2020-01-01 00:05:00-08:00 2020-01-01 00:10:00-08:00 21429
2 2020-01-01 00:10:00-08:00 2020-01-01 00:10:00-08:00 2020-01-01 00:15:00-08:00 21320
3 2020-01-01 00:15:00-08:00 2020-01-01 00:15:00-08:00 2020-01-01 00:20:00-08:00 21272
4 2020-01-01 00:20:00-08:00 2020-01-01 00:20:00-08:00 2020-01-01 00:25:00-08:00 21193
... ... ... ... ...
283 2020-01-01 23:35:00-08:00 2020-01-01 23:35:00-08:00 2020-01-01 23:40:00-08:00 20494
284 2020-01-01 23:40:00-08:00 2020-01-01 23:40:00-08:00 2020-01-01 23:45:00-08:00 20383
285 2020-01-01 23:45:00-08:00 2020-01-01 23:45:00-08:00 2020-01-01 23:50:00-08:00 20297
286 2020-01-01 23:50:00-08:00 2020-01-01 23:50:00-08:00 2020-01-01 23:55:00-08:00 20242
287 2020-01-01 23:55:00-08:00 2020-01-01 23:55:00-08:00 2020-01-02 00:00:00-08:00 20128

288 rows × 4 columns

Frequently, we want to get data across multiple days. We can do that by providing a start and end parameter to any iso.get_* method

caiso_load = caiso.get_load(start="Jan 1, 2021", end="Feb 1, 2021")
caiso_load
Time Interval Start Interval End Load
0 2021-01-01 00:00:00-08:00 2021-01-01 00:00:00-08:00 2021-01-01 00:05:00-08:00 21937.0
1 2021-01-01 00:05:00-08:00 2021-01-01 00:05:00-08:00 2021-01-01 00:10:00-08:00 21858.0
2 2021-01-01 00:10:00-08:00 2021-01-01 00:10:00-08:00 2021-01-01 00:15:00-08:00 21827.0
3 2021-01-01 00:15:00-08:00 2021-01-01 00:15:00-08:00 2021-01-01 00:20:00-08:00 21757.0
4 2021-01-01 00:20:00-08:00 2021-01-01 00:20:00-08:00 2021-01-01 00:25:00-08:00 21664.0
... ... ... ... ...
8923 2021-01-31 23:35:00-08:00 2021-01-31 23:35:00-08:00 2021-01-31 23:40:00-08:00 20054.0
8924 2021-01-31 23:40:00-08:00 2021-01-31 23:40:00-08:00 2021-01-31 23:45:00-08:00 19952.0
8925 2021-01-31 23:45:00-08:00 2021-01-31 23:45:00-08:00 2021-01-31 23:50:00-08:00 19859.0
8926 2021-01-31 23:50:00-08:00 2021-01-31 23:50:00-08:00 2021-01-31 23:55:00-08:00 19763.0
8927 2021-01-31 23:55:00-08:00 2021-01-31 23:55:00-08:00 2021-02-01 00:00:00-08:00 19650.0

8928 rows × 4 columns

We can now see there is data for all of January 2021

import plotly.express as px

fig = px.line(caiso_load, x="Time", y="Load", title="CAISO Load - Jan '21")
fig

Next Steps#

The best part is these APIs work in the same way across all the supported ISOs!

Examples