Skip to main content
100%

Line Chart with Multiple Lines

✓ Published0🌍 Public
KKhatera Alizada
Last edited Mar 19, 2023
Created on Feb 27, 2023

This line chart displays prescription drug expenditure for individuals aged 0-18, broken down by gender, from 2002 to 2014. Three lines represent total, males, and females, allowing for comparison of spending trends over time. The visualization uses D3 v5 with an SVG renderer, employing `scaleTime` and `scaleLinear` for axes, `line` with `curveBasis` for smoothed paths, and `nest` to group data by gender. A color legend, implemented via a custom `colorLegend` function, distinguishes the categories. Data is loaded from a CSV file using `csv` and parsed with `timeParse`.

AI-generated description

Health expenditure const data = data.filter( (d) =>

        d.AgeGroup === '0-18' &&
      	d.Service === 'Prescription Drugs' &&
      	d.Payer === 'Total'
      
    );
MIT Licensed

Similar vizzes