R script/function to use xls forms to process data?

Hey everyone,

I'm wondering if there is code or a function somewhere that lets you take your xls form and use it to recode from the ODK Central output into person-readable values. Basically, I want my data frame to have the text labels for the choices rather than the choice numbers.

I'm writing some code for this now, aided by Jeffrey Rozelle's ODK Codebook shiny app. If this doesn't exist and there is interest, I'd be willing to spend some time generalizing it for reuse.

ODK Codebook App -- https://figured.io/odkCodebookApp/

1 Like

Hi Laure,

The basic steps are to read in the lookup values from the XLSForm, split them by field name, then to dplyr::left_join them yo your submission data.

My approach is to have url-safe but human readable values, such as natator-depressus for the label "Flatback turtle". I can mutate the values into usable labels by replacing dashes ith whitespace and capitalising them appropriately.

Does this help?