Skip to content

Instantly share code, notes, and snippets.

@dickoa
Created February 18, 2022 09:28
Show Gist options
  • Save dickoa/b00ed192a82f80ee03a265aeff46f211 to your computer and use it in GitHub Desktop.
Save dickoa/b00ed192a82f80ee03a265aeff46f211 to your computer and use it in GitHub Desktop.
Read KoBoToolbox data
library(robotoolbox) # if not available please do remotes::install_gitlab("dickoa/robotoolbox")
library(dplyr)
library(labelled)
token <- kobo_token(username = "xxxx",
password = "xxxxx",
url = "kobo.humanitarianresponse.info")
kobo_setup(url = "kobo.humanitarianresponse.info",
token = token)
### List all your projects
al <- kobo_asset_list()
glimpse(al)
## We can read the data from the project: "Data readiness training Assessment for CP3 in Naivasha"
uid <- al |>
filter(name == "Data readiness training Assessment for CP3 in Naivasha") |>
pull(uid)
uid
### Get the data
data <- kobo_data(uid)
glimpse(data)
var_label(data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment