make_user_mapping_w2: Generate a WAStD user mapping from a given turtle tagging DB...

View source: R/make_user_mapping_w2.R

make_user_mapping_w2R Documentation

Generate a WAStD user mapping from a given turtle tagging DB export

Description

The matching is done by fuzzyjoin::stringdist_left_join using the Jaro-Winker distance between the ODKC username and the individual WAStD name, username and aliases of current active WAStD Users.

Usage

make_user_mapping_w2(
  w2_data,
  wastd_users,
  verbose = wastdr::get_wastdr_verbose()
)

Arguments

w2_data

The output of wastdr::download_w2_data.

wastd_users

A tibble of WAStD users.

verbose

Whether to show debug messages. Default: wastdr::get_wastdr_verbose()

Details

The field aliases is where the magic happens. make_user_mapping_w2 matches against each alias after separating the aliases by comma. This way, we can add the exact misspelling of an ODK Collect username as a new alias, and get a 100% match for it.

Value

A tibble of legacy username and user ID with the respective best match of a WAStD user.


dbca-wa/etlTurtleNesting documentation built on Nov. 18, 2022, 8:03 a.m.