Skip to main content
100%

Stacked bar chart of food in cities

✓ Published1🌍 Public
MMing Liu
Last edited Nov 10, 2021
Created on Oct 25, 2021

A stacked bar chart displays the number of restaurants by food type across ten cities, excluding Boston. The visualization uses D3.js with an SVG rendering and a categorical color scale from d3-scale-chromatic. Tooltips reveal the exact restaurant count for each food category on hover. The chart is built using D3's stack method to aggregate data from a CSV file, with axes and legends manually positioned.

AI-generated description

Stacked bar chart of food in cities

To address the feedback from the professor of stacked bar chart, I created a stacked bar chart of type of foods in each top cities as below. I didn't include Boston for this time as it has significantly more restaurants than others. Also I added tooltips to present amounts of restaurants of a type of food in a city when you place mouse onto any section on the bar.

Inspired by a great example of a basic stacked bar chart.

*This is a part of week 9 assignment: Address Project Feedback

MIT Licensed

Similar vizzes