Closed mjhendrickson closed 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)))
user_id
status_id
created_at
screen_name
text
source
display_text_width
reply_to_status_id
reply_to_user_id
reply_to_screen_name
is_quote
is_retweet
favorite_count
retweet_count
quote_count
reply_count
hashtags
symbols
urls_url
urls_t.co
urls_expanded_url
media_url
media_t.co
media_expanded_url
media_type
ext_media_url
ext_media_t.co
ext_media_expanded_url
ext_media_type
mentions_user_id
mentions_screen_name
lang
quoted_status_id
quoted_text
quoted_created_at
quoted_source
quoted_favorite_count
quoted_retweet_count
quoted_user_id
quoted_screen_name
quoted_name
quoted_followers_count
quoted_friends_count
quoted_statuses_count
quoted_location
quoted_description
quoted_verified
retweet_status_id
retweet_text
retweet_created_at
retweet_source
retweet_favorite_count
retweet_retweet_count
retweet_user_id
retweet_screen_name
retweet_name
retweet_followers_count
retweet_friends_count
retweet_statuses_count
retweet_location
retweet_description
retweet_verified
place_url
place_name
place_full_name
place_type
country
country_code
geo_coords
coords_coords
bbox_coords
status_url
name
location
description
url
protected
followers_count
friends_count
listed_count
statuses_count
favourites_count
account_created_at
verified
profile_url
profile_expanded_url
account_lang
profile_banner_url
profile_background_url
profile_image_url
Next, we can run quick exploratory data analysis on the data with a few different packages:
pointblank
Hmisc
skimr
arsenal
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
Of the packages listed above:
pointblank
arsenal
library("rtweet")
mh <- get_timeline('mjhendrickson', n = 5000)
skimr::skim(mh)
Potential fields of interest:
text
source
hashtags
quoted_text
quoted_description
retweet_text
retweet_description
Examine the fields returned by the Twitter API.