Data Analysis Best Practices

Chapter 2 of 7 · 4 practices · 3 min · 4-question quiz

Read the data correctly

Summary numbers hide most problems. These practices get you looking at what a row means, how values are distributed and how your tools read types.

Start: State what one row represents before you query a table

4 practices in this chapter

  1. 1State what one row represents before you query a tableThe grain of a table is what one row means: one order, one order line, one user per day. Most join and aggregation mistakes come from guessing it wrong.
  2. 2Look at distributions and real rows, not only averagesGoogle's guide warns that means and medians hide things like multimodal behaviour, and recommends histograms, cumulative distribution plots and Q-Q plots. It also says to look at examples: sample…
  3. 3Check data types when you load data, especially strings and datesType surprises change results silently: a numeric column read as text sorts "100" before "20", and dates parsed in the wrong unit shift every calculation.
  4. 4Decide on one time zone and convert timestamps explicitly"Orders on 1 October" means different rows in UTC and in local time. If one table stores UTC and another stores local time, a daily join can shift a day's worth of rows.

Check yourself on this chapter

4 questions, right here once you are signed in. Your progress is saved as you read.

Sign up for the quiz