# CSV file
artists <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2022/2022-09-27/artists.csv')
# Total artists per race
ggplot(data = artists) +
geom_bar(mapping = aes(x = type))
artists %>% count(type)
## # A tibble: 13 × 2
## type n
## <chr> <int>
## 1 Actors 260
## 2 Announcers 260
## 3 Architects 260
## 4 Dancers And Choreographers 260
## 5 Designers 260
## 6 Entertainers 260
## 7 Fine Artists, Art Directors, And Animators 260
## 8 Landscape Architects 260
## 9 Music Directors And Composers 260
## 10 Musicians 260
## 11 Photographers 260
## 12 Producers And Directors 260
## 13 Writers And Authors 260
# Percentage of artists in U.S. population
ggplot(data = artists) +
geom_histogram(mapping = aes(x = artists_share))
# Total artists by race
ggplot(data = artists, mapping = aes(x = artists_n, colour = race)) +
geom_freqpoly()
ggplot(data = artists, mapping = aes(x = artists_share)) +
geom_histogram()
# Outliers in percentage of U.S. artists
ggplot(artists) +
geom_histogram(mapping = aes(x = artists_share)) +
coord_cartesian(xlim = c(0, 0.013))
# Total employed as artists per occupation type
ggplot(data = artists, mapping = aes(x = artists_n, y = type)) +
geom_point(na.rm = TRUE)
## Covariation
# Artist occupation percentage by state
ggplot(data = artists, mapping = aes(x = artists_share, y = state)) +
geom_boxplot()
# The proportion of artist type classified by artist race
artists %>%
count(race, type) %>%
ggplot(mapping = aes(x = race, y = type)) +
geom_tile(mapping = aes(fill = n))
# The relationship between all workers and all artists
ggplot(data = artists) +
geom_point(mapping = aes(x = all_workers_n, y = artists_n)) +
coord_cartesian(xlim = c(0, 500000), ylim = c(0, 80000))