clean_contacts_of_contacts: Clean contacts of contacts data

View source: R/clean_contacts_of_contacts.R

clean_contacts_of_contactsR Documentation

Clean contacts of contacts data

Description

Cleans and un-nests contacts of contacts data. Contacts of contacts data is returned by get_contacts_of_contacts().

Usage

clean_contacts_of_contacts(
  contacts_of_contacts,
  contacts_of_contacts_address_history_clean,
  contacts_of_contacts_vacc_history_clean,
  language_tokens
)

Arguments

contacts_of_contacts

A tibble containing the contacts of contacts data.

contacts_of_contacts_address_history_clean

A tibble containing the cleaned address history data from contacts of contacts (data is cleaned by clean_contacts_of_contacts_address_history()).

contacts_of_contacts_vacc_history_clean

A tibble containing the cleaned vaccination history from contacts of contacts (data is cleaned by clean_contacts_of_contacts_vax_history()).

language_tokens

A tibble of language tokens returned by get_language_tokens() to translate the string tokens in the data.

Value

A tibble containing the cleaned contacts of contacts data.

Examples

## Not run: 
url <- "https://MyGoDataServer.com/"
username <- "myemail@email.com"
password <- "mypassword"
outbreak_id <- "3b5554d7-2c19-41d0-b9af-475ad25a382b"

contacts_of_contacts <- get_contacts_of_contacts(
  url = url,
  username = username,
  password = password,
  outbreak_id = outbreak_id
)

locations <- get_locations(
  url = url,
  username = username,
  password = password
)

locations_clean <- clean_locations(locations = locations)

language_tokens <- get_language_tokens(
  url = url,
  username = username,
  password = password,
  language = "english_us"
)

contacts_of_contacts_address_history_clean <- clean_contacts_of_contacts_address_history(
  contacts_of_contacts = contacts_of_contacts,
  locations_clean = locations_clean,
  language_tokens = language_tokens
)

contacts_of_contacts_vacc_history_clean <- clean_contacts_of_contacts_vax_history(
  contacts_of_contacts = contacts_of_contacts,
  language_tokens = language_tokens
)

contacts_of_contacts_clean <- clean_contacts_of_contacts(
  contacts_of_contacts = contacts_of_contacts,
  contacts_of_contacts_address_history_clean = contacts_of_contacts_address_history_clean,
  contacts_of_contacts_vacc_history_clean = contacts_of_contacts_vacc_history_clean,
  language_tokens = language_tokens
)

## End(Not run)

WorldHealthOrganization/godataR documentation built on May 21, 2023, 11:30 a.m.