1.6 Prepped Data

Now that the data is prepped, created a stylized review text.

prepped_hotel <-
  token %>%
  summarize(
    .by = review_id, 
    prepped_review = paste(word, collapse = " "),
    prepped_wrdcnt = n()
  ) %>%
  inner_join(hotel_2, by = join_by(review_id)) %>%
  relocate(prepped_review, prepped_wrdcnt, .after = last_col())

prepped_hotel %>% 
  select(review_id, review, prepped_review) %>% 
  head(n = 1) %>%
  flextable::flextable() %>% 
  flextable::valign(valign = "top") %>% 
  flextable::autofit()

review_id

review

prepped_review

14,478

Love Love Love The Savoy If you are looking for a luxe hotel that isn't stuffy this is the place for you You feel like a millionaire even if you're not one and it's a great place to hang out if you fancy keeping off the streets of London for a while Classy decor wonderful food and cocktails and the staff are wonderful it is an absolute allrounder and if I could afford it I would probably live there

love love love savoy luxe stuffy feel millionaire hang fancy street london classy decor wonderful food cocktail staff wonderful absolute allrounder afford live