region-flags
The visualization displays how often different colors appear in regional flags, using flag images and region data from Wikipedia. It shows a stacked bar chart for each country, with colored segments representing the proportion of each color across its subnational flags. The left panel lists countries and their color distributions; hovering over a segment filters and sorts the corresponding flag thumbnails on the right. The implementation uses d3.select, d3.nestBy, and d3.loadData, with custom color bucketing based on hue and lightness, rendered as SVG rectangles and HTML images.
AI-generated descriptionHow often do different colors show up in regional flags?
Based on Time's “What is the Most Patriotic Color?” and suggested by Jennifer Daniel
Flag images and region list from wikipedia; scrapping code.
More features?
- Better color bucketing / sorting
- Virtual scrolling so scrubbing doesn't lag
- Popout higher res flag