load_survey_csv: Load Survey CSV

View source: R/utils-csv-data.R

load_survey_csvR Documentation

Load Survey CSV

Description

Load a Raw or processed RHoMIS survey csv file, collected using ODK, and convert the column names into a shortened, standardised version. This function can either be used to read

Usage

load_survey_csv(
  file_path,
  country_column = "country",
  unique_id_col = "_uuid",
  hh_id_col = NULL,
  id_type = c("string", "column"),
  proj_id = NULL,
  form_id = NULL,
  overwrite = FALSE,
  repeat_columns = pkg.env$repeat_columns
)

Arguments

file_path

The filepath of the RHoMIS csv

country_column

The name of the column containing the country

unique_id_col

The column in the dataset which contains unique IDs (usually _uuid)

hh_id_col

The column containing household IDs

id_type

Indicator of whether you are providing a single ID

proj_id

Either a single string to be used as the project ID for all households, or the name of the column containing the project IDs (depending on id_type)

form_id

Either a single string to be used as the form ID for all households, or the name of the column containing the form IDs (depending on id_type)

overwrite

True if you would like to overwrite previous ID column, false if would not like to overwrite existing IDs

repeat_columns

The types of repeat column name

Details

Rpackage file: utils-csv-data.R

Value

A tibble of RHoMIS data


l-gorman/rhomis-R-package documentation built on Nov. 8, 2023, 6:46 a.m.