You are on page 1of 24

MARKETING AND

RETAIL ANALYTICS –
ASSIGNMENT1
EXPLORATORY ANALYSIS –
EXECUTIVE SUMMARY
The given dataset is the 1 year (1-Apr-2010 till 31-Mar-
2011) transaction data set of a Café Chain for one of its
restaurants. Please find below the details of the data set.
Each row represents the transaction details of a unique
item(but can have multiple quantities) per order.
 Number of rows: 1,45,830
 Number of columns(variables): 10
 Data of 580 unique Menu Items.
 Data of 69,982 transactions.(identified by Bill numbers).

Note: The given excel file has 3 sheets of data. As the bill numbers and
dates of the second and third sheets are not matching with the first one,
I have used only the first sheet(named as Sheet2) for this analysis.
DETAILS OF VARIABLES
# Variable Description
1 Date Date of transaction
2 Bill Number Bill number of the transaction
3 Item Desc Description of the item ordered
4 Time Time of transaction
5 Quantity Number of quantity ordered for the item
6 Rate Price per one quantity of the item
7 Tax Total tax amount for the item
8 Discount Total discount amount
9 Total Total price excluding the discount
10 Category Category of the Item
Values: Beverage, Food, Liquor, Liquor
&Tobacco*,Merchandise, Misc, Tobacco,
Wines.

*Note: Tobacco is misspelt as Tpbacco in the sheet


MISSING VALUES, OUTLIERS
 No missing values were found in the data
 1+1 WINE GLASS having Rate as 1 could be an
outlier and needs further investigation.
SUMMARY STATISTICS
Initial summary statistics will yield us the below insights:

 Date: The values range from 1-Apr-2010 to 31-Mar-2010


The maximum number(top 5) of unique items per order were ordered on the
following dates:
31-Dec-10: 834
3-Apr-10 : 631
18-Dec-10: 620
29-Jan-11: 607
5-Feb-11 : 573
 Bill Number: The maximum number(top 5) of unique items per order were
ordered in the following transactions(identified by the bill number):
G0490530: 23, G0518006: 23 , G0489943: 21, G0526679: 19 , G0495644: 18
 Item Desc: The items that have appeared in maximum number of orders(top 5):
NIRVANA HOOKAH SINGLE : 8553 MINT FLAVOUR SINGLE : 5817
CAPPUCCINO : 5495 GREAT LAKES SHAKE : 4895 SAMBUCA : 4425
 Time: The maximum number(top 5) of unique items per order were
ordered on the following times:
10:25:36 PM: 33
11:35:33 PM: 30
10:58:37 PM: 29
11:02:58 PM: 26
1:25:14 AM : 25
This indicates that peak time for the restaurant could be roughly
from 10:25PM to 1:30AM
 Quantity: The values range from 1 to 30
 Rate: The values range from 0.01(Mothers day Spl) to 2100(GOSSIPS
CHARD AUS (BTL) –Wines)
 Tax: The values range from 0 to 2731.25.
 Discount: The values range from 0 to 825.
 Total: The values range from 0.01(Mothers Day Spl) to
14231.25(PARTY CHARGES @ 500/- )
 Category:
# Category Count
1 57023
FOOD
2 BEVERAGE 43573
3 TOBACCO 36496
4 LIQUOR 6201
5 MISC 1187
6 WINES 809
7 MERCHANDISE 487
8 LIQUOR & TPBACCO 54

We can see that items of category “food” is ordered the maximum


number of times(unique items per order – not considering multiple
quantities of the same item in the same order) followed by “beverage”
and “tobacco”.
TRENDS IN THE DATASET
As the size of the dataset is quite large, mining the data using the
Category dimension would enable us to have an easy and crisper grasp of
the data than other dimensions like Item Desc, Date, Time etc.

From this plot we can observe that in the 1year dataset,


Food items had the maximum sales volume followed by
Beverage and Tobacco.
To understand the rate trend
per category, I have plotted
the average, min and max of
rate per category. We can
observe that the Liquor
&Tobacco has the highest
average and min rates,
Wines have the highest
maximum rate.
From this plot, we can infer that the maximum sales revenue is
generated from the category “Tobacco” followed by Food and
Beverage.
From this plot, we would be able to understand the total discount
amount given by the restaurant in each of the categories. Food
items were given maximum amount of discount followed by
Beverage and Liquor .
 Tobacco, Liquor & Tobacco, Liquor are having the highest
tax rates.
MENU ANALYSIS
Identify the most popular combos that can be suggested to the restaurant
chain after a thorough analysis of the most commonly occurring sets of menu
items in the customer orders.
As per my understanding, this analysis can be considered similar to a market
basket analysis to find the combinations of items that are ordered most frequently
and hence the most popular. This info can be used to design the menu(catalogue),
plan discounts/offers etc.
I have applied this analysis to our dataset using the apriori algorithm using R
and the arules package.
Steps:
 Extracting bills which have more than 1 item. Count is 38,280

 Extracting data of bills which have more than 1 item . Count is 1,14,128
 We need to arrange records to a single record per Bill number, so that the
individual items that belong to each bill are aggregated across columns into a
single record as an array of products using the split function.
 Now we convert this array data into a “Transaction” object optimized for running
the apriori algorithm. Finally, we run our algorithm setting minimum support and
confidence thresholds, below which R ignores any rules.
 Plot of the relative frequency of each item (i.e. the fraction of
transactions) for the top 25 items by item frequency (i.e. the
fraction of transactions that each item appears in). The most
frequent item appears in less than 15% of the transactions.
 Inspect the actual rules generated by the algorithm -
In our case, the algorithm has identified 60 rules. Out of the 60, the first 50 are
not helpful as there are no items on the LHS. (For these rules, there are no
items on the LHS, the support = the confidence and the lift = 1.)
 The last 10 rules(51-60) are giving the combo rules(ItemX and ItemY combo).
Based on the support, confidence and lift values, the most popular combos are
identified(in blue).
 Hence the most popular combos are:
 Poutine with fries, Nirvana Hookah Single
 Cappuccino, Great Lakes Shake
followed by
 Qua Mineral Water(1000ML), Nirvana Hookah Single
 Mint Flavour Single, Cappuccino
 Great Lakes Shake, Nirvana Hookah Single
PRICE ANALYSIS
Identify the pricing changes that have happened and which menu
items saw a positive impact of the price changes and which menu
items saw a negative impact of the price changes?
Price changes for an item are found to be captured in the
corresponding Rate variable . Also, impact of the pricing changes can be
interpreted as the increase/decrease in the sales volume for that item.

There are 171 items with rate changes. The items which had the maximum
number of price changes are:
 1+1 WINE GLASS has 10 different rates.(Rate of 1 could be an outlier)
 POUTINE WITH FRIES -10 different rates
 GREAT LAKES SHAKE – 7 different rates
 WARM PEPPER & CHICKPEA SALAD -7 different rates
 LEMON INFUSED CHAR GRILLED VEG -5 different rates
 CAPPUCCINO - 5 different rates
 CAFFE LATTE - 5 different rates
MENU ITEMS WITH HIGHEST
IMPACT
 CAFFE LATTE
 CALCUTTA MINT
 CAPPUCCINO
 COTTAGE CHEESE PANINI  BERRY BLAST
 COUNTRY ROAST CHICKEN PANINI
 GARDEN FRESH PANINI
 JR.CHL AVALANCHE
GREAT LAKES SHAKE
MAGGI NDLCREAM/


 GREEN APPLE FLAVOUR SINGLE
 KF DRAUGHT (1/2LTR) CHEE/GARLIC
 LEMON ICED TEA
 MASALA CHAI CUTTING
 POUTINE WITH FRIES
 MIAMI MELONS MINT FLAVOUR SINGLE
 MOROCCAN MINT TEA
 N R G HOOKAH
 NIRVANA HOOKAH SINGLE
 OREO COOKIE SHAKE
 RED BULL ENERGY DRINK
 SAMBUCA
 SATAY CHICKEN PANINI
 SILVER APPLE SINGLE
 TOBLERONE SHAKE Items which exhibited a big
 TUBORG impact - both positive and
negative (increase and
Items which exhibited a huge decrease in quantity sold) with
negative impact(decrease in price change.
quantity sold) with price change.
MENU ITEMS FOR WHICH PRICE INCREASE
SHOWED A NEGATIVE IMPACT(DECREASE IN
QUANTITY SOLD)
• C C C ROMA TOMATO SALAD
• CAESARS SALAD WRAP
 ADD FRIES
• CAFFE LATTE
 ADD ICE CREAM • CALCUTTA MINT
 ADD HERB ROAST CHICKEN • CAPPUCCINO
 ADD ON S • CEASAR SALAD BOWL
 ADD POTATO WEDGES • CH KEY CHAIN
 AIOLI SALAD BOWL
• CH NOTE BOOKS
• CHEESE CAKE OF THE WEEK
 AL SIKANDARI HOOKAH SINGLE • CHERRY FLAVOUR SINGLE
 APPLE FLAVOUR SINGLE • CHICKEN BURGER
 ASIAN WOK TOSSED SALAD • CHICKEN KIBBEH
 BAILEYS IRISH SHAKE • CHICKEN SALAMI PANINI
 BBQ CHICKEN WINGS • CLASSIC BELGIAN WAFFLE
• CLASSIC MENTHOL
 BENSON & HEDGES SPL
• COLUMBIAN SUP DCAFE (AU LAIT)
 BLUE BERRY SINGLE • COTTAGE CHEESE PANINI
 BLUEBERRY BRAIN FREEZER SHAKE • COUNTRY LEMONADE
 BUDWEISER • COUNTRY ROAST CHICKEN PANINI
 BUN MASKA & CHAI • CREPES WITH MUSHROOMS
 DAILY BEER GLASSES
 KF DRAUGHT PITCHER (2LTR)
 ESPRESSO
 FRENCH VINAIGRETTE SALAD BOWL
 KHEEMA GHOTALA
 FRUIT FROM THE TROPICS
 LASSI DA GLASS
 GOOEY CHOCOLATE FUDGE  LEBANESE CHICKEN WRAP
 GRAPE FLAVOUR SINGLE  LEMON FLAVOUR SINGLE
 GREAT LAKES FLOAT W VANILLA  LEMON ICED TEA
 GREAT LAKES FLOATS W CHOC  MAGGI NDL ARRABIATA
 GREEN APPLE FLAVOUR SINGLE  MAGGI NDL BBQ SAUCE
 HASH BROWN OMELETTE  MAGGI NDL BOLOGNESE
 HERBED CHICKEN PIE
 MAGGI NDL BURMESE CURRY
 HERBED GARDEN PIE
 HONEY & MUSTARD GLAZED
 MARRAKESH HOOKAH SINGLE
CHICKEN  MASALA CHAI CUTTING
 ITALIAN OMELETTE BREAKFAST  MEZE PLATTER
 JUICE HOOKAH SINGLE  MIAMI MELONS
 KF DRAUGHT (1/2LTR)  MINT FLAVOUR SINGLE
 RABAT HOOKAH SINGLE
 RECESSION BEER MUG SHOT GLS
 RED BULL ENERGY DRINK
 RED SANGRIA (CARAFE)

 MISCHIEF  RED SANGRIA (GLS)


HOOKAH SINGLE
 MOROCCAN MINT TEA  RED WINE SHEESHA

 MOROCCAN SOY KEBABS  ROCKSTAR TOOTHPICK HOLDER


 SALSA WRAP
 MUSTARD HONEY MAYO SALAD BOWL
 SAMBUCA
 N R G HOOKAH
 SANDASS
 NIRVANA HOOKAH SINGLE
 SANGRIA ROSE (CARAFE)
 NON-VEG CLUB WRAP
 SATAY CHICKEN PANINI
 O M G GRILLED BURGER
 SCRAMBLED EGGS
 OATMEAL AND RAISIN COOKIES
 SILVER APPLE SINGLE
 OREO COOKIE SHAKE  SPANISH OMELETTE BREAKFAST
 PASTA ALFREDO NONVEG  SPICED LEMON AND BASIL VELOUTE
 PASTA ALFREDO VEG  SR.CHL AVALANCHE
 PASTA ARABIATA NONVEG  STRAWBERRY FLAVOUR SINGLE
 PCJ PATTY BURGER  STUFFED MUSHROOM
 PEACH FLAVOUR SINGLE  SUNNY SIDE UP

 PESTO CREAM  TENNESSEE CHICKEN WINGS

 PLAIN JANE (STRAWBERRY)  THANK GOD ITS A SUNDAE


 THE CHAMPAGNE SHEESHA
 POUTINE WITH WEDGES
 RABAT HOOKAH SINGLE
 RECESSION BEER MUG SHOT GLS
 RED BULL ENERGY DRINK
 RED SANGRIA (CARAFE)
 RED SANGRIA (GLS)
 TIRAMISU
 RED WINE SHEESHA
 ROCKSTAR TOOTHPICK HOLDER
 TOBLERONE SHAKE
 SALSA WRAP  TOMATOLINO
 SAMBUCA  TRADITIONAL ITALIAN CRUSTINI
 SANDASS
 TUBORG
 SANGRIA ROSE (CARAFE)
 SATAY CHICKEN PANINI  VANILLA ICECREAM
 SCRAMBLED EGGS  VANILLA LITE SHAKE
 SILVER APPLE SINGLE
 VEG. CLUB WRAP
 SPANISH OMELETTE BREAKFAST
 VERTIGO
 SPICED LEMON AND BASIL VELOUTE
 SR.CHL AVALANCHE  VLN CAB SAUV (GLS)
 STRAWBERRY FLAVOUR SINGLE  WAIST WATCHING OMELETTE
 STUFFED MUSHROOM
 WHITE SANGRIA (CARAFE)
 SUNNY SIDE UP
 TENNESSEE CHICKEN WINGS  WHITE WINE SHEESHA
 THANK GOD ITS A SUNDAE  ZERO SIZE SHOT GLS
 THE CHAMPAGNE SHEESHA
MENU ITEMS FOR WHICH PRICE INCREASE
SHOWED A POSITIVE IMPACT(INCREASE IN
QUANTITY SOLD)
 ADD WHIPPED CREAM  LATE HARVEST SULA
 BENSON & HEDGES LIGHTS CHENIN (GLS)
 BERRY BLAST  MT. BROWNIE
 CASABLANKA HOOKAH SINGLE  MUMBAI SHOT GLASSES
 CHUNKY CHOCO CHIP COOKIES  ORANGE FLAVOUR SINGLE
 CLASSIC MILD
 PLAIN JANES (VANILLA)
 CLASSIC ULTRA MILD
 COLUMBIAN SUP DCAFE (RGLR)
 STELLA ARTOIS (GLS)
 COLUMBIAN SUPREMO (REG)  STELLA ARTOIS MUG (1 LTR)
 COLUMBIAN SUPREMO (AULAIT)  THE CHOCO LATTE
 GRILLED CHICKEN SAUSAGES  VLN CAB SAUV CLASIQ (BTL)
 HOEGAARDEN (GLS)  VLN CAB SAUV CLASIQ (GLS)
 HOEGAARDEN MUG (1 LITRE)
 LATE HARVEST SULA CHENIN
(BTL)
MENU ITEMS FOR WHICH POSITIVE AND
NEGATIVE IMPACT WAS OBSERVED FOR PRICE
INCREASE
 1+1 WINE GLASS
 ADD FRIES
 DAIRY OF A DAIRY
 GREAT LAKES SHAKE
 JR.CHL AVALANCHE
 KF DRAUGHT (1LTR)
 LEMON INFUSED CHAR GRILLED VEG
 LINDT CHOCOLATE SHAKE
 LINDT HOT CHOCOLATE
 MAGGI NDLCREAM/ CHEE/GARLIC
 MAGGI NDLTHAI STYLE
 ORANGE ARRABIATA
 PASTA ARABIATA VEG
 POUTINE WITH FRIES
 ULTIMATE HOT CHOCOLATE
 WARM PEPPER & CHICKPEA SALAD
MENU ITEMS FOR WHICH THE AFTER AND BEFORE THE PRICE
CHANGE, THERE WAS NO IMPACT(QUANTITY SOLD REMAINED SAME)
 1+1 WINE BOTTLE
 BHOJPURI SHOT GLASSES
 BOTTLED WATER (1LITRE)
 GOA GIRLS SHOT GLASS
 THUNDER THIGH(JUICE GLS) RED

You might also like