kobo_media_downloader | R Documentation |
'kobo_media_downloader' downloads media from data downloaded using 'kobo_df_download'. Loops through media columns and downloads files individually.
kobo_media_downloader(
url = "eu.kobotoolbox.org",
uname,
pwd,
assetid,
fsep = ";",
sleep = 2,
identifier = "URL",
timeoutval = 300,
destfolder = "media"
)
url |
The '[url]' of kobotoolbox Default is "eu.kobotoolbox.org". |
uname |
is username of your kobotoolbox account |
pwd |
is the password of the account |
assetid |
is the id of the asset for which the export is to be created |
fsep |
is the separator of the downloaded csv file. In most of the cases, it is ";", which is the default. However, |
sleep |
is the sleep time between API actions. For example, it takes time to download an export. But R does not wait for the download to finish before going to next step. Hence the need to provide a break between consecutive API actions. Default value is 2 (seconds). |
identifier |
is the key using with the columns with URL is identified. Default value is "URL" because in most of the cases, the columns containing the URL values end with "URL". Please note that any other column name with similar value may cause error. |
timeoutval |
is the timeout value in seconds to download the media files. Default is 300 seconds. |
destfolder |
is the folder where the media is to be stored. |
The function creates an export of survey data in 'csv'. If successful, it attempts to download the data and and returns a data frame. From that data frame, the function extracts the URLs of media and attempts to download them.
The function returns a data frame of data downloaded from 'Kobotoolbox'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.