top of page
Search

Animal Adoption in Texas with Plotly

  • Writer: Atharva Anil Dastane
    Atharva Anil Dastane
  • Oct 15, 2022
  • 2 min read

Updated: Nov 18, 2022

Bringing a dog or a cat home often creates confusion whether to adopt or buy from a breeder. I live in Colorado(dog state) and asked many people having dogs whether to adopt or buy from a breeder. 90% of the people said they had adopted their pets instead of buying. It's much less expensive to adopt than purchase from a breeder.

So I tried answering some important questions regarding Adoption through my Exploratory Data Analysis.


Problem Statement

I would like to answer three important questions through this Report.

  1. How do you measure the success of the animal shelter in terms of locating an animal and rescuing it as well as being surrendered by their owners from different counties ?

  2. How has the pandemic influenced the adoption pattern in Austin?

  3. Do older animals stay longer at the animal shelter and are less likely to get adopted?


Introduction The Austin Animal Center is the largest no-kill animal shelter in the United States that provides care and shelter to over 18,000 animals each year and is involved in a range of county, city, and state-wide initiatives for the protection and care of abandoned, at-risk, and surrendered animals. More info : https://www.austintexas.gov/department/about-austin-animal-center


Data Collection I collected data from Socrata API (https://dev.socrata.com/foundry/data.austintexas.gov/9t4d-g238). The Socrata Open Data API allows you to programmatically access a wealth of open data resources from governments, non-profits, and NGOs around the world. The data was extracted in JSON format. In order to avoid Throttling I wrote the data to a text file and downloaded it to my local system.


Libraries Used

  • Numpy, Pandas, Plotly

Plotly was used as it provides interactive graphs and plots.


Data Formatting

I read the data from a text file and converted it to a Dataframe.

We have two dataframes here :-

  • Intake - Dataframe containing all the Animal Intake information.

  • Outcome - Dataframe containing adoption details, fostering period, etc.



Data was not clean, so I did some cleaning and preprocessing.


Data Preprocessing and Cleaning

  • Removed Duplicate columns and Values

  • Dropped columns containing missing values which were not essential for my analysis

  • Formatted datetime column to extract Day, Month and Year

  • Correction and Normalization of some columns


Column Descriptions

  1. animal_id - Primary key to distinguish animals

  2. datetime - Date and time when the animals were rescued,surrendered and adopted,euthanized,etc.

  3. breed - Breed of the animal

  4. color - Color of the animal

  5. sex_upon_intake - Sex of the animal(F/M)

  6. intake_type - Was the animal owner surrendered, stray or public assistance.

  7. age_upon_intake - Animal's age when it was surrendered or rescued

  8. age_upon_outcome(in Months) - Age when animal left the center

  9. Street - Street from where the animal was rescued or surrendered

  10. City - City from where the animal was rescued or surrendered

  11. Distance from Austin (in miles) - Distance of other counties from Austin

  12. Intake_Month, Year and Day - Date when the animal taken in at the center

  13. Outcome_Month, Year and Day - Date when the animal was adopted, euthanized, abandoned, etc


Answering Problem Statement Questions

1) How do you measure the success of the animal shelter in terms of locating an animal and rescuing it as well as being surrendered by their owners from different counties ?

Base level analysis of animals rescued from various counties.


  • Obviously Austin wins the race in terms of the best 'City' rescuing animals. But there are a substantial number of animals that have been rescued from other counties as well.


  • Travis county records the most rescues after Austin followed by Manor county. Also there are some animals (1.17%) that have been rescued 'Outside Jurisdiction'.


  • One out of five animals was rescued from counties other than Austin.

  • Also, we can say that 17% counts to the overall success of animal center in terms of :

  1. Owner surrendering an animal to the center from counties other than Austin.

  2. Carrying out the rescue operation away from Austin.

One of the important aspects to consider here is - Distance. So, I did some Feature Engineering to add a column containing distance in miles from that county to Austin.



  • The average distance from where the animals were rescued was 25.3 miles.

  • Also, we can see that animals have been rescued or surrendered from counties greater than 50 miles of distance from Austin with the highest one being Caldwell county.

I decided to analyze the top 4 counties having the maximum distance from Austin - Caldwell, Burnet, Point Venture and Blanco counties.



  • More stray animals(13) rescued than owner surrendered(11) animals.

  • People from Burnet are the highest that have surrendered their animals to the center. This means people drove a distance of 54.6 miles to surrender their animals.

  • 13 stray animals have been rescued from a distance of more than 40 miles. All this definitely counts towards the success of Austin Animal Center.

I also decided to check whether the center increased their number of rescue operations from these cities located far from Austin from 2014 to present.



  • From 2014 to 2022 there were no changes in the number of animals rescued or surrendered from these far located cities.

2) How has the pandemic influenced the adoption pattern in Austin?

3) Do older animals stay longer at the animal shelter and are less likely to get adopted?

I hope you enjoyed the Report. Thank you!!





 
 
 

Comments


Feel Free to Reach me!

  • Github
  • LinkedIn
  • Email

©2022 by Atharva Anil Dastane | Proudly created with Wix.com

bottom of page