-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
w9_AfLS.qmd
84 lines (59 loc) · 1.75 KB
/
w9_AfLS.qmd
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
title: "TidyTuesday 2023 w9 African Language Sentiment"
author: "Federica Gazzelloni"
execute:
comments: ""
eval: true
echo: true
warning: false
message: false
---
```{r}
library(tidyverse)
tuesdata <- tidytuesdayR::tt_load(2023, week = 09)
```
```{r}
afrisenti <- tuesdata$afrisenti
languages <- tuesdata$languages
language_scripts <- tuesdata$language_scripts
language_countries <- tuesdata$language_countries
country_regions <- tuesdata$country_regions
```
```{r}
afrisenti%>%count(label)
```
```{r}
library(showtext)
#sysfonts::font_families_google()
sysfonts::font_add_google("Explora","Explora")
showtext_auto()
```
```{r}
df_plot <- afrisenti%>%
inner_join(languages,by="language_iso_code")%>%
count(label,intended_use,language)
ggplot(data = df_plot, mapping = aes(label,n,fill=intended_use))+
geom_col(width = 0.5)
coord_polar(theta = "y",
start = 0,
direction = 1,
clip = "off") +
#scale_x_(clip="off")+
#scale_x_reverse(expand=expansion(add=c(10,20))) +
scale_y_continuous(expand=expansion(mult=c(0,0),add=c(0,1))) +
labs(title="African Language Sentiment",
caption="DataSource: #TidyTuesday 2023 week9 African Language Sentiment\nDataViz: Federica Gazzelloni #30DayChartChallenge 2023 Day11 - Circular",
fill="Inteded use")+
scale_fill_manual(values = c("#CF3721", "#31A9B8", "#258039")) +
theme_minimal()+
theme(text=element_text(family="Explora",size=90,face="bold"),
panel.grid = element_blank(),
axis.text.y = element_blank(),
axis.text.x = element_blank(),
axis.title = element_blank()) +
facet_wrap(vars(language))
```
```{r}
ggsave("p4.png",width = 9,height = 10,
device = "png",dpi=300,bg="white")
```