Animal Crossing

tidytuesday

Looking at the unique animal personalities in Animal Crossing.

Ted Laderas
5/5/2020

What was your dataset?

Load your dataset in with the function below. The input is the date the dataset was issued. You should be able to get this from the tt_available() function.

critic <- readr::read_tsv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-05-05/critic.tsv')
user_reviews <- readr::read_tsv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-05-05/user_reviews.tsv')
items <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-05-05/items.csv')
villagers <- readr::read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-05-05/villagers.csv')

Villagers

skimr::skim(villagers)
Table 1: Data summary
Name villagers
Number of rows 391
Number of columns 11
_______________________
Column type frequency:
character 10
numeric 1
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
id 0 1.00 2 8 0 391 0
name 0 1.00 2 8 0 391 0
gender 0 1.00 4 6 0 2 0
species 0 1.00 3 9 0 35 0
birthday 0 1.00 3 5 0 361 0
personality 0 1.00 4 6 0 8 0
song 11 0.97 7 16 0 92 0
phrase 0 1.00 2 10 0 388 0
full_id 0 1.00 11 17 0 391 0
url 0 1.00 60 66 0 391 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
row_n 0 1 239.9 140.7 2 117.5 240 363.5 483 ▇▇▇▇▇

Personalities by Species

species_count <- villagers %>%
  group_by(species)  %>%
  summarize(species_count = n()) %>%
  arrange(species_count)

datatable(species_count)
level_order <- villagers %>%
  group_by(species) %>% count() %>%
  arrange(desc(n)) %>%
  pull(species)

villagers %>%
  mutate(species=factor(species, levels=level_order)) %>%
  ggplot() + aes(x=species, y=personality, color=personality) %>%
  geom_count() + 
   theme_light() + theme(legend.position = "none") +
  theme(axis.text.x = element_text(angle = 90))