| Title: | Adirondack Long-Term Lake Data |
|---|---|
| Description: | Package for the access and distribution of long-term lake datasets from 28 lakes in the Adirondack Park, northern New York state. Includes a wide variety of physical, chemical, and biological parameters originally described in Farrell et al. 2018 <doi:10.1038/sdata.2018.59>. Water chemistry and nutrient records are extended through 2024 using data from the USGS AQ Samples database, including new columns for surface temperature, UV-254 absorbance, and a program flag distinguishing AEAP integrated samples from ALTM surface grabs. The underlying figshare archive <doi:10.6084/m9.figshare.32305479> additionally contains chemistry records for 25 ALTM-only lakes; the package restricts to the 28 originals for consistency with the published dataset. |
| Authors: | Jeremy Farrell [aut, cre], Luke Winslow [aut], Taylor Leach [aut], Tobi Hahn [aut] |
| Maintainer: | Jeremy Farrell <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.7.1 |
| Built: | 2026-06-02 00:34:46 UTC |
| Source: | https://github.com/jeremylfarrell/adklakedata |
Loads data from locally downloaded CSV files. Run check_dl_data before using this function.
The package presents data for the 28 original lakes covered by both the AEAP and ALTM monitoring programs, matching the scope of Farrell et al. (2018, Scientific Data, doi:10.1038/sdata.2018.59). The underlying figshare archive (doi:10.6084/m9.figshare.32305479) additionally contains chemistry and nutrient records for 25 ALTM-only lakes; those records are filtered out by this function but are available directly from figshare if needed.
adk_data(data_name)adk_data(data_name)
data_name |
A string choosing the data to load.
|
## Not run: #grab secchi data and plot it secchi = adk_data('secchi') plot(as.POSIXct(secchi$date), secchi$secchi) ## End(Not run)## Not run: #grab secchi data and plot it secchi = adk_data('secchi') plot(as.POSIXct(secchi$date), secchi$secchi) ## End(Not run)
Returns the path to the shapefile for the study Lake polygons. The source is a locally stored shapefile that can be used for mapping and analysis.
adk_lake_shapes()adk_lake_shapes()
## Not run: #' library(sf) bl = sf::read_sf(adklakedata::adk_shape()) lakes = sf::read_sf(adklakedata::adk_lake_shapes()) plot(st_geometry(bl)) plot(st_geometry(lakes), add=TRUE, col='blue') ## End(Not run)## Not run: #' library(sf) bl = sf::read_sf(adklakedata::adk_shape()) lakes = sf::read_sf(adklakedata::adk_lake_shapes()) plot(st_geometry(bl)) plot(st_geometry(lakes), add=TRUE, col='blue') ## End(Not run)
This function loads the primary geospatial boundary data for the Adirondack parks.
adk_lakes()adk_lakes()
## Not run: sites = adk_lakes() ## End(Not run)## Not run: sites = adk_lakes() ## End(Not run)
Function to recall metadata about each dataset. Includes units and long-name of parameters. Prints info to console as well as returning text.
adk_metadata(data_name)adk_metadata(data_name)
data_name |
character name of dataset. See |
## Not run: #Get chemistry metadata adk_metadata('chem') ## End(Not run)## Not run: #Get chemistry metadata adk_metadata('chem') ## End(Not run)
Returns the path to the shapefile for the Adirondack Park outline (The "Blue Line"). Returns the path to a locally stored shapefile that can be used for mapping and analysis.
adk_shape()adk_shape()
## Not run: #' library(sf) bl = sf::read_sf(adklakedata::adk_shape()) lakes = sf::read_sf(adklakedata::adk_lake_shapes()) plot(st_geometry(bl)) plot(st_geometry(lakes), add=TRUE, col='blue') ## End(Not run)## Not run: #' library(sf) bl = sf::read_sf(adklakedata::adk_shape()) lakes = sf::read_sf(adklakedata::adk_lake_shapes()) plot(st_geometry(bl)) plot(st_geometry(lakes), add=TRUE, col='blue') ## End(Not run)
Check that we have local cache of ADK lake data. If it is not locally available, download the data from the internet and prepare it for local use. This only needs to be run once for each install of the package. Note: you will be required to re-download data when a new version of the package is released. This ensures stale data are not being accidentally used.
check_dl_data()check_dl_data()
Checks if local data files as defined in master file exist and match MD5 hash. Downloads data if necessary.
check_dl_file(master_file, fname = NULL, md5check = TRUE, dest = local_path())check_dl_file(master_file, fname = NULL, md5check = TRUE, dest = local_path())
master_file |
Character path to master file |
fname |
Character vector of specific file names to check |
md5check |
boolean |
dest |
Character path to download destination |
Data files are locally cached (they are too large to be distributed
with the CRAN package). These cached files are stored in your user
data directory, or a custom directory set using set_local_path.
local_path()local_path()
Path to local file cache location
# set custom path to local temp directory set_local_path(tempdir()) #returns current local path directory local_path()# set custom path to local temp directory set_local_path(tempdir()) #returns current local path directory local_path()
Data files are locally cached (they are too large to be distributed
with the CRAN package). These cached files are stored in your user
data directory, or a custom directory set using set_local_path.
set_local_path(path)set_local_path(path)
path |
Full path to custom folder, will be created if it doesn't exist. |
# set custom path to local temp directory set_local_path(tempdir())# set custom path to local temp directory set_local_path(tempdir())