Understanding your customers with Customer Intelligence¶
Every company wants to know which of their customers love them, and where to find new customers who will feel the same.
Imagine your company is looking to open more UK outlets. If you knew exactly who would love your products, you would open your stores close by. What makes someone likely to be a customer is a difficult question, but can be answered with the clever use of data.
We built Customer Intelligence in SherlockML to provide insights specific to each business from knowning only the postcodes of current customers or retail points. Customer Intelligence discovers areas where people are demographically similar to your existing customer base. You can use Customer Intelligence to answer questions like “What describes our best customers?” and “Where can we find more customers who will love our product?”
Say you are a food retailer deciding where to open new stores. We can use the postcodes of Lidl and Waitrose to show how Customer Intelligence recommends different locations for new stores based on the different customer demographics of each business.
from sherlockml import opendata import sherlockml.customerintelligence as ci import matplotlib as mpl from matplotlib import pyplot from IPython.display import display, HTML %matplotlib inline
def display_colorbar(colormap_name, title, ticks=[0, 1], labels=['Low', 'High'], fontsize=16): """ Display a matplotlib colormap. """ fig, axes = pyplot.subplots(figsize=(10, 0.5)) # Normalise colours to match the range of values norm = mpl.colors.Normalize(vmin=min(ticks), vmax=max(ticks)) # Plot colourbar cbr = mpl.colorbar.ColorbarBase( axes, cmap=mpl.cm.get_cmap(colormap_name), norm=norm, orientation='horizontal', ticks=ticks ) axes.set_title(title, fontsize=fontsize) axes.set_xticklabels(labels, fontsize=fontsize) pyplot.show() # Select colormap for visualisation COLORMAP = 'viridis'
# Load data lidl = opendata.load('tutorials/supermarkets/lidl.csv') waitrose = opendata.load('tutorials/supermarkets/waitrose.csv')
# Analyse with Customer Intelligence insight_lidl = ci.analyse(lidl['postcode']) insight_waitrose = ci.analyse(waitrose['postcode'])
For example, the map below identifies areas of the UK where the the population is demographically similar to the customer basis of Lidl.
display(HTML('<h2>Lidl</h2>')) display(insight_lidl.similarity_map(colourmap=COLORMAP, bins=50)) display_colorbar(COLORMAP, title='Similarity')