check the headers : do the variables have the correct names?
stringAsFactors = T : make sure that string data are converted to categorical data
Problem 1. World Happiness Problems.
Download the “World Happiness” data, and import this data into R. We’ll be focusing on .
Load the data (I’ll call it d if you want to follow along with my code), check to make sure it loaded correctly, and report the sample size and names of the variables.
Graph the variable “ladder” as a histogram. Change the arguments to make the graph “look nice”.
Report the mean, median, range, and standard deviation for this variables. Add vertical lines to your graphs above that illustrate the mean (in red), the median (in blue), and the standard deviation (in dashed red).
Describe what each of these statistics tells you about the happiness of countries in the dataset. (Human brain stuff; no R needed! Goal is to connect the stats to knowledge and understanding of the variable.)
Describe what additional questions you have about this variable (what do you NOT learn about happiness levels of countries from this variable, and what might you want to know?)
BREAK TIME : MEET BACK AT 10:20
Part 3 : Working on Lab 3, Problem 2.
In Small Groups: Graph a numeric variable from the World Happiness Dataset, run descriptive statistics (mean, median, range, standard deviation), and describe what these statistics tell you about the data in the graph. What do you learn about this variable? What other questions about this variable do you have?