DataViz Project - First Visualization
This interactive line chart, built with React and D3 v5, visualizes the percentage of a country's population affected by mental illness and unemployment over time, with a dropdown menu to select among six American countries. The SVG rendering uses D3's `scaleTime` and `scaleLinear` for the axes, and natural cubic spline curves via `line().curve(curveNatural)` to smooth the trends. A custom color legend distinguishes the two metrics, shown as green (mental illness) and orange (unemployment) lines, using data from a CSV file hosted on Gist.
AI-generated descriptionThis visualization was constructed using the D3 & React.
The idea behind this visualization was to show the percentage of the population of various countries in America that suffer from some mental illness over the years.
Questions I wanted to answer with this visualization
- How has the percentage of mental diseases in some American countries changed over time?
- Has there been a decrease in people with mental illnesses, or rather an increase?
The data used in this visualization can be found on Gist here: Mental Healths Disorders Dataset