weatherData (version 0.3)

getWeatherData: Gets weather data for a single date

Description

Given a valid station and a single date this function will return a dataframe of time-stamped weather data

Usage

getWeatherData(station, date, station_type = "airportCode",
  opt_temperature_only = T, opt_compress_output = FALSE,
  opt_verbose = FALSE, opt_warnings = TRUE)

Arguments

station
is a valid 3-letter airport code or a valid Weather Station ID
date
is a valid string representing a date in the past (YYYY-MM-DD)
station_type
can be airportCode which is the default, or it can be id which is a weather-station ID
opt_temperature_only
Boolen flag to indicate only Temperature data is to be returned (default TRUE)
opt_compress_output
Boolean flag to indicate if a compressed output is preferred. If this option is set to be TRUE, only every other record is returned
opt_verbose
Boolean flag to indicate if verbose output is desired
opt_warnings
Boolean flag to turn off warnings. Default value is TRUE, to keep the warnings on.

Value

  • A data frame with each row containing:
    • Date and Time stamp for the date specified
    • Temperature and/or other weather columns

    A data frame containing the Date & Time stamp and Weather data columns