Skip to content
Pizza Sales Analysis
This project is based on a challenge from Maven Analytics, where the data was given, and the image above contains a little explanation and some questions about the data. The data is about sales from a fictional pizza place during a year.
The Data
The data given, is divided in four soucers:
Order information
- 'order_id' - The ID of the order (matches the order_details data)
- 'date' - the date of the order
- 'time' the time of the order
Order Details information
- 'order_details_id' - The ID for the order detail
- 'order_id' - The ID of the order refered to (matches the order data)
- 'pizza_id' - The ID of the pizza for the order (matches the pizza data)
- 'quantity' - The number of pizzas mentioned on 'pizza_id' for that order
Pizza information
- 'pizza_id' - The ID of the pizza (matches ..)
- 'pizza_type_id' - The ID for the type of the pizza (matches witch the pizza_type data)
- 'size' - The size of the Pizza ('S','M','L','XL','XXL')
- 'price' - The price of the Pizza
Pizza Types Information
- 'pizza_type_id' - The ID for the type of the pizza (matches witch the pizza data)
- 'name' - The name for this pizza type
- 'category' - Category for the pizza type (e.g. Chicken, Veggie, Meat, etc)
- 'ingredients' - A list of the ingredients of this pizza type
Before answering the questions I'll take a first look at the data
Hidden code
Hidden code
Hidden code
Hidden code
Hidden code
Hidden code
1. How many customers do we have each day? Are there any peak hours?
Since there's no registration of customers of any type, I'll consider the orders to answer this question. So I'll only use the order data which already contains the order id and date and time.
# to get the number of order per day i'll divide the total count of order by the number of unique days we have in the data
# and round it!
order_per_day = len(order.order_id)/len(order.date.unique())
print('Number of orders per day : ',round(order_per_day,0))
The pizza place had a mean of 60 orders a day during 2015