Skip to main content
100%

Fork of Bar plot of Yelp data: top cities

✓ Published0🌍 Public
Aaniosindustries
Last edited Nov 15, 2021
Created on Nov 15, 2021

This bar chart shows the top ten cities in the Greater Boston area by number of restaurants rated four stars or higher on Yelp, with Boston leading at over 1,000 establishments. The visualization aggregates raw Yelp dataset entries by city using JavaScript’s reduce method, then sorts and filters the results before rendering. The chart uses D3 v5’s `scaleLinear` for the x-axis, `scaleBand` for the categorical y-axis, and `axisLeft` and `axisBottom` to draw the axes with custom tick styling. Bars are appended as SVG rectangles with a purple fill, and the data comes from a local CSV file.

AI-generated description

Bar chart of Yelp data: top cities

The original dataset is from public Yelp dataset.

The data used for this visualization is filtered on top-rated restaurants in Greater Boston (GB) area. Top-rated restaurants are defined as 4 stars or above.

This graph shows the top 10 cities with best restaurants in GB.
X axis is the number of best restaurants
Y axis is top 10 cities.

*This is a part of week 4 assignment: Create a Visualization that's Not a Scatter Plot

MIT Licensed

Similar vizzes