Skip to main content
100%

Promotions Bars

✓ Published2🌍 Public
Cchrisdreece
Last edited Jan 18, 2021
Created on Jan 18, 2021
Forked from Promotions

The visualization displays horizontal bars representing headcount across nine U.S. cities, with each bar’s width scaled proportionally to its population count. The code loads data from `locations.csv` via `d3.csv`, converts the percentage columns, and then uses D3’s `select` and `data` join to append styled `div` elements with class `bar`. Bar widths are calculated by dividing the headcount value by two and setting the result as the CSS `width` in pixels. The bars share a uniform teal background and fixed height defined in the external stylesheet.

AI-generated description
MIT Licensed

Similar vizzes