Ode to Tidy

J. Hathaway

Becoming the Critic

Visualization of the Day

Review

Case Study 5: I can clean your data

Take 10 minutes to brainstorm with your table what the data inputs are and what visualizations you would like to create?

  • What mutations or summaries will you need to do?
  • What difficulties do you expect?
  • Do each of the task items make sense?

Task 10: Clean and Reformat (aka tidy)

Tidy messy data

  1. Look at the data and write down your top few concerns about using this file for analysis.
  2. Diagram how this file will need to be changed to be tidy
  3. In ‘psuedo code’ write out the steps you will need to do to get to your final format.
  4. Review the tidyr documentation and find the functions that could help you with this task.

Case Study Final Data Example

  • The data have different units.
  • Are measured on different periods.
  • bind_rows() and measurments::conv_unit() might be helpful.
birth_year height.cm height.in study
1850 169.62 66.77953 bavarian19
1850 156.47 61.60236 bavarian19
1850 172.45 67.89370 bavarian19
1850 168.22 66.22835 bavarian19
1850 166.59 65.58661 bavarian19
1850 160.30 63.11024 bavarian19

Time to work on Case Studies, Tasks, and semester projects.