# NOT RUN {
# Get buoy station information
x <- buoy_stations()
library("leaflet")
leaflet(data = na.omit(x)) %>%
leaflet::addTiles() %>%
leaflet::addCircles(~lon, ~lat, opacity = 0.5)
# Get available buoys
buoys(dataset = 'cwind')
# Get data for a buoy
## if no year or datatype specified, we get the first file
buoy(dataset = 'cwind', buoyid = 46085)
# Including specific year
buoy(dataset = 'cwind', buoyid = 41001, year = 1999)
# Including specific year and datatype
buoy(dataset = 'cwind', buoyid = 41001, year = 2008, datatype = "cc")
buoy(dataset = 'cwind', buoyid = 41001, year = 2008, datatype = "cc")
# Other datasets
buoy(dataset = 'ocean', buoyid = 41029)
# curl debugging
library('httr')
buoy(dataset = 'cwind', buoyid = 46085, config=verbose())
# some buoy ids are character, case doesn't matter, we'll account for it
buoy(dataset = "stdmet", buoyid = "VCAF1")
buoy(dataset = "stdmet", buoyid = "wplf1")
buoy(dataset = "dart", buoyid = "dartu")
# }
Run the code above in your browser using DataLab