LMP Data Examples#

Walkthrough on how to query LMP data from SPP using gridstatus#

import gridstatus
import pandas as pd
iso = gridstatus.SPP()

Available Markets#

SPP has 2 LMP Markets you can query:

iso.markets
[<Markets.REAL_TIME_5_MIN: 'REAL_TIME_5_MIN'>,
 <Markets.DAY_AHEAD_HOURLY: 'DAY_AHEAD_HOURLY'>]

Available Location Types#

The following locations types are available:

iso.location_types
['HUB', 'INTERFACE', 'SETTLEMENT_LOCATION']

HUB and INTERFACE will filter for those location types, but when choosing SETTLEMENT_LOCATION, all available locations and location types will be returned and labeled correctly.

Query Latest Real-Time LMPs by Hub#

By default, the LMP methods will get data for the Hub nodes in SPP:

df = iso.get_lmp(date="latest", market="REAL_TIME_5_MIN")
df
Time Market Location Location Type LMP Energy Congestion Loss
0 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN SPPNORTH_HUB Hub -32.8155 15.8662 -47.8942 -0.7875
1 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN SPPSOUTH_HUB Hub 16.9609 15.8661 1.4744 -0.3796

Query Latest Real-Time LMPs by Settlement Location#

df = iso.get_lmp(
    date="latest", market="REAL_TIME_5_MIN", location_type="SETTLEMENT_LOCATION"
)
df.head(5)
Time Market Location Location Type LMP Energy Congestion Loss
0 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN AEC Settlement Location 69.4670 15.8661 53.0336 0.5673
1 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN AECC_CSWS Settlement Location 82.9840 15.8662 66.2379 0.8799
2 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN AECC_ELKINS Settlement Location 109.7306 15.8661 92.9510 0.9135
3 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN AECC_FITZHUGH Settlement Location 78.6462 15.8661 61.5857 1.1944
4 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN AECC_FLTCREEK Settlement Location 124.9584 15.8662 108.5484 0.5438

When requesting Settlement Locations, locations which are Interfaces and Hubs are marked as such.

df["Location Type"].unique().tolist()
['Settlement Location', 'Interface', 'Hub']

Query Latest Real-Time LMPs by Interface#

df = iso.get_lmp(date="latest", market="REAL_TIME_5_MIN", location_type="Interface")
df.head(5)
Time Market Location Location Type LMP Energy Congestion Loss
0 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN AECI Interface 79.5027 15.8661 63.1488 0.4878
1 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN ALTW Interface 43.7429 15.8662 27.6867 0.1900
2 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN AMRN Interface 43.7429 15.8662 27.6867 0.1900
3 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN BLKW Interface -23.2882 15.8661 -38.5089 -0.6454
4 2022-12-27 22:20:00-06:00 REAL_TIME_5_MIN CLEC Interface 43.7429 15.8662 27.6867 0.1900

Query Today’s Real-Time LMPs by Interface#

df = iso.get_lmp(date="today", market="REAL_TIME_5_MIN", location_type="Interface")
df.head(5)
Time Market Location Location Type LMP Energy Congestion Loss
0 2022-12-27 00:00:00-06:00 REAL_TIME_5_MIN AECI Interface 62.3457 18.1608 43.5727 0.6122
1 2022-12-27 00:00:00-06:00 REAL_TIME_5_MIN ALTW Interface 50.6113 18.1609 32.4184 0.0320
2 2022-12-27 00:00:00-06:00 REAL_TIME_5_MIN AMRN Interface 50.6113 18.1609 32.4184 0.0320
3 2022-12-27 00:00:00-06:00 REAL_TIME_5_MIN BLKW Interface -25.3934 18.1608 -42.6874 -0.8668
4 2022-12-27 00:00:00-06:00 REAL_TIME_5_MIN CLEC Interface 50.6113 18.1609 32.4184 0.0320

Query Day-Ahead LMPs by Hub#

Return today’s day-ahead hourly data by hub:

df = iso.get_lmp(date="today", market="DAY_AHEAD_HOURLY", location_type="Hub")
df.head(5)
Time Market Location Location Type LMP Energy Congestion Loss
0 2022-12-28 00:55:00-06:00 DAY_AHEAD_HOURLY SPPNORTH_HUB Hub -2.0650 18.3069 -19.4408 -0.9311
1 2022-12-28 00:55:00-06:00 DAY_AHEAD_HOURLY SPPSOUTH_HUB Hub 29.2452 18.3069 11.1502 -0.2119
2 2022-12-28 01:55:00-06:00 DAY_AHEAD_HOURLY SPPNORTH_HUB Hub -4.3129 17.8149 -21.2129 -0.9149
3 2022-12-28 01:55:00-06:00 DAY_AHEAD_HOURLY SPPSOUTH_HUB Hub 28.6881 17.8150 11.0831 -0.2100
4 2022-12-28 02:55:00-06:00 DAY_AHEAD_HOURLY SPPNORTH_HUB Hub -4.6564 16.6584 -20.4966 -0.8182

Query Day-Ahead LMPs by Interface#

Return the latest day-ahead hourly data by interface:

df = iso.get_lmp(date="today", market="DAY_AHEAD_HOURLY", location_type="Interface")
df.head(5)
Time Market Location Location Type LMP Energy Congestion Loss
0 2022-12-28 00:55:00-06:00 DAY_AHEAD_HOURLY AECI Interface 68.3391 18.3069 49.3985 0.6337
1 2022-12-28 00:55:00-06:00 DAY_AHEAD_HOURLY ALTW Interface 56.8415 18.3070 38.0957 0.4388
2 2022-12-28 00:55:00-06:00 DAY_AHEAD_HOURLY AMRN Interface 56.8415 18.3070 38.0957 0.4388
3 2022-12-28 00:55:00-06:00 DAY_AHEAD_HOURLY BLKW Interface -12.2775 18.3069 -29.8699 -0.7145
4 2022-12-28 00:55:00-06:00 DAY_AHEAD_HOURLY CLEC Interface 56.8415 18.3070 38.0957 0.4388