
Perform common cleaning tasks for ISS/eSURV data
clean_iss_data.RdISS/eSURV data often needs to be cleaned and standardized before analysis. Because
these datasets may vary from country to country, reviewing the data first and its columns
is the first step. In general, there are eight required columns. These are the parameters
with a suffix _col. Modify the passed arguments as necessary so the function can
successfully run. Priority levels are set to automatically detect high, medium, low, and not a focal site.
Ensure that priority level column categories have these specification:
High: begins with "h".Medium: begins with "m".Low: begins with "l".Not Focal Site: begins with "n" or "x".
Usage
clean_iss_data(
iss_data,
start_date,
end_date,
priority_col = "priority_level",
start_time_col = "starttime",
unreported_cases_col = "num_unreportedcases",
prov_col = "states",
dist_col = "districts",
hf_col = "name_of_facility_visited",
today_col = "today",
date_of_visit_col = "date_of_visit",
ctry.data = lifecycle::deprecated()
)Arguments
- iss_data
tibbleISS data.- start_date
strStart date of desk review.- end_date
strEnd date of desk review.- priority_col
strColumn representing priority level.- start_time_col
strColumn representing start time.- unreported_cases_col
strColumn representing unreported cases.- prov_col
strColumn representing province.- dist_col
strColumn representing district.- hf_col
strColumn representing the health facility name.- today_col
strColumn representing when info was recorded.- date_of_visit_col
strColumn representing date of visit.- ctry.data
listPlease pass the ISS data directly to the iss.data parameter.
Examples
if (FALSE) { # \dontrun{
iss_path <- "C:/Users/ABC1/Desktop/iss_data.csv"
ctry.data <- init_dr("somalia", iss_data_path = iss_path)
ctry.data$iss.data <- clean_iss_data(ctry.data$iss.data, start_date, end_date)
} # }