Where to open a new coffee shop in Denver ?
  • AI Chat
  • Code
  • Report
  • Beta
    Spinner

    Where to open a new coffee shop?

    📖 Background

    You are helping a client who owns coffee shops in Colorado. The company's coffee shops serve high-quality and responsibly sourced coffee, pastries, and sandwiches. They operate three locations in Fort Collins and want to expand into Denver.

    Your client believes that the ideal location for a new store is close to affluent households, and the store appeals to the 20-35 year old demographic.

    Your team collected geographical and demographic information about Denver's neighborhoods to assist the search. They also collected data for Starbucks stores in Denver. Starbucks and the new coffee shops do not compete for the same clients; the team included their location as a reference.

    💪 Challenge

    Provide your client a list of neighborhoods in Denver where they should consider expanding. Include:

    • A visualization of Denver's neighborhoods and the Starbucks store locations.
    • Find the neighborhoods with the highest proportion of people in the target demographic.
    • Select the top three neighborhoods where your client should focus their search.

    Intro

    Retrospectively I made this introduction to talk about the different chapters I will approach : - The data, Brief presentation about the data we will working on - The setup is all about the libraries I need to import - Data Preparation for the inspection/cleaning of Dataframes - Visualization is a first approach of the datas, by seeing the map of denver, population amount by neighborhoods and location of starbucks stores - Exploring Data is a deeper approach, trying to see if some variables are correlated, creating new columns and see if we can choose 3 best neighborhoods to expand the business - Conclusion is to sum up our findings

    💾 The data

    You have assembled information from three different sources (locations, neighborhoods, demographics):

    Starbucks locations in Denver, Colorado
    • "StoreNumber" - Store Number as assigned by Starbucks
    • "Name" - Name identifier for the store
    • "PhoneNumber" - Phone number for the store
    • "Street 1, 2, and 3" - Address for the store
    • "PostalCode" - Zip code of the store
    • "Longitude, Latitude" - Coordinates of the store
    Neighborhoods' geographical information
    • "NBHD_ID" - Neighborhood ID (matches the census information)
    • "NBHD_NAME" - Name of the statistical neighborhood
    • "Geometry" - Polygon that defines the neighborhood
    Demographic information
    • "NBHD_ID" - Neighborhood ID (matches the geographical information)
    • "NBHD_NAME' - Nieghborhood name
    • "POPULATION_2010' - Population in 2010
    • "AGE_ " - Number of people in each age bracket (< 18, 18-34, 35-65, and > 65)
    • "NUM_HOUSEHOLDS" - Number of households in the neighborhood
    • "FAMILIES" - Number of families in the neighborhood
    • "NUM_HHLD_100K+" - Number of households with income above 100 thousand USD per year

    Starbucks locations were scrapped from the Starbucks store locator webpage by Chris Meller.
    Statistical Neighborhood information from the City of Denver Open Data Catalog, CC BY 3.0 license.
    Census information from the United States Census Bureau. Publicly available information.

    Setup

    %%capture
    pip install geopandas
    # import necessary modules
    import pandas as pd # Data manipulation
    import geopandas as gpd # Map Visualization
    import folium # Visualization
    import matplotlib.pyplot as plt # Visualization
    import seaborn as sns # Statistical plots
    from shapely.geometry import Point # Geometry
    

    Data Preparation

    1. Denver DataFrame

    denver = pd.read_csv('./data/denver.csv')
    denver
    denver.shape
    denver.info()

    Cleaning the column StoreNumber and PhoneNumber so we can transform it into integers columns :

    denver['StoreNumber'] = denver['StoreNumber'].str.replace('-','')
    
    denver['PhoneNumber'] = denver['PhoneNumber'].str.replace(' ','').str.replace('-','').str.replace('/', '').str.replace('(','').str.replace(')','')
    
    denver

    Transforming now into integers columns :

    ‌
    ‌
    ‌