Chapter 34 Bacchanal Buffet

The location and category of the most liked business Bacchanal Buffet is shown below

bacchanal = business %>% filter(business_id == "RESDUcs7fIiihp38-d6_6g") %>%
  select(name,neighborhood,city,state,postal_code,categories)

datatable(head(bacchanal), style="bootstrap", class="table-condensed", options = list(dom = 'tp',scrollX = TRUE))

34.1 Word Cloud of Bacchanal Buffet

bacchanal = reviews %>% filter(business_id == "RESDUcs7fIiihp38-d6_6g")

createWordCloud(bacchanal)

34.2 Top Ten most common Words of the business “Bacchanal Buffet”

We examine the Top Ten Most Common words and show them in a bar graph.

bacchanal %>%
  unnest_tokens(word, text) %>%
  filter(!word %in% stop_words$word) %>%
  filter(!word %in% c('food','restaurant')) %>%
  count(word,sort = TRUE) %>%
  ungroup() %>%
  mutate(word = factor(word, levels = rev(unique(word)))) %>%
  head(10) %>%
  
  ggplot(aes(x = word,y = n)) +
  geom_bar(stat='identity',colour="white", fill =fillColor) +
  geom_text(aes(x = word, y = 1, label = paste0("(",n,")",sep="")),
            hjust=0, vjust=.5, size = 4, colour = 'black',
            fontface = 'bold') +
  labs(x = 'Word', y = 'Word Count', 
       title = 'Word Count') +
  coord_flip() + 
  theme_bw()

34.3 Sentiment Analysis - Postive and Not So Postive Words of Bacchanal Buffet

We display the Positive and Not So Positive words used by reviewers for the business Bacchanal Buffet.We have used the AFINN sentiment lexicon, which provides numeric positivity scores for each word, and visualize it with a bar plot.

positiveWordsBarGraph(bacchanal)

34.4 Calculate Sentiment for the reviews

We calculate the sentiment scores for all the reviews using the AFINN sentiment lexicon. We display the Top Six sentiments here.

sentiment_lines = calculate_sentiment(bacchanal)

head(sentiment_lines)

34.5 Negative Reviews

We examine the Top Ten most negative reviews.We examine the Top Ten most negative reviews. The complaints were about Service,waiting,decor. An excerpt of the Service Complaints is provided below

  • this place sucks so fucking bad. We are waiting in line for almost one hour. They only let VIP members taking the available sits as soon as possible

  • Stupid system!!!! Their ticketing idea sucks and defeats the purpose of having it at all!!!

  • Service sucks! Server didn't even bother to check our table. I have to set a side my dirty plates on the other side of my table to be able have a space on our table

display_neg_sentiments(sentiment_lines,bacchanal)

34.6 Positive Reviews

We examine the Top Ten most postive reviews.

display_pos_sentiments(sentiment_lines,bacchanal)

34.7 Relationship among words in Bacchanal Buffet

We explore the different relationship among the various words in Bacchanal Buffet here through a network graph

bigrams_bacchanal <- bacchanal %>%
  count_bigrams()

bigrams_bacchanal %>%
  filter(n > 100) %>%
  visualize_bigrams()

34.7.1 Relationship of words with crab

The following network diagram shows the words associated with the word crab

bigramsMonAmiGabi %>%
  filter(word1 == "crab" | word2 == "crab" ) %>%
  visualize_bigrams()

34.7.2 Relationship of words with food

The following network diagram shows the words associated with the word food

bigramsMonAmiGabi %>%
  filter(word1 == "food" | word2 == "food" ) %>%
  filter(n > 10) %>%
  visualize_bigrams()