clean_case_address_history: Extract address information from case data

View source: R/clean_case_address_history.R

clean_case_address_historyR Documentation

Extract address information from case data

Description

This function un-nests and cleans the address data and stores it in a standalone table with all addresses, even if there is more than 1 per person.

Usage

clean_case_address_history(cases, locations_clean, language_tokens)

Arguments

cases

A tibble with case data. Case data is returned by get_cases().

locations_clean

A tibble with cleaned locations data. Locations data is returned by get_locations() and cleaned by clean_locations().

language_tokens

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

Value

A tibble with address information from cases data.

Examples

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

cases <- get_cases(
  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"
)

case_address_history <- clean_case_address_history(
  cases = cases,
  locations_clean = locations_clean,
  language_tokens = language_tokens
)

## End(Not run)

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