Skip to main content
100%

Alcohol Vega Lite

✓ Published0🌍 Public
Ddvinubius
Last edited May 22, 2021
Created on May 22, 2021
Forked from Hello VizHub

This example uses a scatterplot to compare beer servings and total liters of pure alcohol consumed per country, with tooltips revealing country names on hover. It fetches data from the FiveThirtyEight alcohol-consumption GitHub repository using D3’s `csv` loader, then renders the chart with Vega-Lite via the vega-lite-api wrapper, which registers Vega and Vega-Lite and uses vega-tooltip for interactions. The visualization adapts to the full window size and applies custom axis and label styling from a config object.

AI-generated description

A demonstration of how to start using D3 version 6.

data from

https://github.com/fivethirtyeight/data/tree/master/alcohol-consumption

MIT Licensed

Similar vizzes