clean_events: Clean events data

View source: R/clean_events.R

clean_eventsR Documentation

Clean events data

Description

Cleans and un-nests events data which is returned from get_events().

Usage

clean_events(events, locations_clean)

Arguments

events

A tibble with events data. Events data is returned by get_events().

locations_clean

A tibble with cleaned location data. Location data is returned by get_locations() and cleaned by clean_locations(). Make sure the locations data is cleaned prior to supplying it to clean_events().

Value

A tibble with cleaned events data.

Examples

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

events <- get_events(
  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)

clean_events <- clean_events(
  events = events,
  locations_clean = locations_clean)

## End(Not run)

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