-
Notifications
You must be signed in to change notification settings - Fork 0
/
20220927.R
63 lines (44 loc) · 1.32 KB
/
20220927.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
library(tidytuesdayR)
library(tidyverse)
tt_data <- tt_load("2022-09-27")
readme(tt_data)
artists <- tt_data$artists
str(artists)
artists
unique(artists$race)
unique(artists$type)
ggplot(artists, aes(race, type,
size = location_quotient,
fill = location_quotient))+
geom_point()
artists %>%
filter(state == "Alabama") %>%
group_by(type) %>%
summarize(location_quotient = sum(location_quotient, na.rm = T)) %>%
ggplot(aes(location_quotient, type)) +
geom_point()
artists %>%
ggplot(aes(race, type)) +
geom_jitter(alpha = 0.3)
length(artists$race)
workers_race_state <- artists %>%
group_by(state, race) %>%
summarize(total_workers = sum(all_workers_n))
ggplot(workers_race_state, aes(race, total_workers, color = state)) +
geom_point()
type_race <- artists %>%
group_by(race, type) %>%
summarize(total = sum(all_workers_n))
ggplot(type_race, aes(race, total)) +
geom_line(group = "type")
str(artists)
x <- artists %>%
group_by(race, type) %>%
summarize(total = artists_n,
state = state)
ggplot(x, aes(race, total, color = type)) +
geom_jitter()
artists %>%
filter(artists_share == min(artists_share,na.rm = T))
artists %>% filter(artists_n == min(artists_n, na.rm = T))
artists %>% filter(artists_n == max(artists_n, na.rm = T))