Test UC
✓ Published0🌍 Public
This interactive bar chart visualizes individuals in New York State DOCCS custody, with dropdown menus allowing users to filter the X and Y axes by attributes such as sex, age, race/ethnicity, and time served. The chart renders with React and D3 v5, using `d3.histogram()` to bin age data and `d3.scaleBand()` and `d3.scaleLinear()` for scales. Hovering reveals tooltips with counts and percentages, while data originates from a JSON file loaded via `d3.json()`. Sorting controls and animations are also available.
AI-generated descriptionNY 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