View source: R/retrieve-survey-data.R
get_kobo_data | R Documentation |
This function retrieves survey data from Kobotoolbox API for a specific asset. It supports pagination and handles both JSON and XML formats.
get_kobo_data(
prefix = NULL,
assetid = NULL,
url = "eu.kobotoolbox.org",
uname = NULL,
pwd = NULL,
encoding = "UTF-8",
format = "json"
)
prefix |
name to be used as the prefix of the file names to be downloaded. Can be a path. |
assetid |
The asset ID of the Kobotoolbox form. |
url |
The URL of Kobotoolbox (default is "eu.kobotoolbox.org"). |
uname |
Username for Kobotoolbox account. |
pwd |
Password for Kobotoolbox account. |
encoding |
Encoding to be used for data retrieval (default is "UTF-8"). |
format |
Format of the data to retrieve, either "json" or "xml" (default is "json"). |
The function uses pagination to retrieve large datasets, with a limit of 30,000 records per request. It continues to fetch data until all records are retrieved or an error occurs.
A list containing all retrieved survey results.
## Not run:
kobo_data <- get_kobo_data(
preifx = "my-survey",
assetid = "your_asset_id",
uname = "your_username",
pwd = "your_password"
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.