- NYISO Weather Load Data: https://www.nyiso.com/load-data
- websave: https://www.mathworks.com/help/matlab/ref/websave.html
- unzip: https://www.mathworks.com/help/matlab/ref/unzip.html
Does anyone have the codes from the webinar video "Using Machine Learning and Deep Learning for Energy Forecasting with MATLAB" ?
11 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi All,
I was able to replicate the load-related code of this video. However, the presenter does not show how the weather data was retrieved.
Only the load command is shown in the video.
Can anyone share the weather acquisition part of the webinar, please?
The link to the 2020 webinar is: https://www.mathworks.com/videos/using-machine-learning-and-deep-learning-for-energy-forecasting-with-matlab-1598543886039.html
Thank you in advance/
0 Kommentare
Antworten (1)
Prasanna
am 28 Okt. 2024 um 5:33
Hi Jorge,
The weather data acquisition for the above webinar is done from the New York ISO dataset. To retrieve historical weather load real-time data from the New York ISO, the following MATLAB code can be used. This code downloads the data, unzips it, and saves it for further processing.
% Create a directory for storing the downloaded data
if ~exist('.\Data\Sample\','dir')
mkdir('.\Data\Sample\')
end
% define the date range for data retrieval
dates = (datetime('2005-Feb-01'):calmonths(1):datetime('2006-Jan-01'));
% use parfor to download files in parallel
parfor i = 1:length(dates)
filename = [datestr(dates(i),'yyyymmdd') 'pal_csv.zip'];
url = ['http://mis.nyiso.com/public/csv/pal/' filename];
file_destination = ['Data\Sample\HistLoad' datestr(dates(i), 'yyyymmdd') '.csv.zip'];
fprintf('Downloading %d of %d. %s \n', i, length(dates), filename)
websave(file_destination, url);
end
% create a directory for unzipped files
if ~exist('.\Data\Sample\HistLoad', 'dir')
mkdir('.\Data\Sample\HistLoad');
end
% unzip the downloaded files
for i = 1:length(dates)
unzip(['Data\Sample\HistLoad', datestr(dates(i),'yyyymmdd'), '.csv.zip'], 'Data\Sample\HistLoad');
end
The above code creates a target directory, downloads the required files from the New York ISO dataset, and unzips the files into a specified directory for further analysis. For more information regarding the dataset, and the functions used in the script, refer the following resources:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Weather and Atmospheric Science finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!