# NOT RUN {
# Get buoy station information
x <- buoy_stations()
# refresh stations as needed, takes a while to run
# you shouldn't need to update very often
# x <- buoy_stations(refresh = TRUE)
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 = 45005, year = 2008, datatype = "c")
buoy(dataset = 'cwind', buoyid = 41001, year = 1997, datatype = "c")
# Other datasets
buoy(dataset = 'ocean', buoyid = 41029)
# curl debugging
buoy(dataset = 'cwind', buoyid = 46085, verbose = TRUE)
# 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