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

Percentage change in cards is incorrect #44

Closed colincadams closed 3 years ago

colincadams commented 3 years ago

Describe the bug

The percentage change in the cards in the flow chart sometimes displays zero when it shouldn't.

To Reproduce Steps to reproduce the behavior:

  1. Replace src/data.json with https://drive.google.com/file/d/1OLenZP9LW_p3SKX1kA7JahL7n6R-nuxk/view?usp=sharing
  2. Change stateCode to US_CT in src/index.js
  3. Run yarn start
  4. Open the site and see that all the cards show zero percent change

Expected behavior A clear and concise description of what you expected to happen.

We'd expect actual value changes to be shown instead, for instance for parole population we expect a value change of -104 and a percentage change of -2%.

Screenshots Screenshots revealing sensitive information must not be shared. If a screenshot is helpful in diagnosing and resolving the bug, please send this directly to a contact on the Recidiviz team.

Screen Shot 2021-02-03 at 9 59 22 AM Screen Shot 2021-02-03 at 10 04 44 AM

Desktop (please complete the following information): running locally

Additional context

This file is completely unsorted, maybe that is what is causing this?