Movatterモバイル変換


[0]ホーム

URL:


Skip to contents

ruODK: An R Client for the ODK Central APIEspecially in these trying times, it is important to ask: ruODK?

Especially in these trying times, it is important to ask “r u ODK?”.

ruODK is an R client to access and parse data from ODK Central.

OpenDataKit (ODK) isfree-and open-source software that helps millions of people collect data quickly, accurately, offline, and at scale. The software is in active use in every country in the world and is supported by a large and helpful community.

ruODK is a community contribution to the ODK ecosystem, but not directly affiliated with ODK.

ruODK assumes some familiarity of its users with the ODK ecosystem and workflows. For a detailed overview, read the extensiveODK documentation and visit the friendlyODK forum.

ODK Central is a cloud-based data clearinghouse for digitally captured data, replacing the older softwareODK Aggregate. ODK Central manages user accounts and permissions, stores form definitions, and allows data collection clients likeODK Collect to connect to it for form download and submission upload.

An ODK setup with ODK Build, Central, Collect, and ruODK

A typicalODK workflow: An XForm is designed e.g. inODK Build,published to ODK Central, and downloaded onto an Android device running ODK Collect. After data have been captured digitally usingODK Collect, the data are uploaded and stored in ODK Central. The next step from there is to extract the data, optionally upload it into another data warehouse, and then to analyse and generate insight from it.

While data can be retrieved in bulk through the GUI, ODK Central’s API provides access to its data and functionality through both an OData and a RESTful API with a comprehensive and interactivedocumentation.

ruODK is aimed at the technically minded researcher who wishes to access and process data from ODK Central using the programming language R.

Benefits of using the R ecosystem in combination with ODK:

  • Scalability: Both R and ODK are free and open source software. Scaling to many users does not incur license fees.
  • Ubiquity: R is known to many scientists and is widely taught at universities.
  • Automation: The entire data access and analysis workflow can be automated through R scripts.
  • Reproducible reporting (e.g.Sweave,RMarkdown), interactive web apps (Shiny), workflow scaling (drake).
  • Rstudio-as-a-Service (RaaS) atHosted RStudio with ruODK

ruODK’s scope:

  • To wrap all ODK Central API endpoints with a focus ondata access.
  • To provide working examples of interacting with the ODK Central API.
  • To provide convenience helpers for the day to day tasks when working with ODK Central data in R:data munging the ODK Central API output into tidy R formats.

ruODK’s use cases:

  • Smaller projects: ExamplerOzCBI
    1. Data collection: ODK Collect
    2. Data clearinghouse: ODK Central
    3. Data analysis and reporting:Rmd (ruODK)
    4. Publishing and dissemination:ckanr,CKAN
  • Larger projects:
    1. Data collection: ODK Collect
    2. Data clearinghouse: ODK Central
    3. ETL pipeline into data warehouses:Rmd (ruODK)
    4. QA: in data warehouse
    5. Reporting:Rmd
    6. Publishing and dissemination:ckanr,CKAN

Out of scope:

  • To wrap “management” API endpoints. ODK Central is aVueJS/NodeJS application which provides a comprehensive graphical user interface for the management of users, roles, permissions, projects, and forms.
  • To provide extensive data visualisation. We show only minimal examples of data visualisation and presentation, mainly to illustrate the example data. Once the data is in your hands as tidy tibbles… urODK!

A quick preview

ruODK screencast

Install

You can install the latest release ofruODK from therOpenSci R-Universe:

# Enable the rOpenSci universeoptions(repos=c(  ropensci="https://ropensci.r-universe.dev",  CRAN="https://cloud.r-project.org"))install.packages("ruODK")

Alternatively, you can install the development version from themain branch.

if(!requireNamespace("remotes"))install.packages("remotes")# Full installremotes::install_github("ropensci/ruODK@main",  dependencies=TRUE,  upgrade="always",  build_vignettes=TRUE)# Minimal install without vignettesremotes::install_github("ropensci/ruODK@main",  dependencies=TRUE,  upgrade="ask",  build_vignettes=FALSE)

If the install fails, read the error messages carefully and install any unmet dependencies (system libraries or R packages).

If the install fails on building the vignettes, you can setbuild_vignettes=FALSE and read the vignettes from the online docs instead.

If the installation still fails, or the above does not make any sense, feel free to submit abug report.

TryruODK

You can also runruODK through hosted or self-built Docker images.

In decreasing order of simplicity:

  • Launch a hosted RStudio ServerHosted RStudio with ruODK

  • Launch a hosted JupyterLab server (with all kernel options available)Hosted JupyterLab with ruODK

  • Download the pre-builtruODK Docker image based on the last taggedruODK version

    docker pull ghcr.io/ropensci/ruodk:latestdocker run ghcr.io/ropensci/ruodk:latest
  • Build the latestruODK version locally with your own GitHub Personal Access Token (PAT)

    git clone git@github.com:ropensci/ruODK.gitcd ruODKdocker build .-t<myorg>/ruodk:latest--build-arg GITHUB_PAT="..."docker run-p8888:8888<myorg>/ruodk:latest

The running Docker image will print a URL you can click on. The URL will openJupyterLab in your browser. From there, you can run any available kernel, amongst others are RStudio and a plain R shell.

ConfigureruODK

For all available detailed options to configure authentication forruODK, readvignette("setup", package = "ruODK").

UseruODK

A detailed walk-through with some data visualisation examples is available in thevignette("odata-api", package="ruODK").

See alsovignette("restful-api", package="ruODK") for examples using the alternative RESTful API.

urODK, a sing-alongruODK workshop about you, R, and ODK, is available onHosted RStudio with ruODK.

Contribute

Contributions throughissues and PRs are welcome!

See thecontributing guide on best practices and further readings for code contributions.

Attribution

ruODK was developed by Florian Mayer for the Western AustralianDepartment of Biodiversity, Conservation and Attractions (DBCA). The development was funded both by DBCA core funding and external funds from theNorth West Shelf Flatback Turtle Conservation Program.

ruODK is maintained and extended by Florian Mayer.

To cite packageruODK in publications use:

citation("ruODK")#> To cite ruODK in publications use (with the correct version number:#>#>   Mayer, Florian Wendelin. (2020, Nov 19).  ruODK: An R Client for the ODK Central API (Version X.X.X).  Zenodo.#>   https://doi.org/10.5281/zenodo.5559164#>#> A BibTeX entry for LaTeX users is#>#>   @Misc{,#>     title = {ruODK: Client for the ODK Central API},#>     author = {Florian W. Mayer},#>     note = {R package version X.X.X},#>     year = {2020},#>     url = {https://github.com/ropensci/ruODK},#>   }

Acknowledgements

The Department of Biodiversity, Conservation and Attractions (DBCA) acknowledges the traditional owners of country throughout Western Australia and their continuing connection to the land, waters and community. We pay our respects to them, their culture and to their Elders past and present.

This software was created on Whadjuk boodja (ground) both as a contribution to the ODK ecosystem and for the conservation of the biodiversity of Western Australia, and in doing so, caring for country.

Package functionality

Seevignette("comparison", package="ruODK") for a comprehensive comparison of ruODK to other software packages from both an ODK and an OData angle.

Links

License

Community

Citation

Developers

R-universe

  • ruODK status badge

Software Peer-Review

  • rOpenSci peer-review


[8]ページ先頭

©2009-2025 Movatter.jp