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-12-27 00:00:00-08:00 2023-12-27 00:00:00-08:00 2023-12-27 00:05:00-08:00 -59 874 812 285 194 220 0 2234 10123 1894 -5 5755 0
1 2023-12-27 00:05:00-08:00 2023-12-27 00:05:00-08:00 2023-12-27 00:10:00-08:00 -58 833 813 286 195 215 0 2232 10453 1894 82 5468 0
2 2023-12-27 00:10:00-08:00 2023-12-27 00:10:00-08:00 2023-12-27 00:15:00-08:00 -58 819 812 285 196 217 0 2232 10713 1937 79 5176 0
3 2023-12-27 00:15:00-08:00 2023-12-27 00:15:00-08:00 2023-12-27 00:20:00-08:00 -59 820 812 286 196 217 0 2232 10791 1936 -75 5152 0
4 2023-12-27 00:20:00-08:00 2023-12-27 00:20:00-08:00 2023-12-27 00:25:00-08:00 -59 833 813 286 196 216 0 2232 10788 1888 -199 5249 0
... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ...
146 2023-12-27 12:10:00-08:00 2023-12-27 12:10:00-08:00 2023-12-27 12:15:00-08:00 9470 707 802 295 192 212 0 2238 7562 1107 -2554 2761 0
147 2023-12-27 12:15:00-08:00 2023-12-27 12:15:00-08:00 2023-12-27 12:20:00-08:00 9329 717 801 295 192 211 0 2238 7710 1179 -2621 2834 0
148 2023-12-27 12:20:00-08:00 2023-12-27 12:20:00-08:00 2023-12-27 12:25:00-08:00 9520 722 801 294 192 211 0 2238 7817 1247 -2918 2877 0
149 2023-12-27 12:25:00-08:00 2023-12-27 12:25:00-08:00 2023-12-27 12:30:00-08:00 9735 730 801 294 193 211 0 2237 7852 1165 -3138 3003 0
150 2023-12-27 12:30:00-08:00 2023-12-27 12:30:00-08:00 2023-12-27 12:35:00-08:00 9807 759 801 295 193 211 0 2238 7862 1084 -3131 3087 0

151 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-12-27 00:00:00-08:00 2023-12-27 00:00:00-08:00 2023-12-27 00:05:00-08:00 21845.0
1 2023-12-27 00:05:00-08:00 2023-12-27 00:05:00-08:00 2023-12-27 00:10:00-08:00 21917.0
2 2023-12-27 00:10:00-08:00 2023-12-27 00:10:00-08:00 2023-12-27 00:15:00-08:00 21914.0
3 2023-12-27 00:15:00-08:00 2023-12-27 00:15:00-08:00 2023-12-27 00:20:00-08:00 21811.0
4 2023-12-27 00:20:00-08:00 2023-12-27 00:20:00-08:00 2023-12-27 00:25:00-08:00 21744.0
... ... ... ... ...
146 2023-12-27 12:10:00-08:00 2023-12-27 12:10:00-08:00 2023-12-27 12:15:00-08:00 23093.0
147 2023-12-27 12:15:00-08:00 2023-12-27 12:15:00-08:00 2023-12-27 12:20:00-08:00 23132.0
148 2023-12-27 12:20:00-08:00 2023-12-27 12:20:00-08:00 2023-12-27 12:25:00-08:00 23221.0
149 2023-12-27 12:25:00-08:00 2023-12-27 12:25:00-08:00 2023-12-27 12:30:00-08:00 23307.0
150 2023-12-27 12:30:00-08:00 2023-12-27 12:30:00-08:00 2023-12-27 12:35:00-08:00 23373.0

151 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-12-27 00:00:00-05:00 2023-12-27 00:00:00-05:00 2023-12-27 01:00:00-05:00 2023-12-27 00:00:00-05:00 14170
1 2023-12-27 01:00:00-05:00 2023-12-27 01:00:00-05:00 2023-12-27 02:00:00-05:00 2023-12-27 00:00:00-05:00 13714
2 2023-12-27 02:00:00-05:00 2023-12-27 02:00:00-05:00 2023-12-27 03:00:00-05:00 2023-12-27 00:00:00-05:00 13470
3 2023-12-27 03:00:00-05:00 2023-12-27 03:00:00-05:00 2023-12-27 04:00:00-05:00 2023-12-27 00:00:00-05:00 13382
4 2023-12-27 04:00:00-05:00 2023-12-27 04:00:00-05:00 2023-12-27 05:00:00-05:00 2023-12-27 00:00:00-05:00 13545
... ... ... ... ... ...
139 2024-01-01 19:00:00-05:00 2024-01-01 19:00:00-05:00 2024-01-01 20:00:00-05:00 2023-12-27 00:00:00-05:00 18465
140 2024-01-01 20:00:00-05:00 2024-01-01 20:00:00-05:00 2024-01-01 21:00:00-05:00 2023-12-27 00:00:00-05:00 18124
141 2024-01-01 21:00:00-05:00 2024-01-01 21:00:00-05:00 2024-01-01 22:00:00-05:00 2023-12-27 00:00:00-05:00 17556
142 2024-01-01 22:00:00-05:00 2024-01-01 22:00:00-05:00 2024-01-01 23:00:00-05:00 2023-12-27 00:00:00-05:00 16753
143 2024-01-01 23:00:00-05:00 2024-01-01 23:00:00-05:00 2024-01-02 00:00:00-05:00 2023-12-27 00:00:00-05:00 15938

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