Description Usage Arguments Value Examples
View source: R/retrieve_data.R
call_api()
places a single call to the NOAA API to retrieve either
hourly water level observations or predictions.
1 2 3 4 5 6 7 8 9 10 |
.station |
Numeric or Character. The code that uniquely identifies a NOAA water level station. |
.start |
An object that inherits from R's |
.stop |
An object that inherits from R's |
.which |
'observed' or 'predicted' |
.datum |
Character string, from a limited list of options. Specifies the vertical datum used for the returned data. "STND" is a station-specific datum anticipated to be below all observed or predicted water levels, so al lwater levels wil lbe positive numbers. "NAVD" is the National Vertical Datum, useful for relating tides to ground elevations from survey or LIDAR. The other choices are standard tidal datums. |
.units |
"metric" or "english". The default is "metric". |
.timefmt |
'gmt', 'lst', or 'lst_ldt'. How would you like the time
coordinate defined? Choices are for greenwich mean time (also known as
UTC, although that abbreviation does not work here), local standard
time (with no adjustments for daylight savings time), or local clock
time, which can be confusing, since the data returned is a string (not
an internal |
.tz |
An R timezone specification. Used only for converting text-based
times deliverd from the API to POSIXct objects. Defaults to 'UTC', for
consistency with the default |
A dataframe with columns "datetime" and "water_level"
1 2 3 4 | Providence_station <- 8454000
begin_date <- '20200806'
end_date <- '20200810'
call_api_observed(Providence_station, begin_date, end_date)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.