Marc now has a lot to tell: the table of sales by category, the distribution of order amounts, the three customer segments, a conversion funnel. When he presents it all to Irene as tables, the meeting drags on and the conclusions get lost among the figures. A good chart achieves in five seconds what a table fails to achieve in five minutes: it lets whoever is looking at it see the pattern.

Data visualisation is the graphical representation of information in order to explore it and to communicate it. In this lesson you will learn why it works, what is special about it when the data is massive (you cannot plot millions of points), how to choose the right chart for each question and which principles separate a clear chart from a misleading one. You will practise with matplotlib on NovaMarket's aggregates, and you will finish with an overview of BI tools.

Why visualise

Sight is the sense with the greatest processing capacity we have. We instantly tell a longer bar from a shorter one, a line that rises or a point far away from the rest, with no conscious effort. Reading and comparing twenty numbers in a table, on the other hand, demands attention and memory.

There is also a statistical reason. A numerical summary can hide the shape of the data: there are datasets with the same mean, the same standard deviation and the same correlation whose charts look nothing alike (the classic example is Anscombe's quartet: four series with almost identical statistics and completely different plots). You experienced this in lesson 04-02: the mean and median of the order amounts hinted at skewness, but it was the histogram that showed it.

Visualisation serves two different purposes, which call for different charts:

Exploratory visualisation Explanatory visualisation
For whom For you, while you analyse For someone else
Aim To discover patterns and oddities To convey a specific conclusion
Quantity Many charts, quick ones Few, carefully made
Finish Whatever comes by default Title, labels, colour with intent

The typical mistake is to show the audience the exploratory charts just as they came out.

The challenge with Big Data: you cannot plot millions of points

With a small table, you hand the table to the charting library and it plots it. With massive data, that approach fails for three reasons:

  • It does not fit. Charting libraries work in the memory of a single machine. NovaMarket's 40 million daily events cannot even be loaded.
  • It cannot be drawn. A screen has a few million pixels, and a chart takes up only part of it. With more points than pixels, the points are drawn on top of one another (overplotting) and the result is a blob.
  • It cannot be read. Even if it could be drawn, the eye cannot distinguish a million marks. What it perceives are shapes, densities and trends.

The solution is the module's rule, applied to charts: reduce before you plot. There are three ways of doing it:

Technique What it consists of When to use it
Aggregating Grouping and summarising: sales by day, orders by category Almost always; it is the basis of bar and line charts
Binning Dividing the range into intervals and counting: histograms, heatmaps For distributions and for the relationship between two numeric variables
Sampling Plotting a random sample To see the general shape of a point cloud; not suitable for extremes or rare cases (lesson 04-02)

The working pattern always has the same four stages:

flowchart LR
    A[("Lake<br>millions of rows")] -->|"Spark:<br>groupBy / bins / sample"| B["Aggregate<br>tens or hundreds of rows"]
    B -->|"toPandas()"| C["pandas<br>DataFrame"]
    C -->|"matplotlib"| D["Chart"]

A practical consequence: the size of the chart does not depend on the volume of data. A chart of daily sales over a half-year has 181 points, whether it comes from 20,000 orders or 9 million.

Which chart for which question

You do not start by choosing a chart, but by formulating the question. Almost all analysis questions belong to one of five families:

Type of question Example at NovaMarket Recommended chart Avoid
Comparison between categories Which category sells the most? Bars (horizontal if the names are long), sorted by value Pie with many slices
Change over time How are daily sales going? Lines Bars with hundreds of periods
Distribution of a variable How much does a typical order cost? Histogram; box plot to compare groups Giving only the mean
Relationship between two variables Do those who buy more often spend more? At what times on which days do people buy? Scatter (two numeric variables); heatmap (two categorical variables or bins) Two Y axes with different scales
Composition of a total What share of orders comes through the app? Stacked bars; pie only with two or three slices 3D pie

A sixth case, common in e-commerce, is flow through stages, which is represented with a funnel chart.

Two criteria help you decide when in doubt. First, the eye compares lengths and positions far more precisely than angles, areas or colours: that is why bars usually beat a pie. Second, one chart, one idea: if you need to explain three things, make three charts.

Hands-on: NovaMarket's charts with matplotlib

matplotlib is Python's basic charting library and the one that almost all the others use under the hood. Install it in the course environment:

cd ~/novamarket
source .venv/bin/activate
pip install matplotlib

In matplotlib, a figure (fig) is the whole canvas and a set of axes (ax) is each chart within it. They are created together with plt.subplots(), you draw by calling methods on ax and you save with fig.savefig().

Create ~/novamarket/charts.py with the skeleton; each section will add a block before spark.stop():

from pathlib import Path

import matplotlib
matplotlib.use("Agg")                    # draws to files, without opening windows
import matplotlib.pyplot as plt
from pyspark.sql import SparkSession
from pyspark.sql import functions as F

BASE = Path.home() / "novamarket"
SILVER = BASE / "lake" / "silver"
GOLD = BASE / "lake" / "gold"
CHARTS = BASE / "charts"
CHARTS.mkdir(exist_ok=True)

BLUE, GREY, ORANGE = "#1f77b4", "#b0b0b0", "#e6550d"

spark = SparkSession.builder.master("local[*]").appName("charts").getOrCreate()
spark.sparkContext.setLogLevel("ERROR")

orders = spark.read.parquet(str(SILVER / "orders_complete"))
sales = orders.where(F.col("status") != "returned")


def save(fig, name):
    fig.tight_layout()                   # adjusts the margins so nothing is cut off
    fig.savefig(CHARTS / name, dpi=150)
    plt.close(fig)                       # frees the figure's memory
    print("Saved:", CHARTS / name)


# ... charts from the lesson ...

spark.stop()

The charts are saved as PNG files in ~/novamarket/charts/. The line matplotlib.use("Agg") makes the script work on a server without a display too; if you are working in Jupyter, you can leave it out and the charts will appear under each cell.

Change over time: daily sales (lines)

daily = (
    sales.groupBy(F.to_date("order_date").alias("date"))
    .agg(F.sum("total_amount").alias("sales"))
    .orderBy("date")
    .toPandas()                                   # 181 rows
)
daily["avg_7d"] = daily["sales"].rolling(7).mean()

fig, ax = plt.subplots(figsize=(10, 4))
ax.plot(daily["date"], daily["sales"] / 1000, color=GREY, linewidth=1,
        label="Daily sales")
ax.plot(daily["date"], daily["avg_7d"] / 1000, color=BLUE, linewidth=2.5,
        label="7-day moving average")
ax.set_ylim(0)
ax.set_ylabel("Thousands of euros")
ax.set_title("Sales remain stable at around €176,000 a day", loc="left")
ax.legend(frameon=False)
ax.spines[["top", "right"]].set_visible(False)
save(fig, "daily_sales.png")
  • The whole pattern in ten lines. Spark aggregates 19,000 orders into 181 rows, toPandas() brings them down to the driver and matplotlib plots them.
  • rolling(7).mean() calculates the 7-day moving average in pandas, which you met with Spark windows in lesson 03-03. With 181 rows, doing it in pandas is the most convenient option.
  • Two lines with a hierarchy. The noisy daily series is thin and grey; the moving average, which is the message, is thick and blue.
  • ax.set_ylim(0) makes the vertical axis start at zero; you will see shortly why that matters.
  • ax.spines[...] removes the top and right borders, which add nothing.

The chart shows a daily series fluctuating between about €120,000 and €230,000, and an almost flat moving average around €176,000: no trend and no seasonality, as the EDA anticipated.

Comparison: sales by category (bars)

facts = spark.read.parquet(str(GOLD / "fact_sales"))
products = spark.read.parquet(str(GOLD / "dim_product"))
by_category = (
    facts.where(F.col("status") != "returned")
    .join(products, "product_id")
    .groupBy("category")
    .agg(F.sum("line_amount").alias("sales"))
    .orderBy("sales")
    .toPandas()                                   # 6 rows
)

fig, ax = plt.subplots(figsize=(8, 4))
colours = [ORANGE if c == "television" else GREY for c in by_category["category"]]
bars = ax.barh(by_category["category"], by_category["sales"] / 1e6, color=colours)
ax.bar_label(bars, fmt="€%.1fM", padding=3)
ax.set_xlim(0, 11)
ax.set_title("Television sells 75% more than the second category", loc="left")
ax.xaxis.set_visible(False)
ax.spines[["top", "right", "bottom"]].set_visible(False)
save(fig, "sales_by_category.png")
  • barh draws horizontal bars: the category names can be read without tilting your head.
  • Sorted by value (orderBy("sales")), not alphabetically: the order itself is information.
  • A single colour with intent. All the bars are grey except the one that carries the message.
  • bar_label writes the value next to each bar; with that, the horizontal axis becomes redundant and is hidden.

The result: six bars, from television (€9.9M) to home (€2.6M), with computing (€5.7M) in second place.

Distribution: histogram of order amounts

This is the text histogram from lesson 04-02, now drawn. The bins are calculated in Spark; matplotlib just draws bars:

WIDTH = 500
histogram = (
    orders
    .withColumn("bin", (F.floor(F.col("total_amount") / WIDTH) * WIDTH).cast("int"))
    .groupBy("bin").count()
    .orderBy("bin")
    .toPandas()                                   # one row per bin
)
median = orders.approxQuantile("total_amount", [0.5], 0.0)[0]

fig, ax = plt.subplots(figsize=(8, 4))
ax.bar(histogram["bin"], histogram["count"], width=WIDTH, align="edge",
       color=BLUE, edgecolor="white")
ax.axvline(median, color=ORANGE, linestyle="--")
ax.text(median + 100, histogram["count"].max() * 0.95, f"Median: €{median:.0f}",
        color=ORANGE)
ax.set_xlim(0, 8000)
ax.set_xlabel("Order amount (€)")
ax.set_ylabel("Number of orders")
ax.set_title("Most orders are between €500 and €1,500, with a tail of expensive orders",
             loc="left", fontsize=11)
ax.spines[["top", "right"]].set_visible(False)
save(fig, "amount_histogram.png")

matplotlib's plt.hist() function calculates the bins itself, but it needs all the values in memory. With 20,000 orders it would work; with 18 million a year, it would not. That is why ax.bar is used here on counts that have already been made: width=WIDTH and align="edge" make each bar occupy exactly its interval. axvline marks the median (€1,407) with a vertical line. The axis is cut at €8,000 so that the tail, with a handful of orders up to €12,600, does not squash the rest; it is a legitimate decision as long as you are aware of it and, in a report, say so.

Relationship between two dimensions: day × hour heatmap

heat = (
    orders.groupBy(F.dayofweek("order_date").alias("day"),
                   F.hour("order_date").alias("hour"))
    .count()
    .toPandas()                                   # 7 x 24 = 168 rows
    .pivot(index="day", columns="hour", values="count")
    .reindex([2, 3, 4, 5, 6, 7, 1])               # Monday to Sunday
)

fig, ax = plt.subplots(figsize=(10, 3.5))
image = ax.imshow(heat.values, cmap="Blues", aspect="auto", vmin=0)
ax.set_yticks(range(7), ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"])
ax.set_xticks(range(0, 24, 2))
ax.set_xlabel("Hour of the day")
ax.set_title("Orders by day of the week and hour: there are no peak hours", loc="left")
fig.colorbar(image, ax=ax, label="Orders")
save(fig, "heatmap_day_hour.png")
  • Spark groups by two columns and returns 168 rows; pandas' pivot turns them into a matrix of 7 rows by 24 columns.
  • reindex reorders the days, because dayofweek starts on Sunday.
  • imshow draws the matrix as a grid of colours. cmap="Blues" is a sequential palette (from light to dark), the right one for a magnitude; vmin=0 anchors the lightest colour at zero.
  • colorbar adds the colour legend, which is essential in a heatmap.

In a real shop, this chart would show dark bands at midday and in the evening. Here you get a grid of almost uniform blues (between 95 and 147 orders per cell): the visual version of the lack of seasonality. Try removing vmin=0: matplotlib will stretch the palette between the minimum and the maximum, and the random noise will look like a pattern of light and dark cells. It is the same deception as a truncated axis, transferred to colour.

Flow through stages: the conversion funnel

e = (
    spark.read.parquet(str(GOLD / "daily_funnel"))
    .agg(F.sum("sessions"), F.sum("with_view"), F.sum("with_cart"), F.sum("with_purchase"))
    .first()
)
steps = ["Sessions", "View a product", "Add to cart", "Purchase"]
values = [int(v) for v in e]

fig, ax = plt.subplots(figsize=(8, 3.5))
left = [(values[0] - v) / 2 for v in values]                  # centres each bar
ax.barh(steps, values, left=left, color=BLUE)
for i, v in enumerate(values):
    label = f"{v:,}" + f"  ({v / values[0]:.0%})"
    if v > 0.3 * values[0]:                                   # fits inside the bar
        ax.text(values[0] / 2, i, label, ha="center", va="center", color="white")
    else:                                                     # does not fit: to the right
        ax.text(left[i] + v + 400, i, label, ha="left", va="center")
ax.invert_yaxis()
ax.xaxis.set_visible(False)
ax.tick_params(left=False)
ax.spines[:].set_visible(False)
ax.set_title("Only 12% of sessions end in a purchase;\n"
             "the biggest loss happens before the cart", loc="left")
save(fig, "funnel.png")

matplotlib has no funnel chart, but you can build one with centred horizontal bars: the left parameter shifts the start of each bar by half of what it lacks to match the first. invert_yaxis puts the first step at the top. The result is four bars that narrow: 30,952 sessions (100%), 29,830 with at least one view (96%), 14,670 with a cart (47%) and 3,736 with a purchase (12%). These are the totals from gold/daily_funnel, which count sessions that cross midnight twice (lesson 03-06).

Other libraries

  • seaborn builds on matplotlib and offers statistical charts (boxes, distributions, annotated heatmaps) with better defaults and less code.
  • plotly generates interactive charts in HTML: they let you zoom, filter and see the value of each point by hovering over it. It is a good choice for notebooks and web applications.

Both work on pandas DataFrames, so the pattern does not change: aggregate with Spark and plot the result.

Visualising large volumes: density instead of points

The scatter plot is the one hit hardest by volume. Check this with the 20,000 orders, plotting the time of day against the amount, and compare it with a hexbin, which divides the plane into hexagonal cells and colours each one according to how many points it contains:

points = orders.select(
    (F.hour("order_date") + F.minute("order_date") / 60).alias("hour"),
    "total_amount",
).toPandas()                                      # 20,000 rows: still manageable

fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(11, 4), sharey=True)
ax1.scatter(points["hour"], points["total_amount"], s=4, color=BLUE)
ax1.set_title("Scatter: 20,000 overlapping points", loc="left")
hb = ax2.hexbin(points["hour"], points["total_amount"], gridsize=30, cmap="Blues", mincnt=1)
ax2.set_title("Hexbin: the colour shows how many orders there are", loc="left")
fig.colorbar(hb, ax=ax2, label="Orders")
for ax in (ax1, ax2):
    ax.set_xlabel("Hour of the day")
    ax.set_ylim(0, 8000)
ax1.set_ylabel("Order amount (€)")
save(fig, "order_density.png")

In the left-hand panel, below €3,000 all you can see is a solid blue blob: it is impossible to tell whether there are a thousand orders there or ten thousand. In the right-hand one, the colour gradient reveals that the greatest concentration lies between €500 and €1,500, at any time of day. A hexbin is a two-dimensional histogram.

With 20,000 rows, matplotlib can calculate the hexbin. With billions, you apply the same idea as with the histogram: the bins are calculated in Spark, grouping by the two discretised variables, and only the grid is brought down:

grid = orders.groupBy(
    F.hour("order_date").alias("x"),
    (F.floor(F.col("total_amount") / 250) * 250).alias("y"),
).count()        # at most a few hundred cells -> toPandas() + pivot + imshow

For these cases there are also specialised libraries, such as Datashader, which turn billions of points directly into an image by calculating how many fall into each pixel. Other useful techniques are to plot a sample with transparency (the alpha parameter) or to split the data into several small charts, one per category.

Principles of good design and misleading charts

Principles

  1. The title states the conclusion. "Sales by category" describes the chart; "Television sells 75% more than the second category" says what there is to see. Anyone who reads only the title should take away the message.
  2. Honest axes. In a bar chart, the value axis starts at zero, because what is being compared is the length of the bars. In a line chart it need not, if the range is clear, but it is worth thinking twice.
  3. Colour with intent. Colour is for distinguishing or highlighting, not for decorating. Grey for context and a vivid colour for what matters. Sequential palettes for magnitudes and palettes of distinct hues for categories, using no more than six or seven.
  4. More data, less ink. Every element that conveys no information (borders, dense gridlines, backgrounds, shadows, 3D effects) competes with the data. This is the idea of the data-ink ratio formulated by Edward Tufte: remove everything that can be removed without losing information.
  5. Label directly. Axis names with their units, and values or legends next to the data rather than in a box off to one side.
  6. Order that makes sense. Categories, by value; time, from left to right.
  7. Accessibility. Around 8% of men have some form of colour blindness, almost always involving red and green. Do not rely on colour alone: add labels, shapes or positions; use palettes designed for this and sufficient contrast and font size.

Typical misleading charts

A chart can lie without a single figure being false:

Deception Why it distorts Correction
Truncated axis on bars A 7% difference looks like a threefold one Start at zero
Two Y axes with different scales Any crossing or parallel can be "manufactured" by choosing the scales Two charts, or index both series to 100
3D pie Perspective enlarges the front slices Bars
Hand-picked periods (cherry picking) Starting the series in the worst month makes everything look as if it is growing Show the full period
Comparing unequal periods Months of 28 and 31 days; the current month, incomplete Daily averages; mark partial periods
Areas or icons proportional to the value in a single dimension Doubling an icon's height quadruples its area Bars
Stretched colour palette Noise looks like a pattern Anchor the scale at a meaningful value
Cumulative totals that always rise A cumulative curve grows even if the business is sinking Show the value for each period

Before showing a chart, ask yourself the control question: if someone looks at it for five seconds, will they come away with an impression the data supports?

Overview of BI tools

Charts made with code are ideal for exploring and for one-off reports. For daily consumption by people who do not program, there are BI tools (business intelligence): they connect to a SQL engine (lesson 04-01), let you build charts by dragging fields and publish them in interactive dashboards that update themselves.

Tool Type Strength Bear in mind
Tableau Commercial Very powerful, flexible visual exploration High-cost licences
Power BI Commercial (Microsoft) Integration with Excel, Azure and the rest of the Microsoft ecosystem; very widespread Less natural outside that ecosystem
Apache Superset Open source No licences; connects to almost any SQL engine; includes a SQL editor It has to be deployed and maintained (or bought as a managed service)
Looker Studio Free (Google) Simple reports that are easy to share, integrated with Google Cloud Limited for complex analysis; not to be confused with Looker, Google's enterprise BI platform
Grafana Open source Real-time dashboards on time series; alerts Geared towards monitoring, not business analysis

At NovaMarket two needs coexist. Business analysis (sales, funnel, segments) is served from the gold tables with a BI tool. And the "right now" dashboard from lesson 03-05, with the last minute's sales, fits a tool such as Grafana connected to the streaming system.

In all of them the same rule from this lesson applies: the chart must ask the engine for data that is already aggregated. A slow dashboard is almost always one that queries detail tables instead of gold tables. Which metrics to show and how to organise a dashboard is the subject of the next lesson.

Common Mistakes and Tips

  • Bringing all the data down to plot it. toPandas() on the detail table, followed by plt.hist(). Aggregate or calculate the bins in Spark.
  • Plotting a scatter with hundreds of thousands of points. Use density (hexbin, grid) or a sample with transparency.
  • Choosing the chart before the question. First decide what you want to find out or tell; then how to draw it.
  • Using pies to compare. With more than three slices, or with similar slices, nobody can tell which is bigger.
  • Leaving the defaults in a chart meant for others. Generic titles, axes without units, arbitrary colours.
  • Truncating a bar chart's axis "so the difference shows". If the difference does not show with the axis at zero, it may not be relevant.
  • Overusing colour. Ten vivid colours highlight nothing.
  • Forgetting incomplete periods. The last day or the current month drags the line down and triggers false alarms.
  • Cramming too many series into one chart. More than four or five lines turn into a tangle.
  • Tip: show the chart to someone who does not know the data and ask them to tell you, in one sentence, what they see. If it does not match your title, redo the chart.

Exercises

Exercise 1: choosing the chart

State which chart you would use for each question and which aggregation you would ask Spark for:

  1. How are orders distributed among the four statuses?
  2. Has the conversion rate changed over the course of June?
  3. What is the relationship between purchase frequency and amount spent for the real NovaMarket's 2 million customers?
  4. Do app orders have different amounts from web orders?

Exercise 2: daily conversion

Using gold/daily_funnel, plot the daily evolution of the conversion rate (sessions with a purchase divided by sessions) and save it in daily_conversion.png. Bear in mind what the EDA discovered about the last day in the table.

Exercise 3: spotting the deception

A colleague presents a bar chart titled "Orders by day of the week" with this data for the half-year: Sunday 2,846, Monday 2,833, Tuesday 2,961, Wednesday 2,761, Thursday 2,840, Friday 2,841 and Saturday 2,918. The vertical axis runs from 2,700 to 3,000, and they conclude that "far more is sold on Tuesdays than on Wednesdays". Point out at least two problems and propose an honest version.

Solutions

Exercise 1

  1. Composition with four categories: sorted bars (or a single 100% stacked bar). Aggregation: groupBy("status").count(), 4 rows. A pie would be defensible only because one slice, delivered orders, clearly dominates.
  2. Change over time: lines. Aggregation: one row per day with sessions and purchases (it already exists: gold/daily_funnel).
  3. Relationship between two numeric variables with too many points for a scatter: hexbin or density heatmap. Aggregation: groupBy by frequency and by the amount discretised into bins, with count(). Alternative: a scatter of a sample of a few thousand customers.
  4. Distribution compared across groups: box plot by channel, or two overlaid histograms on the same scale. Aggregation: percentiles by channel with percentile_approx (lesson 04-02), or the histogram bins grouping by channel as well.

Exercise 2

Add to charts.py:

funnel = (
    spark.read.parquet(str(GOLD / "daily_funnel"))
    .where(F.col("date") < "2026-07-01")             # 1 July is incomplete
    .withColumn("conversion", 100 * F.col("with_purchase") / F.col("sessions"))
    .orderBy("date")
    .toPandas()                                       # 30 rows
)
mean = funnel["conversion"].mean()

fig, ax = plt.subplots(figsize=(9, 4))
ax.plot(funnel["date"], funnel["conversion"], color=BLUE, marker="o", markersize=3)
ax.axhline(mean, color=GREY, linestyle="--")
ax.text(funnel["date"].iloc[0], mean + 0.4, f"Mean: {mean:.1f}%", color="#707070")
ax.set_ylim(0)
ax.set_ylabel("Sessions with a purchase (%)")
ax.set_title("June's daily conversion fluctuates around 12%, with no trend", loc="left")
ax.spines[["top", "right"]].set_visible(False)
fig.autofmt_xdate()                                   # tilts the dates on the axis
save(fig, "daily_conversion.png")

The line fluctuates between 10.3% and 14.8%, around a mean of 12.1%, with no trend. Two decisions matter. The 2026-07-01 partition is excluded, because it contains only the last sessions from the night of 30 June and would draw a meaningless final point. And the axis starts at zero: with the axis fitted to the range, the daily fluctuations would look like a rollercoaster, when they are noise around a stable value.

Common mistake: calculating the rate in pandas after summing the days incorrectly, or averaging daily percentages to obtain the monthly rate. The month's rate is the ratio of the sums (3,736 / 30,952), not the mean of the daily rates; here they almost coincide because every day has similar traffic.

Exercise 3

  1. Truncated axis. With the axis between 2,700 and 3,000, Tuesday's bar (261 visible units) looks more than four times as long as Wednesday's (61), when the real difference is 7%.
  2. The difference is noise. The EDA showed that the days of the week do not differ systematically; moreover, the half-year contains 26 days of each kind except Wednesday, which has 25. Part of Wednesday's "drop" is one day less of data.
  3. The title says nothing, and the spoken conclusion exaggerates.

Honest version: bars with the axis starting at zero, showing average orders per day (orders divided by the number of days of that kind), and a title such as "Orders barely vary by day of the week". If you still want to zoom in on the detail, a dot plot is preferable, where there are no lengths to compare, with the axis range clearly visible.

Conclusion

Visualising means taking advantage of the eye's ability to see at a glance what a table hides. With massive data, the rule is to reduce before you plot: aggregate, bin or sample with Spark, bring a small result down to pandas and draw it. The chart is chosen according to the question: bars to compare, lines for change over time, histograms for distribution, scatter plots and heatmaps for relationships, and the funnel for flow through stages. With matplotlib you have built NovaMarket's six charts, saved in ~/novamarket/charts/, and you have seen that when there are too many points you have to plot densities. You also take away the principles that separate a clear chart from a misleading one: a title that states the conclusion, honest axes, colour with intent, as little ink as possible and accessibility.

A well-made chart answers a question. But a business is not run by a single question, but by a small set of figures that are watched every day and that everyone agrees on. What are those figures at NovaMarket? How are they defined so that two dashboards do not give different values? How are they organised into a dashboard that Irene can read in a minute? In the next lesson, From Data to Decision: Metrics, KPIs and Dashboards, you will define NovaMarket's indicators, calculate them on the lake and design the dashboard that completes the module's journey: from data to decision.

© Copyright 2026. All rights reserved