11 Mean Heights of Countries Over Time
Readings
Scan through the following,
- Chapter 27.1 - 27.3 A Field Guide to Base R: R for Data Science (2nd ed)
- This will be helpful in learning to subset/reference elements of vectors and lists (and consequently dataframe and tibbles as well)
- Chapter 20.2.1 - 20.2.4 Reading Excel: R for Data Science (2nd ed)
- Chapter 20.3 - 20.4 Reading Google Sheets: R for Data Science (2nd ed)
- readxl R package
- downloader R package
- cheatsheet
Tip
The guided instruction for importing data may be particularly helpful.
Guided Instruction
The Scientific American argues that humans have been getting taller over the years. As the data scientists that we are becoming, we would like to find data that validates this concept.
This project is not as severe as the two quotes below, but it will give you a taste of pulling various data and file formats together into “tidy” data for visualization and analysis.
“Classroom data are like teddy bears and real data are like a grizzly bear with salmon blood dripping out its mouth.” Jenny Bryan
“Up to 80% of data analysis is spent on the process of cleaning and preparing data” Hadley Wickham
- Read in and tidy the Worldwide heights estimates .xlsx file. After tidying the data it should look something like this (this is just a snippet of a part of the dataset, yours will have more rows of course).
Code | country | height.cm | year_decade |
---|---|---|---|
56 | Belgium | 163.1 | 1810 |
280 | Federal Republic of Germany (until 1990) | 167.8 | 1810 |
250 | France | 163.9 | 1810 |
276 | Germany | 167.8 | 1810 |
528 | Netherlands | 166.0 | 1810 |
246 | Finland | 171.9 | 1810 |
- Make a plot fit for presentation, with decade on the x-axis and and all the countries’ heights in inches on the y-axis; with the points from Germany highlighted based on the data from the
.xlsx
file. - Write a paragraph to summarize how you would respond to the assertion that humans are getting taller over the years. (Does your data tell a story?)
- Render the
.qmd
file. Push all the files created in the rendering process into your GitHub repository.
Submit
In I-learn submit a link to the .md
file on GitHub.