Donut Shop Sales and Operations Analysis with PolarsDonut Shop Sales and Operations Analysis with Polars
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
Donut Shop Sales & Operations Analysis: Polars, Plotly and PostgreSQL
What this is A data analysis project that turns a donut shop's database into clear, interactive insights about sales, inventory and staff. It reads live data straight from a PostgreSQL database, so the results always match what is happening in the business. There are no manual exports and no copy-pasted spreadsheets.
Why Polars, not the usual pandas Most data analysis today is done with pandas. For this project I used Polars, a modern, high-performance data library written in Rust. I built the shop's database to scale, and the analysis needed to scale with it.
Fast on big data: Polars uses all of your computer's CPU cores, so it stays fast as the data grows from thousands of rows to millions. Memory-efficient: it handles large datasets without slowing down or running out of memory. Built for growth: when the business adds more sales, customers and locations, the analysis keeps working without being rewritten.
Live connection with ConnectorX The analysis connects to PostgreSQL through ConnectorX, a database connector built for fast loading, and it loads data directly into Polars. Each run pulls the latest data, so a client can refresh the analysis at any time and see current numbers.
Interactive charts with Plotly All charts are made with Plotly, so they are interactive and not just pictures. Hover over any bar, line or data point to see the exact values, and zoom in or turn data series on and off to explore the details yourself.
What the analysis covers
Sales & revenue: top-selling donuts, sales trends by month, sales by category, and total profit. Inventory & waste: ingredient purchases, wasted donuts, and the money lost to waste. Staff & operations: employees by shift and age group, and salary summaries.
Tools: Python, Polars, ConnectorX, Plotly, PostgreSQL
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started