Skip to main content
Public

Share visualization

Loading preview…

Fork of Fork of Stacked bar chart of Yelp data: top cities

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

Fork of Fork of Stacked bar chart of Yelp data: top cities

0
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 description

Comments

Sign in to join the discussion.

MIT Licensed