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

1. What is the general goal of the feature?
With a connector for OData sources, ODK Central could be configured as a data source in Google Data Studio (GDS). GDS seems similar to Tableau and MS Power BI.

https://datastudio.withgoogle.com/ - apparently free (for now) and available (until Google kills it)
https://marketingplatform.google.com/about/resources/data-studio-product-overview/ - product overview
https://developers.google.com/datastudio - dev docs
https://developers.google.com/datastudio/connector/get-started - how to build a connector

2. What are some example use cases for this feature?
A non-technical user can connect GDS to ODK Central and generate reports and insight.
GDS could be a no-cost replacement for other proprietary GUI analytics platforms, such as Tableau.
Having a no-cost, fairly non-technical analytical platform available would make ODK Central more accessible.

3. What can you contribute to making this feature a reality?
UAT.
This feature might be a great first issue for someone looking to get involved.

Can you say clearer?

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!

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

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

2 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