get_wfp_data: Function to pull outcome monitoring data from the ODK server.

Description Usage Arguments Value Examples

View source: R/01-wfpKenya_data.R

Description

Function to pull outcome monitoring data from the ODK server.

Usage

1
2
3
4
5
6
7
8
get_wfp_data(
  id,
  username,
  password,
  start = Sys.Date(),
  end = Sys.Date(),
  filename
)

Arguments

id

Form ID of the different forms designed for the outcome monitoring study

username

ONA server username credentials.

password

ONA server password credentials.

start

Include data from submission dates after (inclusive) this start date in export to CSV. Date format <yyyy/MM/dd> and default is current system date

end

Include data from submission dates before (exclusive) this date in export to CSV. Date format is <yyyy/MM/dd> and default value current system date

filename

Filename to use for data without the CSV file extension.

Value

A data.frame corresponding to dataset corresponding to the form ID specified.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
  ## Get survey data
  get_wfp_data(id = "household",
               username = "validmeasures",
               password = askpass(),
               start = "2019-07-01",
               end = Sys.Date(),
               filename = "household")

## End(Not run)

validmeasures/wfpKenya documentation built on Feb. 12, 2020, 7:14 p.m.