Violin Plots - Credit Card Utilization by Attrition Status
This interactive visualization uses D3 violin plots to compare credit card customer attrition status—existing versus attrited—across selected quantitative variables from a bank customer dataset. A dropdown menu lets users switch between metrics like credit limit, total transaction amount, and average utilization ratio, with violin color encoding attrition status. The charts render as SVG with animated transitions, and hovering over a violin highlights it and reveals underlying bin values via a tooltip. The implementation relies on d3.histogram, d3.area, d3.curveCatmullRom, and d3.transition for smooth updates.
AI-generated descriptionViolin plots using D3 displaying data of attrition level by different quantitative variables from the Bank Customers Dataset.
The menu at the top enable the users to choose which quantitative columns to use. The options are:
- Customer age
- Credit limit
- Total revolving balance
- Total transaction amount
- Total transaction count
- Avg. utilization ratio
Finally, the attrition status of the customers is encoded on the color of the violins, the users can highlight the violins by hovering over them and see the values used to construct them on the tooltip.