ETX2250/ETF5922

An Introduction to Data Visualisation

Lecturer: Kate Saunders

Department of Econometrics and Business Statistics



Today’s lecture

What we’ll cover:

  • Unit overview and details

  • An Introduction to Data Visualisation

    • Societal importance of data visualisation

    • Learn about the different types of data

  • Getting you set up using Quarto and R (Hands on)

Building the foundation for Unit Learning Outcomes 1 and 2.

Acknowledgement of Country

I wish to acknowledge the people of the Kulin Nations, on whose land we are gathered today. I pay my respects to their Elders, past and present.

In this unit, we will learn about data visualisation and communication. This is not a new topic.

Indigenous Australian rock art uses visual symbols for knowledge and storytelling. These symbols map the land, and pass down cultural and survival lessons across tens of thousands of years.

Link to examples of common symbols

Teaching Team

About your Teaching Team

Kate Saunders

Senior Lecturer
Monash University
Website

About Kate

  • 👨‍🎓 PhD in Statistics

  • 🌐 Home State is Queensland

  • 👩‍💻 Research is in statistics of climate extremes

  • 🧑‍💻 Passionate about open data, data visualisation and data ethics

  • 👩‍💻 Started R coding in 2012 (before tidyverse!)

  • ❤️ Hobby is playing real basketball and fantasy basketball.

About your Teaching Team

Fonti Kar

Lecturer
Monash University
Website

About Fonti

  • 👩‍🎓 PhD in Evolutionary Ecology

  • 🌐 Home is New Zealand + Hong Kong

  • 🧑‍💻 Teaching business stats, data vis and comms

  • 👨‍💻 R coder since 2010

  • 👨‍💻 Creator of ohwhaley and austraits

  • ❤️ Hobby is thruhiking and freediving

Get to know your peers!

Break-out activity

Introduce yourself the people around you.
You might like to ask each other:

  • Where are you from?
  • What are you studying and why?
  • What do you for fun? Hobbies?
  • Something memorable about you?

Nathan Dumlao nate_dumlao, CC0, via Wikimedia Commons

Unit Details

Unit Developers

The material in this unit was mainly developed by Dr. Kate Saunders and Dr. Shanika Wickramasuriya, but there have been many contributors to the unit design and teaching over the years.

Kate Saunders

Shanika Wickramasuriya

Why take this unit?

A picture says a 1000 words

Visualisation …

  • Is a fundamental skill in quantitative analysis and reporting
  • Supports efficient and clear communication
  • Turns data into insights
  • Shows patterns, trends, structure, irregularities, relationships among data

Disclaimer: SSA is an INTENSIVE unit!

What that means:

  • We will cover 12 weeks of material in 4 weeks

  • We will cover 3 lectures each week

  • That’s ~36 hours of study each week! (= Full time job)

  • You will need to keep up with the material

  • Coming to classes and consultations will help you

  • Last minute cramming won’t be possible

Unit Design

Compared to normal semesters the content is condensed.

  • There sometimes will be pre-recorded material for you to watch in your own time.

  • Lectures and tutorials will run together as a workshop in one class block.

  • The balance of lecture material to in class activities will change a little each week.

  • The unit is on campus, but there is a zoom link if you need it

Where to find materials

Unit Website: Lectures, tutorials, solutions

Moodle: Quizzes, assignments, assignment submission portal, data sets, zoom links

Learning Objectives

At the end of this unit you will be able to:

  1. Critique data visualisations using principles of graphical excellence, sound design judgement, and statistical thinking

  2. Create data visualisations from complex data sets using contemporary technologies for business applications

  3. Communicate data-driven insights tailored for audience, message and medium

  4. Design interactive data visualisations and animations for data discovery and communication of complex dynamic patterns.

  5. Formulate research questions from a data set with exploratory data analysis.

  6. Design inclusive and accessible data visualisations for audiences with diverse perspectives, identities, skills and abilities

Overview of the unit: Part 1

Introduction to Data Visualisation

  • Workshop 1: Getting Started with Data Visualisation

  • Workshop 2: The Good, the Bad and the Ugly of Data Visualisation

  • Workshop 3: Visualisation in BI

Note: There are group exercises in workshop 2 and 3 that you need to complete to do your 1st assignment.

Overview of the unit: Part 2

Visualisation in R

  • Workshop 4: Visualisation in R: Plots of 1 - 2 Variables

  • Workshop 5: Data Wrangling in R for Visualisation

  • Workshop 6: Visualisation in R: Plots of 2 or more Variables

Overview of the unit: Part 3

Language of Visual Communication

  • Workshop 7: Iterating your Visualisation

  • Workshop 8: Effective Communication

  • Workshop 9: Visual Storytelling

Overview of the unit: Part 4

Advanced Topics in Visualisation

  • Workshop 10: Infographics (Uncertainty and Missing Data)

  • Workshop 11: Interactivity and Animation

  • Workshop 12: Revision

Assessement

Assessment: Quizzes

Quizzes

  • 12 quizzes related to each lecture and tutorial

  • Count the best 10 out of 12 quizzes

  • This allows you to miss 2 quizzes for sudden and short term emergencies.

  • So no special consideration: Do not leave them until the last minute

  • Quizzes are worth 1% each

  • 10% of your total grade

  • ~ 3 Quizzes will be due each week

  • Bonus: No time limit and there are repeat attempts

Assessments: Porfolio

Portfolio

  • 2 assignments worth 20% each; full submission will create a portfolio of work

  • 40% of your total grade

  • Assignment 1 will cover content from parts 1 and 2; focus is on understanding and creating good visualisations

  • Assignment 2 will cover content from parts 3 and 4; focus is on communication and how to use supporting visuals

  • Apply for special consideration centrally. (This includes short extensions of 48 hours)

  • If you need special consideration, apply ASAP and no later than 11.55 pm on the day your assessment is due.

  • Do not email me for special consideration. You must apply centrally using the link above.

Assessments: Exam

Final exam

  • Exam is in the Febraury Summer Semester Exam Block

  • 50% of your total grade

  • You can take in 2 pages of notes and are allowed access to the unit website [TBC]

  • Can sit the exam anywhere with a reliable internet connection

  • I will run an additional session in January to help you study. Date: TBC

  • The exam might seem far away, but you will need to keep up with class to do well.

Generative AI

You can use Generative AI in this unit.

Generative AI

You can use Generative AI in this unit.

But be careful not to short cut your learning!

Academic Integrity

Break-out Activity: Are these okay? Yeah, nah or maybe?

  • I use AI to complete my weekly quizzes

  • AI generates code to produce visualisations for my portfolio and I write that in my AI use statement

  • AI writes the personal reflection on my portfolio

  • I use AI on my exam

Still not sure - Monash Resources

What is academic integrity? Click here

What does maintaining academic integrity mean? Click here

What happens if I breach academic integrity? Click here

Where to go if you need help

1. Mates & Moodle forum 💬

Suitable for:

  • Ask a friend first
  • General questions about the unit materials, tutorials, or assignment \(\rightarrow\) forum
  • Any emails about general questions will be redirected to the forum.
  • Sharing helps you learn from each other!
  • There is no point answering the same question twice (three times, four times etc.)
  • Careful not to post code from your assignments or hints. I may deduct marks.

2. Practice Session 🙋

Suitable for:

  • Can work through problems with support
  • One-on-one help
  • Get a head start on your assignments
  • Debug code / fix major issues
  • Ask detailed questions
  • Getting additional feedback
  • Being really nerdy about the unit!

3. Unit email ✉️

For personal and urgent enquiries:

  • Email etx2250-etf5922.caulfield-x@monash.edu.
  • Response times are 1 - 2 days but may vary during busy periods.
  • Email if you notice issues with assessments or Moodle.
  • For remarking, get feedback from your tutor first. If this doesn’t provide clarity, email within 10 days of the due date.
  • Do not email my staff account. I receive a high volume of emails and they risk going into a black hole and never being seen again!

4. AI assistants 🤖

Suitable for:

  • Explaining concepts in different words
  • Help understanding R error messages
  • Brainstorming ideas and checking your understanding

Be careful:

  • AI can be confidently wrong, so check against the unit materials.
  • Do not paste assessment questions directly into AI (Academic Integrity Breach)
  • You are responsible for what you submit.

Time to get started

Let’s develop some intuition for why data visualisations are important!

Famous Historical Visualisations

Cholera

What was happening …

  • In 1864, 616 people died in London due to a cholera outbreak

  • The common theory: the disease was carried in the air.

  • Physician John Snow was skeptical, so he began to collect data…

Snow’s original map

Showing the data

Using data visualisation

  • Snow mapped the outbreaks showing deaths clustered around a water pump on Broad Street.

  • The pump was closed down.

  • Cholera was eventually established as a water-borne disease.

Close up of the Broad Street area

Crimean War: Florence Nightingale ❤️

What was happening …

  • Britain was at war with Russia in Crimean peninsula.

  • Florence Nightingale was a nurse treating wounded soldiers.

  • She knew the power of data visualisation!

  • She advocated to Parliament for more sanitary conditions in military hospitals.

Nightingale’s original rose chart

The rose chart

Using data visualisation

  • Sanitation in military hospitals was improved

  • Eventually improved sanitation conditions were also adopted in civilian hospitals

  • Nightingale became the first female member of the Royal Statistical Society

Preventable deaths

Deaths from battle wounds

Other causes

Minard’s plot

Minard’s plot

What was happening

  • In 1812 Napoleon thought it was a good idea to invade Russia.

  • The campaign was a disaster for the French.

  • Engineer Charles Joseph Minard captured the extent of the catastrophe using visualisation.

Six variables, one chart

Minard’s plot

Infographic

Minard’s chart shows:

  • Number of troops

  • Advance or retreat

  • Temperature and time

  • Longitude and latitude

A bit more on Minard

Common theme

We learn …

Data visualisation is a very important tool for communicating with people and supporting them to make decisions.

It’s lead to some very important changes!

Also learn …

Data visualisation is a very valuable tool for evaluating decisions in hindsight.

In some cases, communicating what not to do next time!

High Profile Data Visualisations

What about Modern Visualisations?



Break-out discussion

Where you encounter data visualisation in your everyday life?

Do you use any data visualisations to make decisions?

Take some time to discuss in groups

Three Examples



Covid



Climate Change

Politics

COVID19 Pandemic

What was happening …

  • In the early stages of the COVID19 pandemic, hospital capacity was not able to cope with the amount of cases.

  • Collectively as a society we needed to to slow the spread of the virus and reduce the load on our healthcare systems.

  • People needed to understand and listen to the public health advice about hand washing, social distancing and quarantining etc.

  • Let’s look at some visualisations that helped get the importance of this message across!

Flattening the Curve

A visualisation showing the importance of slowing the spread and reduce the peak in cases (Source).

Social Distancing

A visualisation showing the importance of social distancing (Source).

Climate Change

Communication

  • Climate Change is leading to more frequent and more severe weather

  • There are severe socio-economic consequences as a result of more weather and climate extremes.

  • It is important to communicate with people that our climate is changing and to take actions to reduce emissions

  • Professor Ed Hawkins (University of Reading, UK) created data visualisations to help with this!

Warming Spiral

A visualisation showing the climate is warming.
This visualisation was shown at the Rio Olympics in 2016!

Future Climate

A visualisation showing that our choices today will impact our rate of future warming.

Politics

Why visual political data?

  • Visualising election data helps people understand and trust the results

  • Common election visualisaitons focus on voter behaviour, such as differences in voters between regional areas and cities, or difference based on voters demographics (e.g. age, gender, income).

  • Visualisation also occurs in the polls in the lead up and on election night

  • Visualisation is also used by politicians to support their policy platforms

2024 US Elections: Polling

Voter Needle: Shows election results in context as they come in and displays the uncertainty in the total as votes are counted.

2026 US Senate Elections: Demographics

From an article on 2026 US election results.

2024 US Elections: Policy

And here is the chart credited with saving President Trump’s life.

It doesn’t adhere to the principles of graphical excellence, we’ll show you why and provide a better example later!

Types of data visualisation

A world of possibilities

Matching the data the plot

There are lots of different kinds of visualisations.

But before we can create these visualisations …

Need to learn:

  • Which type of plot works best for what type of data?

  • What are the different kinds of data variables?

  • What are different types of data?

  • What can those different kinds of data represent?

  • What can you show with that data?

In other words: we need to learn how to go from Data-to-Viz!

Discrete Variables

Discrete Variables

  • Discrete variables can take only specific, separate values within a range.

  • Often represent counts or whole numbers.

  • Example: Number of students in a class, number of cars sold.

  • Characteristics:

    • Finite set of values1 (e.g. Dice rolls takes values 1 to 6.)

    • Cannot take on fractional values between two distinct points (e.g. can’t saw in student in half!)

Categorical Variables

Categorical Variables

  • Categorical variables are a type of discrete variable

  • Categorical variables represent categories or groups.

  • Often represented by labels or names rather than numbers.

  • Two types of Categorical Variables:

    • Nominal: Categories with no logical order (e.g. your names)

    • Ordinal: Categories with a meaningful order (e.g. low, medium, high)

Nominal Variables

Nominal Variables

  • Nominal variables are a type of categorical variable with no ordering.
  • Example:
    • Blood type (A, B, AB, O)
    • Types of pets (dog, cat, bird)
    • People’s names (Kate, Bets, Minh).
  • Characteristics:
    • Purely descriptive labels.
    • Cannot rank or order categories.

Ordinal Variables

Ordinal Variables

  • Ordinal variables have a natural order, but differences between values need not be meaningful.
  • Examples:
    • Satisfaction levels (satisfied, neutral, dissatisfied),
    • Education levels (high school, bachelor’s, master’s).
  • Characteristics:
    • Categories can be ranked.
    • Distances between categories may not be equal.

Continuous Variables

Note

  • Continuous variables can take any value within a range.
  • Typically represent measurements (e.g., height, temperature).
  • Examples:
    • Weight of a person (kg)
    • Time taken to complete a task (minutes).
  • Characteristics:
    • Infinite number of possible values within a range.
    • Can be divided into smaller increments.

Step 1: Is understanding what your data is

Step 2: Is understanding what you can show with your data

Step 3: Understanding how best to highlight your data relationships / draw out data comparisons

Common types of data relationships

Spatial Data

  • Spatial data represents data related to physical locations or areas.
  • Examples:
    • Regions on a map (Country names) - Discrete
    • Geographic coordinates (latitude, longitude) - Continuous
  • Characteristics:
    • Useful for mapping and showing spatial patterns.

Common types of data relationships

Temporal Data

  • Temporal data represents data associated with time.
  • Examples:
    • Daily temperature readings (°C) - Continuous
    • Daily energy consumption (kWh) - Continuous
    • Number of sales per day (Hierarchy: store, region, state) - Discrete
  • Characteristics:
    • Follows a sequential order.
    • Useful for trend analysis and time series forecasting.

Wrap up

Summary

Data visualisation is important!

  • We’ve seen examples of high profile and important data visualisations.

  • We’ve learnt when data visualisation is done right, it is a powerful tool for communication.

  • We’ve also seen an example of when data visualisation can be misleading.

  • An important part of this unit will be teaching you how to be critical of data visualisation.

  • You will learn what makes a good or bad visualisation, and to identify when a visualisaton is misleading.

  • We will revisit some of these examples in later.

Summary

Data to Visualisation

  • You’ve also learnt there are lots of different kinds of visualisations

  • We’ve learnt about different types of variables and what these variables can represent

  • This will be important for when we start building our own data visualisations

  • Take a closer look at the Data-to-Viz website to see what kind of data matches best with what plot.

Getting set up

This content is all made available in the form of pre-recorded videos.

First steps

Getting set up

  • By the end of this unit you’ll be creating your own amazing, data visualisations

  • Before you can do that we need to get you set up with the software you’ll use in this unit

  • We’ll now go through the steps to install R and RStudio

  • Think about R as the paint (raw materials) and RStudio as the paintbrush and canvas (tools we need to bring the artwork together).

Installing R and RStudio

We’ll open RStudio to create data visualisations using R.

Step 2: Install R

  • Got to https://www.r-project.org/
  • Click “download R”
  • Select a mirror (I use the Melbourne one)
  • Install for your operating system

Step 2: Install RStudio

  • Got to https://www.rstudio.com/products/rstudio/download/ (you only need the free version)
  • Select download for your system
  • Follow the prompts to install

If you need more help refer to this online module

But Why?

Why do we need a Programming Language

  • It allows us to have reproducible steps, which can be applied for many different data sets

  • Make sure the analysis is not just point and click, you can work as a team on it on the same code

  • It also means we can more easily create our own bespoke visualisations

Why do we use R?

  • It has been around for a while.

  • It is regularly maintained and is open source.

  • It is beginner friendly

  • Even if you use other languages, you might still use R for your data visualisations

Getting Started in R

Learning a new language is hard!

  • You need to think about grammar and structure, and how to communicate well in it!

  • You will make mistakes, lots of them.

  • Below you see code that plots points showing the GDP per capita against life expectancy. The points are coloured by country and the size of the points shows the population.

  • It might look impossible now, but by the end of this semester you will be able to write this yourself!

library(tidyverse)
library(gapminder)
plot <- ggplot(data = gapminder) + 
  geom_point(aes(x = gdpPercap, y = lifeExp, size = pop, colour = country)) + 
  theme(legend.position = "none")
plot 

A Quick Intro to R

Topics covered

Important pieces

  • Different parts of RStudio
  • Assigning variables
  • Different variable types
  • Reading in data and working directories
  • R Projects
  • Functions and R Packages

Checklist

Make sure you have

  • Have installed R and RStudio

  • Are able to set up a Project in R and know why we use them

  • Can read in data from a file into R

  • Know how to install packages and load the package libraries

  • Can assign variables and run basic functions