We’ve just released a new version of rnoaa with A LOT of changes. Check outthe release notesfor a complete list of changes.
We’ll highlight a few things in this post:
-
New data sources in the package
-
NCDC units added to the output of
ncdc()
Links:
Installation Install the lastest from CRAN
1 |
|
Some binaries are not up yet on CRAN – you can also install from GitHub:
1 |
|
Load rnoaa
1 |
|
New data sources
There are three new data sources in the package. There’s more in the works. Youcan keep track of new data sources in the package via the newdatasource
label in the issue tracker.
Blended Sea Winds
Blended Sea Winds contains
globally gridded, high-resolution ocean surface vector winds and wind stresses on aglobal 0.25° grid, and multiple time resolutions of six-hourly, daily, monthly,and 11-year (1995-2005) climatological monthlies.
Data is available from July 9, 1987 to present.
Check out the link above for more information on the data.
In a brief example of getting the data in rnoaa
, we get data for the dateOctober 1st, 2017, and we get daily resolution. The data is provided innetcdf format.
1 |
|
Local Climatological Data Local Climatological Data consists of
hourly, daily, and monthly summaries for approximately 1,600 U.S. locations.
In some examples, we get data for a single station for two different years.The data is returned in data.frame format
1 |
|
Storm Events Database The Storm Events Database contains records used to create theofficial NOAA Storm Data publication.
Data contains:
-
occurrence of storms, and other phenomena of sufficient intensity to cause loss of life,injuries, etc.
-
rare, unusual weather phenomena that generate media attention, such as snow flurries inSouth Florida or the San Diego coastal area
-
other significant meteorological events, such as record max. or min. temperatures orprecipitation that occur in connection with another event
Data is available from January 1950 to August 2018.
There are two functions associated with this data: se_files()
and se_data()
.
se_files()
gives a data.frame of the details of each storm file, andse_data()
gets the data for a particular year and data type.
In a brief example, here we get data for year of 1988 and type “fatalities”
1 |
|
NCDC data gets units
The main function for getting NCDC data via their API – ncdc()
– gains the add_units
parameter(boolean) to toggle adding units to the output data.frame.
The default is add_units=FALSE
– meaning that by default the results from the functionDO NOT CHANGE.
However, if add_units=TRUE
we match by dataset id and data type id and return units ifwe have them. The way we do this is by manually curating lists of metadata inside the package.See any of the files in the source codethat start with units-
.
Do be in touch if you see a problem with these units!
Note that we haven’t filled out all units for all datasets. If you’d like to help it wouldbe much appreciated.
We should also note that ncdc()
now returns tibbles in the data slot. This way if youget back a huge number of rows it won’t print to console for a long time. You can revertthe tibbles back to data.frames just by using as.data.frame
or similar.
Bug fixes! There’s a huge list of bug fixes (and fixes listed in Minor Improvements ) in this version,and many people to thank for reporting them:
Get in touch
Get in touch if you have any rnoaa
questions in theissue tracker or therOpenSci discussion forum.
Related