- 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 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Prasanna
2024-10-28,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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Weather and Atmospheric Science 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!