mjhendrickson / rtweet-sentiment-analysis

Sentiment Analysis of Tweets via rtweet
MIT License
1 stars 0 forks source link

Examine Twitter Fields #3

Closed mjhendrickson closed 4 years ago

mjhendrickson commented 4 years ago

Examine the fields returned by the Twitter API.

mjhendrickson commented 4 years ago

The Twitter API returns a number of fields. These can be returned by the following code:

library("rtweet")
print(colnames(get_timeline('mjhendrickson', n = 1)))
  1. user_id
  2. status_id
  3. created_at
  4. screen_name
  5. text
  6. source
  7. display_text_width
  8. reply_to_status_id
  9. reply_to_user_id
  10. reply_to_screen_name
  11. is_quote
  12. is_retweet
  13. favorite_count
  14. retweet_count
  15. quote_count
  16. reply_count
  17. hashtags
  18. symbols
  19. urls_url
  20. urls_t.co
  21. urls_expanded_url
  22. media_url
  23. media_t.co
  24. media_expanded_url
  25. media_type
  26. ext_media_url
  27. ext_media_t.co
  28. ext_media_expanded_url
  29. ext_media_type
  30. mentions_user_id
  31. mentions_screen_name
  32. lang
  33. quoted_status_id
  34. quoted_text
  35. quoted_created_at
  36. quoted_source
  37. quoted_favorite_count
  38. quoted_retweet_count
  39. quoted_user_id
  40. quoted_screen_name
  41. quoted_name
  42. quoted_followers_count
  43. quoted_friends_count
  44. quoted_statuses_count
  45. quoted_location
  46. quoted_description
  47. quoted_verified
  48. retweet_status_id
  49. retweet_text
  50. retweet_created_at
  51. retweet_source
  52. retweet_favorite_count
  53. retweet_retweet_count
  54. retweet_user_id
  55. retweet_screen_name
  56. retweet_name
  57. retweet_followers_count
  58. retweet_friends_count
  59. retweet_statuses_count
  60. retweet_location
  61. retweet_description
  62. retweet_verified
  63. place_url
  64. place_name
  65. place_full_name
  66. place_type
  67. country
  68. country_code
  69. geo_coords
  70. coords_coords
  71. bbox_coords
  72. status_url
  73. name
  74. location
  75. description
  76. url
  77. protected
  78. followers_count
  79. friends_count
  80. listed_count
  81. statuses_count
  82. favourites_count
  83. account_created_at
  84. verified
  85. profile_url
  86. profile_expanded_url
  87. account_lang
  88. profile_banner_url
  89. profile_background_url
  90. profile_image_url
mjhendrickson commented 4 years ago

Next, we can run quick exploratory data analysis on the data with a few different packages:

More on fast EDA can be found in this Twitter thread: https://twitter.com/beeonaposy/status/1245824406783430660

And in this article (found in the Twitter thread): https://www.groundai.com/project/the-landscape-of-r-packages-for-automated-exploratory-data-analysis/1

mjhendrickson commented 4 years ago

Of the packages listed above:

mjhendrickson commented 4 years ago

Potential fields of interest:

  1. text
  2. source
  3. hashtags
  4. quoted_text
  5. quoted_description
  6. retweet_text
  7. retweet_description