This section investigated dog bite incidents temporal trends and the correlation between dog bite incidents and dogs’ demographics. By looking more closely at the relation between variables and dog bite incidents, we hope to capture potential trends in the dog bites dataset.

Correlation between the number of dog bite incidents and dogs’ background

top_breeds = dog_bites_clean |> 
  group_by(breed) |> 
  summarise(count = n()) |> 
  arrange(desc(count)) |> 
  filter(!is.na(breed) & breed != "unknown") |> 
  slice_head(n = 10)

dog_bites_top10 = dog_bites_clean |> 
  filter(breed %in% top_breeds$breed) |> 
  mutate(
    breed = factor(breed),
    gender = factor(gender),
    spay_neuter = factor(spay_neuter),
    borough = factor(borough)
  )

label(dog_bites_top10$breed) = "Top 10 Breeds"
label(dog_bites_top10$gender) = "Gender"
label(dog_bites_top10$spay_neuter) = "Neuter Status"
label(dog_bites_top10$borough) = "Borough"

table1 = table1(~ breed + gender + spay_neuter + borough, 
                data = dog_bites_top10,
                overall = "Total")

table1
Total
(N=16302)
Top 10 Breeds
Bull 4760 (29.2%)
Chihuahua 648 (4.0%)
Maltese 376 (2.3%)
Mixed 5167 (31.7%)
Poodle 476 (2.9%)
Shepherd 825 (5.1%)
Shih Tzu 735 (4.5%)
Terrier 402 (2.5%)
Unknown 2425 (14.9%)
Yorkshire 488 (3.0%)
Gender
F 2637 (16.2%)
M 6552 (40.2%)
U 7113 (43.6%)
Neuter Status
FALSE 12013 (73.7%)
TRUE 4289 (26.3%)
Borough
Bronx 2780 (17.1%)
Brooklyn 3679 (22.6%)
Manhattan 3451 (21.2%)
Other 635 (3.9%)
Queens 4372 (26.8%)
Staten Island 1385 (8.5%)

The table above displayed how dog bite incidence was distributed across different levels and groups in dog demographic features like breed, gender, neuter status, and the borough where the incident occurred (likely the borough they reside). The top demographic features that contributed the most dog bite incidents are being mixed, male, un-neutered, and active in Queens.