Data Visualization
Data visualization from first principles: choosing charts, scales, bars, lines, histograms, box plots, scatter plots, colour, honest design, annotation, SVG and dashboards.
- Level
- Intermediate
- Time
- About 26 hours
- Modules
- 5
- Lessons
- 15
- Exercises
- 45
A good chart turns a table of numbers into an answer someone can see in seconds; a bad one hides the answer or tells a different story. This course teaches how to choose, build and judge charts so that they are clear, accurate and accessible.
Instead of relying on a plotting library, every example and exercise computes what a chart is made of in plain Python: bins, quartiles, scales, tick marks, positions, colours and SVG shapes. The same ideas then apply to Matplotlib, Vega-Lite, D3, Excel or any dashboard tool.
What you will learn
- Choose the right chart for a question and a type of data
- Build scales, axes and ticks that represent values honestly
- Compute bar, line, histogram, box plot and scatter plot data correctly
- Use colour accessibly and avoid misleading designs
- Annotate charts, compare many series with small multiples and show time series well
- Draw charts in SVG and design dashboards people can act on
Skills you will gain
- Chart selection
- Scales and axes
- Distributions and relationships
- Accessible colour
- Honest chart design
- SVG and dashboards
Before you start
- The Python course: lists, dictionaries, loops, functions and string formatting
- Basic statistics helps: means, medians and percentages
- Nothing to install: all code runs in your browser
Where it is used
- Reports and presentations
- Data journalism
- Business dashboards
- Exploratory data analysis
Modules
Module 1: Visualization foundations
Why charts reveal what summaries hide, how to choose a chart from the question and the data, and how scales and axes map values to positions.
- 1
Why visualize data Intermediate
Why summary numbers are not enough, how a chart turns numbers into shapes the eye reads at once, and the marks and channels every chart is built from.
- 2
Choosing the right chart Intermediate
Matching the question to the chart: comparisons, trends, distributions, relationships and parts of a whole, the data types each chart needs, and when a table is better than any chart.
- 3
Scales, axes and nice ticks Intermediate
How a scale maps data values to positions, why axes use tick values like 0, 20, 40, how to compute them, when an axis must start at zero, and when a logarithmic scale is the honest choice.
Module 2: Core charts
Bar charts for comparing categories, line charts for change over time, and histograms for the shape of a distribution.
- 1
Bar charts Intermediate
The most useful chart there is: bars scaled from a zero baseline, sorted for ranking, horizontal for long labels, labelled directly, and grouped or stacked to compare series.
- 2
Line charts and sparklines Intermediate
Showing change over time: time on the horizontal axis, mapping values to rows, several series on one scale, sparklines as word-sized charts, and how aspect ratio changes the story.
- 3
Histograms and binning Intermediate
Showing the distribution of one variable: equal-width bins as half-open intervals, counting values into bins, choosing the bin width with Sturges' and Freedman–Diaconis rules, and what a histogram's shape tells you.
Module 3: Distributions, relationships and aggregation
Box plots for comparing distributions, scatter plots with trend lines for relationships, and aggregating raw records into chart-ready totals.
- 1
Box plots and quartiles Intermediate
Summarising a distribution in five numbers: quartiles by linear interpolation, the interquartile range, Tukey's fences for outliers, whiskers, and comparing groups with box plots side by side.
- 2
Scatter plots and correlation Intermediate
Showing the relationship between two numerical variables: mapping points to a grid, overplotting, the correlation coefficient, a least-squares trend line, and why correlation is not causation.
- 3
Aggregating data for charts Intermediate
Charts rarely show raw rows: grouping and summing by category, sorting, keeping the top N and folding the rest into Other, rounding percentages so they add up to 100, and pivot tables for two categories at once.
Module 4: Design and honesty
Accessible colour and contrast, the common ways charts mislead, and annotation, direct labels and small multiples that make the message clear.
- 1
Colour and accessibility Intermediate
Using colour to inform rather than decorate: categorical, sequential and diverging palettes, colour-vision deficiency, contrast ratios from WCAG, never relying on colour alone, and building a smooth sequential palette.
- 2
Misleading charts Intermediate
How charts mislead, on purpose or by accident: truncated axes on bar charts, area and bubble sizes, 3D and pie distortions, dual axes, cherry-picked ranges, and measuring distortion with Tufte's lie factor.
- 3
Annotation and small multiples Intermediate
Making a chart say something: titles that state the finding, direct labels instead of legends, annotations of key events, label placement without overlaps, and small multiples with shared scales for comparing many series.
Module 5: Time series, SVG and dashboards
Showing change over time honestly, drawing charts by hand in SVG, and designing dashboards with KPIs, targets and grid layouts.
- 1
Visualizing time series Intermediate
Charting data over time honestly: time on the horizontal axis with even spacing, showing gaps instead of joining across missing dates, indexing series to 100, growth rates and log scales, and choosing the period to show.
- 2
Drawing charts with SVG Advanced
How charts are really drawn on the web: SVG's coordinate system with y pointing down, the viewBox, rect, line, polyline and text elements, scale functions that map data to pixels, and building a bar and a line chart by hand.
- 3
Designing dashboards Advanced
Building dashboards people can act on: choosing a few key metrics, KPI cards with change and targets, layout on a grid with the most important things first, consistent scales and colours, filters, and keeping a dashboard trustworthy.
Projects
- A small SVG chart library Write plain-Python functions that turn data into SVG bar, line and scatter charts with nice ticks, axis labels, direct labels and accessible titles.
- A KPI dashboard Design and build a one-page dashboard for a small online shop: revenue, orders, conversion and returns, with trends, targets and a breakdown by category.
What to learn next
- Machine Learning Machine learning from scratch in plain Python: regression, gradient descent, regularization, k-NN, logistic regression, metrics, trees, ensembles and k-means.
- JavaScript: Programming for the Web From your first program to closures, async code and modules, with every variable and call visible, then real pages that respond, load data and remember it.