Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Promotions Bars

Public visualization

Viewing a saved revision (read-only)

d1017e320ada46928208b1ed2976608a

Promotions Bars

0 stars2🌍 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