Title: | Cross-References Lake Identifiers Between Different Data Sets |
---|---|
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. |
Authors: | Paul Frater [aut, cre] |
Maintainer: | Paul Frater <[email protected]> |
License: | MIT + file LICENSE |
Version: | 0.0.1 |
Built: | 2024-11-15 06:30:57 UTC |
Source: | CRAN |
This help file is simply to serve as a full list of all state shortcut
crosswalk functions. For functionality and examples, see
state_crosswalks
.
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)
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)
data |
A data.set with a column containing a lake identifier corresponding to one of the datasets listed above (also see lake_id_xref) |
from_colname |
Character. The column name in |
agency |
Optional character vector specifying the agency to use for the local ID column. This is helpful if data exist in lake_id_xref for which there are more than one agency in a state that provided data |
id_field |
Optional character vector specifying the id.field to use for 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 only the states listed in this argument. |
A data.frame the same as data
, but with an additional
lake identification column from lake_id_xref
These are functions to be able to quickly and easily translate data.frames
of lake data in the Midwest from one identifier ot another. IDs are from
national, regianal, and state data.sets; these include National Hydrography
Dataset (NHD), NHD Plus High Resolution (NHDHR), LAke multi-scaled
GeOSpatial and temporal database (LAGOS), the Midwest Glacial Lakes
Partnership (MGLP), and state resource management and/or geography/mapping
agencies. Local state agency lake IDs are housed under the column
local.id
in lake_id_xref
and correspond to the state
in which they reside and the agency that provided the data in those
respective columns.
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 )
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 )
data |
A data.set with a column containing a lake identifier corresponding to one of the datasets listed above (also see lake_id_xref) |
from_colname |
Character. The column name in |
states |
Character. The two digit state abbreviation in lower case ( i.e. "wi", "mn", "mi", etc.). This will filter the crosswalk table to only the states listed in this argument. |
agency |
Optional character vector specifying the agency to use for the local ID column. This is helpful if data exist in lake_id_xref for which there are more than one agency in a state that provided data |
id_field |
Optional character vector specifying the id.field to use for 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 that you want to reference from |
to |
Character. The name of the lake ID field from lake_id_xref that you want to reference to |
A data.frame the same as data
, but with an additional
lake identification column from lake_id_xref
local_to_nhdhr(wis_lakes, from_colname = "lake.id", states = "wi")
local_to_nhdhr(wis_lakes, from_colname = "lake.id", states = "wi")
This table contains ID values for various different datasets that reference these lakes. There are local (i.e. state ID fields), National Hydrography Dataset (NHDHR), and NHD COMID. There is also a field for Winslow ID, which relates to the original ID in the NHD dataset (i.e. pre-NHDHR)
lake_id_xref
lake_id_xref
A data.frame with 489,557 rows and 8 columns
Permanent identifier from NHDHR Resolution 2
COMID from NHDHR
Permanent identifier from original NHD dataset
Identifier from LAke multi-scaledGeOSpatial and temporal database
Identifier from the Midwest Glacial Lakes Partnership
The local identifier (usually state agency)
The state that the local identifier corresponds to
The agency from which the local.id was taken
State specific functions to be used as handy shortcuts.
(i.e. you can call a state's function directly rather than specifying
local_to_*
or *_to_local
with the state as an argument.
One of these functions exists for all combinations of both states and lake
ID columns found in lake_id_xref
. For a full list of these functions,
see ?all_state_crosswalks
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)
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)
data |
A data.set with a column containing a lake identifier corresponding to one of the datasets listed above (also see lake_id_xref) |
from_colname |
Character. The column name in |
agency |
Optional character vector specifying the agency to use for the local ID column. This is helpful if data exist in lake_id_xref for which there are more than one agency in a state that provided data |
id_field |
Optional character vector specifying the id.field to use for the local ID column. Occasionally states use more than one identifier. This allows explicit choice of which identifier to use. |
A data.frame the same as data
, but with an additional
lake identification column from lake_id_xref
wi_to_nhdhr(wis_lakes, from_colname = "lake.id")
wi_to_nhdhr(wis_lakes, from_colname = "lake.id")
This data.frame contains the names and lake IDs for 10 lakes in Wisconsin. These are used in examples throughout the package.
wis_lakes
wis_lakes
A data.frame with 10 rows and 4 columns
The state abbreviation (i.e. "wi")
The name of the county in which the lake is found
A unique identifier for each lake
The name of the lake