HW 01 - Pet names

Elijah Adelegan 8/30/2024

Load packages and data

library(tidyverse)
library(openintro)

Exercises

Exercise 1

There are 52,519 pets in the dataset.

Exercise 2

There are 7 variables for each pet

Exercise 3

NA,Lucy, and Charlie are the most common pet names

seattlepets %>%
  count(animal_name, sort = TRUE)
## # A tibble: 13,930 × 2
##    animal_name     n
##    <chr>       <int>
##  1 <NA>          483
##  2 Lucy          439
##  3 Charlie       387
##  4 Luna          355
##  5 Bella         331
##  6 Max           270
##  7 Daisy         261
##  8 Molly         240
##  9 Jack          232
## 10 Lily          232
## # ℹ 13,920 more rows

Exercise 4

Yes by changing the n= in slice_max() to a lower number like 1 and 2. There is more than one name for pigs because there are six of them

Exercise 5

The names more common for cats than dogs are below the line

Exercise 6

The relationship appears to be postive as the line increases on the x axis cats name are more frequent and the higher y axis are more common for dogs. This means that in the context of data both pets share similar names.