Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

CS360 A2 Bar Chart

Public visualization

Viewing a saved revision (read-only)

5bfc03d9de504754b5a8d6680e7d2fd4

CS360 A2 Bar Chart

0 stars4🌍 Public
EEric Yao
Last edited Feb 6, 2024
Created on Feb 2, 2024
Forked from HTML Starter

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 description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.