- 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 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (1)
Prasanna
il 28 Ott 2024 alle 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 Commenti
Vedere anche
Categorie
Scopri di più su Weather and Atmospheric Science in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!