# R-studio programing – data science

I’m working on a Statistics question and need guidance to help me study.

1. Use relative paths to load these data frames into R.

“`{r, eval=TRUE}

“`

2. These data are messy. The observational units in `fert`, `life`, and `pop` are locations in space-time (e.g. Aruba in 2017). Recall that tidy data should have one observational unit per row.

– Make these data tidy now.

– Make sure the new year variable is a numeric.

“`{r, eval = TRUE}

“`

3. Combine these data frames so the fertility rate, population, life expectancy, and the region for each country in each year are in a single data frame.

“`{r, eval = TRUE}

“`

4. Make a scatterplot of fertility rate vs life expectancy, color-coding by region and annotating size by the population.

+ Include only the years 1960, 1970, 1980, 1990, 2000, and 2010. Facet by these years.

+ Interpret the plot in one sentence.

+ Your final plot should look like this:

“`{r, eval=TRUE}

“`

5. Calculate the total population for each region for each year. Exclude 2018.

+ Make a line plot of year versus log of total population, color-coding by region.

+ Interpret the plot in one sentence.

+ Your final plot should look like this:

“`{r, eval = TRUE}

“`

6. Make a bar plot of population vs region for the year 2017.

+ Order the bars on the \$y\$-axis in **decreasing** order of population.

+ Your final plot should look like this:

“`{r, eval = TRUE}

“`