Fork of Fork of Stacked bar chart of Yelp data: top cities
✓ Published0🌍 Public
RRahulSai05
Last edited Mar 8, 2022
Created on Mar 8, 2022
This stacked bar chart displays the count of highly-rated restaurants (4 stars or above) across ten cuisine types for nine Massachusetts cities, excluding Boston. Each horizontal bar represents a city, segmented by food category using distinct colors from a custom ordinal scale via `d3.scaleOrdinal`. The visualization is built with D3.js v7, processing CSV data through `d3.csv` and `d3.stack`. Interactive tooltips appear on mouseover, showing the cuisine and its count, while a manually positioned legend lists food types alongside the axis.
AI-generated descriptionStacked bar chart of Yelp data: top cities
https://observablehq.com/@stefanreifenberg/basic-stacked-bar-chart-from-the-d3-js-gallery
MIT Licensed