Data Lab

Pick some real data. Ask your own question. Plot it, fit a line, and answer it honestly. Everything you need is on this page.

How it works

Four steps. Your booklet walks you through all of them, and you get your question signed off before you touch a computer.

  1. Pick a dataset. Scroll down, read what one row means, and download it.
  2. Write your question. It needs two number columns and it asks whether they are related.
  3. Plot it. Scatterplot, explanatory variable across the bottom, then add the line of best fit.
  4. Answer it. Name the association, read the gradient in context, make one prediction, then argue with yourself about whether to trust it.

Write it up here

Download this, open it in Google Docs, and type straight into it. Paste your screenshot into the box at Question 5, then submit the file to the Compass learning task at the end of the lesson. Hand up whatever you got done.

Download the write-up template

The data

Ten to choose from, plus four extras. Every file is small, already cleaned up, and opens straight into a spreadsheet or CODAP. Hit Peek at the data to see what you are getting before you commit.

Not sure what a finished one looks like?

Walk through a whole investigation, start to finish, on the AFL file: the question, the plot, r, the line, and the honest answer at the end. It takes two minutes to read and it will save you a lot longer than that.

See the worked example

Supercars and everyday cars for sale

1627 rows · 7 columns · 100 KB

One row is
one car advertised for sale in Europe
Good numbers to plot
distance_driven_km, price_aud, age_years
Groups you can split by
brand, gearbox
Also in the file
model, year
You could ask
Do cars with more kilometres on them sell for less? Do older cars always sell for less, and which cars flatly refuse to?
Download CSV
Peek at the data
brandmodelyearage_yearsdistance_driven_kmprice_audgearbox
HondaHonda Accord 2.2d Executive20091726500012540Automatic
Mercedes-BenzMercedes-Benz GLC20161012200055062Automatic
FordFord Kuga20141223204014782Manual
FordFord Mondeo2012142550006840Manual
VolkswagenVolkswagen Polo2013139455011362Manual

WNBA players

163 rows · 13 columns · 13 KB

One row is
one WNBA player and their 2019 season
Good numbers to plot
minutes_per_game, player_efficiency_rating, minutes_total, win_shares, usage_pct, true_shooting_pct
Groups you can split by
team, position
Also in the file
player, age, games_played, rebound_pct, assist_pct
You could ask
Do players who spend longer on court score better ratings? Does shooting more often mean shooting well?
Download CSV
Peek at the data
playerteampositionagegames_playedminutes_totalminutes_per_gameplayer_efficiency_ratingtrue_shooting_pct…
Renee MontgomeryAtlanta DreamGuard323494927.911.152.0…
Elizabeth WilliamsAtlanta DreamCentre-Forward263290928.416.752.1…
Brittney SykesAtlanta DreamGuard253488025.911.344.5…
Tiffany HayesAtlanta DreamGuard292981728.215.149.7…
Jessica BrelandAtlanta DreamForward313376723.215.242.5…

Antarctic penguins

344 rows · 8 columns · 17 KB

One row is
one penguin measured at a research station
Good numbers to plot
flipper_length_mm, body_mass_g, bill_length_mm, bill_depth_mm
Groups you can split by
species, island, sex
Also in the file
year
You could ask
Do penguins with longer flippers weigh more? Is it the same for all three species?
Download CSV
Peek at the data
speciesislandbill_length_mmbill_depth_mmflipper_length_mmbody_mass_gsexyear
AdelieTorgersen39.118.7181.03750.0male2007
AdelieTorgersen39.517.4186.03800.0female2007
AdelieTorgersen40.318.0195.03250.0female2007
AdelieTorgersen—————2007
AdelieTorgersen36.719.3193.03450.0female2007

AFL players

677 rows · 5 columns · 28 KB

One row is
one AFL player
Good numbers to plot
height_cm, weight_kg
Groups you can split by
position, team
Also in the file
player
You could ask
Are taller players heavier? Do ruckmen sit above or below everyone else?
Download CSV
Peek at the data
playerteampositionheight_cmweight_kg
Scott ThompsonAdelaideMidfielder18585
Richard DouglasAdelaideMidfielder18080
Rory SloaneAdelaideMidfielder18385
Patrick DangerfieldAdelaideMidfielder18592
Bernie VinceAdelaideMidfielder18687

NBA players

438 rows · 13 columns · 40 KB

One row is
one NBA player and their season
Good numbers to plot
minutes_per_game, points_per_game, height_cm, weight_kg, salary
Groups you can split by
position, team
Also in the file
player, age, years_experience, games_played, rebounds_per_game, assists_per_game
You could ask
Does more time on court mean more points? Is height or court time the better predictor? Does the pay match the points?
Download CSV
Peek at the data
playerteampositionageyears_experienceheight_cmweight_kgsalarygames_played…
Brad WanamakerBoston CelticsPoint guard301190.595.31445697.099.0…
Carsen EdwardsBoston CelticsPoint guard220180.390.71228026.035.0…
Daniel TheisBoston CelticsCentre272203.2111.15000000.0187.0…
Enes KanterBoston CelticsCentre278208.3113.44767000.0634.0…
Gordon HaywardBoston CelticsSmall forward309200.7102.132700690.0634.0…

Australian Institute of Sport athletes

202 rows · 10 columns · 11 KB

One row is
one elite Australian athlete
Good numbers to plot
height_cm, weight_kg, lean_body_mass_kg, haemoglobin, haematocrit_pct
Groups you can split by
sport, sex
Also in the file
red_cell_count, white_cell_count, ferritin
You could ask
Are taller athletes heavier? Which sport has the tallest athletes?
Download CSV
Peek at the data
sportsexheight_cmweight_kglean_body_mass_kgred_cell_countwhite_cell_counthaematocrit_pcthaemoglobin…
BasketballFemale195.978.963.323.967.537.512.3…
BasketballFemale189.774.458.554.418.338.212.7…
BasketballFemale177.869.155.364.145.036.411.6…
BasketballFemale185.074.957.184.115.337.312.6…
BasketballFemale184.664.653.24.456.841.514.0…

Australian weather, three cities

300 rows · 13 columns · 19 KB

One row is
one day in Hobart, Uluru or Wollongong
Good numbers to plot
min_temp_c, max_temp_c, humidity_3pm_pct
Groups you can split by
location, rain_today
Also in the file
rainfall_mm, wind_gust_kmh, humidity_9am_pct, temp_9am_c, temp_3pm_c, pressure_9am, pressure_3pm, rain_tomorrow
You could ask
Does a cold morning mean a cold afternoon? Does the rule work as well in Uluru as in Hobart?
Download CSV
Peek at the data
locationmin_temp_cmax_temp_crainfall_mmwind_gust_kmhhumidity_9am_pcthumidity_3pm_pcttemp_9am_ctemp_3pm_c…
Hobart7.911.41.244.079749.010.5…
Hobart6.110.80.031.086868.510.3…
Hobart8.919.20.830.0525315.918.3…
Hobart10.620.10.244.0867612.517.5…
Hobart7.819.00.035.0724210.117.4…

Used cars for sale

90 rows · 4 columns · 2 KB

One row is
one second-hand car advertised for sale
Good numbers to plot
age_years, price_thousands_usd, distance_driven_thousand_km
Groups you can split by
model
You could ask
How much value does a car lose each year? Does age or distance driven matter more?
Download CSV
Peek at the data
modelage_yearsdistance_driven_thousand_kmprice_thousands_usd
Mazda6328.615.9
Mazda6230.616.4
Mazda6133.618.9
Mazda6238.616.9
Mazda6238.620.5

Fast food nutrition

515 rows · 14 columns · 43 KB

One row is
one item on a fast food menu
Good numbers to plot
calories, total_fat_g, sodium_mg, protein_g
Groups you can split by
restaurant, salad
Also in the file
item, calories_from_fat, sat_fat_g, trans_fat_g, cholesterol_mg, carbs_g, fibre_g, sugar_g
You could ask
Can you predict an item's fat from its calories? Which chain comes out worst? Are the salads actually better?
Download CSV
Peek at the data
restaurantitemcaloriescalories_from_fattotal_fat_gsat_fat_gtrans_fat_gcholesterol_mgsodium_mg…
McdonaldsArtisan Grilled Chicken Sandwich3806072.00.0951110…
McdonaldsSingle Bacon Smokehouse Burger8404104517.01.51301580…
McdonaldsDouble Bacon Smokehouse Burger11306006727.03.02201920…
McdonaldsGrilled Bacon Smokehouse Chicken Sandwich7502803110.00.51551940…
McdonaldsCrispy Bacon Smokehouse Chicken Sandwich9204104512.00.51201980…

Pokemon stats

800 rows · 13 columns · 44 KB

One row is
one Pokemon
Good numbers to plot
attack, total_stats, defense, hp
Groups you can split by
type_1, generation, legendary
Also in the file
id, name, type_2, sp_attack, sp_defense, speed
You could ask
Do high attack Pokemon give up defense, or do strong ones just get more of everything? Are legendaries a different breed?
Download CSV
Peek at the data
idnametype_1type_2total_statshpattackdefensesp_attack…
1BulbasaurGrassPoison31845494965…
2IvysaurGrassPoison40560626380…
3VenusaurGrassPoison525808283100…
3VenusaurMega VenusaurGrassPoison62580100123122…
4CharmanderFire—30939524360…

Spotify songs

350 rows · 19 columns · 56 KB

One row is
one song
Good numbers to plot
energy, loudness, acousticness, popularity
Groups you can split by
genre, subgenre, playlist_name
Also in the file
title, artist, album, danceability, key, mode, speechiness, instrumentalness, liveness, valence, tempo, duration_ms
You could ask
Are high energy songs mixed louder? Are sad songs slower?
Download CSV
Peek at the data
titleartistpopularityalbumplaylist_namegenresubgenredanceabilityenergy…
On & OnAlok79On & OnDance Roompopdance pop74.777.60000000000001…
All The LiesAlok56All The Lies (Remixes)Cardiopopdance pop70.780.60000000000001…
Hear Me NowAlok75Hear Me NowElectroPop 2020popelectropop77.846.3…
The WallAlok65The WallElectropoppopelectropop68.291.0…
Hear Me NowAlok52Hear Me NowChillout & Remixes 💜popindie poptimism78.843.0…

Hollywood movies

970 rows · 16 columns · 100 KB

One row is
one film released between 2007 and 2013
Good numbers to plot
budget_m, world_gross_m, critic_score, audience_score, opening_weekend_m, domestic_gross_m
Groups you can split by
genre, studio, year
Also in the file
movie, story, theatres_opening_week, avg_per_theatre_opening, foreign_gross_m, profitability, opening_profit
You could ask
Does a bigger budget buy a bigger box office? Do critics and ordinary viewers agree, and which films split them hardest?
Download CSV
Peek at the data
moviestudiocritic_scoreaudience_scorestorygenretheatres_opening_weekopening_weekend_mavg_per_theatre_opening…
Spider-Man 3Sony61.054.0MetamorphosisAction4252.0151.135540.0…
Shrek the ThirdParamount42.057.0QuestAnimation4122.0121.629507.0…
TransformersParamount57.089.0Monster ForceAction4011.070.517577.0…
Pirates of the Caribbean: At World's EndDisney45.074.0RescueAction4362.0114.726302.0…
Harry Potter and the Order of the PhoenixWarner Bros78.082.0QuestAdventure4285.077.117998.0…

Also available

Smaller or stranger. Good if you have finished early or you want something nobody else will have.

Countries: money and lifespan

187 rows · 5 columns · 9 KB

One row is
one country
Good numbers to plot
income_per_person, life_expectancy_years
Groups you can split by
region
Also in the file
country, population
You could ask
Does more money always buy more years of life, or does it level off? Warning: this one is not a straight line, which makes it interesting.
Download CSV
Peek at the data
countryincome_per_personlife_expectancy_yearspopulationregion
Afghanistan192557.6332526562south_asia
Albania1062076.02896679europe_central_asia
Algeria1343476.539666519middle_east_north_africa
Andorra4657784.170473europe_central_asia
Angola761561.025021974sub_saharan_africa

Australian possums

104 rows · 13 columns · 7 KB

One row is
one possum trapped in Victoria or NSW/Qld
Good numbers to plot
head_length_mm, skull_width_mm, total_length_cm
Groups you can split by
region, sex, trap_site
Also in the file
age_years, tail_length_cm, foot_length_mm, ear_length_mm, eye_width_mm, chest_girth_cm, belly_girth_cm
You could ask
Can you tell a Victorian possum from a northern one by its skull?
Download CSV
Peek at the data
trap_siteregionsexage_yearshead_length_mmskull_width_mmtotal_length_cmtail_length_cmfoot_length_mm…
1VictoriaMale8.094.160.489.036.074.5…
1VictoriaFemale6.092.557.691.536.572.5…
1VictoriaFemale6.094.060.095.539.075.4…
1VictoriaFemale6.093.257.192.038.076.1…
1VictoriaFemale2.091.556.385.536.071.0…

Cars: engine size and fuel use

234 rows · 12 columns · 18 KB

One row is
one car model
Good numbers to plot
engine_litres, highway_l_per_100km, highway_miles_per_gallon
Groups you can split by
class, drive, manufacturer
Also in the file
model, year, cylinders, transmission, fuel_type, city_l_per_100km
You could ask
How much fuel economy do you lose per extra litre of engine? This file has fuel use measured two opposite ways, which is worth a look.
Download CSV
Peek at the data
manufacturermodelyearengine_litrescylinderstransmissiondriveclassfuel_type…
audia419991.84auto(l5)Front wheelcompactPremium…
audia419991.84manual(m5)Front wheelcompactPremium…
audia420082.04manual(m6)Front wheelcompactPremium…
audia420082.04auto(av)Front wheelcompactPremium…
audia419992.86auto(l5)Front wheelcompactPremium…

How mammals sleep

83 rows · 8 columns · 4 KB

One row is
one mammal species
Good numbers to plot
sleep_hours, dream_sleep_hours, body_mass_kg, brain_mass_kg
Groups you can split by
diet
Also in the file
animal, sleep_cycle_hours, awake_hours
You could ask
Do animals that sleep more also dream more? Do carnivores sleep longer?
Download CSV
Peek at the data
animaldietsleep_hoursdream_sleep_hourssleep_cycle_hoursawake_hoursbrain_mass_kgbody_mass_kg
CheetahCarnivore12.1——11.9—50.0
Owl monkeyOmnivore17.01.8—7.00.01550.48
Mountain beaverHerbivore14.42.4—9.6—1.35
Greater short-tailed shrewOmnivore14.92.30.1333333339.10.000290.019
CowHerbivore4.00.70.66666666720.00.423600.0

Getting your question right

This is where this task actually goes wrong, so spend a minute on it. Use this shape:

Is there a relationship between ______ and ______ in ______ ?

Check all four before you start

  • It names two columns that both hold numbers.
  • It asks whether they are related, not what one single value is.
  • You can answer it from your file, without going and finding more data.
  • It is not secretly a compare-two-groups question. That is boxplot work, not a scatterplot. Both are fine, you just have to know which one you are doing.
The questionVerdict
✔ Do penguins with longer flippers weigh more?Two number columns, and it asks about a relationship.
✔ Does a bigger movie budget mean a bigger box office?Both are numbers, and the file can answer it.
✔ Is court time or height the better predictor of points?Ambitious and good. Two scatterplots, then compare the two r values.
✘ What is the best Pokemon?‘Best’ is not a number, and nothing is being related to anything.
✘ How many songs are in the Spotify file?That is a fact you look up in one second, not an investigation.
! Do midfielders weigh more than ruckmen?Careful. This compares two GROUPS, so it is boxplots, not a scatterplot. Fine to do, but know which one you are doing.
! Does more court time CAUSE more points?Careful. Your data can show two things go together. It can never prove one causes the other. Ask whether they are related, then discuss cause separately.
✘ Does eating fast food make people unhealthy?There are no people in that file, only menu items. Check your file actually contains the thing you are asking about.

How to plot it

We are using CODAP. It is free, it runs in the browser, there is no login and nothing to install, so it works the same on a Chromebook as on a lab computer.

CODAP

codap.concord.org/app · free, any browser, no login, nothing to install

  1. Open the data. Drag your CSV onto the CODAP window. Or use the menu button, choose Import, then the Local File tab. Your data appears as a table.
    You can also use Copy link for CODAP above and import straight from the web.
  2. Make an empty graph. Click Graph in the top toolbar.
  3. Drag your explanatory variable onto the horizontal axis, across the bottom.
  4. Drag your response variable onto the vertical axis. That is your scatterplot.
  5. Add the line. Click the ruler icon in the strip of icons down the right of the graph, then tick Least Squares Line. You get the equation and r in a yellow box, which you can drag if it covers your dots.
  6. Colour by group (optional, looks great). Drag a word column onto the middle of the graph.
  7. Screenshot it, with the line and the box of numbers both readable, because you write the rest up off that picture. Chromebook: Ctrl + Show Windows, or Ctrl + Shift + Show Windows to drag a box around just the graph. Windows: Win + Shift + S. Paste it into your template at Question 5.

Stuck? If a column will not go on an axis, click its name and choose Treat as Numeric. If nothing happens when you drag, you forgot to make the graph first.

Reading r

CODAP prints r straight into the yellow box beside your line, so there is no working to do. Read it off.

Then check it against your own eyes. A plus sign means the line runs uphill, a minus sign downhill. If the sign and the picture disagree, you have read the wrong number.

And remember: the sign only tells you the direction. Strength is how far r sits from zero, so r = −0.9 is strong and r = +0.2 is weak.

Strength bands, ignoring the sign: 0.75 to 1 strong, 0.5 to 0.75 moderate, 0.25 to 0.5 weak, below 0.25 nothing worth talking about. A guide, not a law: 0.74 and 0.76 are not different animals, and a curved plot can carry a healthy r and still deserve no straight line. Look at the picture as well as the number.

If your box shows R squared instead, older versions do that. Square root it and take the sign off the slope: R squared of 0.67 gives r = 0.82, the penguin number from class.

SALT, before you call it finished

  • Scale, evenly spaced, on both axes.
  • Axes, explanatory variable across the bottom.
  • Labels, both axes named, with units.
  • Title, saying what the graph is of.

Find your own data

Finish the investigation first. Then, if you want to go hunting, this is the big public list:

github.com/awesomedata/awesome-public-datasets

Fair warning, and this is genuinely what working with data feels like: a lot of those links are dead, a lot of the files are far too big to open, and a file that will not load is not a maths problem you can solve. If that link is blocked at school, try it at home.

What makes a dataset usable

Get it approved before you commit to it.