'NOAA' Weather Data from R

Client for many 'NOAA' data sources including the 'NCDC' climate 'API' at < https://www.ncdc.noaa.gov/cdo-web/webservices/v2>, with functions for each of the 'API' 'endpoints': data, data categories, data sets, data types, locations, location categories, and stations. In addition, we have an interface for 'NOAA' sea ice data, the 'NOAA' severe weather inventory, 'NOAA' Historical Observing 'Metadata' Repository ('HOMR') data, 'NOAA' storm data via 'IBTrACS', tornado data via the 'NOAA' storm prediction center, and more.

cranchecks BuildStatus Buildstatus codecov.io rstudio mirrordownloads cranversion

rnoaa is an R interface to many NOAA data sources. We don’t cover all of them, but we include many commonly used sources, and add we are always adding new sources. We focus on easy to use interfaces for getting NOAA data, and giving back data in easy to use formats downstream. We currently don’t do much in the way of plots or analysis.

Data sources in rnoaa


There is a tutorial on the rOpenSci website, and there are many tutorials in the package itself, available in your R session, or on CRAN. The tutorials:

  • NOAA Buoy vignette
  • NOAA National Climatic Data Center (NCDC) vignette (examples)
  • NOAA NCDC attributes vignette
  • NOAA NCDC workflow vignette
  • Sea ice vignette
  • Severe Weather Data Inventory (SWDI) vignette
  • Historical Observing Metadata Repository (HOMR) vignette
  • Storms (IBTrACS) vignette

netcdf data

Functions to work with buoy data use netcdf files. You’ll need the ncdf package for those functions, and those only. ncdf is in Suggests in this package, meaning you only need ncdf if you are using the buoy functions. You’ll get an informative error telling you to install ncdf if you don’t have it and you try to use the buoy functions. Installation of ncdf should be straightforward on Mac and Windows, but on Linux you may have issues. See http://cran.r-project.org/web/packages/ncdf/INSTALL

NOAA NCDC Datasets

There are many NOAA NCDC datasets. All data sources work, except NEXRAD2 and NEXRAD3, for an unknown reason. This relates to ncdc_*() functions only.

Dataset Description Start Date End Date Data Coverage
GHCND Daily Summaries 1763-01-01 2018-12-09 1.00
GSOM Global Summary of the Month 1763-01-01 2018-11-01 1.00
GSOY Global Summary of the Year 1763-01-01 2018-01-01 1.00
NEXRAD2 Weather Radar (Level II) 1991-06-05 2018-12-10 0.95
NEXRAD3 Weather Radar (Level III) 1994-05-20 2018-12-07 0.95
NORMAL_ANN Normals Annual/Seasonal 2010-01-01 2010-01-01 1.00
NORMAL_DLY Normals Daily 2010-01-01 2010-12-31 1.00
NORMAL_HLY Normals Hourly 2010-01-01 2010-12-31 1.00
NORMAL_MLY Normals Monthly 2010-01-01 2010-12-01 1.00
PRECIP_15 Precipitation 15 Minute 1970-05-12 2014-01-01 0.25
PRECIP_HLY Precipitation Hourly 1900-01-01 2014-01-01 1.00

NOAA NCDC Attributes

Each NOAA dataset has a different set of attributes that you can potentially get back in your search. See http://www.ncdc.noaa.gov/cdo-web/datasets for detailed info on each dataset. We provide some information on the attributes in this package; see the vignette for attributes to find out more

NCDC Authentication

You’ll need an API key to use the NOAA NCDC functions (those starting with ncdc*()) in this package (essentially a password). Go to http://www.ncdc.noaa.gov/cdo-web/token to get one. You can’t use this package without an API key.

Once you obtain a key, there are two ways to use it.

  1. Pass it inline with each function call (somewhat cumbersome)
ncdc(datasetid = 'PRECIP_HLY', locationid = 'ZIP:28801', datatypeid = 'HPCP', limit = 5, token =  "YOUR_TOKEN")
  1. Alternatively, you might find it easier to set this as an option, either by adding this line to the top of a script or somewhere in your .rprofile
options(noaakey = "KEY_EMAILED_TO_YOU")
  1. You can always store in permamently in your .Rprofile file.



You’ll need GDAL installed first. You may want to use GDAL >= 0.9-1 since that version or later can read TopoJSON format files as well, which aren’t required here, but may be useful. Install GDAL:

Then when you install the R package rgdal (rgeos also requires GDAL), you’ll most likely need to specify where you’re gdal-config file is on your machine, as well as a few other things. I have an OSX Mavericks machine, and this works for me (there’s no binary for Mavericks, so install the source version):

install.packages("http://cran.r-project.org/src/contrib/rgdal_0.9-1.tar.gz", repos = NULL, type="source", configure.args = "--with-gdal-config=/Library/Frameworks/GDAL.framework/Versions/1.10/unix/bin/gdal-config --with-proj-include=/Library/Frameworks/PROJ.framework/unix/include --with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib")

The rest of the installation should be easy. If not, let us know.

Stable version from CRAN


or development version from GitHub


Load rnoaa


NCDC v2 API data

Fetch list of city locations in descending order

ncdc_locs(locationcategoryid='CITY', sortfield='name', sortorder='desc')
#> $meta
#> $meta$totalCount
#> [1] 1987
#> $meta$pageCount
#> [1] 25
#> $meta$offset
#> [1] 1
#> $data
#>       mindate    maxdate                  name datacoverage            id
#> 1  1892-08-01 2018-10-31            Zwolle, NL       1.0000 CITY:NL000012
#> 2  1901-01-01 2018-12-07            Zurich, SZ       1.0000 CITY:SZ000007
#> 3  1957-07-01 2018-12-07         Zonguldak, TU       1.0000 CITY:TU000057
#> 4  1906-01-01 2018-12-07            Zinder, NG       0.9025 CITY:NG000004
#> 5  1973-01-01 2018-12-07        Ziguinchor, SG       1.0000 CITY:SG000004
#> 6  1938-01-01 2018-12-07         Zhytomyra, UP       0.9723 CITY:UP000025
#> 7  1948-03-01 2018-12-07        Zhezkazgan, KZ       0.9302 CITY:KZ000017
#> 8  1951-01-01 2018-12-07         Zhengzhou, CH       1.0000 CITY:CH000045
#> 9  1941-01-01 2018-10-31          Zaragoza, SP       1.0000 CITY:SP000021
#> 10 1936-01-01 2009-06-17      Zaporiyhzhya, UP       1.0000 CITY:UP000024
#> 11 1957-01-01 2018-12-07          Zanzibar, TZ       0.8016 CITY:TZ000019
#> 12 1973-01-01 2018-12-07            Zanjan, IR       0.9105 CITY:IR000020
#> 13 1893-01-01 2018-12-10     Zanesville, OH US       1.0000 CITY:US390029
#> 14 1912-01-01 2017-06-19             Zahle, LE       0.9819 CITY:LE000004
#> 15 1951-01-01 2018-12-07           Zahedan, IR       0.9975 CITY:IR000019
#> 16 1860-12-01 2018-12-07            Zagreb, HR       1.0000 CITY:HR000002
#> 17 1975-08-29 2018-12-07         Zacatecas, MX       0.9306 CITY:MX000036
#> 18 1947-01-01 2018-12-07 Yuzhno-Sakhalinsk, RS       1.0000 CITY:RS000081
#> 19 1893-01-01 2018-12-10           Yuma, AZ US       1.0000 CITY:US040015
#> 20 1942-02-01 2018-12-10   Yucca Valley, CA US       1.0000 CITY:US060048
#> 21 1885-01-01 2018-12-10      Yuba City, CA US       1.0000 CITY:US060047
#> 22 1998-02-01 2018-12-07            Yozgat, TU       0.9993 CITY:TU000056
#> 23 1893-01-01 2018-12-10     Youngstown, OH US       1.0000 CITY:US390028
#> 24 1894-01-01 2018-12-10           York, PA US       1.0000 CITY:US420024
#> 25 1869-01-01 2018-12-10        Yonkers, NY US       1.0000 CITY:US360031
#> attr(,"class")
#> [1] "ncdc_locs"

Get info on a station by specifying a dataset, locationtype, location, and station

ncdc_stations(datasetid='GHCND', locationid='FIPS:12017', stationid='GHCND:USC00084289')
#> $meta
#> $data
#>   elevation    mindate    maxdate latitude                  name
#> 1      12.2 1899-02-01 2018-12-09  28.8029 INVERNESS 3 SE, FL US
#>   datacoverage                id elevationUnit longitude
#> 1            1 GHCND:USC00084289        METERS  -82.3126
#> attr(,"class")
#> [1] "ncdc_stations"

Search for data

out <- ncdc(datasetid='NORMAL_DLY', stationid='GHCND:USW00014895', datatypeid='dly-tmax-normal', startdate = '2010-05-01', enddate = '2010-05-10')

See a data.frame

head( out$data )
#> # A tibble: 6 x 5
#>   date                datatype        station           value fl_c 
#>   <chr>               <chr>           <chr>             <int> <chr>
#> 1 2010-05-01T00:00:00 DLY-TMAX-NORMAL GHCND:USW00014895   652 S    
#> 2 2010-05-02T00:00:00 DLY-TMAX-NORMAL GHCND:USW00014895   655 S    
#> 3 2010-05-03T00:00:00 DLY-TMAX-NORMAL GHCND:USW00014895   658 S    
#> 4 2010-05-04T00:00:00 DLY-TMAX-NORMAL GHCND:USW00014895   661 S    
#> 5 2010-05-05T00:00:00 DLY-TMAX-NORMAL GHCND:USW00014895   663 S    
#> 6 2010-05-06T00:00:00 DLY-TMAX-NORMAL GHCND:USW00014895   666 S

Plot data, super simple, but it’s a start

out <- ncdc(datasetid='GHCND', stationid='GHCND:USW00014895', datatypeid='PRCP', startdate = '2010-05-01', enddate = '2010-10-31', limit=500)
ncdc_plot(out, breaks="1 month", dateformat="%d/%m")

More plotting

You can pass many outputs from calls to the noaa function in to the ncdc_plot function.

out1 <- ncdc(datasetid='GHCND', stationid='GHCND:USW00014895', datatypeid='PRCP', startdate = '2010-03-01', enddate = '2010-05-31', limit=500)
out2 <- ncdc(datasetid='GHCND', stationid='GHCND:USW00014895', datatypeid='PRCP', startdate = '2010-09-01', enddate = '2010-10-31', limit=500)
ncdc_plot(out1, out2, breaks="45 days")

Get table of all datasets

#> $meta
#> $meta$offset
#> [1] 1
#> $meta$count
#> [1] 11
#> $meta$limit
#> [1] 25
#> $data
#>                     uid    mindate    maxdate                        name
#> 1  gov.noaa.ncdc:C00861 1763-01-01 2018-12-09             Daily Summaries
#> 2  gov.noaa.ncdc:C00946 1763-01-01 2018-11-01 Global Summary of the Month
#> 3  gov.noaa.ncdc:C00947 1763-01-01 2018-01-01  Global Summary of the Year
#> 4  gov.noaa.ncdc:C00345 1991-06-05 2018-12-10    Weather Radar (Level II)
#> 5  gov.noaa.ncdc:C00708 1994-05-20 2018-12-07   Weather Radar (Level III)
#> 6  gov.noaa.ncdc:C00821 2010-01-01 2010-01-01     Normals Annual/Seasonal
#> 7  gov.noaa.ncdc:C00823 2010-01-01 2010-12-31               Normals Daily
#> 8  gov.noaa.ncdc:C00824 2010-01-01 2010-12-31              Normals Hourly
#> 9  gov.noaa.ncdc:C00822 2010-01-01 2010-12-01             Normals Monthly
#> 10 gov.noaa.ncdc:C00505 1970-05-12 2014-01-01     Precipitation 15 Minute
#> 11 gov.noaa.ncdc:C00313 1900-01-01 2014-01-01        Precipitation Hourly
#>    datacoverage         id
#> 1          1.00      GHCND
#> 2          1.00       GSOM
#> 3          1.00       GSOY
#> 4          0.95    NEXRAD2
#> 5          0.95    NEXRAD3
#> 6          1.00 NORMAL_ANN
#> 7          1.00 NORMAL_DLY
#> 8          1.00 NORMAL_HLY
#> 9          1.00 NORMAL_MLY
#> 10         0.25  PRECIP_15
#> 11         1.00 PRECIP_HLY
#> attr(,"class")
#> [1] "ncdc_datasets"

Get data category data and metadata

ncdc_datacats(locationid = 'CITY:US390029')
#> $meta
#> $meta$totalCount
#> [1] 38
#> $meta$pageCount
#> [1] 25
#> $meta$offset
#> [1] 1
#> $data
#>                     name            id
#> 1    Annual Agricultural        ANNAGR
#> 2     Annual Degree Days         ANNDD
#> 3   Annual Precipitation       ANNPRCP
#> 4     Annual Temperature       ANNTEMP
#> 5    Autumn Agricultural         AUAGR
#> 6     Autumn Degree Days          AUDD
#> 7   Autumn Precipitation        AUPRCP
#> 8     Autumn Temperature        AUTEMP
#> 9               Computed          COMP
#> 10 Computed Agricultural       COMPAGR
#> 11           Degree Days            DD
#> 12      Dual-Pol Moments DUALPOLMOMENT
#> 13             Echo Tops       ECHOTOP
#> 14      Hydrometeor Type   HYDROMETEOR
#> 15            Miscellany          MISC
#> 16                 Other         OTHER
#> 17               Overlay       OVERLAY
#> 18         Precipitation          PRCP
#> 19          Reflectivity  REFLECTIVITY
#> 20    Sky cover & clouds           SKY
#> 21   Spring Agricultural         SPAGR
#> 22    Spring Degree Days          SPDD
#> 23  Spring Precipitation        SPPRCP
#> 24    Spring Temperature        SPTEMP
#> 25   Summer Agricultural         SUAGR
#> attr(,"class")
#> [1] "ncdc_datacats"

Tornado data

The function tornadoes() simply gets all the data. So the call takes a while, but once done, is fun to play with.

shp <- tornadoes()
#> OGR data source with driver: ESRI Shapefile 
#> Source: "/home/jose/.cache/rnoaa/tornadoes/torn", layer: "torn"
#> with 62520 features
#> It has 21 fields

HOMR metadata

In this example, search for metadata for a single station ID

homr(qid = 'COOP:046742')
#> $`20002078`
#> $`20002078`$id
#> [1] "20002078"
#> $`20002078`$head
#>                  preferredName latitude_dec longitude_dec precision
#> 1 PASO ROBLES MUNICIPAL AP, CA      35.6697     -120.6283   DDddddd
#>             por.beginDate por.endDate
#> 1 1949-10-05T00:00:00.000     Present
#> $`20002078`$namez
#>                         name  nameType
#> $`20002078`$identifiers
#>      idType          id
#> 1     GHCND USW00093209
#> 2   GHCNMLT USW00093209

Storm data

Get storm data for the year 2010

storm_data(year = 2010)
#> # A tibble: 2,787 x 200
#>    serial_num season   num basin sub_basin name  iso_time nature latitude
#>    <chr>       <int> <int> <chr> <chr>     <chr> <chr>    <chr>     <dbl>
#>  1 2009317S1…   2010     1 " SI" " MM"     ANJA  2009-11… " TS"      -9.5
#>  2 2009317S1…   2010     1 " SI" " MM"     ANJA  2009-11… " TS"     -10.2
#>  3 2009317S1…   2010     1 " SI" " MM"     ANJA  2009-11… " TS"     -11.1
#>  4 2009317S1…   2010     1 " SI" " MM"     ANJA  2009-11… " TS"     -11.9
#>  5 2009317S1…   2010     1 " SI" " MM"     ANJA  2009-11… " TS"     -12.5
#>  6 2009317S1…   2010     1 " SI" " MM"     ANJA  2009-11… " TS"     -12.8
#>  7 2009317S1…   2010     1 " SI" " MM"     ANJA  2009-11… " TS"     -12.9
#>  8 2009317S1…   2010     1 " SI" " MM"     ANJA  2009-11… " TS"     -12.9
#>  9 2009317S1…   2010     1 " SI" " MM"     ANJA  2009-11… " TS"     -13  
#> 10 2009317S1…   2010     1 " SI" " MM"     ANJA  2009-11… " TS"     -13.1
#> # ... with 2,777 more rows, and 191 more variables: longitude <dbl>,
#> #   wind.wmo. <dbl>, pres.wmo. <dbl>, center <chr>,
#> #   wind.wmo..percentile <dbl>, pres.wmo..percentile <dbl>,
#> #   track_type <chr>, latitude_for_mapping <dbl>,
#> #   longitude_for_mapping <dbl>, current.basin <chr>,
#> #   hurdat_atl_lat <dbl>, hurdat_atl_lon <dbl>, hurdat_atl_grade <dbl>,
#> #   hurdat_atl_wind <dbl>, hurdat_atl_pres <dbl>, td9636_lat <dbl>,

GEFS data

Get forecast for a certain variable.

res <- gefs("Total_precipitation_surface_6_Hour_Accumulation_ens", lat = 46.28125, lon = -116.2188)
#>   Total_precipitation_surface_6_Hour_Accumulation_ens lon lat ens time2
#> 1                                                0.45 244  46   0     6
#> 2                                                0.40 244  46   1     6
#> 3                                                0.18 244  46   2     6
#> 4                                                0.30 244  46   3     6
#> 5                                                0.60 244  46   4     6
#> 6                                                0.13 244  46   5     6

Argo buoys data

There are a suite of functions for Argo data, a few egs:

# Spatial search - by bounding box
argo_search("coord", box = c(-40, 35, 3, 2))
# Time based search
argo_search("coord", yearmin = 2007, yearmax = 2009)
# Data quality based search
argo_search("coord", pres_qc = "A", temp_qc = "A")
# Search on partial float id number
argo_qwmo(qwmo = 49)
# Get data
argo(dac = "meds", id = 4900881, cycle = 127, dtype = "D")

CO-OPS data

Get daily mean water level data at Fairport, OH (9063053)

coops_search(station_name = 9063053, begin_date = 20150927, end_date = 20150928,
             product = "daily_mean", datum = "stnd", time_zone = "lst")
#> $metadata
#> $metadata$id
#> [1] "9063053"
#> $metadata$name
#> [1] "Fairport"
#> $metadata$lat
#> [1] "41.7597"
#> $metadata$lon
#> [1] "-81.2811"
#> $data
#>            t       v   f
#> 1 2015-09-27 174.430 0,0
#> 2 2015-09-28 174.422 0,0



  • Please report any issues or bugs.
  • License: MIT
  • Get citation information for rnoaa in R doing citation(package = 'rnoaa')
  • Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.



rnoaa 0.8.4

US federal government shutdown

This very long US federal government shutdown has allowed time for building in nicer failure behavior and more documentation for government shutdowns. There's a number of related changes:

  • better government shutdown failure behavior for the swdi() function (#298)
  • better government shutdown failure behavior for the lcd() function (#295)
  • better failure behavior for all ncdc*() functions (#293) (#297)
  • added a package level manual file section "Where data comes from and government shutdowns"


  • swdi(): changed from downloading data with download.file to crul (#298)
  • fix arc2() tests to not have hard-coded dates (#294)

rnoaa 0.8.2


  • improvements in failing well when there's a US government shutdown for many functions that work with web REST APIs (#293) (#295)
  • fix to arc2 tests to not be sensitive to the real year that the test is run in, reported in CRAN checks and via email (#294)

rnoaa 0.8.0


  • gains function bsw() for Blended Sea Winds data (#246)
  • gains function ghcnd_read() - to read .dly files directly, e.g., files already downloaded (#223) thanks @shabbychef for the feature request
  • gains function lcd() for Local Climatological Data (#212)
  • gains functions se_data() and se_files() for the Storm Events Database (#282)
  • ghcnd() and ghcnd_search() gain a refresh parameter to refresh data for the query even if it's already cached locally. in addition, these functions now print messages to tell the user what file path the data is locally cached in, and the min and max dates when using ghcnd_search() (#269) thanks @kgmccann
  • ncdc() gains add_units parameter (boolean) to toggle adding units to the output data.frame. default is add_units=FALSE. if add_units=TRUE we match dataset id and data type id and return units if we have them. do be in touch if you see a problem with these units! ncdc() now returns tibbles in the data slot (#233) (#266) (#289) (#287)


  • spelling fixes to coops docs (#228) thanks @jsta
  • fix in ghcnd_search() to arrange data by day instead of by month (#247) thanks @asrivas3 for reporting
  • move swdi() to use xml2 and crul packages instead of XML and httr (#275)
  • added swdi() tests (#239) thanks @kevin-ht-ho
  • isd_stations_search() no longer renames lat and lon column names (#238) thanks @kevin-ht-ho
  • add codemeta keywords to description (#287)
  • replace httr with crul throughout package (#186)
  • many tests use vcr now for caching, more to do waiting on vcr being able to handle direct to disk use cases and binary files like pdfs (#284)
  • fix links in Code of Conduct


  • fixes to gefs(). was incorrectly repeating time values within ensembles when it should have repeated time values across ensembles so that each ensemble has a time value for each time period (#230) (#231) thanks for report from @lcsma and fix by @potterzot
  • fix bug in ncdc() - fix to internal function parse_ncdc(), which was failing on strsplit() call if attributes was NULL (#232) thanks for reporting @andypicke
  • fix to cpc_prcp(): URLs were changed at some point, fixes for this (#242)
  • fix to cpc_prcp(): to read .gz files correctly with gzfile instead of file (#248)
  • fix in homr() - NOAA server gives back a 200 OK response even if that's not the case - but we can check content type to see if there was likely an error (#250)
  • fix to autoplot.meteo_coverage (#258)
  • fix to buoy_stations(): was getting the wrong station ids - fixed; and use async HTTP requests to get data faster (#261) thanks @johnharley for the bug report
  • fix to ghcnd_stations(): was returning an extra empty row (#267) thanks @joeroe for the bug report
  • related to (#267), ghcnd() was giving a trailing row of NA's - fixed (#270)
  • swdi(): radius parameter doesn't work, update docs to tell users not to use it (#243)
  • ncdc() fix: fix to internal function parse_ncdc(), errored when more than 1 flag returned (#279) thanks @ghaines3 for the bug report
  • buoy fixes (#251)
  • storm_shp() fix: update to use new URL patterns (#263)
  • make swdi() fail better (#274) thanks @OrionDarley
  • fix meteo_nearby_stations() to coerce character to numeric lat and lon values (#257) thanks @mondorescue for the bug report
  • fix to meteo_nearby_stations() - internally ignored the user supplied column names for lat and lon (#286) thanks @ghaines3 for the bug report
  • fixed tornadoes() for Windows OS's: utils::untar() was failing on windows, changed to using utils::unzip() (#203)
  • fixed argo_buoy_files(): use fill=TRUE in the read.table call - was erroring on some Windows OS's (#235) thanks @jonmcalder for reporting

rnoaa 0.7.0

Note that some NOAA datasets have changed names:

  • GHCNDMS is now GSOM (Global Summary of the Month)
  • ANNUAL is now GSOY (Global Summary of the Year)


  • isd() gains new parameters additional to toggle whether the non-mandatory ISD fields (additional + remarks) are parsed and returned & force to toggle whether download new version or use cached version. isd_read() gains new parameter additional (see description above) (#190)
  • New function for Climate Prediction Center data: cpc_prcp() (#193)
  • New function arc2() to get data from Africa Rainfall Climatology version 2 (#201)


  • A number of NOAA services now use https - changed internal code to use https from http for coops, swdi, ersst, and tornadoes data sources (#187)
  • Changes to sea ice URLs - just internal (#185)
  • Fixes to coops_search() to handle requests better: only certain date combinations allowed for certain COOPS products (#213) (#214) thanks @tphilippi !
  • Now using hoardr package to manage caching in some functions. Will roll out to all functions that cache soon (#191)
  • README img location fix requested by CRAN (#207)
  • GHCNDMS is now GSOM and ANNUAL is now GSOY - added to docs and examples of using GSOM and GSOY (#189)


  • A number of fixes to isd() (#168)
  • Fixes to coops_search() to fix time zone problems (#184) thanks @drf5n
  • Fixes to ghcnd() - fix some column types that were of inappropriate type before (#211)
  • Fix to ghcnd(): we were coercing factors to integers, which caused nonsense output - first coercing to character now, then integer (#221)
  • There were problems in parsing flags (attributes) for some datasets via ncdc() function. Added metadata to the package to help parse flags (#199)

rnoaa 0.6.6


  • isd() now using a new package isdparser to parse NOAA ISD files. We still fetch the file within rnoaa, but the file parsing is done by isdparser (#176) (#177) (#180) thanks @mrubayet for the push


  • Fixed precipitation units in docs for meteo_* functions (#178) thanks @mrubayet


  • Fixed bug in ghcnd() where internal unexported function was not found (#179)
  • Fix to isd_stations() and isd_stations_search() to work correctly on Windows (#181) thanks @GuodongZhu
  • Changed base URL for all NOAA NCDC functions (those starting with ncdc) to https from http (#182) thanks @maspotts
  • Changed base URL for all NOAA HOMR functions (those starting with homr) to https from http (#183)

rnoaa 0.6.5


  • Added notes to docs of functions that do file caching - where to find cached files.
  • meteo_clear_cache gains parameter force to control force parameter in unlink()
  • Removed lubridate usage in seaiceurls() function, just using base R functions.


  • Fixed bug which was affecting binary installs only. We accidentally determined a path on package build, such that the user of the CRAN binary build machine got inserted into the path. This is now fixed. (#173)

rnoaa 0.6.4


  • New function isd_read() to read ISD output from isd() manually instead of letting isd() read in the data. This is useful when you use isd() but need to read the file in later when it's already cached. (#169)
  • Some functions in rnoaa cache files that are downloaded from various NOAA web services. File caching is usually done when data comes from FTP servers. In some of these functions where we cache data, we used to write to your home directory, but have now changed all these functions to write to a proper cache directory in a platform independent way. We determine the cache directory using rappdirs::user_cache_dir(). Note that this may change your workflow if you'd been depending on cached files to be a in particular place on your file system. In addition, the path parameter in the changed functions is now defunct, but you get an informative warning about it (#171)


  • storm_data() now returns a tibble/data.frame not inside of a list. We used to return a list with a single slot data with a data.frame, but this was unnecessary.
  • ghcnd_stations() now outputs a data.frame (tbl_df) by itself, instead of a data.frame nested in a list. This may change how you access data from this function. (#163)
  • Improved docs on token usage for NCDC functions (with prefix ncdc_*()) (#167)
  • Added note to isd() docs that when you get an error similar to Error: download failed for ftp://ftp.ncdc.noaa.gov/pub/data/noaa/1955/011490-99999-1955.gz, the file does not exist on NOAA's ftp servers. If your internet is down, you'll get a different error saying as much (#170)

rnoaa 0.6.0


  • A large PR was merged with a suite of functions. Most functions added a prefixed with meteo_*, and are meant to find weather monitors near locations (meteo_nearby_stations), find all monitors within a radius of a location (meteo_distance), calculate the distances between a location and all available stations (meteo_process_geographic_data), calculate the distance between two locations (meteo_spherical_distance), pull GHCND weather data for multiple weather monitors (meteo_pull_monitors), create a tidy GHCND dataset from a single monitor (meteo_tidy_ghcnd), and determine the "coverage" for a station data frame (meteo_coverage()). In addition, vis_miss() added to visualize missingness in a data.frame. See the PR diff against master for all the changes. (#159) Thanks a ton to @geanders et al. (@hrbrmstr, @maelle, @jdunic, @njtierney, @leighseverson, @RyanGan, @mandilin, @jferreri, @cpatrizio88, @ryan-hicks, @Ewen2015, @mgutilla, @hakessler, @rodlammers)


  • isd_stations_search() changed internal structure. We replaced usage of geojsonio and lawn for faster dplyr::filter for bbox inputs, and meteo_distance() for lat/long/radius inputs . This speeds up this function significantly. Thanks to @lukas-rokka (#157)
  • isd_stations_search() and isd_stations() now return tibble's instead of data.frame's
  • Removed cached ISD stations dataset within package to reduce package size. Only change is now that on first use of the function the user has to download the entire thing, but on subsquent uses it will pull from the cached version on the users machine. isd_stations_search() now caches using rappdirs (#161)
  • Convert all is() uses to inherits()


  • Fixed seaiceeurls() function that's used to generate urls for the seaice() function - due to change in NOAA urls (#160)
  • Fix to function ghncd_split_vars() to not fail on dplyr::contains call (#156) thanks @lawinslow !

rnoaa 0.5.6


  • Fixes for new httr version to call encoding explicitly (#135)
  • Fix to broken link for reference to source code used in gefs functions (#121)
  • Speed ups implemented for the isd() function - it's a time consuming task as we have to parse a nasty string of characters line by line - more speed ups to come in future versions (#146)
  • Replace dplyr::rbind_all() with dplyr::bind_rows() as the former is being deprecated (#152)


  • Fix for isd() function - was failing on some station names that had leading zeros. (#136)
  • Fix for ncdc_stations() - used to allow more than one station id to be passed in, but internally only handled one. This is a restriction due to the NOAA NCDC API. Documentation now shows an example of how to deal with many station ids (#138)
  • Fixes to the suite of ncdc_*() functions to allow multiple inputs to those parameters where allowed (#139)
  • Fixed bug in ncdc_plot() due to new ggplot2 version (#153)
  • Fixed bugs in argo() functions: a) with new httr, box input of a vector no longer works, now manually make a character vector; b) errant file param being passed into the http request, removed (#155)

rnoaa 0.5.2


  • New data source added: ARGO buoy data. See functions starting with argo() (#123) for more, see http://www.argo.ucsd.edu/
  • New data source added: CO-OPS tide and current data. See function coops_search() (#111) for idea from @fmichonneau (#124) for implementing @jsta See http://co-ops.nos.noaa.gov/api/ also (#126) (#128)


  • rgdal moved to Suggests to make usage easier (#125)
  • Changes to ncdc_plot() - made default brakes to just default to what ggplot2 does, but you can still pass in your own breaks (#131)

rnoaa 0.5.0


  • New data source added: NOAA Global Ensemble Forecast System (GEFS) data. See functions gefs(), gefs_dimension_values(), gefs_dimensions(), gefs_latitudes(), gefs_longitudes(), and gefs_variables() (#106) (#119) thanks @potterzot - he's now an author too
  • New data source added: NOAA Extended Reconstructed Sea Surface Temperature (ERSST) data. See function ersst() (#96)
  • New function isd_stations() to get ISD station data.
  • Added code of conduct to code repository


  • Swapped ncdf package for ncdf4 package. Windows binaries weren't availiable for ncdf4 prior to now. (#117)
  • Proper license info added for javascript modules used inside the package (#116)
  • Improvements to isd() function to do transformations of certain variables to give back data that makes more sense (#115)
  • leaflet, geojsonio, and lawn added in Suggests, used in a few functions.
  • Note added to swdi() function man page that the nldn dataset is available to military users only (#107)


  • Fix to buoy() function to accept character class inputs for the buoyid parameter. the error occurred because matching was not case-insensitive, now works regardless of case (#118)
  • Fixes for new ggplot2 version (#113)
  • Built in GET request retries for ghncd functions as some URLs fail unpredictably (#110)

rnoaa 0.4.2


  • Explicitly import non-base R pkg functions, so importing from utils, methods, and stats (#103)
  • All NCDC legacy API functions are now defunct. See ?rnoaa-defunct for more information (#104)
  • radius parameter removed from ncdc_stations() function (#102), was already removed internally within the function in the last version, now not in the function definition, see also (#98) and (#99)
  • Dropped plyr and data.table from imports. plyr::rbind.fill() and data.table::rbindlist() replaced with dplyr::bind_rows().


  • Fixed problem with httr v1 where empty list not allowed to pass to the query parameter in GET (#101)

rnoaa 0.4.0


  • Gains a suite of new functions for working with NOAA GHCND data, including ghcnd(), ghcnd_clear_cache(), ghcnd_countries(), ghcnd_search(), ghcnd_splitvars() ghcnd_states(), ghcnd_stations(), and ghcnd_version() (#85) (#86) (#87) (#88) (#94)
  • New contributor Adam Erickson (@DougFirErickson)
  • All NOAA buoy functions put back into the package. They were previously on a separate branch in the GitHub repository. (#37) (#71) (#100)


  • Minor adjustments to isd() functions, including better man file.
  • Cleaner package imports - importing mostly only functions used in dependencies.
  • Startup message gone.
  • callopts parameter changed to ... in function swdi().
  • More robust test suite.
  • ncdc() requires that users do their own paging - previously this was done internally (#77)
  • Many dependencies dropped, simplifying package: RCurl, maptools, stringr, digest. A few new ones added: dplyr, tidyr.


  • All erddap functions now defunct - see the package rerddap, a general purpose R client for ERDDAP servers. (#51) (#73) (#90) (#95)
  • The extent function in noaa_stations() used to accept either a bounding box or a point defined by lat/long. The lat/long option dropped as it required two packages, one of which is a pain to install for many users (#98) (#99)

rnoaa 0.3.3


  • New data source NOAA legacy API with ISD, daily, and ish data via function ncdc_legacy(). (#54)
  • New function isd() to get ISD data from NOAA FTP server. (#76)
  • ERDDAP gridded data sets added. Now tabledap datasets are accessible via erddap_table(), while gridded datasets are available via erddap_grid(). Helper function erddap_search() was modified to search for either tabledap or griddap datasets, and erddap_info() gets and prints summary information differently for tabledap and griddap datasets. (#63)


  • erddap_data() defunct, now as functions erddap_table() and erddap_grid(), uses new store parameter which takes a function, either disk(path, overwrite) to store on disk or memory() to store in R memory.
  • assertthat library removed, replaced with stopifnot()

rnoaa 0.3.0


  • New data source added (NOAA torndoes data) via function tornadoes(). (#56)
  • New data source added (NOAA storm data from IBTrACS) via functions storm_*(). (#57)
  • New data source added (NOAA weather station metadata from HOMR) via functions homr_*() (#59)
  • New vignettes for storm data and homr data.
  • Some functions in rnoaa now print data.frame outputs as dplyr-like outputs with a summary of the data.frame, as appropriate.


  • Across all ncdc_* functions changed callopts parameter to .... This parameter allow you to pass in options to httr::GET to modify curl requests. (#61)
  • A new helper function check_key() looks for one of two stored keys, as an environment variable under the name NOAA_KEY, or an option variable under the name noaakey. Environment variables can be set during session like Sys.setenv(VAR = "..."), or stored long term in your .Renviron file. Option variables can be set during session like options(var = "..."), or stored long term in your .Rprofile file.
  • is.* and print.* functions no longer have public man files, but can be seen via rnoaa::: if needed.

rnoaa 0.2.0


  • New package imports: sp, rgeos, assertthat, jsonlite, and ncdf4, and new package Suggests: knitr, taxize
  • Most function names changed. All noaa*() functions for NCDC data changed to ncdc*(). noaa_buoy() changed to buoy(). noaa_seaice() changed to seaice(). When you call the old versions an error is thrown, with a message pointing you to the new function name. See ?rnoaa-defunct.
  • New vignettes: NCDC attributes, NCDC workflow, Seaice vignette, SWDI vignette, ERDDAP vignette, NOAA buoy vignette.
  • New functions to interact with NOAA ERDDAP data: erddap_info(), erddap_data(), and erddap_search().
  • New functions to interact with NOAA buoy data: buoy(), including a number of helper functions.
  • ncdc() now splits apart attributes. Previously, the attributes were returned as a single column, but now there is column for each attribute so data can be easily retrieved. Attribute columns differ for each different datasetid.
  • buoy() function has been removed from the CRAN version of rnoaa. Install the version with buoy() and associated functions via devtools::install_github("ropensci/rnoaa", ref="buoy")


  • noaa_swdi() (function changed to swdi()) gains new parameter filepath to specify path to write a file to if format=kmz or format=shp. Examples added for using format= csv, shp, and kmz.
  • Now using internal version of plyr::compact.
  • Added API response checker/handler to all functions to pass on helpful messages on server errors.
  • ncdc() gains new parameter includemetadata. If TRUE, includes metadata, if not, does not, and response should be faster as does not take time to calculate metadata.
  • noaa_stations() gains new parameter radius. If extent is a vector of length 4 (for a bounding box) then radius is ignored, but if you pass in two points to extent, it is interpreted as a point, and then radius is used as the distance upon which to construct a bounding box. radius default is 10 km.


  • datasetid, startdate, and enddate are often required parameters, and changes were made to help users with this.

rnoaa 0.1.0


  • Submitted to CRAN.

rnoaa 0.0.8


  • Wrote new functions for NOAA API v2.
  • A working vignette now.

rnoaa 0.0.1


  • Wrappers for NOAA API v1 were written, not on CRAN at this point.

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


1.3.8 by Daniel Hocking, 2 months ago

https://docs.ropensci.org/rnoaa/ (docs), https://github.com/ropensci/rnoaa (devel)

Report a bug at https://github.com/ropensci/rnoaa/issues

Browse source code at https://github.com/cran/rnoaa

Authors: Scott Chamberlain [aut] , Daniel Hocking [ctb, cre] , Brooke Anderson [ctb] , Maëlle Salmon [ctb] , Adam Erickson [ctb] , Nicholas Potter [ctb] , Joseph Stachelek [ctb] , Alex Simmons [ctb] , Karthik Ram [ctb] , Hart Edmund [ctb] , rOpenSci [fnd] (https://ropensci.org)

Documentation:   PDF Manual  

Task views: Hydrological Data and Modeling

MIT + file LICENSE license

Imports utils, crul, lubridate, dplyr, tidyr, tidyselect, ggplot2, scales, XML, xml2, jsonlite, gridExtra, tibble, isdparser, geonames, hoardr, data.table

Suggests roxygen2, testthat, taxize, ncdf4, raster, leaflet, rgdal, purrr, ggmap, vcr, webmockr

Imported by wildviz.

Suggested by Z10.

See at CRAN