NYC Data Science Academy| Blog
Bootcamps
Lifetime Job Support Available Financing Available
Bootcamps
Data Science with Machine Learning Flagship πŸ† Data Analytics Bootcamp Artificial Intelligence Bootcamp New Release πŸŽ‰
Free Lesson
Intro to Data Science New Release πŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook Graduate Outcomes Must See πŸ”₯
Alumni
Success Stories Testimonials Alumni Directory Alumni Exclusive Study Program
Courses
View Bundled Courses
Financing Available
Bootcamp Prep Popular πŸ”₯ Data Science Mastery Data Science Launchpad with Python View AI Courses Generative AI for Everyone New πŸŽ‰ Generative AI for Finance New πŸŽ‰ Generative AI for Marketing New πŸŽ‰
Bundle Up
Learn More and Save More
Combination of data science courses.
View Data Science Courses
Beginner
Introductory Python
Intermediate
Data Science Python: Data Analysis and Visualization Popular πŸ”₯ Data Science R: Data Analysis and Visualization
Advanced
Data Science Python: Machine Learning Popular πŸ”₯ Data Science R: Machine Learning Designing and Implementing Production MLOps New πŸŽ‰ Natural Language Processing for Production (NLP) New πŸŽ‰
Find Inspiration
Get Course Recommendation Must Try πŸ’Ž An Ultimate Guide to Become a Data Scientist
For Companies
For Companies
Corporate Offerings Hiring Partners Candidate Portfolio Hire Our Graduates
Students Work
Students Work
All Posts Capstone Data Visualization Machine Learning Python Projects R Projects
Tutorials
About
About
About Us Accreditation Contact Us Join Us FAQ Webinars Subscription An Ultimate Guide to
Become a Data Scientist
    Login
NYC Data Science Acedemy
Bootcamps
Courses
Students Work
About
Bootcamps
Bootcamps
Data Science with Machine Learning Flagship
Data Analytics Bootcamp
Artificial Intelligence Bootcamp New Release πŸŽ‰
Free Lessons
Intro to Data Science New Release πŸŽ‰
Find Inspiration
Find Alumni with Similar Background
Job Outlook
Occupational Outlook
Graduate Outcomes Must See πŸ”₯
Alumni
Success Stories
Testimonials
Alumni Directory
Alumni Exclusive Study Program
Courses
Bundles
financing available
View All Bundles
Bootcamp Prep
Data Science Mastery
Data Science Launchpad with Python NEW!
View AI Courses
Generative AI for Everyone
Generative AI for Finance
Generative AI for Marketing
View Data Science Courses
View All Professional Development Courses
Beginner
Introductory Python
Intermediate
Python: Data Analysis and Visualization
R: Data Analysis and Visualization
Advanced
Python: Machine Learning
R: Machine Learning
Designing and Implementing Production MLOps
Natural Language Processing for Production (NLP)
For Companies
Corporate Offerings
Hiring Partners
Candidate Portfolio
Hire Our Graduates
Students Work
All Posts
Capstone
Data Visualization
Machine Learning
Python Projects
R Projects
About
Accreditation
About Us
Contact Us
Join Us
FAQ
Webinars
Subscription
An Ultimate Guide to Become a Data Scientist
Tutorials
Data Analytics
  • Learn Pandas
  • Learn NumPy
  • Learn SciPy
  • Learn Matplotlib
Machine Learning
  • Boosting
  • Random Forest
  • Linear Regression
  • Decision Tree
  • PCA
Interview by Companies
  • JPMC
  • Google
  • Facebook
Artificial Intelligence
  • Learn Generative AI
  • Learn ChatGPT-3.5
  • Learn ChatGPT-4
  • Learn Google Bard
Coding
  • Learn Python
  • Learn SQL
  • Learn MySQL
  • Learn NoSQL
  • Learn PySpark
  • Learn PyTorch
Interview Questions
  • Python Hard
  • R Easy
  • R Hard
  • SQL Easy
  • SQL Hard
  • Python Easy
Data Science Blog > Capstone > Finding the Best Liquor Store Location in Iowa

Finding the Best Liquor Store Location in Iowa

Denise Garbato
Posted on Jul 3, 2022

The skills the author demonstrates here can be learned through taking Data Science with Machine Learning bootcamp with NYC Data Science Academy.

Background and Objective

According to Mintel, between 2016 and 2021, spirit sales have outpaced those of beer and wine market.Β  Β Because of this growing trend, there is opportunity to open a spirit’s store.

A prospective client is looking to tap an untapped niche by opening a liquor store targeting higher income millennials; staffed with people who are skilled in making at-home, primarily lower calorie cocktails.Β  The objective is to identify the optimal location for this new store. Millennials are more calorie conscious about what they drink than other generations.Β  The store would offer free samples of such drinks on the premisesΒ  and sell not only alcohol butΒ  also the other ingredients that go into making mixed drinks.Β  Since this is a bit of a risk, he doesn't want to open too big of a store.

The prospective client wants to open the liquor store in Iowa and is looking for the three best locations.

To do this I needed to:

  • understand the existing market landscape of both the products and the stores.
  • get an understanding of the demographics of the state.

Data Science Approach

  1. Perform an unsupervised clustering of the spirits products purchased by Iowa stores from the state managed Iowa Alcoholic Beverages Division.
  2. Use clusters fromΒ  (1)Β  to derive features to use in a clustering of the stores to segment the Iowa spirit's market into different store types.
  3. Leverage output from (2) to determine the distribution of store types in each zip code.
  4. Pair insights from (1)-(3) with zip code level demographic information available from the Census Bureau to identify the locations with the most promising locations based on both localized competition trends and zip code demographics.

Python Libraries Used

  • csv
  • pandas
  • numpy
  • sklearn
  • matplotlib
  • seaborn

Datasets

Iowa Liquor Sales Dataset

  • This dataset was made publicly available by the state of Iowa and was compiled from sales data recorded by the Iowa Alcoholic Beverages Division over the period 2012 to 2021
  • For this project, only 2021 data was used given pre-2021 data was considered to be less directly relevant to a new business entering the market.
  • Iowa is an alcoholic beverage control state which means that the state is a monopolistic wholesaler of spirits.
  • Retailers purchase spirits directly from the Iowa Alcoholic Beverages Division.

Census Demographic Datasets

  • Data from the United States Census Bureau’s American Community Survey for 2020 at the zip code level in Iowa (population, age, housing, income, educational attainment etc.).
  • Data from the United States Census Bureau’s American Community Survey for for 2015 at the zip and state level (population).

Zip Code Database

Data from the United States Postal Service (primary city, county and state associated with each zip code).

 

Initial Product Clusters

Products were clustered using the continuous variables: state bottle price, bottle volume and bottles sold.

Given that there were not any categorical variables other than product category (e.g. whiskies, vodkas etc.) , K-Means was considered optimal to use in this case vs K-Modes and K-Prototypes.

With K-Means, initially K centroids are created at random.Β  Each point is assigned to the centroid that it is closest to using Euclidean distance.Β  Centroids are recalculated after each cluster is formed.Β  A centroid is simply a vector of means.Β  New clusters are formedΒ  using the new centroids and points are assigned to their closest cluster.Β  The process continues iteratively until no new clusters can be formed.

Outlier Treatments

As the K-means algorithm will assign every observation to one of k clusters with each computation contributing equally to the computation of the new means for that new centroid, considerable care should be taken to remove any outliers that may otherwise heavily distort these mean computations.

First products with bottle volumes over 3,000 milliliters and products with a retail price above $500 were removed.

 

A product with over 2 million bottles sold is an additional outlier that was removed.

 

After outliers were removed, the features were standard scaled using sklearn library's Standard Scaler utility for use in the K-means clustering of the products.

 

The inertia plot indicated four clusters.Β  The silhouette score indicated the same number of clusters.

 

The four clusters developed are:

  • High End
  • Volume For Dollar
  • Popular Bottles
  • Everything Else

 

High End stands out because the median prices are so much higher than the products in the other clusters.

 

 

Volume For Dollar stands out because the median volume is so much higher than it is for the other clusters

 

Popular Bottles stands out because the median bottle quantity sold is so much greater compared to other clusters.

 

Nothing stands out about Everything Else other than it consists of such a large number of unique products andΒ  a lot more revenue when compared to the other clusters.

Since Everything Else has nothing to distinguish it from the other clustersΒ  and has the most revenue, a sub-clustering of Everything Else was performed.Β  Note that the silhouette scores for five, six and seven clusters were lower than than that of four clusters.

Sub-clustering of Everything Else

A K-means clustering on Bottle Price, Bottle Volume and Bottles Sold was used to develop the sub-clusters.

Before the sub-clusters were developed, the features were standardized.

The inertia plot for the sub-clustering of Everything Else indicates four clusters.

The four sub-clusters are:

  • Quick Shots
  • Expensive
  • Least Expensive
  • Most Variety

 

Quick shots stands out since it has a higher cost per ml than the other sub-clusters partially due to the relatively smaller size of these bottles shown through Quick Shot's median bottle size being only 200 ml versus 750 ml for the three other sub-clusters.

 

Expensive stands out here.Β  The bottle price is so much higher than it is for the other sub-clusters.

 

Moderately Priced is the least expensive.Β  The bottle prices of Quick Shots cannot be directly compared to the others becauseΒ  the bottles are so much smaller and are more expensive on a price per ml basis.

 

Most Variety has the largest variety of products (over 2,000) compared to the other sub-clusters.Β  On the other hand, Least Expensive has the smallest variety with only 136 different products.

 

Final Product Clusters

 

There are seven product clusters when the initial product clusters are combined with the sub-clusters of Everything Else.

They are:

  • Most Variety (Everything Else sub-cluster)
  • Expensive (Everything Else sub-cluster)
  • Quick Shots (Everything Else sub-cluster)
  • Moderately Priced (Everything Else sub-cluster)
  • Volume for Dollar
  • High End
  • Popular Bottles

 

High End stands out here.Β  Expensive is higher priced than the other remaining clusters.

 

 

Popular Bottles generates the most revenue in each product category on a per product basis. Least Expensive follows.

 

Final Product Clusters Liquor Category Breakdown

For the state of Iowa, whiskies are the number one alcohol type with vodkas ranking #2. This aligns with vodka being one of the most popular alcohol types nationally.

 

 

Here the five key product clusters areΒ  compared.Β  Whiskey dominates in every product clusterΒ  including Expensive.Β  There is also some expensive Tequila.

Given that High End accounts accounts for less than one percent of the revenue of every store on average and given Quick Shots suffered from data quality issues, five of the original seven product clusters were used to feature engineer variables to use in the clustering of the stores.

Clustering Stores

I clustered the stores using the total number of unique products in each store and five features engineered from the product clusters.

The five features engineeredΒ  are the percentage of revenue from each store from each of the following product clusters.

  • Most Variety
  • Expensive
  • Moderately priced
  • Popular Bottles
  • Volume For Dollar

Outliers

Before clustering, outliers needed to be removed:

First stores with number of unique products over 1,750 were excluded.

Secondly 18 outlier stores, discovered during an initial clustering, were excluded. The outliers are mainly distilleries and not stores. A distillery is where hard liquor like whiskey, gin, vodka, rum, etc. is made on the premises.

Features were standardized before clustering.

Inertia Plot

The inertia plot for the clustering of the stores indicates four clusters.Β  The silhouette score indicated the same.

 

 

The four store clusters are:

  • Convenience stores
  • Smaller stores
  • Medium sized stores
  • Large stores

 

Apart from convenience stores, the clusters were named based on store revenue.

 

Store Clusters by Top 5 Store Types

Casey’s General Store is the largest convenience store chain in Iowa with 508 stores.Β  Fifty percent ofΒ  the convenience stores in Iowa are a Casey’s General Store.

Hy-Vee is the largest supermarket chain in Iowa.Β  They typicallyΒ  sell a wide variety of Spirits.Β  They also have dedicated liquor stores andΒ  some gas stations.

Fareway Stores is the second largest supermarket chain in Iowa.

Mom and pop stores and small chains fall into the other category.

 

Large stores have the largest number of unique products and Convenience stores have the smallest.

 

 

Convenience stores have limited shelf space and mainly sell Popular Bottles.Β 

Popular Bottles make up a smaller percent of store revenue at Large stores than they do in the other store clusters.

 

Volume for Dollar with a low price per milliliter are mainly carried at Medium and Large sized stores.

 

Moderately Priced make up a larger percent of store revenue at Smaller sized stores.

 

Putting it all together with census data

 

Since my prospective client's goal is to open a liquor store targeting higher income millennials, the locations selected (zip codes) must fit this demographic.

 

Feature Engineering

To assess degree of local competition, I created the following variables at the zip code level.

Population growth

  • 2020 population/2015 population

Median household income index

  • (median household income in zip code) / (median household income for the state) * 100

Median home market value index

  • (median home market value in zip code) / (median home market value for the state) * 100

Median age index

  • (median age in zip code) / (median age in state) * 100

Population densityΒ 

  • (total population) / (land area in square miles)

 

To access competition, I created the following for each zip code.

Total Number of Stores

  • Number of Convenience stores
  • Number of Smaller stores
  • Number of Medium sized stores
  • Number of Large stores
  • Population per store (excludes convenience stores)
  • (total population ) / (number of stores - number of convenience stores)

Population per store is a good indicator of how much competition there is.Β  Convenience stores were left out of the calculation because they mainly carry Popular Bottles.Β  My prospective client is interested in open a niche liquor store which will not be selling just Popular Bottles.Β  Convenience stores are not a direct competitor.

As Convenience stores are not considered to be a direct competitor, onlyΒ Smaller, Medium and Large stores are considered to be potential competitors to the new store entrant in this analysis.

Location Selection Process

I selected locations (zip codes) that met the following criteria and sorted by population per store

My selection criteria :

  • Population growth > 1
    • To identify zip codes with positive population growth from 2015 t0 2020
  • Median household income indexΒ  > 100
  • Median home market value index > 100
  • Population density > 900
  • Median age index < 100

My prospective client also wanted an area that is somewhat urban since the market research said to think young, think urban.Β  Initially, instead ofΒ  using the population densityΒ  as a selection criteria I used population > 10,000.Β  However, although that resulted in a larger number of locations (18), it included some rather sparsely populated areas.Β  Some zip codes selected using that criteria were spread out over 100 square miles.

A population density over 900 is high for Iowa given the average population density across the entire state is just 56.

When population density was used instead it narrowed it down to just nine.

OfΒ  the nine, the top five locations based on population per store were further evaluated.Β  They are

  • Iowa City
  • Urbandale
  • Ankeny
  • Wauke
  • Des Moines

 

Data Analysis of Top Five

While Iowa City has the largest population per store, Ankeny has the largest population.

Des Moines has the zip code which is the highest in population density.Β  Waukee is the lowest.

 

There was a twenty percent increase in the populations of Urbandale, Ankeny and Waukee.Β  Meanwhile, the populations of Iowa City and Des Moines have increased less than ten percent.

 

Ages for millennials range from 26 to 41.

The closest that I could come to that using census data is 25 to 44.

Ankeny, Waukee, and Des Moines have a higher percent of the population in the target age group than Iowa City and Urbandale.Β  With respect to median age, Iowa City is the youngest which is most likely because the University of Iowa is located there.

Β 

The graph of the percent of households with income $75K plus looks very similar to that of median household income.Β  Urbandale, Ankeny and Waukee are much higher in income than Iowa City and Des Moines.Β Β With respect to median household income,Β  Iowa City and Des Moines are just slightly above the median for the state which is $61,836.

The chart below paints detailed picture of the competition.Β  Des Moines clearly has the most competition. It also has a medium sized liquor store and a small liquor store.Β  In addition, it's median income is only slightly above the median for the state and it has the smallest increase in population. For these reasons, I would not recommend this location.

Note that there are other zips code in Des Moines than the ones shown throughout this analysis.Β  It is a city of over two hundred and twenty thousand.

Iowa City has the least competition.Β  However, the median income is only slightly above that of the state, the population has grown less than ten percent from 2015.Β  It has lowest median age which as mentioned is most likely because the University of Iowa is located there.Β  Lastly, it has the smallest percent of the population age 25 to 44 which is just below what it is for the entire state of Iowa.Β  Since it Β doesn't target my prospective client's desired demographic, Β I would not recommend this location.

That leaves Urbandale, Ankeny and Waukee.Β  They are all high income and have populations that have grown over Β twenty percent from 2015. Β Growing populations mean more customers.

Recommended Cities

Urbandale

  • Competition: It has the least competition with just one medium sized store.Β  A small niche store has a good chance here.
  • Geographic Area: It is the smallest in terms of square miles at 10.
  • Income: It has the highest median income at $144,180.
  • Age Demographics: 25.8% of the population is age 25 to 34 which is two percentage points above what it is for the state as a whole.
    • It is the oldest in terms of median age at 36.
  • Population: It has the smallest population at almost fifteen thousand people.
    • The population has grown 22% since 2015.

Ankeny

  • Competition: In terms of competition, it has one large store and two medium sized stores.Β  It has no small stores at all.Β  The large store is a Hy-Vee supermarket.Β  One of the medium sized stores is a Fareway supermarket.Β  The other is a drug store.Β  Those store formats are very different than that of my prospective client.Β  A small niche store could fit in here.
  • Geographic Area: It is 21 square miles, the new store could be physically located at a distance from the other stores.
  • Income: It has a median income of $91,974
  • Age Demographics: Β 33.8% of the population is age 25 to 44.
    • It is the youngest in terms of median age at 32.
  • Population: It has the largest population of the three with just over forty thousand people.
    • The population has grown 32% since 2015.

 

Waukee

  • Competition: In terms of competition it has the most with three large stores, one medium sized store and one small store.Β  The three large stores area a Hy-Vee supermarket and two stores that sell liquor and tobacco.Β  The medium sized store is a Fareway supermarket.Β  The smaller store is a small Hy-Vee market.Β  A small niche store could fit in here.
  • Geographic Area: It is 27 square miles. A new store could be located at a distance from the others.
  • Income: It has a median income of $98,546.
  • Age Demographics: 34.6% of the population is age 25-44.
    • The median age is 34.
  • Population: It has a population of almost twenty seven thousand.
    • The population has grown 34.7% since 2015.

 

 

 

 

About Author

Denise Garbato

I am a Statistician and Business Analyst who supports strategic decision making in digital and traditional marketing channels by discovering insights, applying statistical and programming skills with a results-focused approach. I am skilled in data analysis and predictive...
View all posts by Denise Garbato >

Related Articles

Capstone
Catching Fraud in the Healthcare System
Capstone
The Convenience Factor: How Grocery Stores Impact Property Values
Capstone
Acquisition Due Dilligence Automation for Smaller Firms
Machine Learning
Pandemic Effects on the Ames Housing Market and Lifestyle
Machine Learning
The Ames Data Set: Sales Price Tackled With Diverse Models

Leave a Comment

No comments found.

View Posts by Categories

All Posts 2399 posts
AI 7 posts
AI Agent 2 posts
AI-based hotel recommendation 1 posts
AIForGood 1 posts
Alumni 60 posts
Animated Maps 1 posts
APIs 41 posts
Artificial Intelligence 2 posts
Artificial Intelligence 2 posts
AWS 13 posts
Banking 1 posts
Big Data 50 posts
Branch Analysis 1 posts
Capstone 206 posts
Career Education 7 posts
CLIP 1 posts
Community 72 posts
Congestion Zone 1 posts
Content Recommendation 1 posts
Cosine SImilarity 1 posts
Data Analysis 5 posts
Data Engineering 1 posts
Data Engineering 3 posts
Data Science 7 posts
Data Science News and Sharing 73 posts
Data Visualization 324 posts
Events 5 posts
Featured 37 posts
Function calling 1 posts
FutureTech 1 posts
Generative AI 5 posts
Hadoop 13 posts
Image Classification 1 posts
Innovation 2 posts
Kmeans Cluster 1 posts
LLM 6 posts
Machine Learning 364 posts
Marketing 1 posts
Meetup 144 posts
MLOPs 1 posts
Model Deployment 1 posts
Nagamas69 1 posts
NLP 1 posts
OpenAI 5 posts
OpenNYC Data 1 posts
pySpark 1 posts
Python 16 posts
Python 458 posts
Python data analysis 4 posts
Python Shiny 2 posts
R 404 posts
R Data Analysis 1 posts
R Shiny 560 posts
R Visualization 445 posts
RAG 1 posts
RoBERTa 1 posts
semantic rearch 2 posts
Spark 17 posts
SQL 1 posts
Streamlit 2 posts
Student Works 1687 posts
Tableau 12 posts
TensorFlow 3 posts
Traffic 1 posts
User Preference Modeling 1 posts
Vector database 2 posts
Web Scraping 483 posts
wukong138 1 posts

Our Recent Popular Posts

AI 4 AI: ChatGPT Unifies My Blog Posts
by Vinod Chugani
Dec 18, 2022
Meet Your Machine Learning Mentors: Kyle Gallatin
by Vivian Zhang
Nov 4, 2020
NICU Admissions and CCHD: Predicting Based on Data Analysis
by Paul Lee, Aron Berke, Bee Kim, Bettina Meier and Ira Villar
Jan 7, 2020

View Posts by Tags

#python #trainwithnycdsa 2019 2020 Revenue 3-points agriculture air quality airbnb airline alcohol Alex Baransky algorithm alumni Alumni Interview Alumni Reviews Alumni Spotlight alumni story Alumnus ames dataset ames housing dataset apartment rent API Application artist aws bank loans beautiful soup Best Bootcamp Best Data Science 2019 Best Data Science Bootcamp Best Data Science Bootcamp 2020 Best Ranked Big Data Book Launch Book-Signing bootcamp Bootcamp Alumni Bootcamp Prep boston safety Bundles cake recipe California Cancer Research capstone car price Career Career Day ChatGPT citibike classic cars classpass clustering Coding Course Demo Course Report covid 19 credit credit card crime frequency crops D3.js data data analysis Data Analyst data analytics data for tripadvisor reviews data science Data Science Academy Data Science Bootcamp Data science jobs Data Science Reviews Data Scientist Data Scientist Jobs data visualization database Deep Learning Demo Day Discount disney dplyr drug data e-commerce economy employee employee burnout employer networking environment feature engineering Finance Financial Data Science fitness studio Flask flight delay football gbm Get Hired ggplot2 googleVis H20 Hadoop hallmark holiday movie happiness healthcare frauds higgs boson Hiring hiring partner events Hiring Partners hotels housing housing data housing predictions housing price hy-vee Income industry Industry Experts Injuries Instructor Blog Instructor Interview insurance italki Job Job Placement Jobs Jon Krohn JP Morgan Chase Kaggle Kickstarter las vegas airport lasso regression Lead Data Scienctist Lead Data Scientist leaflet league linear regression Logistic Regression machine learning Maps market matplotlib Medical Research Meet the team meetup methal health miami beach movie music Napoli NBA netflix Networking neural network Neural networks New Courses NHL nlp NYC NYC Data Science nyc data science academy NYC Open Data nyc property NYCDSA NYCDSA Alumni Online Online Bootcamp Online Training Open Data painter pandas Part-time performance phoenix pollutants Portfolio Development precision measurement prediction Prework Programming public safety PwC python Python Data Analysis python machine learning python scrapy python web scraping python webscraping Python Workshop R R Data Analysis R language R Programming R Shiny r studio R Visualization R Workshop R-bloggers random forest Ranking recommendation recommendation system regression Remote remote data science bootcamp Scrapy scrapy visualization seaborn seafood type Selenium sentiment analysis sentiment classification Shiny Shiny Dashboard Spark Special Special Summer Sports statistics streaming Student Interview Student Showcase SVM Switchup Tableau teachers team team performance TensorFlow Testimonial tf-idf Top Data Science Bootcamp Top manufacturing companies Transfers tweets twitter videos visualization wallstreet wallstreetbets web scraping Weekend Course What to expect whiskey whiskeyadvocate wildfire word cloud word2vec XGBoost yelp youtube trending ZORI

NYC Data Science Academy

NYC Data Science Academy teaches data science, trains companies and their employees to better profit from data, excels at big data project consulting, and connects trained Data Scientists to our industry.

NYC Data Science Academy is licensed by New York State Education Department.

Get detailed curriculum information about our
amazing bootcamp!

Please enter a valid email address
Sign up completed. Thank you!

Offerings

  • HOME
  • DATA SCIENCE BOOTCAMP
  • ONLINE DATA SCIENCE BOOTCAMP
  • Professional Development Courses
  • CORPORATE OFFERINGS
  • HIRING PARTNERS
  • About

  • About Us
  • Alumni
  • Blog
  • FAQ
  • Contact Us
  • Refund Policy
  • Join Us
  • SOCIAL MEDIA

    © 2025 NYC Data Science Academy
    All rights reserved. | Site Map
    Privacy Policy | Terms of Service
    Bootcamp Application