This report contains the analysis of the `gapminder` dataset and contains the results of the top Countries with the largest life expectancy in Europe.  The analysis is based on data from 2007.  The report also analyzes how life expectancy changed over the years in Europe.  

This report was generated using R and the code to extract the European 2007 data is as follows:

```{r load-data, message=FALSE}
#load tidyverse library
library(tidyverse) # used for data manipulation
library(rmarkdown) # used for paged_table function
library(kableExtra) # used for table
library(ggpubr) #used for ggarrange function 

#read file into R
pop_data <- read_csv("data/gapminder_data.csv")

#create a table with data from European countries in 2007 showing the countries with the largest life expectancy at the top 
euro_data_tbl <- pop_data %>% 
                    filter(continent == "Europe" & year == 2007) %>% 
                    select(-continent, -year) %>% 
                    arrange(desc(lifeExp)) %>% 
                    rename(Country = country, "Population Size" = pop, "Life Expectancy" = lifeExp, "GDP" = gdpPercap)
                    
```

The results in euro_data_tbl are displayed in the Table below:

```{r kbl-table}
euro_data_tbl %>% 
          kable(caption="European countries ordered by greatest life expectancy from 2007 data") %>% 
          kable_styling(bootstrap_options = "striped", full_width = F) %>% 
          scroll_box(width = "100%", height = "200px")
```
