Chapter 32 Business with most Five Star Reviews from Users
The following plot shows the names of business with the most Five Star Reviews.Mon Ami Gabi and Bacchanal Buffet are the Two most popular restaurants from the Yelp reviews with Five Star ratings. We will do a deep dive for these restaurants.
most5StarsReviews = reviews %>%
filter(stars == 5) %>%
group_by(business_id) %>%
summarise(Count = n()) %>%
arrange(desc(Count)) %>%
ungroup() %>%
mutate(BusinessID = reorder(business_id,Count)) %>%
head(10)
most5StarsReviews = inner_join(most5StarsReviews,business)
most5StarsReviews %>%
mutate(name = reorder(name,Count)) %>%
ggplot(aes(x = name,y = Count)) +
geom_bar(stat='identity',colour="white", fill = fillColor) +
geom_text(aes(x = name, y = 1, label = paste0("(",Count,")",sep="")),
hjust=0, vjust=.5, size = 4, colour = 'black',
fontface = 'bold') +
labs(x = 'Name of the Business',
y = 'Count',
title = 'Name of the Business and Count') +
coord_flip() +
theme_bw()