Animal shelters aim to maximize adoption rates, but not all pets are adopted equally. Factors such as age and species may influence how likely an animal is to find a home.
In this project, I analyze a dataset of pets to investigate which characteristics are associated with higher adoption likelihood. By identifying these patterns, this analysis can provide insights that may help improve adoption strategies in shelters.
Figure 1. Animals in a shelter environment.
Animal adoption is an important issue for shelters, as many animals remain unadopted each year. Understanding the factors that influence adoption likelihood can help improve outcomes and reduce overcrowding.
Previous research and general trends suggest that adopters often prefer younger animals and certain pet types. However, data-driven analysis is necessary to confirm these patterns and better understand how different variables impact adoption rates.
This project uses real data to explore these relationships and provide insights into what makes a pet more likely to be adopted.
The dataset contains information on pet characteristics such as age, type, and adoption likelihood.
library(dplyr)
library(ggplot2)
data <- read.csv("Data SC/pet_adoption_data.csv")
knitr::kable(head(data))
| PetID | PetType | Breed | AgeMonths | Color | Size | WeightKg | Vaccinated | HealthCondition | TimeInShelterDays | AdoptionFee | PreviousOwner | AdoptionLikelihood |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 500 | Bird | Parakeet | 131 | Orange | Large | 5.039768 | 1 | 0 | 27 | 140 | 0 | 0 |
| 501 | Rabbit | Rabbit | 73 | White | Large | 16.086727 | 0 | 0 | 8 | 235 | 0 | 0 |
| 502 | Dog | Golden Retriever | 136 | Orange | Medium | 2.076286 | 0 | 0 | 85 | 385 | 0 | 0 |
| 503 | Bird | Parakeet | 97 | White | Small | 3.339423 | 0 | 0 | 61 | 217 | 1 | 0 |
| 504 | Rabbit | Rabbit | 123 | Gray | Large | 20.498100 | 0 | 0 | 28 | 14 | 1 | 0 |
| 505 | Dog | Labrador | 70 | Brown | Large | 20.986261 | 0 | 0 | 87 | 301 | 1 | 0 |
data %>%
group_by(PetType) %>%
summarise(avg_adoption = mean(AdoptionLikelihood, na.rm = TRUE))
## # A tibble: 4 × 2
## PetType avg_adoption
## <chr> <dbl>
## 1 Bird 0.302
## 2 Cat 0.287
## 3 Dog 0.464
## 4 Rabbit 0.254
ggplot(data, aes(x = AgeMonths, y = AdoptionLikelihood)) +
geom_point(alpha = 0.6) +
geom_smooth(color = "red", se = TRUE) +
labs(
title = "Younger Pets Are More Likely to Be Adopted",
subtitle = "Adoption likelihood decreases as age increases",
x = "Age (Months)",
y = "Adoption Likelihood"
) +
theme_minimal()
This visualization shows a clear negative relationship between age and adoption likelihood. Younger pets tend to have a higher probability of adoption, while older pets are less likely to be adopted. This pattern may reflect adopter preferences for younger animals, which could have important implications for shelter strategies.
ggplot(data, aes(x = PetType, y = AdoptionLikelihood, fill = PetType)) +
geom_boxplot() +
labs(
title = "Adoption Likelihood Varies by Pet Type",
x = "Pet Type",
y = "Adoption Likelihood"
) +
theme_minimal() +
theme(legend.position = "none")
The bar graph displays the average adoption likelihood for each pet
type. The results show minimal variation across all categories,
indicating that birds, cats, dogs, and rabbits have similar adoption
likelihoods. This suggests that pet type may not be a strong predictor
of adoption in this dataset, and other factors, such as age, may play a
more important role.
A linear regression model was used to evaluate whether age predicts adoption likelihood.
model <- lm(AdoptionLikelihood ~ AgeMonths, data = data)
summary(model)
##
## Call:
## lm(formula = AdoptionLikelihood ~ AgeMonths, data = data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.4928 -0.3471 -0.2396 0.5400 0.8296
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.496430 0.020881 23.775 <2e-16 ***
## AgeMonths -0.001821 0.000197 -9.245 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.4601 on 2005 degrees of freedom
## Multiple R-squared: 0.04089, Adjusted R-squared: 0.04041
## F-statistic: 85.48 on 1 and 2005 DF, p-value: < 2.2e-16
The regression results show a statistically significant negative relationship between age and adoption likelihood (p < 0.001). This indicates that as age increases, the likelihood of adoption decreases. However, the R-squared value is relatively low, suggesting that age alone does not fully explain adoption outcomes and that other factors may also play an important role.
library(GGally)
data %>%
select(AgeMonths, AdoptionLikelihood) %>%
ggpairs()
This correlation plot shows a negative relationship between age and adoption likelihood, with a correlation of approximately -0.20. This indicates that as age increases, adoption likelihood tends to decrease. Although the relationship is not extremely strong, it is consistent with the trends observed in previous visualizations.
While this analysis identifies important trends, there are limitations. The dataset does not include factors such as breed, health status, or shelter conditions, which may also influence adoption likelihood.
Future analyses could incorporate additional variables or apply more advanced models to better understand adoption behavior.
This project demonstrates that pet age and type play an important role in adoption likelihood. Younger pets are more likely to be adopted, highlighting a potential challenge for shelters in placing older animals.
These findings provide useful insights that could help improve adoption strategies and increase overall adoption rates.
Additionally, this project strengthened skills in data visualization, statistical modeling, and data analysis using R.
These findings highlight the importance of data-driven decision-making in improving animal adoption outcomes.