Day76: Emoji context

Posted by csiu on May 11, 2017 | with: 100daysofcode

At a seminar today, I bumped into my friend Thea. I showed her yesterday’s post and she pointed out:

It’ll be interesting to see what’s being said about the emojis

I agree, and so today I focus on context.

Workflow

  1. Define a function to obtain the tweets with the emoji of interest
  2. Make sense of the tweets from 2 emojis: (1) the most frequently tweeted one; and (2) the one that seems to be out of place, i.e the tangerine


Obtaining tweets with the emoji of interest

get_tweet_with_emoji <- function(emoji){
  popular_emoji_df <-
    emoji_counts %>%

    ## get tweet id containing the emoij
    filter(
      native == emoji,
      counts > 0
    ) %>%
    {.$tweet_id} %>%

    ## get tweet df containing the emoji
    {df_tidy[.,]}

  ## extract text
  (popular_emoji_text <-
    df %>%
    filter(id %in% popular_emoji_df$id) %>%
    {.$text}
  )
}

Emoji: heavy white checkmark

With regards to the heavy checkmark emoiji, it seems like people are saying they have voted.

Emoji: tangerine

With the tangerine emoji, it seems like people or voting NDP…

or Green Party…