What is Grid Status?#

gridstatus logo

Tests 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 Solar Wind Geothermal Biomass Biogas Small Hydro Coal Nuclear Natural Gas Large Hydro Batteries Imports Other
0 2023-02-19 00:00:00-08:00 -23 1267 976 240 199 230 4 2265 9300 1731 8 6487 0
1 2023-02-19 00:05:00-08:00 -23 1261 976 241 198 229 4 2267 9190 1590 48 6769 0
2 2023-02-19 00:10:00-08:00 -23 1259 977 242 198 229 4 2266 9081 1374 174 6956 0
3 2023-02-19 00:15:00-08:00 -23 1262 976 242 198 230 4 2266 9160 1421 160 6957 0
4 2023-02-19 00:20:00-08:00 -23 1262 976 243 198 230 4 2265 9058 1430 157 6991 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
214 2023-02-19 17:50:00-08:00 -31 1389 970 252 194 229 4 2265 7409 2048 1960 7743 0
215 2023-02-19 17:55:00-08:00 -31 1380 970 251 193 229 4 2264 7488 2104 1997 7834 0
216 2023-02-19 18:00:00-08:00 -31 1393 970 253 193 230 4 2265 7537 2228 2023 7851 0
217 2023-02-19 18:05:00-08:00 -28 1411 969 254 193 231 4 2264 7526 2531 1853 7887 0
218 2023-02-19 18:10:00-08:00 -27 1403 969 253 193 233 4 2265 7456 2508 1852 8027 0

219 rows × 14 columns

Load#

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

caiso.get_load("today")
Time Load
0 2023-02-19 00:00:00-08:00 21250.0
1 2023-02-19 00:05:00-08:00 21371.0
2 2023-02-19 00:10:00-08:00 21364.0
3 2023-02-19 00:15:00-08:00 21336.0
4 2023-02-19 00:20:00-08:00 21300.0
... ... ...
214 2023-02-19 17:50:00-08:00 23237.0
215 2023-02-19 17:55:00-08:00 23474.0
216 2023-02-19 18:00:00-08:00 23655.0
217 2023-02-19 18:05:00-08:00 23820.0
218 2023-02-19 18:10:00-08:00 23956.0

219 rows × 2 columns

Load Forecast#

Another dataset we can query is the load forecast

nyiso = gridstatus.NYISO()
nyiso.get_load_forecast("today")
Forecast Time Time Load Forecast
0 2023-02-19 00:00:00-05:00 2023-02-19 00:00:00-05:00 14907
1 2023-02-19 00:00:00-05:00 2023-02-19 01:00:00-05:00 14493
2 2023-02-19 00:00:00-05:00 2023-02-19 02:00:00-05:00 14205
3 2023-02-19 00:00:00-05:00 2023-02-19 03:00:00-05:00 14063
4 2023-02-19 00:00:00-05:00 2023-02-19 04:00:00-05:00 14036
... ... ... ...
139 2023-02-19 00:00:00-05:00 2023-02-24 19:00:00-05:00 18786
140 2023-02-19 00:00:00-05:00 2023-02-24 20:00:00-05:00 18381
141 2023-02-19 00:00:00-05:00 2023-02-24 21:00:00-05:00 17864
142 2023-02-19 00:00:00-05:00 2023-02-24 22:00:00-05:00 17148
143 2023-02-19 00:00:00-05:00 2023-02-24 23:00:00-05:00 16372

144 rows × 3 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 Load
0 2020-01-01 00:00:00-08:00 21533
1 2020-01-01 00:05:00-08:00 21429
2 2020-01-01 00:10:00-08:00 21320
3 2020-01-01 00:15:00-08:00 21272
4 2020-01-01 00:20:00-08:00 21193
... ... ...
283 2020-01-01 23:35:00-08:00 20494
284 2020-01-01 23:40:00-08:00 20383
285 2020-01-01 23:45:00-08:00 20297
286 2020-01-01 23:50:00-08:00 20242
287 2020-01-01 23:55:00-08:00 20128

288 rows × 2 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 Load
0 2021-01-01 00:00:00-08:00 21937.0
1 2021-01-01 00:05:00-08:00 21858.0
2 2021-01-01 00:10:00-08:00 21827.0
3 2021-01-01 00:15:00-08:00 21757.0
4 2021-01-01 00:20:00-08:00 21664.0
... ... ...
8923 2021-01-31 23:35:00-08:00 20054.0
8924 2021-01-31 23:40:00-08:00 19952.0
8925 2021-01-31 23:45:00-08:00 19859.0
8926 2021-01-31 23:50:00-08:00 19763.0
8927 2021-01-31 23:55:00-08:00 19650.0

8928 rows × 2 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