Fetch water quality profiler or meteorological data for a lake
lt_get_wq.RdQueries the LimnoTrack water quality profiler endpoint for a given lake,
returning either profiler ("pro") or meteorological ("met") data. Unlike
lt_fetch(), this hits a dedicated API endpoint rather than the PostgREST
interface, and requires an API key.
This downloads all the data for the specified lake and type, so it may take
some time for lakes with large datasets. These data correspond to data
available in the LimnoTrack web interface, which uses automated quality
control and filtering to remove erroneous data.
Usage
lt_get_wq(
lake = "Karapiro",
type = c("pro", "met"),
api_key = NULL,
base_url = "https://api.limnotrack.com"
)Arguments
- lake
character; lake name (e.g.,
"Karapiro").- type
character; either
"pro"for profiler data or"met"for meteorological data. Default"pro".- api_key
character; API key for authentication. If
NULL, will look for the key in theLERNZMP_KEYenvironment variable. If that is not set, will throw an error. To get an API key, contact LimnoTrack (admin@limnotrack.com)- base_url
character; base URL of the LimnoTrack API.
Value
A tibble::tibble of profiler or meteorological data.