Title: | Adirondack Long-Term Lake Data |
---|---|
Description: | Package for the access and distribution of Long-term lake datasets from lakes in the Adirondack Park, northern New York state. Includes a wide variety of physical, chemical, and biological parameters from 28 lakes. Data are from multiple collection organizations and have been harmonized in both time and space for ease of reuse. |
Authors: | Luke Winslow [aut, cre], Taylor Leach [aut], Tobi Hahn [aut] |
Maintainer: | Luke Winslow <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.6.1 |
Built: | 2024-11-23 04:02:13 UTC |
Source: | https://github.com/lawinslow/adklakedata |
Loads data from locally downloaded CSV files. Run check_dl_data
before using this function.
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()
library(sf) bl = read_sf(adklakedata::adk_shape()) lakes = read_sf(adklakedata::adk_lake_shapes()) plot(st_geometry(bl)) plot(st_geometry(lakes), add=TRUE, col='blue')
library(sf) bl = read_sf(adklakedata::adk_shape()) lakes = read_sf(adklakedata::adk_lake_shapes()) plot(st_geometry(bl)) plot(st_geometry(lakes), add=TRUE, col='blue')
Returns a data.frame of lake info. Includes common info like lake location (lat/lon), lake name, and numerical site ID.
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()
library(sf) bl = read_sf(adklakedata::adk_shape()) lakes = read_sf(adklakedata::adk_lake_shapes()) plot(st_geometry(bl)) plot(st_geometry(lakes), add=TRUE, col='blue')
library(sf) bl = read_sf(adklakedata::adk_shape()) lakes = read_sf(adklakedata::adk_lake_shapes()) plot(st_geometry(bl)) plot(st_geometry(lakes), add=TRUE, col='blue')
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())