View source: R/suso_api_paradata.R
suso_export_paradata | R Documentation |
Exports Survey Solutions Paradata, and returns a data.table.
suso_export_paradata(
server = suso_get_api_key("susoServer"),
apiUser = suso_get_api_key("susoUser"),
apiPass = suso_get_api_key("susoPass"),
workspace = NULL,
token = NULL,
questID = "xxxx-xxx-xxxx-xxx-xxx",
version = 1,
workStatus = "Completed",
reloadTimeDiff = 1,
inShinyApp = FALSE,
multiCore = NULL,
onlyActiveEvents = FALSE,
allResponses = TRUE,
gpsVarName = NA,
verbose = T,
showProgress = F
)
server |
Survey Solutions server address |
apiUser |
Survey Solutions API user |
apiPass |
Survey Solutions API password |
workspace |
server workspace, if nothing provided, defaults to primary |
token |
If Survey Solutions server token is provided apiUser and apiPass will be ignored |
questID |
QuestionnaireId for which the paradata should be generated |
version |
questionnnaire version |
workStatus |
define which statuses the file should inlude (i.e. Restored,Created,SupervisorAssigned,InterviewerAssigned, RejectedBySupervisor,ReadyForInterview, SentToCapi,Restarted,Completed,ApprovedBySupervisor, RejectedByHeadquarters,ApprovedByHeadquarters,Deleted), if NULL all is exported |
reloadTimeDiff |
time difference in hours between last generated file and now |
inShinyApp |
if True, file interacts with shiny progress bar |
multiCore |
if not NULL, an integer number specifying the number of cores to use |
onlyActiveEvents |
if TRUE only active events are exported, decreases processing time and memory requirements |
allResponses |
if TRUE all responses will be extracted. Setting it to FALSE may decrease processing time and memory requirements |
gpsVarName |
provide GPS variable name. If not provided, identification is attempted by lookin for a variable containing gps in its name. |
verbose |
if TRUE, shows messages about the operation carried out. Can be useful for longrunning operations. |
showProgress |
also display the progress bars. |
suso_export_paradata
returns a data.table. Calculates the response time
and separtes multiple responses into individual columns. It also creates a variable
counter which preserves the sequence of events.
The return value is a list with a separate list element for each event. If any of the variable names contains gps this function also attempts to identify (and extract) the geo-reference location. In case of multiple gps variables, it identifies the first variable, with not all missing values. This in turn facilitates the creation of paradata maps (see vignette on paradata). In addition it also returns all the variables and responses in separate columns and as factors. Exporting onlyActiveEvents substantially decrease processing time. The events may be sufficient for most of the paradata analysis.
To further decrease the processing time, one could set allResponses to FALSE. Doing so will still export all the data, however it will not attempt to extract all responses and setting them to factors.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.