DataLens

Streamlit Project: Toko Kita's sales dashboard

Three graded tasks that build one dashboard step by step. Put the headline numbers on a page, add sidebar filters that change everything below them, and finish with a cached loader and a download button for the finance team.

Track project

Open the project

A realistic brief and graded tasks that use the whole track. Included with Pro.

The brief

Toko Kita is a small Indonesian online shop that sells coffee, kitchen equipment, stationery, home goods and a few electronics. Every Monday the owner asks the same questions: how much did we sell, which products did best, and how do the app and the website compare? Every Monday somebody opens the export, makes a pivot table, and pastes screenshots into the group chat.

You're going to replace that with a Streamlit app the whole team can open in a browser. You'll build it in three steps, and each task is one step: first the headline numbers, then the filters, then the parts that make it pleasant to use every day (a fast loader and a way to take the numbers away as a file). By the last task, you have something you could actually deploy.

How the tasks work

Each task is checked automatically, like the module questions. The checker runs your app the way Streamlit does, from top to bottom, then clicks and types into your widgets and runs it again, so the labels in the tickets have to match exactly. The tickets say what the page must show, not how to arrange your code. There are hints if you get stuck, but try each task without opening the solution first.

The tasks

#TaskMain skills
1The headline numbersst.title, st.columns, st.metric, pandas in an app
2Filters in the sidebarst.sidebar, multiselect, radio, empty states
3Fast and downloadablest.cache_data, selectbox, st.download_button

The data

All three tasks use sales.csv, the order export from January to June 2024. Every row is one line of an order (one product), so an order with three products takes three rows that share an order_id. The columns are:

order_id, order_date, customer, city, segment, product, category, quantity, unit_price, revenue, channel, status

channel is app or web, and status is completed, shipped, pending or cancelled. Only completed rows count as sales on this dashboard. Money is shown the Indonesian way, with dots between the thousands: Rp 11.836.000. In Python, f"Rp {n:,}".replace(",", ".") does that.

When you're ready, open Task 1.

Open the project

A realistic brief and graded tasks that use the whole track. Included with Pro.