Recidiviz / public-dashboard

A public-facing dashboard to help educate citizens and build accountability
GNU General Public License v3.0
5 stars 3 forks source link

[US_PA] Discrepancies between dynamic text and visualization in PA dashboard #491

Open hobuobi opened 2 years ago

hobuobi commented 2 years ago

Describe the bug The dynamic text doesn't match the visualization (43% vs 46% Black folks in SCIs, 40% vs 43% White folks in the SCIs, etc.). See below.

Screen Shot 2021-10-04 at 9.40.15 PM.png

To Reproduce Steps to reproduce the behavior:

  1. Go to the Racial Disparities page of the Pennsylvania dashboard.
  2. Scroll or click to the 2nd section (titled "Disparities are already present before incarceration").
  3. Hover over the dark blue bar (for the proportion of the selected race that is present in the State Correctional Institutions).
  4. Observe the discrepancy between that and the relevant dynamic text in the copy.

Expected behavior The dynamic text and the visualization should match in what they tell the user.

Desktop (please complete the following information): Screenshots taken on a Mac (Big Sur) in Google Chrome (93.0.4577.82)

macfarlandian commented 2 years ago

the cause of this is that people with race/ethnicity unknown are being dropped from the chart data but counted toward the total that we use to calculate the number in the text; in other words the percentages in the text are smaller because they are calculated with a larger denominator.

I don't know whether the usual footnote treatment of unknowns would be sufficient here? The percentages would still be different but it would at least provide more context. If we wanted to do something more drastic than that we'd have to scope it out some more.