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
MMar-99
Last edited Mar 7, 2022
Created on Mar 7, 2022

This stacked bar chart visualizes the distribution of ten cuisine types across the top ten Yelp cities (excluding Boston), showing the number of four-star-or-above restaurants in each. Each horizontal bar represents a city, segmented by cuisine, with a legend mapping the color scheme. The chart uses d3’s `scaleBand` and `scaleLinear` for axes, `stack` to aggregate data, and `scaleOrdinal` for categorical colors. Tooltips reveal exact counts per segment, and the SVG is rendered with d3’s selection and append methods. Data comes from a CSV file loaded via `csv`.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed