The Best Zip Codes in Los Angeles City to Open a New Pet Store

An application of KMeans Clustering

1. Description & Discussion of the Background

With a population of 4 millions, city of Los Angeles is the second most populous city in the United States. The ”City of Angels” is a city of sharp contrasts, home to people who hail from all parts of the globe and an important center of culture, business, media, and international trade. Being the world’s hub of television, motion picture, and music industry, Los Angeles has a diverse economy and hosts businesses in a broad range of professional and cultural fields.

2. Data Description

The data used in this work can be classified as below:

  • The geographical coordinate of all zip codes in the US from https://public.opendatasoft.com/
  • Foursquare API to fetch the venues (specifically pet store and pet service) around a particular zip code coordinate

3. Methodology

Python libraries used in this work are:

  • folium and geopy for map visualization
  • requests and json for making API call
  • seaborn for data visualization
  • scikit-learn for clustering algorithm (KMeans clustering)
First dataframe
Geographic Distribution of Zip codes in Los Angeles
List of venues obtained from API call.

4. Results

The KMean clustering was performed with k=5 on zip codes without pet venues and the parameters taken into account are only number of households with pet and rent price. The clustering and plotting resulted in below chart:

KMeans plot for zip codes without pet-related business
  • Highest number of households with pet
  • Rent price is among the lowest in the city
Clusters’ geographic distribution
Best zip codes to open a new pet store in LA

5. Conclusion

The answer of the question “which part of LA is the best to open a new pet store?” is the 9 zip codes belonging to cluster 2, with 90250 / Hawthorne(Holly Park) as the absolute best zip code. The reason being that the cluster has pretty much a lot of things to make a new pet business successful: very few existing pet-related establishment, high pet population, and the rent prices are among the lowest in the city.

Data-enthusiast