m4rz910 / NYISOToolkit

Access data, statistics, and visualizations for New York's electricity grid.
MIT License
55 stars 3 forks source link

Ability to query today's data #29

Open reriley opened 3 years ago

reriley commented 3 years ago

It would be really handy to be able to query today's data up to the present time for near real-time analysis.

m4rz910 commented 2 years ago

hey @reriley, sorry I didn't see this until now - almost one year later :( You can achieve this already by passing True to the 'redownload' and 'reconstruct' arguments to NYISOData (see below). From one perspective it inefficiently redownloads the files it already has from the beginning of the year until the latest day, but I built it like that in case the NYISO retroactively modifies past files and we want to pull those instead of appending to an internal database.

df = NYISOData(dataset='load_h', year=2022, redownload=True, reconstruct=True, create_csv=False).df