Recidiviz / justice-counts-components

A set of React components powering a web app for exploring centralized, standardized metrics on the performance of justice systems across the United States
GNU General Public License v3.0
1 stars 0 forks source link

Sources and Methodology functionality #31

Closed hobuobi closed 3 years ago

hobuobi commented 3 years ago

There are two parts to this task. Both are described in the "Sources and Methodology" section of the PRD (link).

Methodology

Each “metric block” (in Key Insights and the Flow Diagram) should have a Methodology tooltip available that summarizes the fields used to calculate that particular metric. This should be accessible from a blue tooltip in the corner of each box, and should generally read: "Includes data for the following categories from [source]’s public reports: [comma-delimited mapping_overrides]" Both [source] and [comma-delimited mapping_overrides] will be available in the fixture files. @colincadams to provide more details here.

Sources

This will be a simple section at the bottom of the page with a list of data sources for the state. The list of sources (URLs) will also be available in the fixture file. (@colincadams to provide details) See PRD for mocks.

colincadams commented 3 years ago

I've updated the fixture file and uploaded it here: https://drive.google.com/file/d/1V8PfIjfsFzft0_nOmdZOZGtQGqwJm5xC/view?usp=sharing

This contains the new columns:

I also updated the fixture file to include the updated fake data for CO, including the metric renames from yesterday and new columns, as well as some initial real data for other states in case that is useful for testing. Right now the "real" data only covers a handful of metrics.

These new columns are in the same file and so are provided for each data point. For the tooltips, use the information for the specific data point shown. For the source list, we will have to go through all the data points and come up with the unique set of sources to display.

There are a few open questions I'm aware of for @hobuobi to resolve in the PRD:

  1. What to do if the raw_source_categories list is empty
  2. The actual format of the source list and whether or not to group them by source name.

@jessex to review in case there is anything I missed!

jessex commented 3 years ago

Thanks, @colincadams!

@Wmaileq, please comment here if you have any questions or concerns about the new fixture file format and how to apply it both in this feature or elsewhere (I don't think this should impact any previous features but let us know if we're wrong about that).

colincadams commented 3 years ago

Just to follow up on the open questions:

  1. If no raw_source_categories are present, the text should read: "Includes data from [source]'s public reports (source link)". (also reflected in PRD)
  2. The format of the sources section was updated in the PRD
Wmaileq commented 3 years ago

Almost done here, I think it will be ready tomorrow morning-lunch together with #32 and #36.

hobuobi commented 3 years ago

We're making a small change to this -- adding specific report names! In many places, we were using "source" or "link" to refer to the specific reports that the data came from. Thanks to @colincadams , we now have the exact report names to use here!

The report_name column will hold this value. That means changes in two places:

Methodology Tooltip

This should now read:

“Includes data for the following categories from [source_name]’s public reports: [raw_source_categories] ([report_name]),”

[report_name] is the name of the report (in that column in the fixture file). “([report_name])” in the tooltip should still link to the [source_url] for that metric.

Group 60

Sources

This should now read:

“All data for these visualizations was from public reports published by the [source_name] ([report_name], [report_name]) and [source_name] ([report_name]).”

Each “[report_name]” should still link to the [source_url] for that metric.

Group 58 (2)
colincadams commented 3 years ago

I don't have the updated fixture file yet, but I'll try to have it for you tomorrow!

colincadams commented 3 years ago

Updated the fixture file! Same link but will link again here: https://drive.google.com/file/d/1V8PfIjfsFzft0_nOmdZOZGtQGqwJm5xC/view

Let me know if there are any errors with it 😄

Wmaileq commented 3 years ago

@hobuobi I was reviewing the components for the v1 release and realized that right now sources at the bottom of the screen created only from data used in the flow diagram and key insights sections. (So sources from chart data points aren't used.)

Is data from charts should be used to create Source links at the bottom of the screen?

Wmaileq commented 3 years ago

I've decided to go ahead and open the PR that should close the issue.