Created
February 18, 2022 09:28
-
-
Save dickoa/b00ed192a82f80ee03a265aeff46f211 to your computer and use it in GitHub Desktop.
Read KoBoToolbox data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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