Data Visualization - ICE-6 - Bar Chart
✓ Published0🌍 Public
This visualization displays a horizontal bar chart comparing types of chest pain against age counts from a heart attack dataset. The chart uses React to manage state and render SVG elements, while d3-scale functions (scaleBand and scaleLinear) map categorical pain types to y-axis bands and age values to x-axis positions. The data is loaded via d3.csv from a GitHub gist, filtered to the first 12 records, and mapped with a switch statement to rename chest pain codes into descriptive labels. The visualization highlights the distribution of different chest pain types across age groups.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed