Hey all, our team is picking this [older thread] back up to support MOH. Has anyone built a SuperSet dashboard that we could build upon? We’ve really appreciated the CHT Watchdog in Grafana, and hoping for something similar for programmatic/CHT data.
I’ve moved your post into a new thread - I think new threads get more community eyeballs and I’m hoping others will be able to share their experience, if not their Superset code.
A bit ago, there was an internal effort at Medic to uncover failure scenarios of the CHT. This involved building out dashboards based on couch2pg data in Postgres (folks should use CHT Sync now though) which we could then create dashboards to hopefully alert on problems we’d seen in the wild prior. The point of me mentioning all this is that we published everything on GitHub in the cht-app-monitoring-data-ingest repository. It might be helpful to browse that for inspiration.
Otherwise, I wonder if @yuv has a moment to write in here? He’s done quite a bit of work with Superset both internally at Medic but as well with Nepali deployments using Superset. I’m hoping he some helpful tips to share!
If I recall, unlike Grafana, it’s a bit more tricky to share dashboards in the Superset ecosystem, but that’s just my hearsay! I’d love hear directly from the community who have on the ground experience!
A sample dashboard based on the default config for the CHT can be found here.
To import it you would need to change the datasource so it may not be very useful as is but maybe can be used as an example.
It contains the following charts:
Contacts, grouped by type over time using the ‘reported’ field
Reports, grouped by form over time using the ‘reported’ field
Pregnancy danger signs by parent_uuid (which could represent an area or CHW)
New people registered over time.
More specific charts will depend on your configuration.
In general this pattern has been useful for other deployments:
one table for each contact type which has foreign keys to other contact tables; this allows grouping and filtering based on the relationships in the hierarchy; (e.g. patient by the CHW that registered them instead of contacts where type = 'patient' by parent_id).
one table or materialized view for each form, containing foreign keys to the relevant contact fields (e.g. pregnancy reports by area instead of `reports where form=‘pregnancy’ by grandparent_uuid).
If you are ok with the additional setup, the preferred way to setup up the database for superset is CHT Sync.
It includes some tables that are common to all CHT deployments, and a way to set up other tables with dbt so you are not starting from just the raw json documents.
It does involve additional setup, so if you have an existing database with couch2pg and materialized views already written, that could work also.