elliottmess / koboapi Goto Github PK
View Code? Open in Web Editor NEWLink kobotoolbox-based API with R.
Home Page: https://elliottmess.github.io/koboAPI/
Link kobotoolbox-based API with R.
Home Page: https://elliottmess.github.io/koboAPI/
A few functions have the password as a parameter, which increases the risk of sharing password along with code/script.
A solution has to be found to remove those hard coded passwords, while limiting the number of times the password is asked for with readline.
Hi Elliot,
This package is great! I'm not sure if you are still working on it at the moment, but I could not get a bunch of functions to work properly. The issues I found were usually due to object and function names being overwritten. I have fixed the package to work for my needs in my forked repo. It now works for the simple cases of downloading all the forms in a kobo account into a table, downloading a kobo dataset, and downloading the XLSForm form. The changes I made may have broken the some of the stuff for more complex use-cases where you want to deal with languages differently or extract the repeat groups into a nested list column. Therefore, it may not make sense for me to submit a pull request yet. However, let me know your thoughts. Thanks!
I also added a standardize_form function in kobo_utils to be used after download_form. It just puts the columns back to how they would have been when the form was downloaded (just fixes list_name in survey dataframe). I made the function separate because I didn't want to change columns that might be crucial for other functionality. In this standard format kobold functions (seths package) can be used which are quite convenient. If making this standardization can be done inside the download_form function without breaking other processes that would be simpler.
When calling download_data and download_form (but probably with other functions too) with an "old_id" in the formid argument, the following errors shows:
Error: Problem with `mutate()` input `label`.
x object 'label' not found
i Input `label` is `purrr::map(label, setNames, languages_labels)`.
When I try to download my data i found this problem in this function:
download_data : function (formid, user, pwd, api = "https://kobo.humanitarianresponse.info", seperator = "\/")
download_data("841767", "xxxxx", "xxxxx", api = "https://kobo.humanitarianresponse.info", seperator = "\/")
|============================================================================| 100%
Error in new2old_id(formid, download_forms_all) :
all_forms must be a dataframe
When the forms are on koobotoolbox.org, the API is :kc.kobotoolbox.org, meaning that the variable storing the api must be modified.
api_old <- gsub("kobo", "kc", api)
should be replaced by:
api_old <- gsub("kf", "kc", api)
When data with repeat questions are downloaded, an error is thrown because for the forward slash included in the column names by the kobotoolbox API.
Example:
"Description_Assessment/Key_2[1]/Key_6"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.