The Mad Hatter’s Guide to Data Viz and Stats in R
  1. Group 3 — Bodies and talk
  • Data Viz and Stats
    • Tools
      • Introduction to R and RStudio
    • Data Kits
      • Healthcare Data Kits
    • Descriptions
      • 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
      • Modelling with Linear Regression
      • Modelling with Logistic Regression
      • 🕔 Modelling and Predicting Time Series
    • Workflow
      • Facing the Abyss
      • I Publish, therefore I Am
      • Data Carpentry
    • Arts
      • Colours
      • Fonts
      • 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 Spine
  • 2 Introduction — the tables we own
  • 3 Panel A — body / measure
  • 4 Panel B — category / talk
  • 5 Panel C — place
  • 6 Conclusion

Group 3 — Bodies and talk

Studio wall

Author

Group names here

1 Spine

How do bodies measure, how do people talk about mind and school, and how long do countries live?

This sentence stays at the top. Every panel must attach to it. If a plot cannot be introduced in a clause that hangs off this line, it is off the wall.

2 Introduction — the tables we own

This folder is ours for the ten days. Three tables, three shapes.

  • Panel A (panel-A.csv) — body measures (bdims): height, weight, waist, hip, chest, age, sex. Stand-in for NHANES when that package is not on the machine.
  • Panel B (panel-B.csv) — GSS 2010: degree, grass, hours of work and rest. mntlhlth is days of poor mental health — a Quant. Do not mosaic it.
  • Panel C (panel-C.csv) — gapminder 2007: life expectancy, GDP per capita, population by country.

Talk (B) and tape-measure (A) are different hunts.

We load from this folder:

library(readr)
library(tidyverse)

A <- read_csv("panel-A.csv")
B <- read_csv("panel-B.csv")
C <- read_csv("panel-C.csv")

Found tables train the mark. A campus Free Hunch, if we collect one, is a made panel of the same pair type — new people, old grammar. It does not replace A, B, or C.

3 Panel A — body / measure

height_cm, weight_kg, waist_cm are Quant. sex is Qual.

3.0.1 1. See the table

What is a case? Which columns are Quant / Qual? What is missing?

# glimpse() / inspect() / skim()

3.0.2 2. Ask

One question this table can answer. One it cannot. Write both.

3.0.3 3. Choose a mark

Geom, map mark, or (later) test that matches the pair type. Name it before you code.

3.0.4 4. Predict

What do we think we will see? One sentence, before Run.

3.0.5 5. Make

Human brick first. Optional: one AI prompt, pasted below, only for what section 3 named.

# human chunk

# ## Prompt we actually used
# ai_draft
# ours

3.0.6 6. Say

Caption + one sentence we will stand behind. Title is a sentence, not a column name.

3.0.7 7. Limit

What this panel cannot do. Which kit table we refused to abuse.

4 Panel B — category / talk

degree × grass is Qual + Qual. mntlhlth is Quant — it belongs in a histogram or a grouped violin, not a mosaic.

4.0.1 1. See the table

What is a case? Which columns are Quant / Qual? What is missing?

# glimpse() / inspect() / skim()

4.0.2 2. Ask

One question this table can answer. One it cannot. Write both.

4.0.3 3. Choose a mark

Geom, map mark, or (later) test that matches the pair type. Name it before you code.

4.0.4 4. Predict

What do we think we will see? One sentence, before Run.

4.0.5 5. Make

Human brick first. Optional: one AI prompt, pasted below, only for what section 3 named.

# human chunk

# ## Prompt we actually used
# ai_draft
# ours

4.0.6 6. Say

Caption + one sentence we will stand behind. Title is a sentence, not a column name.

4.0.7 7. Limit

What this panel cannot do. Which kit table we refused to abuse.

5 Panel C — place

lifeExp is the honest fill. pop is a count — symbol map, not choropleth.

Geometry is not in the CSV. Join in R, then use the same seven headings.

# library(sf)
# library(rnaturalearth)
# world <- ne_countries(scale = "medium", returnclass = "sf")
# # join on country name; list the unmatched labels

5.0.1 1. See the table

What is a case? Which columns are Quant / Qual? What is missing?

# glimpse() / inspect() / skim()

5.0.2 2. Ask

One question this table can answer. One it cannot. Write both.

5.0.3 3. Choose a mark

Geom, map mark, or (later) test that matches the pair type. Name it before you code.

5.0.4 4. Predict

What do we think we will see? One sentence, before Run.

5.0.5 5. Make

Human brick first. Optional: one AI prompt, pasted below, only for what section 3 named.

# human chunk

# ## Prompt we actually used
# ai_draft
# ours

5.0.6 6. Say

Caption + one sentence we will stand behind. Title is a sentence, not a column name.

5.0.7 7. Limit

What this panel cannot do. Which kit table we refused to abuse.

6 Conclusion

What the spine looks like after three panels.

  • The question we will defend in ninety seconds
  • What we will not claim
  • Which lines were human, which were machine
  • Limits: sample, missingness, the test we did not run
  • Gift for the steal-this strip (palette, annotation, join trick)
# sessionInfo()
Back to top

License: CC BY-SA 2.0

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

Hosted by Netlify .