Create an OData connector to use ODK Central as data source in Google Data Studio

I'll try!

GDS allows users to configure data sources, and access and analyze data from these sources.
I wish ODK Central could be used as data source, and the following facts indicate it might be possible:
ODK Central has a (somewhat standard compliant) OData API.
GDS however doesn't have a "connector" for OData APIs. Yet.
My suggestion is to build a new GDS connector following https://developers.google.com/datastudio/connector which supports the ODK Central OData API.

Related, ruODK is an R client for the ODK Cental API (OData and RESTful), now peer-reviewed and released at https://docs.ropensci.org/ruODK/.

1 Like

Resources for anyone willing to give this a shot:

  1. Tools: https://developers.google.com/datastudio/connector/get-started
  2. Target: The ODK Central API docs https://odkcentral.docs.apiary.io/
  3. Test: Use the ODK Central Sandbox for testing, ask here or create an "Account request" (Disclaimer: I'm not ODK core, but like anyone with an account on the ODK Central Sandbox I can invite others)

I fear building an OData connector will require form introspection and parsing of each data type supported in ODK Central. A starting point might be the R implementation of "I've got the OData, now what" (docs and source).

1 Like

Hi @Florian_May. Thinking of picking this up - is it still open/in need of dev work? I notice it's tagged with pr-welcome, is there a place you had in mind to add the connector?

3 Likes

Hi @PieterBenjamin! If you have time, feel free to have a go! I put this idea here in the hope that someone would find time. I'd be happy to test and share any lessons implemented in ruODK if that helps.

2 Likes

I'm desperately looking for an automated (e.g. API-driven) way to get ODK submission data from ODK Central into Google Data Studio, or even into Google Sheets (using only Enketo). If you are taking this up, I'd be keen to test out the solution! Thanks!

3 Likes

Thanks for letting me know! Working on it with a few devs here.

3 Likes

Great work, and thanks for taking this up!

Minor feedback:

Looking forward to test drive when it's ready!

2 Likes

Also, we are moving to a token based method, instead of use base64 encoding scheme of username and password.
Now I can tokens, but how do I verify that the token I have is not expired, is there a URL that I can send a token to and get whether that token has expired or not? Thanks!

You can find the auth API in the ODK Central API docs (see my links above).
Leading question: Is there an endpoint in the token auth that would work to verify authentication on any ODK Central instance, independent of specific (or any) projects being present?

Happy to announce that our connector seems to be working and is ready for testing at https://github.com/UDub-Impact/OData-Connector. @Florian_May @cbg would either of you be willing to do some preliminary user testing? We were not able to get repeats working but other than that the connector should be fully functional!

3 Likes

Awesome, thanks for sharing! I'll give it a go and report back here.

2 Likes

I've had a go at the connector and here's some feedback:

  • Love the coding style, well documented and readable :slight_smile:
  • I used the code as is and did not fork or alter it.
  • Got stuck at Using... step 3: The "path" meant the "ODK Central API URL". The example ending in /v1 finally was the winning hint. The mention of "Using your form ID" threw me, as that only comes three dialogues later.
  • Was able to log in fine once "path" was correct.
  • Consider using a form's OData Service URL as single parameter, replacing "path" in the first screen (login to ODK Central) and in the second screen (form config) replacing "dataset ID" and "form ID". You can parse all these elements out of the OData service URL.
  • Was able to view ("explore") the data.
  • Was not able to create any map from either WKT or GeoJSON. If you figured that one out, your users would love having these instructions in your README (or wherever they might be looking when using the connector). That's GDS's omission.
  • Was not able to view images, but that's the current implementation of ODK Central: Can we hotlink ODK Central media files?
    See what ruODK does to retrieve images: code and docs.

If you'd ask me what else to add to the roadmap, here are some ideas:

  • Show a map of geopoints with popups showing custom HTML including images from ODK Central submissions (that's an extra authenticated HTML request per image, maybe trigger async on popup open).
  • Show some useful example visualisations in GDS of the standard fields you could expect from an ODK form - metadata, submission dates, start/end times of forms, geolocation/start_time.
  • View and left join repeats (any other table than "Submissions") to main data.
  • A step by step tutorial of the above.

Overall, great work, wonderful code, and shaping up to become another valuable "low-code" avenue to visualize the OData feed.

3 Likes

Thanks so much for the time and feedback Florian, it's great to have such a supportive community :slight_smile:. We're in the middle of finals at Impact++, and have Winter break right after so it will be a couple of weeks before we can get our teeth into your suggestions. If anyone else reading this thread has comments, please chime in!

2 Likes

@Florian_May Happy to let you know we've resumed work on the connector! Our roadmap for now definitely includes looking into GeoData and images, as well as polishing up the readme and the user experience. For now we've decided to place repeats on the back burner, partially because we aren't certain how best to handle it in GDS.

3 Likes

@Florian_May Happy to let you know we've been working with @LN to improve the connector and implement some of the original changes you suggested. Do you mind giving the connector another look and letting us know if there's anything else we missed?

2 Likes

Happy to share that our connector now is deployed and you can access it here.

We are currently in the process of getting this connector approved by Google. Once that is done, everyone can access our connector by searching for "ODK central" within Google Data Studio!

If you have any questions or issues related to the connector, please file an issue in our github repo here!

4 Likes

3 posts were split to a new topic: Repeats with OData Connector

Just want to say that our connector is now officially a Google Data Studio data source! You can access it by searching for "ODK Central" in the data source section of Google Data Studio!

3 Likes

Thanks to @Florian_May for suggesting this integration and congrats to @hugh_sun, @PieterBenjamin and the rest of the UW Impact++ team that made this a reality in partnership with Team ODK.

You can find out more here. Please post a support issue if you have any issues or questions about using the connector.

2 Likes