Skip to main content
100%

Barchart experiment

✓ Published0🌍 Public
XXiaoyu Su
Last edited Mar 12, 2021
Created on Feb 16, 2021
Forked from HTML Starter

This bar chart displays counts of deaths per month in New York DOCCS custody across 2020, with interactive mouseover details listing individual names and dates from the raw dataset. The React-based visualization renders SVG bars using d3.scaleBand and d3.scaleLinear, featuring a button that toggles a red dashed mean line with confidence-interval lines computed via d3.mean and d3.deviation. A second button triggers animated transitions through d3 transitions in `change_data`, briefly shifting all bars to the mean height before restoring original values over 2 seconds.

AI-generated description
<!DOCTYPE html> <html> <head> <title>Fork of barchart</title> <link rel="stylesheet" href="styles.css"> <!-- packages goes in here --> <script src="https://unpkg.com/react@16.9.0/umd/react.production.min.js"></script> <script src="https://unpkg.com/react-dom@16.9.0/umd/react-dom.production.min.js"></script> <script src="https://unpkg.com/d3@5.11.0/dist/d3.min.js"></script> </head> <body> <div id="root_bar"> <svg id="death_bar" height='350' width='550'/> </div> <script src="bundle.js"></script> </body> </html>
MIT Licensed

Similar vizzes