24  ruODK Setup and basic functions

24.1 Background

ruODK is a great package for interacting with ODK Central via R. Full details of how to use it are here.

To connect your ODK Central account to R, you’ll need to set up your passwords in the r.environ file so they’re not exposed in scripts. Your passwords will be stored in plain text on your r.environ so be cautious about which machines you work with this way. There’s also options to add you password manually each time, but we’ll assume you’re on a secure machine when you do this.

24.2 Add your credentials to r.environ

Run this command to open the r.environ file

usethis::edit_r_environ(scope = “user”)

Inside renviron file, be careful not to delete anything, but add these lines (substituting your ODK central URL and email address in the appropriate places.

ODKC_URL=“https://central.xxx.com”

ODKC_UN=“mustafa.orbach@xxx.com”

On a new line, add the password you use to log in to the system. Substitute xxx for your password

ODKC_PW=“xxx”

On a new line, add your password for decryption (if you use project level encryption). Substitute xxx for your password

ODKC_PP=“xxx”

Finally, save the r.environ file and restart R to load it in to R.

24.3 Using ruODK to download a data set

24.3.1 Libraries

library(ruODK)
library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.3     ✔ readr     2.1.4
✔ forcats   1.0.0     ✔ stringr   1.5.0
✔ ggplot2   3.4.4     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.0
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(knitr)

24.3.2 Connect to server

My servers are at central.lshtm.ac.uk. You need to change this to yours. Sys.getenv() pulls the passwords from the r.environ file in a way that is more secure than just adding to the script.

#connect to server
ruODK::ru_setup(
  url = "https://central.lshtm.ac.uk",
  un = Sys.getenv("ODKC_UN"),
  pw = Sys.getenv("ODKC_PW"),
  tz = "Europe/London",
  verbose = TRUE
)
<ruODK settings>
  Default ODK Central Project ID:  
  Default ODK Central Form ID:  
  Default ODK Central URL: https://central.lshtm.ac.uk 
  Default ODK Central Username: chrissy.roberts@lshtm.ac.uk 
  Default ODK Central Password: run ruODK::get_default_pw() to show 
  Default ODK Central Passphrase: run ruODK::get_default_pp() to show 
  Default Time Zone: Europe/London 
  Default ODK Central Version: 1.1 
  Default HTTP GET retries: 3 
  Verbose messages: TRUE 
  Test ODK Central Project ID:  
  Test ODK Central Form ID:  
  Test ODK Central Form ID (ZIP tests):  
  Test ODK Central Form ID (Attachment tests):  
  Test ODK Central Form ID (Parsing tests):  
  Test ODK Central Form ID (WKT tests):  
  Test ODK Central URL:  
  Test ODK Central Username:  
  Test ODK Central Password: run ruODK::get_test_pw() to show 
  Test ODK Central Passphrase: run ruODK::get_test_pp() to show 
  Test ODK Central Version: 1.1 

24.3.3 Show a list of projects

You’ll want to know the pid number, given here as id

kable(ruODK::project_list()[1:2,-9])
id name description archived key_id created_at updated_at deleted_at forms app_users datasets last_submission last_entity
138 000_entities_chrissy_roberts NA FALSE NA 2023-10-16T12:20:44.601Z 2023-10-17T10:22:12.362Z NA 4 1 0 2023-10-16T21:16:44.950Z NA
37 000_Scratch_Project__Chrissy NA FALSE NA 2021-06-10T11:43:13.735Z 2023-07-21T14:20:50.404Z NA 24 2 0 2023-11-17T15:33:21.949Z NA

24.3.4 Show a list of forms that are included in the project

kable(ruODK::form_list(pid = 37))
project_id xml_form_id state enketo_id enketo_once_id created_at updated_at key_id version hash sha sha256 draft_token published_at name submissions entity_related review_states_received review_states_has_issues review_states_edited last_submission excel_content_type created_by_id created_by_type created_by_display_name created_by_created_at created_by_updated_at created_by_deleted_at fid
37 AN_Monitor open gGwfHzOgg3dMejAgIZHOU1FcuzyRobK 11c1c76d466f72e471d12b11c9f5d223a5987a23dade79a42d9ed3db663c51a8 2023-07-21 15:14:40 2023-07-21 15:20:50 NA bfb550086d060c85ca5c98bd31575537 42b9d1742e0387b387bebd8ab3f2542f262d92a7 d3d6f0abb2c8c28af73b75bbc815bc20545056feda7a88526ae7ce7c15d01f99 NA 2023-07-21 15:18:26 AN_Monitor 32 FALSE 31 0 1 2023-08-02T10:40:40.969Z application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA AN_Monitor
37 Badger-2040-Test-Acquire open XO8gzUmvHtUl8DchjYiLbzltj2EaljN 8b4cbaad7ef0d1c35041f326a23748e41bcd8fcce320f86ce23e765152f5191e 2023-07-17 13:46:34 2023-07-21 15:20:50 NA 1688347654 aad5b860f0a9b0802746814931600ca3 2fd1201f2064b45e515c713d422ab5702188120f 87e283cf98c4b9fb70caf491d7ab955c3d45991cd748227c8bc5a5e1477914ca NA 2023-07-17 13:47:22 Badger 2040 Test Acquire 1 FALSE 1 0 0 2023-07-17T12:49:07.408Z application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA Badger-2040-Test-Acquire
37 barcode open JhyeDvlWAsCHf9QHEGBMTHhCxav9Sas ffb06698afb54d556ad46662c2d2525ba75e998703f5d67dba452f1a70bc652a 2023-07-17 13:31:00 2023-07-21 15:20:50 NA bf0a782e17e8b5b49118ed29f96016a4 55988cd4a0cfc3b72f321d507df721d21dabf5e5 9898f5db30d7bf585f414bf3f0076220cb3ca9b34134d1665cf4a0d494e11f0e NA 2023-07-17 13:31:07 barcode 2 FALSE 2 0 0 2023-07-17T12:36:05.736Z application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA barcode
37 Book1 open iEJdbcIkiiy4EJRbbrSXZLT5UV3H5Dd a12692041174d95b2bf77c641c4cc59b06a6118b9f132ff897441acdabf429a7 2023-10-03 10:45:21 2023-10-03 11:20:59 NA 6 98a93fbbc315d701ec2a1c00fea9f3e1 51645db17b4ab4d1b65c1e0802aa184be88415a5 73363d42cbe6a93b9eab810a172bf60369c588adff289fc484c13acd2aaaadb1 NA 2023-10-03 10:45:30 Book1 0 FALSE 0 0 0 NA application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA Book1
37 Book2 open iMFxucJ5QoVlX8Fk58DJ2oa1MDbw1sV 4904830bafa8a7cb0e4d28fe0311d5e272a9aa0bdac6d32bac3f0c9ec95ca1ff 2023-10-03 11:21:25 2023-10-03 11:22:13 NA 2 254cd7fe492ee632cfa3f09f337c8641 f1807ff6ae156a1f9ac1e178367fc576e9602158 3267505c477fb1b76a567e1f7958d6b2afadc7eb870d19b2a702bb5c2cfbe4b9 NA 2023-10-03 11:22:13 Book2 0 FALSE 0 0 0 NA application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA Book2
37 bsc4 open ujsgQE0BigNyuMsWcfCwZQJo3soXbcH 758767be4f73ee6f7e5224d71c04b38b199c7f0d6c6da4d173a8ce4870062821 2023-11-03 09:45:40 2023-11-03 09:45:44 NA 1 093d3ca75cc80d42bd35a0bb60f30832 3fe5b79e18603dfe9baa40b3745fb6ae2d393504 6eafbe8e38f0f70408bf4b003e507939ac8e093979d540261734dc00cb33c4e1 NA 2023-11-03 09:45:44 botswana spectacle compliance questionnaire 0 FALSE 0 0 0 NA application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA bsc4
37 deja_vu open mfAXNBr1eZMZujYooScRiKpr1qAA2x8 e5b8c3e94accd393038a389a09e013685241610d91df20c4bf1d04aef8bb13ff 2023-06-09 18:11:30 2023-07-21 15:20:50 NA 31bf3382e15635e5e6b026c0d714ced9 ca2f839c483e598349ba94ae30130964ee543906 c149d95797e9dc82cb81168b66dc0a3ddb5129007168fc2be5d63eb0b255e936 NA 2023-06-09 18:12:03 deja_vu 0 FALSE 0 0 0 NA application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA deja_vu
37 dynamic_image open W0ce45XegHMKg5hIpu6TvjREmZXDemG NA 2023-06-14 14:05:39 2023-07-21 15:20:50 NA 20230614_2122 52f43580b65f9dbf2989443ab9ba8e00 b7cf5d0af2745911b245602e905a1802dcdcb221 6397c943464b458e1bb2e3cd2186cc8e09b9ff1f3a3b03f8dd7a828ca6afa220 vpqM\(DrUXdUXlt3sMxKzuMR3uUlpEIi38qEOtFPZc2BBL1NdXOlR4H1HWSmwnEA6 |NA |DynamicImage | 0|FALSE | 0| 0| 0|NA |application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | 19|user |Chrissy h. Roberts (SA) |2020-10-13 13:38:03 |2020-10-16 12:26:24 |NA |dynamic_image | | 37|Consent_Online |open |w1HeDySCXDaDttbDMNcHYiKqcsIdEfF |558feac954aec8f6e1ace5a5f8df307f39764450f133030ab2c4493a1c3c598b |2022-10-21 11:25:43 |2023-07-21 15:20:50 | NA|1 |cf910d1d93c659fe238c0a5d51d0e695 |c183764c1da7991a79bd4f8c53a2346f7863e04c |557fbec6339a464faa53c37ffb66d6af6e4051bcb61436f5a40b0a19474fc57e |NA |2022-10-21 11:58:58 |Eureka Study | 3|FALSE | 2| 0| 1|2023-08-03T13:25:28.961Z |application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | 19|user |Chrissy h. Roberts (SA) |2020-10-13 13:38:03 |2020-10-16 12:26:24 |NA |Consent_Online | | 37|form_with_id |open |uvFBa4B0ZUFicVILv4CgHUTmCi1wvzb |93ba398d78627670f0cf746b0881a38c0b9b11b84741cd945337c6507291d96b |2023-10-03 10:40:44 |2023-10-03 11:18:06 | NA|34 |f2a03f1c5f37c4575e618a8926830cd9 |463e75fed8e88b957cac1ade28a23b870dad377d |accbab9816a566ecf7bd643364f4a28fcf8f23bda9b78e09cbbd8389144d841b |NA |2023-10-03 11:18:06 |form_with_id | 8|FALSE | 8| 0| 0|2023-10-03T10:17:32.503Z |application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | 19|user |Chrissy h. Roberts (SA) |2020-10-13 13:38:03 |2020-10-16 12:26:24 |NA |form_with_id | | 37|geopoint_map |open |aPU4FTAcx124KGvWwtOUJhoVniE1GQT |ecce075b71472afbf97fce27a53c1298114cfbe1c129d16684e2e2e9e70d01a7 |2022-07-21 11:00:49 |2023-07-21 15:20:50 | NA| |f0b34efc38940a990396576f4643a008 |2d96e27527c1de28998373e741ed64515d9bf8d5 |c7aaf2141eef6b69a355d4c36af3c46341f876a921ebc5d11c55d26109cea6c2 |NA |2022-07-21 13:09:42 |geopoint_map | 4|FALSE | 2| 0| 2|2023-06-22T09:57:57.153Z |application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | 19|user |Chrissy h. Roberts (SA) |2020-10-13 13:38:03 |2020-10-16 12:26:24 |NA |geopoint_map | | 37|geopoint_test |open |reXze8unsqqOaOVPuUtuHheIDLYkik3 |e174bc81e0ea052e8d282915d638dbb0bc83085ff03ef7ebd90fb5714f3710f4 |2022-06-16 12:19:45 |2023-07-21 15:20:50 | NA| |dacea051c12f44b2241eb51b83157c4c |73083a0de82fde3fad47c11471cc97d6e5d1d1b0 |d2817c391c1c4bfba9a9fe9baed5a6190f784d44aafec8fb3d57011b36e48aa2 |NA |2022-06-16 12:20:55 |geopoint_test | 0|FALSE | 0| 0| 0|NA |application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | 19|user |Chrissy h. Roberts (SA) |2020-10-13 13:38:03 |2020-10-16 12:26:24 |NA |geopoint_test | | 37|Guinée questionnaire sur l'implémentation 22 Septembre 2022 V5 |open |nXDh9ihm5xWo4zzIoE3xvh6gQ5m6noy |39dcb9596b208fdc147665f2b40ffe3cdbd3130722e44e2cad977fa258e2f22f |2022-09-22 11:42:24 |2023-11-03 09:44:41 | NA| |15bfaa3400d9aefe5cc72171abe2a035 |71f3ca02bbb9a91a29deaeef10de97699db0256c |b13c00b634b6774c32604d9202e558438d8973c41542495eae5c7fd50ac48b79 |NA |2023-11-03 09:44:41 |Guinée questionnaire sur l'implémentation 22 Septembre 2022 V5 | 0|FALSE | 0| 0| 0|NA |application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | 19|user |Chrissy h. Roberts (SA) |2020-10-13 13:38:03 |2020-10-16 12:26:24 |NA |Guinée questionnaire sur l'implémentation 22 Septembre 2022 V5 | | 37|indexed_repeat_with_internal_cascading_select |open |wYI980zrjTKRLugyaeVbmfgQgPkO5lA |5bcb31a950f149af7ae1c13fa3938867354586d7c516436295a7025e09b08fce |2022-06-09 08:35:34 |2023-07-21 15:20:50 | NA| |e61dbda049489bcff50d5d21603a34f0 |053a5d0dd254a88926c733046d41cfd2687df10c |1b303413342ce3f4361dc06841054146b0ecc7e64deb8d173f9c701e2af080ac |NA |2022-06-09 08:36:48 |indexed_repeat_with_internal_cascading_select | 3|FALSE | 1| 0| 1|2022-06-09T07:38:12.442Z |application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | 19|user |Chrissy h. Roberts (SA) |2020-10-13 13:38:03 |2020-10-16 12:26:24 |NA |indexed_repeat_with_internal_cascading_select | | 37|ODK XLSForm Template v2023.1 |open |EBrgrhBwmZRZTy7JcVyNOags9ncZvaL |07a4ac52a6bdf3c7a5743b0bdc0586a0405f767c5bc614918a789cc343054556 |2023-11-17 13:36:18 |2023-11-17 15:32:50 | NA|20231117153234 |21b90a37a21cfeae9024e7db8f843b30 |b0c3cb83e85b66435e002b08cdc254d9cdf51980 |00bd59695d5075616deb7a257bad9fa82ca7623c1c94760116ace7a7ec1e10b9 |NA |2023-11-17 15:32:50 |ODK XLSForm Template v2023.1 | 3|FALSE | 3| 0| 0|2023-11-17T15:33:21.949Z |application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | 19|user |Chrissy h. Roberts (SA) |2020-10-13 13:38:03 |2020-10-16 12:26:24 |NA |ODK XLSForm Template v2023.1 | | 37|period.diary |open |wn1QkzNaPx5RvYBcwvEPBNOyrPb7LiE |523e22e3eafa21d4313e53ebedf28e1fd4cafe1508e42c1fe8cb9e2c24f08004 |2022-06-14 22:40:55 |2023-07-21 15:20:50 | NA| |d4ce754877a34b1ab1c66f4c0ece4f03 |3dbca6a7253e712218ec4d00ebd4889cdc32f8ac |961ac4fa9273c7fc28454352f6d48a63265b434b5347076ae4348282e0f0f9a6 |NA |2023-07-12 14:28:02 |period.diary | 2|FALSE | 0| 0| 2|2023-07-12T13:28:55.318Z |application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | 19|user |Chrissy h. Roberts (SA) |2020-10-13 13:38:03 |2020-10-16 12:26:24 |NA |period.diary | | 37|prepopulate.example |open |6PjXO9YhLRDcfZdORRWZKApXzzxA1vF |fe45e799aab8e1b7a21a15ee491bcc8c095e7fc4ecb95345274b47667c3114b5 |2021-06-10 13:26:35 |2023-07-21 15:20:50 | NA|1 |9518e5bc127b144b11fd469684b3ac80 |a8261359f6216499c2a137a7608ae8235966485b |ccdd0dd114efbfc17f88e1ff3cab084385d28ce31cff800704298e294ff75154 |NA |2021-06-10 13:27:20 |prepopulate.example | 13|FALSE | 8| 0| 5|2021-06-10T12:53:25.956Z |application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | 19|user |Chrissy h. Roberts (SA) |2020-10-13 13:38:03 |2020-10-16 12:26:24 |NA |prepopulate.example | | 37|scan |open |m8ndkVZvroSdbeaZtzd8jIJNNpgcGo8 |NA |2023-07-07 12:19:41 |2023-07-21 15:20:50 | NA| |8cf728f37c1e5a6a57991a55be531002 |6f1f9e9731bf630907fea298780b91a872a71828 |52455f3ba145c05b950ac9877cefe8e471276f7b70b261be88186cc19c97e12b |h18rXzcd\)sXAgB5YudHU7tN5PDTWSjYiMSmGSuKaoZXb8Yg7xsNlmATELAemAu9F NA scan 0 FALSE 0 0 0 NA application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA scan
37 socialcontact open 59KbfDuxbnASccLDIO8k1mncP8D6915 NA 2022-07-20 11:36:55 2023-07-21 15:20:50 3100 20192310 0a4bc27525b822f379a5522423107270 685dd2f797cc3b2c75596ef6ec5032239c68a2b1 a007fede67456309bf5f49188dcdafc4579d687860c013ff1e938949f2a9a974 i7K!YgHLrOSCLwb9qcg8wm8nSOa21TBM5kFGHOB6HEMA0l0UfQbxml4QSZmQl3QB NA Social_Contact_Survey 0 FALSE 0 0 0 NA NA 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA socialcontact
37 states open dMP1Efe2fCyn9BcW4q3QXDjxLCb97hw 83286e46cfe4b556cb1cd45e91d75bebd26709906f7dcf41aa59024f0861b4a9 2023-06-13 17:23:48 2023-07-21 15:20:50 NA 2 fb485b922d4b568d7096e995faf56d7f 2599294b363c40796c2575860e6a94d524d6431c fbe8dd65167d828a9812346633335f1e7cfc8dce7bb6dab618ba94bab0d38744 NA 2023-06-13 17:50:44 states 0 FALSE 0 0 0 NA application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA states
37 iov_v4 open zO5rRQ9qdHzWWCJ7CMIuxi3TNRatfYF 5b9a5a604ad8cd36d753fe7a97742c04ce2496090564fe67983b11c8c9ed7f2e 2023-06-13 11:17:19 2023-07-21 15:20:50 NA 1a27a53332476c816f62fbc311377374 ba5b8619c0369fe60868dfae1dce3c78b3a4a567 b640ba40e05a7347f223a5e3050e27eefa15d8571e01f26db32db1c5d97ff9fb NA 2023-06-13 13:56:14 Trachoma Grader Exam v4 0 FALSE 0 0 0 NA NA 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA iov_v4
37 trachoma_grading_test open vv2zLC5LcjGaE4XuvUVcRfZ8sAcLGFs NA 2023-06-13 14:51:03 2023-07-21 15:20:50 NA 857e24f535a2e4f7dfc022f201c2c5f3 2e14abea6e83b9a22b82d34c2a6fdb3d79f0f213 030c65210ff544a069b0f6266a07169b563e22553b8e5b54b441a3852c8116de qp1QzD1Zi0FRqiV2wdMPpgVWYB2TSWmSnNLU$Uy7OR7tlDwu1bqrS7acCZIJ6eFt NA trachoma_grading_test 0 FALSE 0 0 0 NA application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA trachoma_grading_test
37 Version 4 MSc ODK FORM open 1txKNg1kWWsSZ7rBb9H9NlvvxwguIca d8bbab33debd16bc5879e707933c50a8c615d816d28245c33f5c085340e2f44f 2023-10-03 10:28:29 2023-10-03 10:28:51 NA 2f1794f1769f7e1bfdc94f7f5d503998 d94e791991fb2ea82a1d3684798c2c8569b947ec 0929c85e60f026828cdfaeb6fd103c1302e3cb6e000f34a78abc4736afaaf82e NA 2023-10-03 10:28:33 Version 4 MSc ODK FORM 0 FALSE 0 0 0 NA application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA Version 4 MSc ODK FORM
37 Zim_Photos open Qmh4mHegPlAi65mGG8E6cg9npzsPtAx bbcb36e9fe0ed7cca8982cc4ca8f12ca432615ee63899d36568bb9c867201810 2022-09-09 10:48:36 2023-07-21 15:20:50 NA 118c629659e9e59d18bcbdf248019d16 667a2e0e3e795282b18bbe30f813e8458c169377 0bdf80ebc607cff4806ba0019092e102d203691504cab25672aac6dc9a8901fe NA 2022-09-09 10:48:54 Zim_Photos 0 FALSE 0 0 0 NA application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA Zim_Photos

24.3.5 Show details about a specific form

kable(ruODK::form_detail(pid = 37,fid = "geopoint_map"))
name fid version state submissions created_at created_by_id created_by updated_at published_at last_submission hash
geopoint_map geopoint_map open 4 2022-07-21T10:00:49.605Z 19 Chrissy h. Roberts (SA) 2023-07-21T14:20:50.416Z 2022-07-21T12:09:42.248Z 2023-06-22T09:57:57.153Z f0b34efc38940a990396576f4643a008

24.3.6 Show a list of submissions to a specific form

kable(ruODK::submission_list(pid = 37,fid = "geopoint_map"))
instance_id submitter_id device_id created_at updated_at review_state user_agent submitter_id_2 submitter_type submitter_display_name submitter_created_at submitter_updated_at submitter_deleted_at current_version
uuid:e6fe41e0-d9b3-49bf-8562-962e883f6b18 19 NA 2023-06-22 10:57:57 2023-07-06 11:46:52 edited Enketo/5.0.2 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15 19 user Chrissy h. Roberts (SA) 2020-10-13 13:38:03 2020-10-16 12:26:24 NA 19 , 2023-07-06T10:46:52.783Z , uuid:a3c73d2b-0136-443e-ab9c-d831919245e2, TRUE , 19 , user , Chrissy h. Roberts (SA) , 2020-10-13T12:38:03.905Z , 2020-10-16T11:26:24.184Z
uuid:0a671884-27ed-4eb8-9102-310149899678 1094 collect:v2m4bt3bE9ZfeMfi 2022-07-21 13:13:51 2023-07-11 11:54:56 edited org.odk.collect.android/v2022.3-beta.2 Dalvik/2.1.0 (Linux; U; Android 12; Pixel 4a Build/SQ3A.220705.003.A1) 1094 field_key chrissy 2021-11-03 12:44:28 NA NA 19 , 2023-07-11T10:54:56.640Z , uuid:16219910-28f2-407c-90ac-6f758713b176, TRUE , 19 , user , Chrissy h. Roberts (SA) , 2020-10-13T12:38:03.905Z , 2020-10-16T11:26:24.184Z
uuid:9f6a1fd4-3394-4e5a-b013-e344272cdf70 1094 collect:v2m4bt3bE9ZfeMfi 2022-07-21 13:13:24 NA NA org.odk.collect.android/v2022.3-beta.2 Dalvik/2.1.0 (Linux; U; Android 12; Pixel 4a Build/SQ3A.220705.003.A1) 1094 field_key chrissy 2021-11-03 12:44:28 NA NA 1094 , 2022-07-21T12:13:24.100Z , uuid:9f6a1fd4-3394-4e5a-b013-e344272cdf70 , TRUE , collect:v2m4bt3bE9ZfeMfi , org.odk.collect.android/v2022.3-beta.2 Dalvik/2.1.0 (Linux; U; Android 12; Pixel 4a Build/SQ3A.220705.003.A1), 1094 , field_key , chrissy , 2021-11-03T12:44:28.375Z
uuid:0a65e09e-18e5-4fd3-bbe8-4c57529ccc89 1094 collect:v2m4bt3bE9ZfeMfi 2022-07-21 13:11:19 NA NA org.odk.collect.android/v2022.3-beta.2 Dalvik/2.1.0 (Linux; U; Android 12; Pixel 4a Build/SQ3A.220705.003.A1) 1094 field_key chrissy 2021-11-03 12:44:28 NA NA 1094 , 2022-07-21T12:11:19.019Z , uuid:0a65e09e-18e5-4fd3-bbe8-4c57529ccc89 , TRUE , collect:v2m4bt3bE9ZfeMfi , org.odk.collect.android/v2022.3-beta.2 Dalvik/2.1.0 (Linux; U; Android 12; Pixel 4a Build/SQ3A.220705.003.A1), 1094 , field_key , chrissy , 2021-11-03T12:44:28.375Z

24.3.7 Pull submissions

ruODK is very powerful and can get quite complicated. The most basic thing you need is a dataframe with your submissions. Here’s how to get one.

df<-ruODK::odata_submission_get(pid = "37",fid="geopoint_map")

24.3.8 Show data

kable(df[,1:4])
geopoint_longitude geopoint_latitude geopoint_altitude geopoint_accuracy
152.528542 -32.19346 0 0
-2.929474 60.74228 0 0
152.504487 -32.18187 0 0
152.526883 -32.20085 0 0