library(tidyverse)
library(lubridate)
neda_nine <- read_rds(here::here(
"data",
"NEDA_week_nineteen.rds"
)) %>%
mutate(data_year = 2019) %>%
select(-media) %>%
filter(created_at_tweet %within% interval(ymd("2019-02-25"), ymd("2019-03-04"))) %>%
mutate(interval_created = int_length(interval(ymd("2019-02-25"), created_at_tweet)))
neda_twenty <- read_rds(here::here(
"data",
"NEDA_week_twenty.rds"
)) %>%
mutate(data_year = 2020) %>%
filter(created_at_tweet %within% interval("2020-02-24", ymd("2020-03-02"))) %>%
mutate(interval_created = int_length(interval(ymd("2020-02-24"), created_at_tweet)))
neda <- bind_rows(neda_nine, neda_twenty)
Below are the basic statistics (total number of tweets, number of unique users and date):
library(gt)
total_tweets <- neda %>%
group_by(data_year) %>%
count() %>%
ungroup()
total_tweets
## # A tibble: 2 x 2
## data_year n
## <dbl> <int>
## 1 2019 19432
## 2 2020 16463
unique_users <- neda %>%
group_by(data_year) %>%
distinct(name) %>%
count() %>%
ungroup()
unique_users
## # A tibble: 2 x 2
## data_year n
## <dbl> <int>
## 1 2019 10773
## 2 2020 10402
2019 NEDA week officialy from 25th to March 3st : 2019-02-25 00:00:03, 2019-03-03 22:00:26
2020 NEDA week from February 24th to March 1st: 2020-02-24 00:02:16, 2020-03-01 22:59:04
neda %>%
group_by(data_year) %>%
count(screen_name, sort = T) %>%
slice(1:10) %>%
gt() %>%
tab_options(
heading.title.font.size = 13,
column_labels.font.size = 11,
table.font.size = 11
) %>%
tab_header(
title = "# of different tweets by user"
) %>%
fmt_number(
columns = vars(n),
decimals = 0
)
| # of different tweets by user | |
|---|---|
| screen_name | n |
| 2019 | |
| NEDAstaff | 375 |
| Dianev44 | 256 |
| zacharydmallory | 224 |
| Grace_Durbin | 111 |
| SupermodelEmme | 102 |
| KidsMatterOK | 77 |
| EDFColorado | 69 |
| heavenlysins66 | 56 |
| JenniSchaefer | 56 |
| TheProjectHEAL | 56 |
| 2020 | |
| NEDAstaff | 114 |
| uofleatlab | 74 |
| CheriLev | 66 |
| NaopakSasvim | 34 |
| EDCareDenver | 33 |
| MentalHealthMil | 31 |
| YazzyLaMer | 31 |
| EDFColorado | 28 |
| KelseyEClark | 28 |
| drmuhlheim | 26 |
neda %>%
group_by(data_year) %>%
select(screen_name, followers_count) %>%
arrange(desc(followers_count)) %>%
distinct(screen_name, .keep_all = T) %>%
slice(1:20) %>%
gt() %>%
tab_options(
heading.title.font.size = 13,
column_labels.font.size = 11,
table.font.size = 11
) %>%
tab_header(
title = "Firts 20th users by # of followers"
) %>%
fmt_number(
columns = vars(followers_count),
decimals = 0
)
| Firts 20th users by # of followers | |
|---|---|
| screen_name | followers_count |
| 2019 | |
| 36,665,765 | |
| MTV | 15,499,665 |
| MTVNEWS | 5,160,025 |
| WomensHealthMag | 4,581,386 |
| MensHealthMag | 4,516,375 |
| TeenVogue | 3,340,148 |
| inquirerdotnet | 2,792,707 |
| Ginger_Zee | 2,340,517 |
| 2,337,657 | |
| Jimparedes | 1,751,509 |
| harpersbazaarus | 1,677,033 |
| seventeen | 1,359,212 |
| NIMHgov | 1,153,600 |
| womenshealth | 936,617 |
| HRC | 811,703 |
| HHSGov | 754,150 |
| dosomething | 750,146 |
| ABC7NY | 653,570 |
| teddyboylocsin | 646,794 |
| Allure_magazine | 576,799 |
| 2020 | |
| 35,993,421 | |
| gmanews | 5,533,600 |
| parentsmagazine | 4,763,121 |
| CNNnews18 | 4,342,366 |
| GMA | 3,707,198 |
| inquirerdotnet | 2,938,922 |
| sadierob | 1,871,043 |
| DZMMTeleRadyo | 1,332,968 |
| NIMHgov | 1,163,247 |
| womenshealth | 932,087 |
| NYDailyNews | 736,888 |
| AlvaroAlvaradoC | 652,868 |
| SELFmagazine | 507,126 |
| nutribullet | 442,739 |
| Xiaxue | 374,580 |
| MentalHealthAm | 333,155 |
| TrevorProject | 290,826 |
| WCVB | 287,301 |
| TWLOHA | 278,281 |
| raphablueberry | 254,924 |
neda %>%
filter(str_detect(text, "^RT @NEDAstaff")) %>%
group_by(data_year) %>%
count(retweeted_status_id, sort = TRUE) %>%
left_join(neda %>% select(id_tweet, text, created_at_tweet),
by = c("retweeted_status_id" = "id_tweet")
) %>%
slice(1:10) %>%
select(-retweeted_status_id, created_at_tweet) %>%
gt()
| n | text | created_at_tweet |
|---|---|---|
| 2019 | ||
| 176 | Today kicks of #NEDAwareness Week 2019 from Feb 25-Mar 3. Our theme, "Come as You Are", highlights NEDA’s movement… https://t.co/cFJhr1BqJJ | 2019-02-25 17:30:07 |
| 98 | For #NEDAwareness Week, @Instagram and @NEDA have teamed up to let individuals at all stages of body acceptance and… https://t.co/exGloFska1 | 2019-02-26 17:09:04 |
| 92 | Thank you to the @EmpireStateBldg for lighting up in blue and green for #NEDAwareness Week! https://t.co/p2SbhcDbMI | 2019-02-27 02:24:37 |
| 56 | #NEDAwareness Week kicks off this Monday and buildings across the country will light up in blue and green to shine… https://t.co/9bscDufL3A | 2019-02-25 00:38:00 |
| 53 | #NEDAwareness Week is Here! https://t.co/GgJEcJOWyB | 2019-02-25 17:03:04 |
| 45 | This #NEDAwareness Week (2/25-3/4), take and share our screening tool - you never know who might need it! https://t.co/dQ0iCIC9L7. | 2019-02-25 22:08:00 |
| 41 | For #NEDAwareness Week, NEDA Ambassadors Ryan Sheldon @BingeConfession and Karla Mosley @karlamosley share how Eat… https://t.co/VZiY65soDw | 2019-02-28 16:16:01 |
| 36 | If you are in a crisis, text 'NEDA' to 741741 to connect with a trained volunteer from Crisis Text Line. #NEDAwareness | 2019-02-26 20:59:02 |
| 31 | #NEDAwareness Week kicks off this Monday and buildings across the country will light up in blue and green to shine… https://t.co/KZMSmrTps1 | 2019-02-26 04:13:00 |
| 22 | This #NEDAwareness Week (2/25-3/4), take and share our screening tool - you never know who might need it! https://t.co/dQ0iCIC9L7. | 2019-02-27 02:23:00 |
| 2020 | ||
| 125 | Happy #NEDAwareness Week 2020! 🎉 We encourage everyone to embrace this year’s theme, #ComeAsYouAre: Hindsight is 20… https://t.co/NPU8E1cHNO | 2020-02-24 11:41:01 |
| 48 | Thank you to the @EmpireStateBldg for lighting up in NEDA’s signature blue and green colors tonight! We are proud t… https://t.co/fnnLMtUYRU | 2020-02-26 02:56:27 |
| 36 | In honor of #NEDAwareness Week, #NEDAmbassador, Gina Susanna (@nourishandeat), shares strategies via @i_weigh on ho… https://t.co/D978UGBu3Q | 2020-02-26 23:15:02 |
| 27 | #DYK: 1 in 3 people with an #eatingdisorder identify as male? On the NEDA blog, @DrStuartBMurray and his @USC colle… https://t.co/ygg9zpvEKj | 2020-02-25 21:20:03 |
| 26 | This #NEDAwareness Week, we want to hear about YOUR experience with #eatingdisorders, body image, and/or exercise i… https://t.co/0tgtZTNHJz | 2020-02-24 18:27:02 |
| 21 | NEDA and @instagram teamed up this #NEDAwareness week to encourage you to #ComeAsYouAre and use the social media pl… https://t.co/5a155uZmv3 | 2020-02-28 16:01:07 |
| 20 | We love seeing all of the #NEDAwareness Week reflections! To minimize triggers and harmful content, please take a l… https://t.co/YyamTcFxVT | 2020-02-24 17:04:01 |
| 18 | Throughout #NEDAwareness week, monuments and buildings across America will be lighting up in NEDA’s signature blue… https://t.co/jq3VfGCDuP | 2020-02-24 21:07:02 |
| 17 | #NEDAwareness Week starts tomorrow!! Is your school or organization helping to spread awareness about food, body im… https://t.co/vdRaG2yNBB | 2020-02-24 00:14:11 |
| 17 | Come as You Are and join the NEDAwareness Week conversation on social media. Don’t forget to use the official campa… https://t.co/vesASwtlSi | 2020-02-24 13:58:01 |
library(scales)
neda %>%
select(
created_at_tweet, screen_name, retweeted_status_user_screen_name, text,
interval_created, data_year
) %>%
mutate(rec_screen_name = case_when(
screen_name != "NEDAstaff" ~ "Others users",
TRUE ~ "NEDAstaff"
)) %>%
mutate(round_created_at_tweet = round_date(created_at_tweet, unit = "hour")) %>%
count(data_year, round_created_at_tweet, rec_screen_name) %>%
ggplot(aes(x = round_created_at_tweet, y = n, colour = rec_screen_name)) +
geom_line() +
labs(
title = "",
colour = "Tweets posted by:",
x = "NEDAwareness week",
y = "# of tweets"
) +
scale_x_datetime() +
facet_wrap(data_year ~ ., ncol = 1, scales = "free_x") +
theme_light() +
theme(legend.position = "bottom") +
scale_color_brewer(palette = "Set1")
neda_20_hist <- read_rds(here::here("data", "NEDA_historical_twenty.rds")) %>%
# filter(screen_name == "NEDAstaff") %>%
select(id_tweet, created_at_tweet, retweet_count, favorite_count) %>%
mutate(data_year = 2020) %>%
arrange(desc(created_at_tweet)) %>%
group_by(id_tweet) %>%
slice(1) %>%
ungroup()
neda_19_hist <- read_rds(here::here("data", "NEDA_historical_nineteen.rds")) %>%
# filter(screen_name == "NEDAstaff") %>%
select(id_tweet, created_at_tweet, retweet_count, favorite_count) %>%
mutate(data_year = 2019) %>%
arrange(desc(created_at_tweet)) %>%
group_by(id_tweet) %>%
slice(1) %>%
ungroup()
d <- bind_rows(neda_19_hist, neda_20_hist)
d %>%
mutate(id_tweet = as.character(id_tweet)) %>%
select(id_tweet, retweet_count, favorite_count, data_year) %>%
pivot_longer(
cols = -c(data_year, id_tweet), values_to = "values",
names_to = "variables"
) %>%
group_by(data_year, variables) %>%
count(values, name = "number_of_tweets") %>%
ungroup() %>%
filter(values > 0) %>%
mutate(variables = factor(variables,
level = c(
"retweet_count",
"favorite_count"
),
labels = c(
"Retweets",
"Likes"
)
)) -> dd
dd %>%
mutate(data_year = as_factor(data_year)) %>%
ggplot(aes(x = values, y = number_of_tweets, color = data_year)) +
geom_point() +
scale_y_log10(breaks = log_breaks()) +
scale_x_log10(
breaks = trans_breaks("log10", function(x) 10^x),
labels = trans_format("log10", math_format(10^.x))
) +
scale_color_brewer(palette = "Set1") +
theme_light() +
xlab("# rt/likes from a user in collection") +
ylab("# Tweets") +
facet_wrap(. ~ variables)
2019 data:
read_rds(here::here("data", "neda_liwc_gender_nineteen.rds")) %>%
select(gender, id) %>%
distinct() %>%
count(gender, sort = T)
## # A tibble: 3 x 2
## gender n
## <chr> <int>
## 1 f 762
## 2 u 671
## 3 m 313
2020 data:
read_rds(here::here("data", "neda_liwc_gender_twenty.rds")) %>%
select(gender, id) %>%
distinct() %>%
count(gender, sort = T)
## # A tibble: 3 x 2
## gender n
## <chr> <int>
## 1 u 193
## 2 f 173
## 3 m 65