🌍 Public
CS360 A2 Bar Chart
This bar chart visualization displays global total smokers by year, with horizontal bars representing aggregated smoker counts from a CSV dataset. The code uses p5.js to load tabular data via `loadTable()` and `createCanvas`, then calculates yearly totals by summing the `Data.Smokers.Total` column. Bars are drawn with `rect()` and mapped to a maximum value of 2 billion, while axes labels and a title are rendered using `text()`. The interactive canvas resizes to the window, showing trends in smoking numbers across available years.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed
Comments
Sign in to join the discussion.