-
Notifications
You must be signed in to change notification settings - Fork 1
/
08_plotting.R
43 lines (37 loc) · 1.58 KB
/
08_plotting.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
writeLines("It is part of my CNPq-funded project and seeks to make corpus tools and R accessible. If you have any doubts or wish to make any research contact please send me an email. Rodrigo de Lima-Lopes [email protected]")
# Ciro Gomes
CG.w %>%
slice(1:25) %>%
ggplot(aes(x = reorder(word, n, function(n) -n), y = n)) +
geom_bar(stat = "identity") +
theme(axis.text.x = element_text(angle = 60, hjust = 1)) +
labs(
x = "Words", y = "Frequency",
title = "Frequency of Twitter words posted by Ciro Gomes",
subtitle = "Twitter status (tweet) counts aggregated by day from January 2022",
caption = "\nSource: Data collected from Twitter's REST API via rtweet"
)
# Lula
LI.w %>%
slice(1:25) %>%
ggplot(aes(x = reorder(word, n, function(n) -n), y = n)) +
geom_bar(stat = "identity") +
theme(axis.text.x = element_text(angle = 60, hjust = 1)) +
labs(
x = "Words", y = "Frequency",
title = "Frequency of Twitter words posted by Lula",
subtitle = "Twitter status (tweet) counts aggregated by day from January 2022",
caption = "\nSource: Data collected from Twitter's REST API via rtweet"
)
# Bolsonaro
JB.w %>%
slice(1:25) %>%
ggplot(aes(x = reorder(word, n, function(n) -n), y = n)) +
geom_bar(stat = "identity") +
theme(axis.text.x = element_text(angle = 60, hjust = 1)) +
labs(
x = "Words", y = "Frequency",
title = "Frequency of Twitter words posted by Jair Bolsonaro",
subtitle = "Twitter status (tweet) counts aggregated by day from January 2022",
caption = "\nSource: Data collected from Twitter's REST API via rtweet"
)