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-05-22 00:00:00-07:00 2023-05-22 00:00:00-07:00 2023-05-22 00:05:00-07:00 -42 1882 805 287 208 411 3 2266 6184 3634 -151 8824 0
1 2023-05-22 00:05:00-07:00 2023-05-22 00:05:00-07:00 2023-05-22 00:10:00-07:00 -42 1874 799 289 209 406 4 2267 5584 3617 147 9155 0
2 2023-05-22 00:10:00-07:00 2023-05-22 00:10:00-07:00 2023-05-22 00:15:00-07:00 -42 1875 799 286 208 399 3 2265 5353 3608 316 9131 0
3 2023-05-22 00:15:00-07:00 2023-05-22 00:15:00-07:00 2023-05-22 00:20:00-07:00 -42 1871 800 287 209 397 3 2266 5273 3603 196 9265 0
4 2023-05-22 00:20:00-07:00 2023-05-22 00:20:00-07:00 2023-05-22 00:25:00-07:00 -42 1881 803 286 209 397 3 2266 5053 3608 221 9319 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
207 2023-05-22 17:15:00-07:00 2023-05-22 17:15:00-07:00 2023-05-22 17:20:00-07:00 9592 2018 810 314 202 391 2 2264 6176 2960 941 5017 0
208 2023-05-22 17:20:00-07:00 2023-05-22 17:20:00-07:00 2023-05-22 17:25:00-07:00 9471 2026 810 315 201 391 2 2263 6500 2965 1151 4689 0
209 2023-05-22 17:25:00-07:00 2023-05-22 17:25:00-07:00 2023-05-22 17:30:00-07:00 9224 2040 810 315 201 392 2 2264 6533 2972 1499 4669 0
210 2023-05-22 17:30:00-07:00 2023-05-22 17:30:00-07:00 2023-05-22 17:35:00-07:00 9054 2075 810 312 201 394 2 2265 6777 2965 1699 4440 0
211 2023-05-22 17:35:00-07:00 2023-05-22 17:35:00-07:00 2023-05-22 17:40:00-07:00 8833 2150 808 313 202 393 2 2264 7674 2965 1091 4671 0

212 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-05-22 00:00:00-07:00 2023-05-22 00:00:00-07:00 2023-05-22 00:05:00-07:00 23091.0
1 2023-05-22 00:05:00-07:00 2023-05-22 00:05:00-07:00 2023-05-22 00:10:00-07:00 23167.0
2 2023-05-22 00:10:00-07:00 2023-05-22 00:10:00-07:00 2023-05-22 00:15:00-07:00 23141.0
3 2023-05-22 00:15:00-07:00 2023-05-22 00:15:00-07:00 2023-05-22 00:20:00-07:00 23056.0
4 2023-05-22 00:20:00-07:00 2023-05-22 00:20:00-07:00 2023-05-22 00:25:00-07:00 22965.0
... ... ... ... ...
207 2023-05-22 17:15:00-07:00 2023-05-22 17:15:00-07:00 2023-05-22 17:20:00-07:00 28391.0
208 2023-05-22 17:20:00-07:00 2023-05-22 17:20:00-07:00 2023-05-22 17:25:00-07:00 28584.0
209 2023-05-22 17:25:00-07:00 2023-05-22 17:25:00-07:00 2023-05-22 17:30:00-07:00 28826.0
210 2023-05-22 17:30:00-07:00 2023-05-22 17:30:00-07:00 2023-05-22 17:35:00-07:00 28967.0
211 2023-05-22 17:35:00-07:00 2023-05-22 17:35:00-07:00 2023-05-22 17:40:00-07:00 29096.0

212 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-05-22 00:00:00-04:00 2023-05-22 00:00:00-04:00 2023-05-22 01:00:00-04:00 2023-05-22 00:00:00-04:00 12928
1 2023-05-22 01:00:00-04:00 2023-05-22 01:00:00-04:00 2023-05-22 02:00:00-04:00 2023-05-22 00:00:00-04:00 12381
2 2023-05-22 02:00:00-04:00 2023-05-22 02:00:00-04:00 2023-05-22 03:00:00-04:00 2023-05-22 00:00:00-04:00 12078
3 2023-05-22 03:00:00-04:00 2023-05-22 03:00:00-04:00 2023-05-22 04:00:00-04:00 2023-05-22 00:00:00-04:00 11961
4 2023-05-22 04:00:00-04:00 2023-05-22 04:00:00-04:00 2023-05-22 05:00:00-04:00 2023-05-22 00:00:00-04:00 12138
... ... ... ... ... ...
139 2023-05-27 19:00:00-04:00 2023-05-27 19:00:00-04:00 2023-05-27 20:00:00-04:00 2023-05-22 00:00:00-04:00 15144
140 2023-05-27 20:00:00-04:00 2023-05-27 20:00:00-04:00 2023-05-27 21:00:00-04:00 2023-05-22 00:00:00-04:00 15097
141 2023-05-27 21:00:00-04:00 2023-05-27 21:00:00-04:00 2023-05-27 22:00:00-04:00 2023-05-22 00:00:00-04:00 14891
142 2023-05-27 22:00:00-04:00 2023-05-27 22:00:00-04:00 2023-05-27 23:00:00-04:00 2023-05-22 00:00:00-04:00 14276
143 2023-05-27 23:00:00-04:00 2023-05-27 23:00:00-04:00 2023-05-28 00:00:00-04:00 2023-05-22 00:00:00-04:00 13531

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