MyNixOS website logo
Description

Download Data from Kobotoolbox to R.

Wrapper for 'Kobotoolbox' APIs ver 2 mentioned at <https://support.kobotoolbox.org/api.html>, to download data from 'Kobotoolbox' to R. Small and simple package that adds immense convenience for the data professionals using 'Kobotoolbox'.

KoboconnectR

CRANstatus R-CMD-check

The goal of KoboconnectR is to facilitate data extraction from Kobotoolbox projects/assets into R, instead of downloading the individual spreadsheet files.

Installation

CRAN version can be downloaded with:

install.packages("KoboconnectR") 

The effort is still in its early stage. The development version can be installed from GitHub with:

# install.packages("devtools")
devtools::install_github("asitav-sen/KoboconnectR")

Getting started

Before being able to use the kobotoolbox API, one needs to set up API token. The kobotoolbox documentation lists multiple ways for one to extract the token value. If there is a token, the easiest way to retrieve it is by using get_kobo_token() function.

kobotools_kpi_data(assetid= "assetid", url="kobo.humanitarianresponse.info", uname="username", pwd="password")

To find the asset id, one can use the kobotools_api() function that returns a list of assets the user has access to.

kobotools_api(url="kobo.humanitarianresponse.info", simplified=T, uname="userid", pwd="password")

Downloading data

KoboconnectR::kobo_df_download(uname = "username",
                                          pwd="password", assetid = "assetid",
                                          lang = "English (en)", all="false", lang="_default",
                               hierarchy="false", include_grp="true",grp_sep="/",fsep=";",
                              multi_sel="both", media_url="true", fields=NULL, sub_ids=NULL, sleep=2)

IF THE DOWNLOAD FAILS, TRY INCREASING THE SLEEP PARAMETER (use the dev version please).

For further details, check the vignette.

Contribution

The package is stable but still in early stages of development. Any help to enhance it further will be highly appreciated. Please feel free to fork, add/modify and create pull requests.

Issues and Suggestions

Please feel free to add issue of suggestions in github

Dependencies

The following packages are required to install and run this package.

  1. Package httr
  2. Package jsonlite
  3. Package curl
  4. Package mime
  5. Package openssl
  6. Package R6
  7. Package methods
  8. Package readxl
  9. Package rlang
  10. Package purrr.
Metadata

Version

1.2.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows