How does alcohol consumption vary by education level?
This visualization explores how alcohol consumption varies across education levels, with stacked bars segmented by ethnicity. Each bar represents an education category (None, High School, Bachelors, Higher), and the length of each colored segment shows average alcohol consumption for that ethnic group. Hovering over the legend highlights the corresponding segments across all bars. The chart uses D3's `flatRollup`, `stack`, `scaleBand`, and `scaleLinear` APIs, with data from a synthetic patient dataset.
AI-generated descriptionStacked bars showing estimated religion breakdown of the most populous 20 countries in 2010. Based on an example from the tutorial Splitting Charts. Interactions:
- Hover over the legend to highlight religions.
Data is from The Global Religious Landscape by Pew Research, generated using this processing script.