API to access energy data
Project description
Install — Getting Started — Method Availability — Pricing Data — Feedback
isodata
provides standardized API to access energy data from the major Independent System Operators (ISOs) in the United States.
Install
isodata
supports python 3.7+. Install with pip
python -m pip install isodata
Getting Started
First, we can see all of the ISOs that are supported
>>> import isodata
>>> isodata.list_isos()
Name Id
0 California ISO caiso
1 Electric Reliability Council of Texas ercot
2 New York ISO nyiso
3 Southwest Power Pool spp
4 PJM pjm
5 Midcontinent ISO miso
6 ISO New England isone
Next, we can select an ISO we want to use
>>> iso = isodata.get_iso('caiso')
>>> caiso = iso()
All ISOs have the same API. Here is how we can get the fuel mix
>>> caiso.get_latest_fuel_mix()
ISO: California ISO
Total Production: 43104 MW
Time: 2022-08-03 18:25:00-07:00
+-------------+-------+-----------+
| Fuel | MW | Percent |
|-------------+-------+-----------|
| Natural Gas | 19868 | 46.1 |
| Solar | 5388 | 12.5 |
| Imports | 4997 | 11.6 |
| Wind | 3887 | 9 |
| Large Hydro | 3312 | 7.7 |
| Nuclear | 2255 | 5.2 |
| Batteries | 1709 | 4 |
| Geothermal | 886 | 2.1 |
| Biomass | 344 | 0.8 |
| Small hydro | 234 | 0.5 |
| Biogas | 208 | 0.5 |
| Coal | 16 | 0 |
| Other | 0 | 0 |
+-------------+-------+-----------+
or the energy demand throughout the current day as a Pandas DataFrame
>>> iso.get_demand_today()
Time Demand
0 2022-08-03 00:00:00-07:00 30076.0
1 2022-08-03 00:05:00-07:00 29966.0
2 2022-08-03 00:10:00-07:00 29893.0
3 2022-08-03 00:15:00-07:00 29730.0
4 2022-08-03 00:20:00-07:00 29600.0
.. ... ...
219 2022-08-03 18:15:00-07:00 41733.0
220 2022-08-03 18:20:00-07:00 41690.0
221 2022-08-03 18:25:00-07:00 41718.0
222 2022-08-03 18:30:00-07:00 41657.0
223 2022-08-03 18:35:00-07:00 41605.0
[224 rows x 2 columns]
we can get today's supply in the same way
>>> iso.get_supply_today()
Time Supply
0 2022-08-03 00:00:00-07:00 31454
1 2022-08-03 00:05:00-07:00 31366
2 2022-08-03 00:10:00-07:00 30985
3 2022-08-03 00:15:00-07:00 30821
4 2022-08-03 00:20:00-07:00 30667
.. ... ...
220 2022-08-03 18:20:00-07:00 43096
221 2022-08-03 18:25:00-07:00 43104
222 2022-08-03 18:30:00-07:00 43013
223 2022-08-03 18:35:00-07:00 42885
224 2022-08-03 18:40:00-07:00 42875
[225 rows x 2 columns]
to get data for a specific day, use the historical method calls. For example,
>>> iso.get_historical_demand("Jan 1, 2020")
Time Demand
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
.. ... ...
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 2020-01-01 00:00:00-08:00 20025
[289 rows x 2 columns]
The best part is these APIs work across all the supported ISOs
Method Availability
Here is the current status of availability of each method for each ISO
New York ISO | California ISO | Electric Reliability Council of Texas | ISO New England | Midcontinent ISO | Southwest Power Pool | PJM | |
---|---|---|---|---|---|---|---|
get_latest_status |
❌ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |
get_latest_fuel_mix |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
get_fuel_mix_today |
✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
get_fuel_mix_yesterday |
✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
get_historical_fuel_mix |
✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
get_latest_demand |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
get_demand_today |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
get_demand_yesterday |
✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
get_historical_demand |
✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
get_latest_supply |
✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ |
get_supply_today |
✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ |
get_supply_yesterday |
✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
get_historical_supply |
✅ | ✅ | ❌ | ✅ | ❌ | ❌ | ✅ |
Pricing Data
We are investigating adding pricing data to isodata
. Currently, day ahead prices are supported for CAISO. If this would be useful, please let us know by filing an issue and describing your use case.
>>> import isodata
>>> iso = isodata.CAISO()
>>> iso.get_day_ahead_prices(start_date="may 2, 2022",
num_days=1,
nodes=["TH_NP15_GEN-APND"])
LMP_TYPE pnode lmp congestion energy losses MGHG
interval start
2022-05-02 00:00:00-07:00 TH_NP15_GEN-APND 70.47015 0.00000 71.55783 -1.08768 0.0
2022-05-02 01:00:00-07:00 TH_NP15_GEN-APND 68.73617 0.00000 69.86093 -1.12476 0.0
2022-05-02 02:00:00-07:00 TH_NP15_GEN-APND 67.58898 0.00000 68.82788 -1.23890 0.0
2022-05-02 03:00:00-07:00 TH_NP15_GEN-APND 68.51088 0.00000 69.64611 -1.13523 0.0
2022-05-02 04:00:00-07:00 TH_NP15_GEN-APND 74.25415 0.00000 75.56136 -1.30721 0.0
2022-05-02 05:00:00-07:00 TH_NP15_GEN-APND 77.86464 0.00000 79.62434 -1.75970 0.0
2022-05-02 06:00:00-07:00 TH_NP15_GEN-APND 80.71256 0.00000 82.11675 -1.40420 0.0
2022-05-02 07:00:00-07:00 TH_NP15_GEN-APND 66.68011 0.00000 67.15016 -0.47005 0.0
2022-05-02 08:00:00-07:00 TH_NP15_GEN-APND 56.40186 7.88764 48.52878 -0.01456 0.0
2022-05-02 09:00:00-07:00 TH_NP15_GEN-APND 48.69254 9.08351 39.49055 0.11847 0.0
2022-05-02 10:00:00-07:00 TH_NP15_GEN-APND 41.55114 8.09662 33.41776 0.03676 0.0
2022-05-02 11:00:00-07:00 TH_NP15_GEN-APND 38.59000 10.35001 28.20333 0.03666 0.0
2022-05-02 12:00:00-07:00 TH_NP15_GEN-APND 36.89000 8.04264 28.82718 0.02018 0.0
2022-05-02 13:00:00-07:00 TH_NP15_GEN-APND 38.34660 8.08619 30.11885 0.14156 0.0
2022-05-02 14:00:00-07:00 TH_NP15_GEN-APND 40.00000 7.97681 31.85753 0.16566 0.0
2022-05-02 15:00:00-07:00 TH_NP15_GEN-APND 40.00000 6.59597 33.42743 -0.02340 0.0
2022-05-02 16:00:00-07:00 TH_NP15_GEN-APND 45.31324 8.08926 36.76443 0.45956 0.0
2022-05-02 17:00:00-07:00 TH_NP15_GEN-APND 59.39957 2.43405 56.88020 0.08532 0.0
2022-05-02 18:00:00-07:00 TH_NP15_GEN-APND 81.43412 0.00000 83.73688 -2.30276 0.0
2022-05-02 19:00:00-07:00 TH_NP15_GEN-APND 100.77406 0.00000 104.60251 -3.82845 0.0
2022-05-02 20:00:00-07:00 TH_NP15_GEN-APND 102.88135 0.00000 105.97585 -3.09449 0.0
2022-05-02 21:00:00-07:00 TH_NP15_GEN-APND 91.42214 0.00000 94.18167 -2.75952 0.0
2022-05-02 22:00:00-07:00 TH_NP15_GEN-APND 81.84891 0.00000 83.61315 -1.76424 0.0
2022-05-02 23:00:00-07:00 TH_NP15_GEN-APND 72.61741 0.00000 73.53662 -0.91921 0.0
Feedback Welcome
isodata
is under active development. If there is any particular data you would like access to, let us know by posting an issue or emailing kmax12@gmail.com.
Related projects
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file isodata-0.4.0.tar.gz
.
File metadata
- Download URL: isodata-0.4.0.tar.gz
- Upload date:
- Size: 17.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3b71d962315ef2b1fa553cd24279eedced4ae21d37a8a7caf16ebca1eb2955e |
|
MD5 | 98ac82e173a63a689fe03c534aa4b0c9 |
|
BLAKE2b-256 | 0487f13e7f01ec58d0193e00417785f3b785e990d8442041335fb6ac1a90e50d |
File details
Details for the file isodata-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: isodata-0.4.0-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.7.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2308f4975e9270a9fb680014a4f57bced950c983fb7cba23a894c163ae225755 |
|
MD5 | 68d82f198012dbc984e6670610b5704c |
|
BLAKE2b-256 | c243eb6584c6f76e63923dd37516b57e6690dd39d243ad29578dff48bed35fe3 |