Introduction

The problem statement addressed in this analysis pertains to understanding the factors influencing dog adoption rates. This is of interest as it can provide insights into improving the adoption process, enhancing animal welfare, and ultimately matching more dogs with suitable homes.

To address this problem statement, we plan to analyze the dog data set, which includes information on dog breeds, locations, adoption rates, and other relevant variables. We will employ descriptive statistics, exploratory data analysis, and potentially predictive modeling techniques to gain insights into the factors influencing dog adoption rates.

Our current proposed approach involves conducting exploratory data analysis to identify patterns and trends in the data. We will use techniques such as data visualization, correlation analysis, and possibly regression modeling to understand the relationships between various variables and adoption rates.

The analysis aims to provide valuable insights for those involved in dog adoption processes, including animal shelters, rescue organizations, and potential adopters. By understanding the factors influencing adoption rates, shelters and organizations can optimize their strategies for promoting dog adoptions, while potential adopters can make more informed decisions when choosing a dog. Ultimately, the analysis seeks to facilitate better matches between dogs and potential owners, leading to improved animal welfare outcomes.

Packages

Packages used in this analysis:

  • Library(tidyr)
  • Library(tidyverse)
  • Library(dplyr)

To suppress messages and warnings resulting from loading the package, we can use the suppressMessages() function.

tidyr: This package provides tools for creating tidy data, where each column is a variable, and each row is an observation.

tidyverse: This is a collection of packages designed for data science, including dplyr, ggplot2, tidyr, and other packages. It provides a consistent and coherent approach to data manipulation, visualization, and analysis, making it easier to work with data.

dplyr: This function provides a set of functions that are optimized for tasks such as filtering, selecting, mutating, summarizing, and arranging data. It makes it easier to work with data frames and perform common data manipulation tasks efficiently.

Data Preparation

Original source of data was obtained through Canvas Dog Data.

Source Data

In the source data for the dog data set, there were originally 35 variables collected for the purpose of gathering information on animals who are up for adoption. The original purpose of the data set was likely to facilitate the adoption process by providing detailed information about the dogs available for adoption.

Regarding missing values, the data collection process encountered cases where certain information was not available or not recorded. In the dog data set, missing values were recorded as NA. As part of the data cleaning process, missing values were handled by encoding missing values as “Unknown”, and removing columns which had a high percentage of NA values that did not impact data calculations. In addition, variables that were not deemed useful to keep in the dataset were removed.

#load package
suppressPackageStartupMessages({
  library(tidyverse)
  library(dplyr)
})

# imported the data set
dog <- read.csv("dog_descriptions.csv")


# view structure of data
str(dog)


#summary of data 
summary(dog)

# address missing data 
#checked how many NA values each variable had
colSums(is.na(dog))

#removed 7 columns due to some having NA values that were 80% or more, and other columns had data that was unecessary
#Changed NA values to "unknown" in 8 columns to keep the columns and get rid of NA values 

dog <- dog[, !(names(dog) %in% c("photo", "color_tertiary", "tags", "description","color_secondary", "accessed", "stateQ"))] %>% 
          mutate(env_children = ifelse(is.na(env_children), "Unknown", env_children)) %>% 
          mutate(env_dogs = ifelse(is.na(env_dogs), "Unknown", env_dogs)) %>% 
          mutate(env_cats = ifelse(is.na(env_cats), "Unknown", env_cats)) %>%
          mutate(breed_secondary = ifelse(is.na(breed_secondary), "Unknown", breed_secondary)) %>%
          mutate(color_primary = ifelse(is.na(color_primary), "Unknown", color_primary)) %>% 
          mutate(coat = ifelse(is.na(coat), "Unknown", coat)) %>%
          mutate(contact_zip = ifelse(is.na(contact_zip), "Unknown", contact_zip)) %>%
          mutate(type = ifelse(is.na(type), "Unknown", type))

# checking for data duplication 
unique(dog)

# changed to only show the date in the posted column 
dog$posted <- as.Date(dog$posted)

Once the data had been cleaned, the following is what the final data set looks like in a condensed from showing the first 5 rows of the dataset:

head(dog, 5)
##         id org_id species                  breed_primary breed_secondary
## 1 46042150  NV163     Dog American Staffordshire Terrier     Mixed Breed
## 2 46042002  NV163     Dog               Pit Bull Terrier     Mixed Breed
## 3 46040898   NV99     Dog                       Shepherd         Unknown
## 4 46039877  NV202     Dog            German Shepherd Dog         Unknown
## 5 46039306  NV184     Dog                      Dachshund         Unknown
##   breed_mixed breed_unknown     color_primary    age    sex   size    coat
## 1        TRUE         FALSE     White / Cream Senior   Male Medium   Short
## 2        TRUE         FALSE Brown / Chocolate  Adult   Male  Large   Short
## 3       FALSE         FALSE           Brindle  Adult   Male  Large   Short
## 4       FALSE         FALSE           Unknown   Baby Female  Large Unknown
## 5       FALSE         FALSE           Unknown  Young   Male  Small    Long
##   fixed house_trained declawed special_needs shots_current env_children
## 1  TRUE          TRUE       NA         FALSE          TRUE      Unknown
## 2  TRUE          TRUE       NA         FALSE          TRUE      Unknown
## 3  TRUE         FALSE       NA         FALSE          TRUE      Unknown
## 4 FALSE         FALSE       NA         FALSE         FALSE      Unknown
## 5  TRUE         FALSE       NA         FALSE          TRUE         TRUE
##   env_dogs env_cats   name    status     posted contact_city contact_state
## 1  Unknown  Unknown HARLEY adoptable 2019-09-20    Las Vegas            NV
## 2  Unknown  Unknown BIGGIE adoptable 2019-09-20    Las Vegas            NV
## 3  Unknown  Unknown  Ziggy adoptable 2019-09-20     Mesquite            NV
## 4  Unknown  Unknown  Gypsy adoptable 2019-09-20      Pahrump            NV
## 5     TRUE     TRUE   Theo adoptable 2019-09-20    Henderson            NV
##   contact_zip contact_country type
## 1       89147              US  Dog
## 2       89147              US  Dog
## 3       89027              US  Dog
## 4       89048              US  Dog
## 5       89052              US  Dog

The following variables are variables of concern in the cleaned data set due to the number of “unknown” values.

  • env_children: This variable indicates the compatibility of each dog with children.
## 
##   FALSE    TRUE Unknown    <NA> 
##    4439   23588   30153       0
  • env_dog: This variable represents the compatibility of each dog with other dogs.
## 
##   FALSE    TRUE Unknown    <NA> 
##    3547   31122   23511       0
  • env_cats: This variable denotes the compatibility of each dog with cats.
## 
##   FALSE    TRUE Unknown    <NA> 
##    6810   12542   38828       0

Proposed Exploratory Data Analysis

To discover hidden insights in the data, I’ll start with Exploratory Data Analysis. This means diving into the data to understand its patterns, distributions, and connections. I’ll use different graphs like histograms, box plots, scatter plots, and correlation matrices to spot any unusual patterns or outliers. To answer key questions, I would summarize the data using descriptive statistics, frequency tables, and summary metrics. Additionally, I could use inferential statistics such as hypothesis testing or regression analysis to test relationships and make predictions. Overall, by leveraging a combination of exploratory techniques, data manipulation, and statistical analysis, I aim to uncover hidden insights in the data and provide valuable information that can inform decision-making processes related to dog adoption and welfare.

To explain what I find in the data, I’ll use different pictures and tables. For example:

  • I’ll use bar charts to show how often different things happen.
  • Box plots help compare things between groups.
  • Scatter plots to show if two things seem connected.

In addition, some tables that may be used are:

  • Summary tables to give a quick look at the most important numbers.
  • ANOVA tables help compare averages between groups.

Some things I currently don’t know or would need extra assistance in to answer my questions is conducting exploratory analysis with the current variables and conducting descriptive statistics. I am not quite comfortable in using these techniques, especially using the RStudio software. I am unfamiliar in conducting statistical work in the software and feel like it may hinder me from being able to conduct helpful and meaningful test on the dataset.

I do not plan to incorporate any machine learning techniques as I am not familiar or have knowledge on how to apply those techniques.