Movatterモバイル変換


[0]ホーム

URL:


Type:Package
Title:Cross-References Lake Identifiers Between Different Data Sets
Version:0.0.1
Maintainer:Paul Frater <paul.frater@wisconsin.gov>
Description:Handy helper package for cross-referencing lake identifiers among different data sets in the Midwestern United States. There are multiple different state, regional, and federal agencies that have different identifiers on lakes. This package helps you to go between them.
Imports:dplyr (≥ 1.1.3), rlang (≥ 1.1.1)
License:MIT + file LICENSE
Encoding:UTF-8
LazyData:true
RoxygenNote:7.2.3
Depends:R (≥ 4.1.0)
Suggests:knitr, rmarkdown, testthat (≥ 3.0.0)
Config/testthat/edition:3
VignetteBuilder:knitr
NeedsCompilation:no
Packaged:2024-01-17 22:47:23 UTC; paul
Author:Paul FraterORCID iD [aut, cre]
Repository:CRAN
Date/Publication:2024-01-18 11:10:02 UTC

mwlaxeref: Cross-References Lake Identifiers Between Different Data Sets

Description

logo

Handy helper package for cross-referencing lake identifiers among different data sets in the Midwestern United States. There are multiple different state, regional, and federal agencies that have different identifiers on lakes. This package helps you to go between them.

Author(s)

Maintainer: Paul Fraterpaul.frater@wisconsin.gov (ORCID)


A full list of state crosswalk functions

Description

This help file is simply to serve as a full list of all state shortcutcrosswalk functions. For functionality and examples, seestate_crosswalks.

Usage

comid_to_ia(data, from_colname = "nhd.comid", agency = NULL, id_field = NULL)comid_to_in(data, from_colname = "nhd.comid", agency = NULL)comid_to_mi(data, from_colname = "nhd.comid", agency = NULL, id_field = NULL)comid_to_mn(data, from_colname = "nhd.comid", agency = NULL)comid_to_mo(data, from_colname = "nhd.comid", agency = NULL)comid_to_nd(data, from_colname = "nhd.comid", agency = NULL)comid_to_sd(data, from_colname = "nhd.comid", agency = NULL)comid_to_wi(data, from_colname = "nhd.comid", agency = NULL)ia_to_comid(data, from_colname, agency = NULL, id_field = NULL)ia_to_lagos(data, from_colname, agency = NULL, id_field = NULL)ia_to_mglp(data, from_colname, agency = NULL, id_field = NULL)ia_to_nhd(data, from_colname, agency = NULL, id_field = NULL)ia_to_nhdhr(data, from_colname, agency = NULL, id_field = NULL)in_to_comid(data, from_colname, agency = NULL, id_field = NULL)in_to_lagos(data, from_colname, agency = NULL)in_to_mglp(data, from_colname, agency = NULL)in_to_nhd(data, from_colname, agency = NULL)in_to_nhdhr(data, from_colname, agency = NULL)lagos_to_ia(data, from_colname = "lagos.id", agency = NULL, id_field = NULL)lagos_to_in(data, from_colname = "lagos.id", agency = NULL)lagos_to_mn(data, from_colname = "lagos.id", agency = NULL)lagos_to_mo(data, from_colname = "lagos.id", agency = NULL)lagos_to_nd(data, from_colname = "lagos.id", agency = NULL)lagos_to_sd(data, from_colname = "lagos.id", agency = NULL)lagos_to_wi(data, from_colname = "lagos.id", agency = NULL)mglp_to_ia(data, from_colname = "mglp.id", agency = NULL, id_field = NULL)mglp_to_in(data, from_colname = "mglp.id", agency = NULL)mglp_to_mi(data, from_colname = "mglp.id", agency = NULL, id_field = NULL)mglp_to_mn(data, from_colname = "mglp.id", agency = NULL)mglp_to_mo(data, from_colname = "mglp.id", agency = NULL)mglp_to_nd(data, from_colname = "mglp.id", agency = NULL)mglp_to_sd(data, from_colname = "mglp.id", agency = NULL)mglp_to_wi(data, from_colname = "mglp.id", agency = NULL)mi_to_comid(data, from_colname, agency = NULL, id_field = NULL)mi_to_lagos(data, from_colname, agency = NULL, id_field = NULL)mi_to_mglp(data, from_colname, agency = NULL, id_field = NULL)mi_to_nhd(data, from_colname, agency = NULL, id_field = NULL)mi_to_nhdhr(data, from_colname, agency = NULL, id_field = NULL)mn_to_comid(data, from_colname, agency = NULL)mn_to_lagos(data, from_colname, agency = NULL)mn_to_nhd(data, from_colname, agency = NULL)mn_to_nhdhr(data, from_colname, agency = NULL)mo_to_comid(data, from_colname, agency = NULL)mo_to_lagos(data, from_colname, agency = NULL)mo_to_mglp(data, from_colname, agency = NULL)mo_to_nhd(data, from_colname, agency = NULL)mo_to_nhdhr(data, from_colname, agency = NULL)nd_to_comid(data, from_colname, agency = NULL)nd_to_lagos(data, from_colname, agency = NULL)nd_to_mglp(data, from_colname, agency = NULL)nd_to_nhd(data, from_colname, agency = NULL)nd_to_nhdhr(data, from_colname, agency = NULL)nhd_to_ia(  data,  from_colname = "nhd.id",  states = NULL,  agency = NULL,  id_field = NULL)nhd_to_in(data, from_colname = "nhd.id", states = NULL, agency = NULL)nhd_to_mi(  data,  from_colname = "nhd.id",  states = NULL,  agency = NULL,  id_field = NULL)nhd_to_mn(data, from_colname = "nhd.id", states = NULL, agency = NULL)nhd_to_mo(data, from_colname = "nhd.id", states = NULL, agency = NULL)nhd_to_nd(data, from_colname = "nhd.id", states = NULL, agency = NULL)nhd_to_sd(data, from_colname = "nhd.id", states = NULL, agency = NULL)nhd_to_wi(data, from_colname = "nhd.id", states = NULL, agency = NULL)nhdhr_to_ia(data, from_colname = "nhdhr.id", agency = NULL, id_field = NULL)nhdhr_to_in(data, from_colname = "nhdhr.id", agency = NULL)nhdhr_to_mi(data, from_colname = "nhdhr.id", agency = NULL, id_field = NULL)nhdhr_to_mn(data, from_colname = "nhdhr.id", agency = NULL)nhdhr_to_mo(data, from_colname = "nhdhr.id", agency = NULL)nhdhr_to_nd(data, from_colname = "nhdhr.id", agency = NULL)nhdhr_to_sd(data, from_colname = "nhdhr.id", agency = NULL)sd_to_comid(data, from_colname, agency = NULL)sd_to_lagos(data, from_colname, agency = NULL)sd_to_mglp(data, from_colname, agency = NULL)sd_to_nhd(data, from_colname, agency = NULL)sd_to_nhdhr(data, from_colname, agency = NULL)wi_to_comid(data, from_colname, agency = NULL)wi_to_lagos(data, from_colname, agency = NULL)wi_to_mglp(data, from_colname, agency = NULL)wi_to_nhd(data, from_colname, agency = NULL)wi_to_nhdhr(data, from_colname, agency = NULL)

Arguments

data

A data.set with a column containing a lake identifiercorresponding to one of the datasets listed above (also see lake_id_xref)

from_colname

Character. The column name indata that lake IDsthat are being converted from (e.g.data has a lake ID column thatyou are trying to convert from – what is the name of that column)

agency

Optional character vector specifying the agency to use forthe local ID column. This is helpful if data exist in lake_id_xref forwhich there are more than one agency in a state that provided data

id_field

Optional character vector specifying the id.field to usefor the local ID column. Occasionally states use more than one identifier.This allows explicit choice of which identifier to use.

states

Character. The two digit state abbreviation in lower case (i.e. "wi", "mn", "mi", etc.). This will filter the crosswalk table to onlythe states listed in this argument.

Value

A data.frame the same asdata, but with an additionallake identification column from lake_id_xref


Crosswalk from one lake ID to another

Description

These are functions to be able to quickly and easily translate data.framesof lake data in the Midwest from one identifier ot another. IDs are fromnational, regianal, and state data.sets; these include National HydrographyDataset (NHD), NHD Plus High Resolution (NHDHR), LAke multi-scaledGeOSpatial and temporal database (LAGOS), the Midwest Glacial LakesPartnership (MGLP), and state resource management and/or geography/mappingagencies. Local state agency lake IDs are housed under the columnlocal.id inlake_id_xref and correspond to the statein which they reside and the agency that provided the data in thoserespective columns.

Usage

nhdhr_to_local(  data,  from_colname = "nhdhr.id",  states = NULL,  agency = NULL,  id_field = NULL)local_to_nhdhr(  data,  from_colname,  states = NULL,  agency = NULL,  id_field = NULL)nhdhr_to_comid(data, from_colname = "nhdhr.id")comid_to_nhdhr(data, from_colname = "nhd.comid")nhdhr_to_nhd(data, from_colname = "nhdhr.id")nhd_to_nhdhr(data, from_colname = "nhd.id")nhdhr_to_lagos(data, from_colname = "nhdhr.id")lagos_to_nhdhr(data, from_colname = "lagos.id")nhdhr_to_mglp(data, from_colname = "nhdhr.id")mglp_to_nhdhr(data, from_colname = "mglp.id")comid_to_nhd(data, from_colname = "nhd.comid")nhd_to_comid(data, from_colname = "nhd.id")comid_to_lagos(data, from_colname = "nhd.comid")lagos_to_comid(data, from_colname = "lagos.id")comid_to_mglp(data, from_colname = "nhd.comid")mglp_to_comid(data, from_colname = "mglp.id")comid_to_local(  data,  from_colname = "nhd.comid",  states = NULL,  agency = NULL,  id_field = NULL)local_to_comid(  data,  from_colname,  states = NULL,  agency = NULL,  id_field = NULL)nhd_to_lagos(data, from_colname = "nhd.id")lagos_to_nhd(data, from_colname = "lagos.id")nhd_to_mglp(data, from_colname = "nhd.id")mglp_to_nhd(data, from_colname = "mglp.id")nhd_to_local(  data,  from_colname = "nhd.id",  states = NULL,  agency = NULL,  id_field = NULL)local_to_nhd(data, from_colname, states = NULL, agency = NULL, id_field = NULL)lagos_to_mglp(data, from_colname = "lagos.id")mglp_to_lagos(data, from_colname = "mglp.id")lagos_to_local(  data,  from_colname = "lagos.id",  states = NULL,  agency = NULL,  id_field = NULL)local_to_lagos(  data,  from_colname,  states = NULL,  agency = NULL,  id_field = NULL)mglp_to_local(  data,  from_colname = "mglp.id",  states = NULL,  agency = NULL,  id_field = NULL)local_to_mglp(  data,  from_colname,  states = NULL,  agency = NULL,  id_field = NULL)crosswalk_lake_id(  data,  from,  to,  from_colname,  states = NULL,  agency = NULL,  id_field = NULL)

Arguments

data

A data.set with a column containing a lake identifiercorresponding to one of the datasets listed above (also see lake_id_xref)

from_colname

Character. The column name indata that lake IDsthat are being converted from (e.g.data has a lake ID column thatyou are trying to convert from – what is the name of that column)

states

Character. The two digit state abbreviation in lower case (i.e. "wi", "mn", "mi", etc.). This will filter the crosswalk table to onlythe states listed in this argument.

agency

Optional character vector specifying the agency to use forthe local ID column. This is helpful if data exist in lake_id_xref forwhich there are more than one agency in a state that provided data

id_field

Optional character vector specifying the id.field to usefor the local ID column. Occasionally states use more than one identifier.This allows explicit choice of which identifier to use.

from

Character. The name of the lake ID field from lake_id_xref thatyou want to reference from

to

Character. The name of the lake ID field from lake_id_xref thatyou want to reference to

Value

A data.frame the same asdata, but with an additionallake identification column from lake_id_xref

Examples

local_to_nhdhr(wis_lakes, from_colname = "lake.id", states = "wi")

Lake identification cross-reference table

Description

This table contains ID values for various different datasets that referencethese lakes. There are local (i.e. state ID fields), National HydrographyDataset (NHDHR), and NHD COMID. There is also a field for Winslow ID, whichrelates to the original ID in the NHD dataset (i.e. pre-NHDHR)

Usage

lake_id_xref

Format

lake_id_xref

A data.frame with 489,557 rows and 8 columns

nhdhr.id

Permanent identifier from NHDHR Resolution 2

nhd.comid

COMID from NHDHR

winslow.id

Permanent identifier from original NHD dataset

lagos.id

Identifier from LAke multi-scaledGeOSpatial and temporal database

mglp.id

Identifier from the Midwest Glacial Lakes Partnership

local.id

The local identifier (usually state agency)

state

The state that the local identifier corresponds to

agency

The agency from which the local.id was taken


Crosswalk lake identifiers to/from specific states

Description

State specific functions to be used as handy shortcuts.(i.e. you can call a state's function directly rather than specifyinglocal_to_* or*_to_local with the state as an argument.One of these functions exists for all combinations of both states and lakeID columns found inlake_id_xref. For a full list of these functions,see ?all_state_crosswalks

Usage

nhdhr_to_wi(data, from_colname = "nhdhr.id", agency = NULL)lagos_to_mi(data, from_colname = "lagos.id", agency = NULL, id_field = NULL)mn_to_mglp(data, from_colname, agency = NULL)

Arguments

data

A data.set with a column containing a lake identifiercorresponding to one of the datasets listed above (also see lake_id_xref)

from_colname

Character. The column name indata that lake IDsthat are being converted from (e.g.data has a lake ID column thatyou are trying to convert from – what is the name of that column)

agency

Optional character vector specifying the agency to use forthe local ID column. This is helpful if data exist in lake_id_xref forwhich there are more than one agency in a state that provided data

id_field

Optional character vector specifying the id.field to usefor the local ID column. Occasionally states use more than one identifier.This allows explicit choice of which identifier to use.

Value

A data.frame the same asdata, but with an additionallake identification column from lake_id_xref

Examples

wi_to_nhdhr(wis_lakes, from_colname = "lake.id")

Example of lake ID data from Wisconsin

Description

This data.frame contains the names and lake IDs for 10 lakes inWisconsin. These are used in examples throughout the package.

Usage

wis_lakes

Format

wis_lakes

A data.frame with 10 rows and 4 columns

state

The state abbreviation (i.e. "wi")

county

The name of the county in which the lake is found

lake.id

A unique identifier for each lake

lake.name

The name of the lake


[8]ページ先頭

©2009-2025 Movatter.jp