Loading Alcohol Consumption CSV Data
This example demonstrates the basics of loading and parsing a CSV dataset with D3.js. It fetches global alcohol consumption data from the World Health Organization and displays a summary of the file’s size, row count, and column count in large text. The visualization uses `d3.csv` to asynchronously load the remote dataset from a GitHub Gist, then `d3.csvFormat` and `data.length`/`data.columns` to compute the displayed metrics. The page renders the result inside a `<pre>` element with no charting or graphical elements.
AI-generated descriptionA program that loads and parses some CSV
Data Source: Global Alcohol Consumption Data 2010-2019.
This dataset contains information about the volume of alcohol consumed across many different countries for the years 2010-2019 from the World Health Organization. The data is broken down into five categories of alcohol: wine, beer, spirits, other, and all. The values reported are the per capiata consumption of people 15+ in liters of pure alcohol.