Skip to main content
100%

Insurance

✓ Published0🌍 Public
Llynz09
Last edited Sep 27, 2020
Created on Sep 26, 2020

The scatter plot shows medical insurance charges across patient ages, with points colored by smoking status to reveal that smokers incur consistently higher costs than non-smokers. The visualization uses the Vega-Lite API within a D3 v5 framework, binding CSV data loaded via `d3.csv` and rendering points with `vl.markPoint`. The chart encodes age and charges on quantitative axes via `vl.x().fieldQ()` and `vl.y().fieldQ()`, while the categorical smoker variable drives `vl.color().fieldN()`. Custom styling is applied through a Vega-Lite config object that adjusts axis labels and title fonts.

AI-generated description

The scatter plot shows average charges between 18-30 bracket in case its a smoker is almost 50% higher than charges in 60-64 age bracket in case the person is a non smoker. Better Not Smoke then. Data:Insurance.

MIT Licensed

Similar vizzes