DataLens

Plotly Project: Toko Kita's monthly review charts

Three graded charts for the shop's half-year review. A sorted bar chart of revenue by category, a monthly trend measured against a target, and two panels that share one time axis.

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 month the owner presents the numbers to the two people who invested in the shop. Until now, that meant a spreadsheet chart with the default colours, the legend in the way, and no title anyone could read from the back of the room.

For the half-year review, you're making the three charts that go on the slides. Each one has a single job. The first says where the money comes from, the second says whether the shop is hitting its monthly target, and the third shows whether more revenue came from more orders or from bigger ones. A good chart answers its question at a glance, so the tickets are specific about sorting, titles and labels.

How the tasks work

Each task is checked automatically, like the module questions. The checker doesn't look at a picture of your chart. It reads the figure object: the traces, their values, and the layout. That means the details in each ticket (the exact title, the order of the bars, the axis labels) are what gets checked. Store your figure in fig and don't call fig.show(). There are hints if you get stuck, but try each task without opening the solution first.

The tasks

#TaskMain skills
1Revenue by categorypx.bar, sorting for a horizontal bar chart, titles, colour
2Against the targetLine charts with markers, add_hline, hover text
3Revenue and orders togethermake_subplots, shared x-axes, mixing bar and line traces

The data

All three charts 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

status is completed, shipped, pending or cancelled, and only completed rows count as sales in the review. order_date looks like 2024-03-14, so its first seven characters are the month label (2024-03).

When you're ready, open Task 1.

Open the project

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