Skip to contents

Downloads data from the Marine Institute's ERDDAP server for the Irish Weather Buoy Network. Supports filtering by date range, stations, and variables.

Usage

download_buoy_data(
  start_date = Sys.Date() - 30,
  end_date = Sys.Date(),
  stations = NULL,
  variables = NULL,
  format = "csv"
)

Arguments

start_date

Character or Date, start of date range (default: 30 days ago)

end_date

Character or Date, end of date range (default: today)

stations

Character vector of station IDs (default: all stations)

variables

Character vector of variable names (default: all variables)

format

Character, output format: "csv", "json", or "tsv" (default: "csv")

Value

Data frame containing the requested buoy data

Examples

if (FALSE) { # \dontrun{
# Get last 7 days of data for all stations
data <- download_buoy_data(
  start_date = Sys.Date() - 7,
  end_date = Sys.Date()
)

# Get specific variables for M3 buoy
wave_data <- download_buoy_data(
  stations = "M3",
  variables = c("time", "WaveHeight", "WavePeriod", "Hmax")
)
} # }