This interface allows users to access NOAA data directly from MATLAB. Quantative and climate risk analysts can use the available data to make investment decisions based on climate data and weather patterns.
Users can retrieve NOAA data directly from MATLAB. NOAA documentation for Datasets, Data Categories, Data Types, Location Categories, Locations, Stations and Data can be found here:
https://www.ncdc.noaa.gov/cdo-web/webservices/v2
A valid NOAA connection is required for all requests. Users can retrieve information required to make subsequent data requests.
n = noaa("myNOAAToken");
d = datasets(n);
d = datasets(n,"GSOY");
d = datacategories(n);
d = datacategories(n,"ANNAGR");
d = datacategories(n,[],"location","CITY:US390029","locationid","FIPS:37","limit",100);
d = datatypes(n);
d = datatypes(n,"ACMH");
d = datatypes(n,[],"datacategoryid","TEMP","limit",10);
d = datatypes(n,[],"stationid","COOP:310090");
d = locationcategories(n);
d = locationcategories(n,"CLIM_REG");
d = locationcategories(n,[],"startdate","1970-01-01");
d = locations(n);
d = locations(n,"FIPS:37");
d = locations(n,[],"datasetid","GHCND");
d = locations(n,[],"locationcategoryid","ST","limit",52);
d = locations(n,[],"locationcategoryid","CITY","sortfield","name","sortorder","desc");
d = stations(n)
d = stations(n,"COOP:010008")
d = stations(n,[],"locationid","FIPS:37")
d = stations(n,[],"datatypeid","EMNT","datatypeid","EMXT","datatypeid","HTMN")
d = getdata(n,"GHCND",datetime("2010-05-01"),datetime("2010-05-10"),"locationid","ZIP:28801")
annualTemperatureData = [];
for y = 2015:2022
annualTemperatureData = [annualTemperatureData;getdata(n,"GHCND", ...
datetime(strcat(num2str(y),"-01-01")), ...
datetime(strcat(num2str(y),"-12-31")), ...
stationid = "GHCND:SPE00119783", ...
datatypeid = "TAVG", ...
locationid = "FIPS:SP", ...
limit = 1000, ...
units = "metric")];
end
Temperature = annualTemperatureData.value;
Date = datetime(annualTemperatureData.date);
T = timetable(Date, Temperature);
head(T)
The license is available in the LICENSE.TXT file in this GitHub repository.
Community Support
MATLAB Central
Copyright 2022 The MathWorks, Inc.