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
| # | Task | Main skills |
|---|---|---|
| 1 | The headline numbers | st.title, st.columns, st.metric, pandas in an app |
| 2 | Filters in the sidebar | st.sidebar, multiselect, radio, empty states |
| 3 | Fast and downloadable | st.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.