Fork of Menu Line Chart - Deaths caused per country from different risk factor
This interactive line chart visualizes annual deaths attributed to various risk factors—such as alcohol use, smoking, or unsafe water—for a selected country over 17 years. Two dropdown menus let users choose the country and the risk factor, updating the single smoothed line rendered with d3.line and curveNatural. The visualization is built with React and D3 v5, using scaleTime and scaleLinear for axes and SVG paths for rendering. The underlying data comes from a CSV file listing deaths per country and risk factor across all age groups and sexes.
AI-generated descriptionA menu line chart displaying data: Number of deaths by risk factor.
This chart shows the number of deaths for different countries based on different risk factors in 17 years. </br> The total annual number of deaths is measured across all age groups and both sexes.
The year is displayed on the x-axis, the number of deaths on the y-axis.
Interaction was added so the users can choose which data to be presented.
- Which Country?
- Which Risk Factor?