The Mad Hatter’s Guide to Data Viz and Stats in R
  1. Data Viz and Stats
  2. Case Studies
  3. Heptathlon
  • Data Viz and Stats
    • Tools
      • Introduction to R and RStudio
    • Studio Flow and Data Kits
      • 12-Day Studio Index
      • Healthcare Data Kits
    • Visualization
      • Data
      • Inspect Data
      • Graphs
      • Summaries
      • Counts
      • Quantities
      • Groups
      • Distributions
      • Groups and Distributions
      • Change
      • Proportions
      • Hierarchy
      • Evolution and Flow
      • Ratings and Rankings
      • Surveys
      • Time
      • Space
        • Introduction to Maps
        • What is Vector Data?
        • The Grammar of Maps
        • Interactive Maps with leaflet
      • Networks
      • Miscellaneous Graphing Tools, and References
    • Inference
      • Basics
      • 🎲 Samples
      • Randomization
      • One Mean
      • Two Independent Means
      • Two Paired Means
      • Multiple Means (ANOVA)
      • Correlation
      • One Proportion
      • Two Proportions
    • Modelling
      • Linear Regression
      • Logistic Regression
      • 🕔 Time Series
    • Workflow
      • Facing the Abyss
      • I Publish, therefore I Am
      • Data Carpentry
    • Arts
      • Colours
      • Fonts for Charts
      • Font Effects in Charts
      • Branding and Typography
      • Annotations
      • More Annotations
      • Highlighting
      • Scales
    • AI Tools
      • Using gander and ellmer
      • Using Github Copilot and other AI tools to generate R code
      • Using LLMs to Explain Stat models
    • Case Studies
      • Demo:Product Packaging and Elderly People
      • Ikea Furniture
      • Movie Profits
      • Gender at the Work Place
      • Heptathlon
      • School Scores
      • Children's Games
      • Valentine’s Day Spending
      • Women Live Longer?
      • Hearing Loss in Children
      • California Transit Payments
      • Seaweed Nutrients
      • Coffee Flavours
      • Legionnaire’s Disease in the USA
      • Antarctic Sea ice
      • William Farr's Observations on Cholera in London
    • Projects
      • No Free Hunch

On this page

  • 1 Setting up R Packages
  • 2 Introduction
  • 3 Data
  • 4 Download the Modified data
  • 5 Data Dictionary
  • 6 Analyse the Data
  • 7 Plot the Data
  • 8 Task and Discussion
  1. Data Viz and Stats
  2. Case Studies
  3. Heptathlon

Heptathlon

1 Setting up R Packages

library(tidyverse)
library(mosaic)
library(skimr)
library(ggformula)
library(correlation)

Plot Fonts and Theme

Use _setup.qmd to set these up.

2 Introduction

This is a dataset pertaining to scores of multiple athletes in the 7 events that make up the Heptathlon, modified for ease of analysis and plotting.

3 Data

library(HSAUR)
heptathlon

4 Download the Modified data

Not Applicable!

5 Data Dictionary

NoteQuantitative Variables

Write in.

NoteQualitative Variables

Write in.

NoteObservations

Write in.

6 Analyse the Data

```{r}
#| label: data-preprocessing
#
# Write in your code here
# to prepare this data as shown below
# to generate the plot that follows
```

7 Plot the Data

8 Task and Discussion

Complete the Data Dictionary. Create the graph shown and discuss the following questions:

  • Identify the type of charts
  • Identify the variables used for various geometrical aspects (x, y, fill…). Name the variables appropriately.
  • Which events in the 7-event heptathlon are most highly correlated with scores in hurdles?
  • If an athlete was a record holder in both high jump and hurdles, what would be your opinion about them? Justify based on the graph!
Back to top
Gender at the Work Place
School Scores

License: CC BY-SA 2.0

Website made with ❤️ and Quarto, by Arvind V.

Hosted by Netlify .