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

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 2023-09-12 00:00:00-07:00 2023-09-12 00:00:00-07:00 2023-09-12 00:05:00-07:00 39 2450 843 277 191 297 0 2215 12755 2988 -458 6386 0
1 2023-09-12 00:05:00-07:00 2023-09-12 00:05:00-07:00 2023-09-12 00:10:00-07:00 39 2433 843 277 191 297 0 2214 12233 2704 -20 6453 0
2 2023-09-12 00:10:00-07:00 2023-09-12 00:10:00-07:00 2023-09-12 00:15:00-07:00 39 2421 842 278 191 297 0 2214 12156 2571 100 6443 0
3 2023-09-12 00:15:00-07:00 2023-09-12 00:15:00-07:00 2023-09-12 00:20:00-07:00 39 2411 842 274 192 297 0 2214 12059 2361 74 6673 0
4 2023-09-12 00:20:00-07:00 2023-09-12 00:20:00-07:00 2023-09-12 00:25:00-07:00 39 2351 841 271 191 297 0 2214 12266 2188 132 6978 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
219 2023-09-12 18:15:00-07:00 2023-09-12 18:15:00-07:00 2023-09-12 18:20:00-07:00 3742 3232 791 303 186 292 0 2223 14512 4652 2378 4068 0
220 2023-09-12 18:20:00-07:00 2023-09-12 18:20:00-07:00 2023-09-12 18:25:00-07:00 3132 3257 791 303 186 292 0 2223 14742 4735 2441 4177 0
221 2023-09-12 18:25:00-07:00 2023-09-12 18:25:00-07:00 2023-09-12 18:30:00-07:00 2499 3264 791 304 186 292 0 2224 15129 4806 2549 4136 0
222 2023-09-12 18:30:00-07:00 2023-09-12 18:30:00-07:00 2023-09-12 18:35:00-07:00 1985 3290 791 302 186 292 0 2224 15387 4835 2668 4171 0
223 2023-09-12 18:35:00-07:00 2023-09-12 18:35:00-07:00 2023-09-12 18:40:00-07:00 1510 3284 790 303 186 292 0 2223 15641 4836 2778 4276 0

224 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 2023-09-12 00:00:00-07:00 2023-09-12 00:00:00-07:00 2023-09-12 00:05:00-07:00 27228.0
1 2023-09-12 00:05:00-07:00 2023-09-12 00:05:00-07:00 2023-09-12 00:10:00-07:00 27218.0
2 2023-09-12 00:10:00-07:00 2023-09-12 00:10:00-07:00 2023-09-12 00:15:00-07:00 27155.0
3 2023-09-12 00:15:00-07:00 2023-09-12 00:15:00-07:00 2023-09-12 00:20:00-07:00 26993.0
4 2023-09-12 00:20:00-07:00 2023-09-12 00:20:00-07:00 2023-09-12 00:25:00-07:00 26957.0
... ... ... ... ...
219 2023-09-12 18:15:00-07:00 2023-09-12 18:15:00-07:00 2023-09-12 18:20:00-07:00 35685.0
220 2023-09-12 18:20:00-07:00 2023-09-12 18:20:00-07:00 2023-09-12 18:25:00-07:00 35615.0
221 2023-09-12 18:25:00-07:00 2023-09-12 18:25:00-07:00 2023-09-12 18:30:00-07:00 35546.0
222 2023-09-12 18:30:00-07:00 2023-09-12 18:30:00-07:00 2023-09-12 18:35:00-07:00 35533.0
223 2023-09-12 18:35:00-07:00 2023-09-12 18:35:00-07:00 2023-09-12 18:40:00-07:00 35547.0

224 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 2023-09-12 00:00:00-04:00 2023-09-12 00:00:00-04:00 2023-09-12 01:00:00-04:00 2023-09-12 00:00:00-04:00 16688
1 2023-09-12 01:00:00-04:00 2023-09-12 01:00:00-04:00 2023-09-12 02:00:00-04:00 2023-09-12 00:00:00-04:00 15991
2 2023-09-12 02:00:00-04:00 2023-09-12 02:00:00-04:00 2023-09-12 03:00:00-04:00 2023-09-12 00:00:00-04:00 15472
3 2023-09-12 03:00:00-04:00 2023-09-12 03:00:00-04:00 2023-09-12 04:00:00-04:00 2023-09-12 00:00:00-04:00 15177
4 2023-09-12 04:00:00-04:00 2023-09-12 04:00:00-04:00 2023-09-12 05:00:00-04:00 2023-09-12 00:00:00-04:00 15206
... ... ... ... ... ...
139 2023-09-17 19:00:00-04:00 2023-09-17 19:00:00-04:00 2023-09-17 20:00:00-04:00 2023-09-12 00:00:00-04:00 18304
140 2023-09-17 20:00:00-04:00 2023-09-17 20:00:00-04:00 2023-09-17 21:00:00-04:00 2023-09-12 00:00:00-04:00 17983
141 2023-09-17 21:00:00-04:00 2023-09-17 21:00:00-04:00 2023-09-17 22:00:00-04:00 2023-09-12 00:00:00-04:00 17036
142 2023-09-17 22:00:00-04:00 2023-09-17 22:00:00-04:00 2023-09-17 23:00:00-04:00 2023-09-12 00:00:00-04:00 16015
143 2023-09-17 23:00:00-04:00 2023-09-17 23:00:00-04:00 2023-09-18 00:00:00-04:00 2023-09-12 00:00:00-04:00 15022

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