DOI Project Status: Active – The project has reached a stable, usable state and is being actively developed. Last-changedate GitHub issues CI - GitHub Actions CI - Appveyor Text coverage CodeFactor Hosted RStudio with 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) is free-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 extensive ODK documentation and visit the friendly ODK forum.

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

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

A typical ODK workflow: An XForm is designed e.g. in ODK Build, published to ODK Central, and downloaded onto an Android device running ODK Collect. After data have been captured digitally using ODK 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 interactive documentation.

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


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) at Binder

ruODK’s scope:

  • To wrap all ODK Central API endpoints with a focus on data 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: Example rOzCBI
    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 a VueJS/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


You can install the development version (main branch) of ruODK with:

if (!requireNamespace("remotes")) install.packages("remotes")
remotes::install_github("ropensci/[email protected]", dependencies = TRUE)

ODK Central

Access to an ODK Central instance

First, we need an ODK Central instance and some data to play with!

Either request a free trial or follow the setup instructions to build and deploy your very own ODK Central instance.

ODK Central setup

The ODK Central user manual provides up-to-date descriptions of the steps below.

  • Create a web user account on an ODK Central instance. Your username will be an email address.
  • Create a project and give the web user at least read permissions.
  • Create an XForm, e.g. using ODK Build, or use the example forms provided by ruODK. The .odkbuild versions can be loaded into ODK Build, while the .xml versions can be directly imported into ODK Central.
  • Publish the form to ODK Central.
  • Collect some data for this form on ODK Collect and let ODK Collect submit the finalised forms to ODK Central.

Configure ruODK

Set up ruODK with an OData Service URL and credentials of a read-permitted ODK Central web user. Adjust verbosity to your liking.

  svc = "",
  un = "[email protected]",
  pw = "...",
  tz = "Australia/Perth",
  verbose = TRUE # great for demo or debugging

For all available detailed options to configure ruODK, read vignette("setup", package = "ruODK").

Use ruODK

A quick example browsing projects, forms, submissions, and accessing the data:

# Part 1: Data discovery ------------------------------------------------------#
# List projects
proj <- ruODK::project_list()
proj %>% head() %>% knitr::kable(.)
id name forms app_users created_at updated_at last_submission archived
1 DBCA 12 14 2020-09-15 11:50:06 NA 2021-03-09 10:45:08 FALSE
4 Fire Management and Plant Health 5 2 2020-11-06 11:12:16 NA 2020-11-06 11:47:21 FALSE
6 Kingston Spotlighting 3 3 2021-02-16 14:01:19 NA 2021-02-16 14:36:52 FALSE
2 ruODK package tests 12 1 2020-10-31 19:11:50 NA 2020-11-02 12:41:14 FALSE
3 ruODK package tests encrypted 1 1 2020-10-31 19:12:57 NA 2020-11-02 15:26:38 FALSE
5 Sandbox 2 1 2020-12-14 15:36:46 NA 2021-01-27 07:35:06 FALSE
# List forms of default project
frms <- ruODK::form_list()
frms %>% head() %>% knitr::kable(.)
name fid version state submissions created_at created_by_id created_by updated_at last_submission hash
Flora Quadrat 0.4 Flora-Quadrat-04 open 1 2020-11-02 10:56:21 5 Florian Mayer 2020-11-23 13:25:03 2020-11-02 12:19:45 434ff9e1e33fc8bb35148c0cc6979708
Flora Quadrat 0.4 (gap) Flora-Quadrat-04-gap open 2 2020-11-02 11:15:29 5 Florian Mayer 2020-11-23 13:25:03 2020-11-02 12:36:09 241c4759564ea039b4404b6892025500
Flora Quadrat 0.4 (one att) Flora-Quadrat-04-att open 1 2020-11-02 11:13:13 5 Florian Mayer 2020-11-23 13:25:03 2020-11-02 12:36:10 2cb6a4b3d7f05ab055f3da89d0958b14
I8n label and choices I8n_label_choices open 2 2020-11-02 11:29:48 5 Florian Mayer 2020-11-23 13:25:03 2020-11-02 12:41:14 bc4dff584ab2e0b0dd2c50eb1c2c7aa4
I8n label lang I8n_label_lng open 1 2020-11-02 11:38:37 5 Florian Mayer 2020-11-23 13:25:03 2020-11-02 12:39:58 7e912580b246796c8477cfcd4c5dceab
I8n label lang with choice filter I8n_lang_choicefilter open 0 2020-11-23 13:23:36 5 Florian Mayer 2020-11-23 13:25:03 NA 369a921eb94672dabbd395a035819d65
# Form details of default form
frmd <- ruODK::form_detail()
frmd %>% knitr::kable(.)
name fid version state submissions created_at created_by_id created_by updated_at last_submission hash
Flora Quadrat 0.4 Flora-Quadrat-04 open 1 2020-11-02T02:56:21.085Z 5 Florian Mayer 2020-11-23T05:25:03.426Z 2020-11-02T04:19:45.451Z 434ff9e1e33fc8bb35148c0cc6979708
# Form schema: defaults to version 1.1
meta <- ruODK::form_schema(odkc_version = get_test_odkc_version())
#> ℹ Form schema v1.1
meta %>% knitr::kable(.)
path name type binary ruodk_name
/meta meta structure NA meta
/meta/instanceID instanceID string NA meta_instance_id
/encounter_start_datetime encounter_start_datetime dateTime NA encounter_start_datetime
/reporter reporter string NA reporter
/device_id device_id string NA device_id
/location location structure NA location
/location/area_name area_name string NA location_area_name
/location/quadrat_photo quadrat_photo binary TRUE location_quadrat_photo
/location/corner1 corner1 geopoint NA location_corner1
/habitat habitat structure NA habitat
/habitat/morphological_type morphological_type select1 NA habitat_morphological_type
/habitat/morphological_type_photo morphological_type_photo binary TRUE habitat_morphological_type_photo
/vegetation_stratum vegetation_stratum repeat NA vegetation_stratum
/vegetation_stratum/nvis_level3_broad_floristic_group nvis_level3_broad_floristic_group select1 NA vegetation_stratum_nvis_level3_broad_floristic_group
/vegetation_stratum/max_height_m max_height_m decimal NA vegetation_stratum_max_height_m
/vegetation_stratum/foliage_cover foliage_cover select1 NA vegetation_stratum_foliage_cover
/vegetation_stratum/dominant_species_1 dominant_species_1 string NA vegetation_stratum_dominant_species_1
/vegetation_stratum/dominant_species_2 dominant_species_2 string NA vegetation_stratum_dominant_species_2
/vegetation_stratum/dominant_species_3 dominant_species_3 string NA vegetation_stratum_dominant_species_3
/vegetation_stratum/dominant_species_4 dominant_species_4 string NA vegetation_stratum_dominant_species_4
/perimeter perimeter structure NA perimeter
/perimeter/corner2 corner2 geopoint NA perimeter_corner2
/perimeter/corner3 corner3 geopoint NA perimeter_corner3
/perimeter/corner4 corner4 geopoint NA perimeter_corner4
/perimeter/mudmap_photo mudmap_photo binary TRUE perimeter_mudmap_photo
/taxon_encounter taxon_encounter repeat NA taxon_encounter
/taxon_encounter/field_name field_name string NA taxon_encounter_field_name
/taxon_encounter/photo_in_situ photo_in_situ binary TRUE taxon_encounter_photo_in_situ
/taxon_encounter/taxon_encounter_location taxon_encounter_location geopoint NA taxon_encounter_taxon_encounter_location
/taxon_encounter/life_form life_form select1 NA taxon_encounter_life_form
/taxon_encounter/voucher_specimen_barcode voucher_specimen_barcode barcode NA taxon_encounter_voucher_specimen_barcode
/taxon_encounter/voucher_specimen_label voucher_specimen_label string NA taxon_encounter_voucher_specimen_label
/encounter_end_datetime encounter_end_datetime dateTime NA encounter_end_datetime
# Part 2: Data access ---------------------------------------------------------#
# Form tables
srv <- ruODK::odata_service_get()
srv %>% knitr::kable(.)
name kind url
Submissions EntitySet Submissions
Submissions.vegetation_stratum EntitySet Submissions.vegetation_stratum
Submissions.taxon_encounter EntitySet Submissions.taxon_encounter
# Form submissions
data <- ruODK::odata_submission_get(local_dir = fs::path("vignettes/media"),
                                    odkc_version = get_test_odkc_version())
#> ℹ Downloading submissions...
#> ✔ Downloaded submissions.
#> ℹ Reading form schema...
#> ℹ Form schema v1.1
#> ℹ Parsing submissions...
#> ℹ Not unnesting geo fields: value_location_corner1, value_perimeter_corner2, value_perimeter_corner3, value_perimeter_corner4, value_taxon_encounter_taxon_encounter_location
#> ℹ Unnesting: value
#> ℹ Unnesting column "value"
#> ℹ Unnesting more list cols: value___system, value_meta, value_location, value_habitat, value_perimeter
#> ℹ Not unnesting geo fields: value_location_corner1, value_perimeter_corner2, value_perimeter_corner3, value_perimeter_corner4, value_taxon_encounter_taxon_encounter_location
#> ℹ Unnesting: value___system, value_meta, value_location, value_habitat, value_perimeter
#> ℹ Unnesting column "value___system"
#> ℹ Unnesting column "value_meta"
#> ℹ Unnesting column "value_location"
#> ℹ Unnesting column "value_habitat"
#> ℹ Unnesting column "value_perimeter"
#> ℹ Found date/times: encounter_start_datetime, encounter_end_datetime.
#> ℹ Found attachments in main Submissions table: location_quadrat_photo, habitat_morphological_type_photo, perimeter_mudmap_photo.
#> ℹ Downloading attachments...
#> ℹ Using local directory "vignettes/media".
#> ◉ File already downloaded, keeping "vignettes/media/1604290006239.jpg".
#> ℹ Using local directory "vignettes/media".
#> ◉ File already downloaded, keeping "vignettes/media/1604290049411.jpg".
#> ℹ Using local directory "vignettes/media".
#> ◉ File already downloaded, keeping "vignettes/media/1604290379613.jpg".
#> ℹ Found geopoints: location_corner1, perimeter_corner2, perimeter_corner3, perimeter_corner4.
#> ℹ Parsing location_corner1...
#> ℹ Parsing perimeter_corner2...
#> ℹ Parsing perimeter_corner3...
#> ℹ Parsing perimeter_corner4...
#> ℹ Found geotraces: .
#> ℹ Found geoshapes: .
#> ✔ Returning parsed submissions.
data %>% dplyr::select(-"odata_context") %>% knitr::kable(.)
id encounter_start_datetime device_id encounter_end_datetime system_submission_date system_submitter_id system_submitter_name system_attachments_present system_attachments_expected meta_instance_id location_area_name location_quadrat_photo location_corner1_longitude location_corner1_latitude location_corner1_altitude location_corner1_accuracy location_corner1 habitat_morphological_type habitat_morphological_type_photo vegetation_stratum_odata_navigation_link perimeter_corner2_longitude perimeter_corner2_latitude perimeter_corner2_altitude perimeter_corner2_accuracy perimeter_corner2 perimeter_corner3_longitude perimeter_corner3_latitude perimeter_corner3_altitude perimeter_corner3_accuracy perimeter_corner3 perimeter_corner4_longitude perimeter_corner4_latitude perimeter_corner4_altitude perimeter_corner4_accuracy perimeter_corner4 perimeter_mudmap_photo taxon_encounter_odata_navigation_link
uuid:469f71d3-d7aa-4c74-8aaa-af5f667a2f28 2020-11-02 12:06:19 5afb51f35ba0c572 2020-11-02 12:15:48 2020-11-02T04:19:45.451Z 53 ruODK 5 5 uuid:469f71d3-d7aa-4c74-8aaa-af5f667a2f28 Test site 1 vignettes/media/1604290006239.jpg 115.8844 -31.99596 -12.7 4.625 Point , 115.8843989 , -31.9959554 , -12.6999998092651, 4.625 flat vignettes/media/1604290049411.jpg Submissions(‘uuid:469f71d3-d7aa-4c74-8aaa-af5f667a2f28’)/vegetation_stratum 115.8843 -31.99579 -21.2 4.861 Point , 115.8842726 , -31.9957893 , -21.1999988555908, 4.861 115.8843 -31.99582 -21.2 4.655 Point , 115.8843031 , -31.9958188 , -21.1999988555908, 4.655 115.8846 -31.99614 -12.7 4.913 Point , 115.8845949 , -31.9961397 , -12.6999998092651, 4.913 vignettes/media/1604290379613.jpg Submissions(‘uuid:469f71d3-d7aa-4c74-8aaa-af5f667a2f28’)/taxon_encounter

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

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

Try ruODK

Binder will launch a disposable, hosted RStudio instance with ruODK installed and the companion package urODK opened as starting point for a hands-on workshop or instant demo of ruODK usage.

Create a new RMarkdown workbook from ruODK template “ODK Central via OData” and follow the instructions within.


Contributions through issues and PRs are welcome!

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


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

To cite package ruODK in publications use:

#> To cite ruODK in publications use:
#>   Mayer, Florian Wendelin. (2020, Nov 19).  ruODK: An R Client for the
#>   ODK Central API (Version 0.9.5).  Zenodo.
#> A BibTeX entry for LaTeX users is
#>   @Misc{,
#>     title = {ruODK: Client for the ODK Central API},
#>     author = {Florian W. Mayer},
#>     note = {R package version 0.9.5},
#>     year = {2020},
#>     url = {},
#>   }


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 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

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