Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
9 years ago
Solved

R script Getting Error Unable to translate bytes

Hello All, I am trying to ger the twitter data using R script in power bi desktop. Here is the script that i have used to get the twitter data. library(twitteR) source("authenticate.R") tweets <- ...
  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi KumarDarmesh

     

    I have solved this issue by using stringi package.

    here is the script that i have used.

     

    library(twitteR)
    library(stringi)

    tweets <- searchTwitter(search_term, number_of_tweets )
    #convert received data to something PowerBi understands
    df_tweets <- twListToDF(tweets)

    #column clean
    df_tweets$text <- stri_encode(df_tweets$text, "", "UTF-8")

    It cleans the column which are not understandable.