Skip to content

Build a Sales DashBoard with Streamlit and BigQuery

Introduction

The web application designed to provide comprehensive insights into liquor sales performance in Iowa. As a dashboard product, its primary objective is to furnish managers and business decision-makers with crucial information essential for informed decision-making. For instance, users can analyze sales performance across different cities, conduct comparative assessments, identify revenue-driven and profit-driven products, and explore optimal product combinations.

Data Source

The data originates from the Iowa liquor dataset, available through Google BigQuery’s public datasets, totaling approximately 8 GB. My filter is designed to specifically extract related data recorded between 2022 and 2023.

query = """
SELECT * EXCEPT  (store_number, address, zip_code, county_number,category,vendor_number,vendor_name,item_number,volume_sold_liters,volume_sold_gallons)
FROM `bigquery-public-data.iowa_liquor_sales.sales`
WHERE date  BETWEEN  '2022-01-01' AND '2023-12-31'
"""

Tech Stacks

Python serves as the glue that integrates the various components of our tech stack. The ETL script retrieves data from BigQuery, processes it using Python libraries, and prepares it for presentation in the Streamlit application.

  • Python: Python serves as the primary programming language for developing our application.
  • BigQuery: Google BigQuery as data warehouse solution for storing and querying large datasets. Its scalability and performance capabilities make it well-suited for handling big data analytics tasks.
  • ETL Script: Developed a custom ETL (Extract, Transform, Load) script in Python to prepare and process the big data stored in BigQuery. This script ensures that the data is cleaned, transformed, and formatted appropriately for further analysis and visualization.
  • Streamlit: Streamlit is used to build the user interface of the web application. Its simplicity and ease of use allow us to create interactive data visualizations and dashboards effortlessly.
  • Deployment: It can be dockerized and then deployed to streamlit community, heroku or other cloud provider such as AWS, Azure, GCP.

Features

  • Empowers managers with essential insights by delivering key information promptly.
  • Visualizes the sale performance across cities and categories, enabling detailed exploration at various levels.
  • Shows the best combinations for further marketing or sales strategies.
  • Tracks sales trends over time and facilitates comparative analysis across multiple cities.