Line Graph with Interactive Color Legend
This interactive line graph tracks three categories of death rates—suicide, alcohol-related, and firearm deaths—across years using a single dataset from a gist. Three colored lines represent each cause, while an interactive color legend lets users hover to highlight one category and fade the others. The visualization is built with React and D3 v5, using SVG paths generated by `d3.line()` with `curveNatural` interpolation, and relies on React hooks like `useState` and `useCallback` to manage hover state and legend interactions.
AI-generated descriptionA visualization constructed using React that shows the number of various types of deaths by demographics.
The data shown here comes from Gist: Deaths by Suicide, Firearms, Alcohol.
Currently the Sex, Ethnicity, and Age Group menus don't filter. The current graph shows male points as blue and female points as red. The various points in each year are the different ethnicities. The age group currently isn't being used and all age groups are being showed.