Skip to main content
100%

Under Custody

✓ Published3🌍 Public
AAnnie Ulichney
Last edited Mar 29, 2021
Created on Mar 16, 2021

This interactive bar chart explores New York State DOCCS under-custody data, showing population counts, average age, or average time served grouped by categories like sex, race, or age. Users select variables through React dropdown components for both axes, while radio buttons trigger animated re-sorting of bars by value or category. The visualization uses D3 v5 for scales, SVG rendering, transitions, and hover tooltips displaying counts and percentages, with data loaded and transformed via React hooks and D3's nest function.

AI-generated description

NY DOCCS Under Custody Data Visualization with Filters on X and Y Axes

To Do:

  • Update Y axis label to reflect user selection
  • Change "y-axis" and "x-axis" text to be outside the dropdown
  • Eliminate entries with no info for selected variables before plotting to prevent empty bars
  • Eliminate age from x-axis selection options without breaking the code

Build Instructions

  • First to install dependencies
foo@bar:~$ npm install
  • After each modification run the code below to build bundle.js
foo@bar:~$ npm run build

Credit

  • Using react DOM to render the barplot.
  • Using react Dropdown component.
  • Using react hooks to change the data.
MIT Licensed

Similar vizzes