Package 'adklakedata'

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

Help Index


Load ADK Data

Description

Loads data from locally downloaded CSV files. Run check_dl_data before using this function.

Usage

adk_data(data_name)

Arguments

data_name

A string choosing the data to load.

Data name (data_name) Data Description
chem Lake Chemistry
crustacean Crustacean Zooplankton Biomass
meta Lake-specific metadata (type, location, morphology)
nutrient Lake Nutrients
phyto Phytoplankton Biomass Observations
rotifer Rotifer Zooplankton Biomass
secchi Lake Secchi Depth Observations
tempdo Temperature and Dissolved Oxygen Profiles
met Lake-specific Meterology (air temp, wind, precip, etc)

Examples

## Not run: 

#grab secchi data and plot it
secchi = adk_data('secchi')
plot(as.POSIXct(secchi$date), secchi$secchi)

## End(Not run)

Return path to Lake Polygons Shapefile

Description

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.

Usage

adk_lake_shapes()

Examples

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')

List of lakes with attributes

Description

Returns a data.frame of lake info. Includes common info like lake location (lat/lon), lake name, and numerical site ID.

Usage

adk_lakes()

Examples

## Not run: 
sites = adk_lakes()

## End(Not run)

Get data table metadata info

Description

Function to recall metadata about each dataset. Includes units and long-name of parameters. Prints info to console as well as returning text.

Usage

adk_metadata(data_name)

Arguments

data_name

character name of dataset. See adk_data documentation for dataset names.

Examples

## Not run: 
#Get chemistry metadata
adk_metadata('chem')

## End(Not run)

Return path to Adirondack Park Shapefile

Description

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.

Usage

adk_shape()

Examples

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')

Download lake data from internet

Description

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.

Usage

check_dl_data()

Verify and download data files

Description

Checks if local data files as defined in master file exist and match MD5 hash. Downloads data if necessary.

Usage

check_dl_file(master_file, fname = NULL, md5check = TRUE,
  dest = local_path())

Arguments

master_file

Character path to master file

fname

Character vector of specific file names to check

md5check

boolean

dest

Character path to download destination


Get local file path

Description

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.

Usage

local_path()

Value

Path to local file cache location

Examples

# set custom path to local temp directory
set_local_path(tempdir())

#returns current local path directory
local_path()

Set custom local file path

Description

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.

Usage

set_local_path(path)

Arguments

path

Full path to custom folder, will be created if it doesn't exist.

Examples

# set custom path to local temp directory
set_local_path(tempdir())