knitr::opts_chunk$set( fig.width = 10, comment = "#>", warning = FALSE, message = FALSE )
This vignette covers NOAA buoy data from the National Buoy Data Center. The
main function to get data is buoy
, while buoys
can be used to
get the buoy IDs and web pages for each buoy.
library('rnoaa')
res <- buoys(dataset = "cwind")
Inspect the buoy ids, and the urls for them
head(res)
Or browse them on the web
browseURL(res[1, 2])
With buoy
you can get data for a particular dataset, buoy id, year, and datatype.
Get data for a buoy
if no year or datatype specified, we get the first file
buoy(dataset = 'cwind', buoyid = 46085)
Including year
buoy(dataset = 'cwind', buoyid = 41001, year = 1999)
Including year and datatype
buoy(dataset = 'cwind', buoyid = 41001, year = 2008, datatype = "cc")
Including just datatype
buoy(dataset = 'cwind', buoyid = 41001, datatype = "cc")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.