Metrics

Tausi includes metrics and dashboards that provide insight into workflow processes and jurisprudence trends. These are defined in the tausi_metrics project.

Metrics and dashboards

Tausi uses Google Data Studio for basic workflow dashboards. They are easy to configure and update using the Google Data Studio tooling.

Google Data Studio connects to the Tausi database and extracts the information it needs for the reports.

Managing dashboards

Dashboards are configured in the admin area under Tausi Metrics, Dashboards.

Metrics

For workflow task reports, Tausi must calculate rollups to provide insight into weekly, monthly and quarterly task progression. This allows Tausi to calculate the number of tasks carried over from the previous period, or carried over into the next period. These metrics are otherwise not available from the raw task data tables.

Metrics are calculated for two periods: week and month. The month period can also be rolled up into quarters by Google Data Studio.

Each night at 1am, Tausi runs a task that calculates the metrics for the week and month periods for the past two days. It is safe for previously calculated periods to be re-calculated (the old metrics will be overwritten correctly). We calculate metrics for the last two days in case there was an issue with the metrics calculated yesterday.

Manually updating metrics

Metrics can also be updated manually using a management command, run on the host where Tausi is deployed.

To update metrics for a particular day (both week and month metrics will be updated), run:

dokku run tausi python manage.py update_metrics --date YYYY-MM-DD

where YYYY-MM-DD is the date, such as 2020-02-03.

To update metrics for an entire year (safe to do even if the year is not complete), run:

dokku run tausi python manage.py update_metrics --year YYYY

where YYYY is the year, such as 2020.