- 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!