Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide schema section for performance hub metrics and display caveats #943

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

MatMoore
Copy link
Contributor

@MatMoore MatMoore commented Oct 14, 2024

#913

Add a template specifically for metrics which hides the schema section, and adds some caveats about use of the data.

I've deliberately kept this out of the description field, because it is common to all datasets from this platform, and clutters up the details page of the Performance Hub itself (modelled as a database).

@MatMoore MatMoore force-pushed the hide-schema-for-metrics branch 2 times, most recently from 337cf38 to da5b164 Compare October 15, 2024 08:47
Since performance hub metadata is not in prod yet and are subject to change,
I've not implemented Metrics as a distinct entity type that can be filtered
on. Instead,

1. expose a subtype attribute that determines what template to render
2. conditionally add extra caveats to metrics coming from
   performance-hub, to reflect their current state

This will need to be reviewed again if we decide to move forward with
performance hub metadata.
@MatMoore MatMoore force-pushed the hide-schema-for-metrics branch from da5b164 to 70699b5 Compare October 15, 2024 08:58
@MatMoore MatMoore marked this pull request as ready for review October 15, 2024 09:02
@MatMoore MatMoore requested a review from a team as a code owner October 15, 2024 09:02
@MatMoore MatMoore changed the title Hide schema for metrics Hide schema for metrics and display caveats Oct 15, 2024
@MatMoore MatMoore changed the title Hide schema for metrics and display caveats Hide schema section for performance hub metrics and display caveats Oct 15, 2024
@LavMatt
Copy link
Contributor

LavMatt commented Oct 15, 2024

Looking good, have a few points/thoughts:

  • I'm wondering if we should look to make use of the entity sub-type which is already returned by the client's get_table_details() method. We could then distinguish a metric from a table (although the sub-type for these from cadet might be model or even view so we might need some kind of mapping step too).
  • The search method also returns the sub type for each entity so we could display more precise entity types on both details and search results pages.
  • Maybe not one for now but would we want to be able to filter metrics as a separate entity type on the search page?
  • Just an observation on content but often the description is just repetition of the metric name and in some cases it's not obvious what the measure is from the name and description. e.g. 1 to 1 completions - i'm not sure what this is measuring.

@MatMoore
Copy link
Contributor Author

MatMoore commented Oct 15, 2024

@LavMatt I started out making use of the sub type as you describe, but I decided against it at this stage because it turned into quite a big change, and I think it's quite likely that we would end up changing or reverting any changes we make now once we actually get some feedback on it.

The areas where the entity/result type gets surfaced in Find MoJ data are:

  • On the details page
  • In the URL of the details page
  • On search results
  • In the search filter

Making the search filter distinguish between Table and Metric requires would require changes to the search function to take into account subtype, and the label on the search results page requires a change to the query and result parsing code.

I also had some doubts whether "Metric" is the right way of describing this data. It may cause some confusion because we've ingested Justice Data measures as "Charts" even though they are pretty similar to Performance Hub Metrics. So I think it's better to wait until we've spoken to generalist users before changing this.

Regarding the descriptions:

Just an observation on content but often the description is just repetition of the metric name and in some cases it's not obvious what the measure is from the name and description. e.g. 1 to 1 completions - i'm not sure what this is measuring.

I agree that the descriptions are not very good... this probably needs to be discussed with the team that manages this data. @jemnery is this something you can bring up with them once this is on preprod? If needs be we could potentially maintain a separate set of descriptions for these metrics, but the ideal would be for them to improve the metadata at source.

@MatMoore MatMoore merged commit d00b11e into main Oct 15, 2024
18 checks passed
@MatMoore MatMoore deleted the hide-schema-for-metrics branch October 15, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants