-- Attaching packages -------------------------------------- tidyverse 1.2.1 --
v ggplot2 3.3.0 v purrr 0.3.2
v tibble 2.1.3 v dplyr 0.8.3
v tidyr 1.0.2 v stringr 1.4.0
v readr 1.3.1 v forcats 0.4.0
Warning: package 'ggplot2' was built under R version 3.6.3
Warning: package 'tidyr' was built under R version 3.6.3
-- Conflicts ----------------------------------------- tidyverse_conflicts() --
x dplyr::filter() masks stats::filter()
x dplyr::lag() masks stats::lag()
Warning: package 'gapminder' was built under R version 3.6.3
Warning: package 'ggbeeswarm' was built under R version 3.6.3
Warning: package 'skimr' was built under R version 3.6.3
Warning: package 'janitor' was built under R version 3.6.3
Attaching package: 'janitor'
The following objects are masked from 'package:stats':
chisq.test, fisher.test
Warning: package 'ggridges' was built under R version 3.6.3
data<-read_csv(here::here("downloads", "data.csv"))Parsed with column specification:
cols(
`Fixed broadband Internet subscribers (per 100 people)` = col_character(),
`1998` = col_double(),
`1999` = col_double(),
`2000` = col_double(),
`2001` = col_double(),
`2002` = col_double(),
`2003` = col_double(),
`2004` = col_double(),
`2005` = col_double(),
`2006` = col_double(),
`2007` = col_double(),
`2008` = col_double(),
`2009` = col_double(),
`2010` = col_double(),
`2011` = col_logical()
)
glimpse(data)Observations: 213
Variables: 15
$ `Fixed broadband Internet subscribers (per 100 people)` <chr> "Afgha...
$ `1998` <dbl> NA, NA...
$ `1999` <dbl> NA, NA...
$ `2000` <dbl> NA, NA...
$ `2001` <dbl> 0.0000...
$ `2002` <dbl> 0.0000...
$ `2003` <dbl> 0.0000...
$ `2004` <dbl> 6.8802...
$ `2005` <dbl> 7.3566...
$ `2006` <dbl> 0.0016...
$ `2007` <dbl> 0.0015...
$ `2008` <dbl> 0.0015...
$ `2009` <dbl> 0.0029...
$ `2010` <dbl> 0.0043...
$ `2011` <lgl> NA, NA...
data_tidy<- data %>%
bind_rows()
glimpse(data_tidy)Observations: 213
Variables: 15
$ `Fixed broadband Internet subscribers (per 100 people)` <chr> "Afgha...
$ `1998` <dbl> NA, NA...
$ `1999` <dbl> NA, NA...
$ `2000` <dbl> NA, NA...
$ `2001` <dbl> 0.0000...
$ `2002` <dbl> 0.0000...
$ `2003` <dbl> 0.0000...
$ `2004` <dbl> 6.8802...
$ `2005` <dbl> 7.3566...
$ `2006` <dbl> 0.0016...
$ `2007` <dbl> 0.0015...
$ `2008` <dbl> 0.0015...
$ `2009` <dbl> 0.0029...
$ `2010` <dbl> 0.0043...
$ `2011` <lgl> NA, NA...
skim(data_tidy) %>%
summary()| Name | data_tidy |
| Number of rows | 213 |
| Number of columns | 15 |
| _______________________ | |
| Column type frequency: | |
| character | 1 |
| logical | 1 |
| numeric | 13 |
| ________________________ | |
| Group variables | None |
names(data_tidy)[1] <- "country"
names(data_tidy)[2] <- "1998"
names(data_tidy)[3] <- "1999"
names(data_tidy)[4] <- "2000"
names(data_tidy)[5] <- "2001"
names(data_tidy)[6] <- "2002"
names(data_tidy)[7] <- "2003"
names(data_tidy)[8] <- "2004"
names(data_tidy)[9] <- "2005"
names(data_tidy)[10] <- "2006"
names(data_tidy)[11] <- "2007"
names(data_tidy)[12] <- "2008"
names(data_tidy)[13] <- "2009"
names(data_tidy)[14] <- "2010"
names(data_tidy)[15] <- "2011"
glimpse(data_tidy)Observations: 213
Variables: 15
$ country <chr> "Afghanistan", "Albania", "Algeria", "American Samoa",...
$ `1998` <dbl> NA, NA, NA, NA, NA, NA, NA, 0.0000000, NA, NA, NA, 0.0...
$ `1999` <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0.6368611,...
$ `2000` <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 2.37781227...
$ `2001` <dbl> 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000...
$ `2002` <dbl> 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000...
$ `2003` <dbl> 0.000000e+00, 0.000000e+00, 5.640253e-02, NA, 4.987327...
$ `2004` <dbl> 6.880265e-04, 0.000000e+00, 1.111247e-01, NA, 8.343516...
$ `2005` <dbl> 7.356639e-04, 8.657458e-03, 4.104785e-01, NA, 1.327676...
$ `2006` <dbl> 0.001625928, NA, 0.509104678, NA, 18.298820640, 0.0438...
$ `2007` <dbl> 0.001581161, 0.315490754, 0.846557772, NA, 22.76201007...
$ `2008` <dbl> 0.001537626, 2.011694862, 1.408735929, NA, 25.03360500...
$ `2009` <dbl> 0.00299058, 2.88155283, 2.34047516, NA, 27.41613586, 0...
$ `2010` <dbl> 0.004362367, 3.292324493, 2.537498590, NA, 28.87207768...
$ `2011` <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA...
group_by(data_tidy, country)# A tibble: 213 x 15
# Groups: country [213]
country `1998` `1999` `2000` `2001` `2002` `2003` `2004` `2005`
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Afghan~ NA NA NA 0. 0. 0. 6.88e-4 7.36e-4
2 Albania NA NA NA 0. 0. 0. 0. 8.66e-3
3 Algeria NA NA NA 0. 0. 5.64e-2 1.11e-1 4.10e-1
4 Americ~ NA NA NA 0. 0. NA NA NA
5 Andorra NA NA NA NA 1.66e+0 4.99e+0 8.34e+0 1.33e+1
6 Angola NA NA NA 0. 0. 0. 0. 0.
7 Antigu~ NA NA NA 0. 0. 0. 1.21e-1 9.38e-1
8 Argent~ 0 NA NA 2.52e-1 3.93e-1 6.81e-1 1.42e+0 2.40e+0
9 Armenia NA NA NA 1.96e-4 2.61e-4 3.27e-4 3.27e-2 6.49e-2
10 Aruba NA NA NA 0. 0. 1.44e+0 7.03e+0 1.22e+1
# ... with 203 more rows, and 6 more variables: `2006` <dbl>,
# `2007` <dbl>, `2008` <dbl>, `2009` <dbl>, `2010` <dbl>, `2011` <lgl>
skim(data_tidy)| Name | data_tidy |
| Number of rows | 213 |
| Number of columns | 15 |
| _______________________ | |
| Column type frequency: | |
| character | 1 |
| logical | 1 |
| numeric | 13 |
| ________________________ | |
| Group variables | None |
Variable type: character
| skim_variable | n_missing | complete_rate | min | max | empty | n_unique | whitespace |
|---|---|---|---|---|---|---|---|
| country | 0 | 1 | 4 | 32 | 0 | 213 | 0 |
Variable type: logical
| skim_variable | n_missing | complete_rate | mean | count |
|---|---|---|---|---|
| 2011 | 213 | 0 | NaN | : |
Variable type: numeric
| skim_variable | n_missing | complete_rate | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
|---|---|---|---|---|---|---|---|---|---|---|
| 1998 | 156 | 0.27 | 0.03 | 0.10 | 0 | 0.00 | 0.00 | 0.00 | 0.48 | ▇▁▁▁▁ |
| 1999 | 171 | 0.20 | 0.16 | 0.40 | 0 | 0.00 | 0.00 | 0.01 | 1.91 | ▇▁▁▁▁ |
| 2000 | 146 | 0.31 | 0.60 | 1.47 | 0 | 0.00 | 0.01 | 0.38 | 8.23 | ▇▁▁▁▁ |
| 2001 | 20 | 0.91 | 0.53 | 1.80 | 0 | 0.00 | 0.00 | 0.07 | 16.48 | ▇▁▁▁▁ |
| 2002 | 11 | 0.95 | 0.98 | 2.66 | 0 | 0.00 | 0.00 | 0.34 | 21.84 | ▇▁▁▁▁ |
| 2003 | 21 | 0.90 | 1.69 | 3.74 | 0 | 0.00 | 0.03 | 0.89 | 23.35 | ▇▁▁▁▁ |
| 2004 | 23 | 0.89 | 2.71 | 5.09 | 0 | 0.00 | 0.11 | 2.22 | 24.81 | ▇▁▁▁▁ |
| 2005 | 18 | 0.92 | 4.02 | 7.00 | 0 | 0.01 | 0.43 | 3.36 | 29.08 | ▇▁▁▁▁ |
| 2006 | 27 | 0.87 | 5.58 | 8.68 | 0 | 0.03 | 1.04 | 5.89 | 37.06 | ▇▁▁▁▁ |
| 2007 | 13 | 0.94 | 6.34 | 9.70 | 0 | 0.05 | 1.47 | 8.25 | 45.00 | ▇▁▁▁▁ |
| 2008 | 15 | 0.93 | 7.76 | 10.93 | 0 | 0.09 | 2.35 | 10.73 | 55.18 | ▇▁▁▁▁ |
| 2009 | 23 | 0.89 | 9.20 | 12.02 | 0 | 0.21 | 3.58 | 13.36 | 62.11 | ▇▂▁▁▁ |
| 2010 | 17 | 0.92 | 9.71 | 12.33 | 0 | 0.30 | 4.25 | 14.71 | 63.83 | ▇▂▂▁▁ |
glimpse(data_tidy)Observations: 213
Variables: 15
$ country <chr> "Afghanistan", "Albania", "Algeria", "American Samoa",...
$ `1998` <dbl> NA, NA, NA, NA, NA, NA, NA, 0.0000000, NA, NA, NA, 0.0...
$ `1999` <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 0.6368611,...
$ `2000` <dbl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 2.37781227...
$ `2001` <dbl> 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000...
$ `2002` <dbl> 0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000...
$ `2003` <dbl> 0.000000e+00, 0.000000e+00, 5.640253e-02, NA, 4.987327...
$ `2004` <dbl> 6.880265e-04, 0.000000e+00, 1.111247e-01, NA, 8.343516...
$ `2005` <dbl> 7.356639e-04, 8.657458e-03, 4.104785e-01, NA, 1.327676...
$ `2006` <dbl> 0.001625928, NA, 0.509104678, NA, 18.298820640, 0.0438...
$ `2007` <dbl> 0.001581161, 0.315490754, 0.846557772, NA, 22.76201007...
$ `2008` <dbl> 0.001537626, 2.011694862, 1.408735929, NA, 25.03360500...
$ `2009` <dbl> 0.00299058, 2.88155283, 2.34047516, NA, 27.41613586, 0...
$ `2010` <dbl> 0.004362367, 3.292324493, 2.537498590, NA, 28.87207768...
$ `2011` <lgl> NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA...
data_tidy %>%
bind_rows()# A tibble: 213 x 15
country `1998` `1999` `2000` `2001` `2002` `2003` `2004` `2005`
<chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 Afghan~ NA NA NA 0. 0. 0. 6.88e-4 7.36e-4
2 Albania NA NA NA 0. 0. 0. 0. 8.66e-3
3 Algeria NA NA NA 0. 0. 5.64e-2 1.11e-1 4.10e-1
4 Americ~ NA NA NA 0. 0. NA NA NA
5 Andorra NA NA NA NA 1.66e+0 4.99e+0 8.34e+0 1.33e+1
6 Angola NA NA NA 0. 0. 0. 0. 0.
7 Antigu~ NA NA NA 0. 0. 0. 1.21e-1 9.38e-1
8 Argent~ 0 NA NA 2.52e-1 3.93e-1 6.81e-1 1.42e+0 2.40e+0
9 Armenia NA NA NA 1.96e-4 2.61e-4 3.27e-4 3.27e-2 6.49e-2
10 Aruba NA NA NA 0. 0. 1.44e+0 7.03e+0 1.22e+1
# ... with 203 more rows, and 6 more variables: `2006` <dbl>,
# `2007` <dbl>, `2008` <dbl>, `2009` <dbl>, `2010` <dbl>, `2011` <lgl>
data_years <- data_tidy %>%
gather(key="year", value="number_of_users", "1998":"2011")
glimpse(data_years)Observations: 2,982
Variables: 3
$ country <chr> "Afghanistan", "Albania", "Algeria", "American...
$ year <chr> "1998", "1998", "1998", "1998", "1998", "1998"...
$ number_of_users <dbl> NA, NA, NA, NA, NA, NA, NA, 0.0000000, NA, NA,...
data_years %>%
group_by(country) %>%
select_if(is.numeric)%>%
skim()| Name | Piped data |
| Number of rows | 2982 |
| Number of columns | 2 |
| _______________________ | |
| Column type frequency: | |
| numeric | 1 |
| ________________________ | |
| Group variables | country |
Variable type: numeric
| skim_variable | country | n_missing | complete_rate | mean | sd | p0 | p25 | p50 | p75 | p100 | hist |
|---|---|---|---|---|---|---|---|---|---|---|---|
| number_of_users | Afghanistan | 4 | 0.71 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▇▅▁▂▂ |
| number_of_users | Albania | 5 | 0.64 | 0.95 | 1.38 | 0.00 | 0.00 | 0.01 | 2.01 | 3.29 | ▇▁▁▁▂ |
| number_of_users | Algeria | 4 | 0.71 | 0.82 | 0.96 | 0.00 | 0.07 | 0.46 | 1.27 | 2.54 | ▇▃▂▁▃ |
| number_of_users | American Samoa | 12 | 0.14 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▁▁▇▁▁ |
| number_of_users | Andorra | 5 | 0.64 | 16.74 | 10.10 | 1.66 | 8.34 | 18.30 | 25.03 | 28.87 | ▅▂▂▅▇ |
| number_of_users | Angola | 4 | 0.71 | 0.04 | 0.05 | 0.00 | 0.00 | 0.02 | 0.08 | 0.11 | ▇▁▂▂▅ |
| number_of_users | Antigua and Barbuda | 4 | 0.71 | 2.66 | 3.19 | 0.00 | 0.03 | 1.38 | 4.96 | 8.09 | ▇▃▁▂▃ |
| number_of_users | Argentina | 3 | 0.79 | 3.82 | 3.72 | 0.00 | 0.54 | 2.40 | 7.31 | 9.56 | ▇▂▂▂▅ |
| number_of_users | Armenia | 5 | 0.64 | 0.48 | 0.91 | 0.00 | 0.00 | 0.06 | 0.36 | 2.75 | ▇▁▁▁▁ |
| number_of_users | Aruba | 4 | 0.71 | 10.24 | 7.47 | 0.00 | 2.84 | 12.87 | 16.91 | 17.79 | ▆▂▁▃▇ |
| number_of_users | Australia | 5 | 0.64 | 12.18 | 10.29 | 0.63 | 2.60 | 9.88 | 23.20 | 24.15 | ▇▂▁▂▆ |
| number_of_users | Austria | 1 | 0.93 | 11.42 | 8.65 | 0.00 | 3.99 | 10.65 | 19.54 | 23.86 | ▇▃▃▂▇ |
| number_of_users | Azerbaijan | 6 | 0.57 | 0.89 | 1.74 | 0.00 | 0.02 | 0.11 | 0.79 | 5.08 | ▇▁▁▁▁ |
| number_of_users | Bahamas | 4 | 0.71 | 5.12 | 2.48 | 1.37 | 3.66 | 4.65 | 6.96 | 9.34 | ▅▇▂▇▂ |
| number_of_users | Bahrain | 1 | 0.93 | 2.98 | 2.88 | 0.00 | 0.18 | 2.23 | 5.36 | 7.30 | ▇▃▂▃▅ |
| number_of_users | Bangladesh | 5 | 0.64 | 0.02 | 0.02 | 0.00 | 0.00 | 0.00 | 0.03 | 0.04 | ▇▁▁▂▅ |
| number_of_users | Barbados | 4 | 0.71 | 12.42 | 7.57 | 0.00 | 10.35 | 13.06 | 17.90 | 21.01 | ▃▁▆▂▇ |
| number_of_users | Belarus | 4 | 0.71 | 3.59 | 6.14 | 0.00 | 0.00 | 0.07 | 4.17 | 17.55 | ▇▁▁▁▁ |
| number_of_users | Belgium | 1 | 0.93 | 15.17 | 11.56 | 0.11 | 4.47 | 15.54 | 25.55 | 30.96 | ▇▃▂▃▇ |
| number_of_users | Belize | 4 | 0.71 | 1.55 | 1.10 | 0.00 | 0.51 | 2.06 | 2.47 | 2.58 | ▅▂▁▂▇ |
| number_of_users | Benin | 4 | 0.71 | 0.01 | 0.01 | 0.00 | 0.00 | 0.01 | 0.02 | 0.04 | ▇▃▃▁▂ |
| number_of_users | Bermuda | 6 | 0.57 | 36.03 | 24.98 | 0.00 | 21.81 | 41.03 | 55.19 | 62.11 | ▅▁▅▂▇ |
| number_of_users | Bhutan | 4 | 0.71 | 0.19 | 0.38 | 0.00 | 0.00 | 0.00 | 0.22 | 1.19 | ▇▂▁▁▁ |
| number_of_users | Bolivia | 4 | 0.71 | 0.37 | 0.40 | 0.00 | 0.07 | 0.17 | 0.71 | 0.98 | ▇▁▁▁▃ |
| number_of_users | Bosnia and Herzegovina | 1 | 0.93 | 1.79 | 2.82 | 0.00 | 0.00 | 0.18 | 2.24 | 8.18 | ▇▁▁▂▁ |
| number_of_users | Botswana | 3 | 0.79 | 0.17 | 0.23 | 0.00 | 0.00 | 0.09 | 0.32 | 0.60 | ▇▁▁▁▂ |
| number_of_users | Brazil | 1 | 0.93 | 2.22 | 2.43 | 0.00 | 0.19 | 1.72 | 4.01 | 6.81 | ▇▃▁▁▂ |
| number_of_users | Brunei | 4 | 0.71 | 2.69 | 1.77 | 0.57 | 1.27 | 2.33 | 4.06 | 5.44 | ▇▇▂▂▅ |
| number_of_users | Bulgaria | 4 | 0.71 | 5.32 | 5.74 | 0.00 | 0.02 | 3.57 | 10.11 | 14.44 | ▇▂▂▂▃ |
| number_of_users | Burkina Faso | 4 | 0.71 | 0.03 | 0.04 | 0.00 | 0.00 | 0.01 | 0.06 | 0.09 | ▇▁▁▁▂ |
| number_of_users | Burundi | 4 | 0.71 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▇▁▁▁▃ |
| number_of_users | Cambodia | 4 | 0.71 | 0.07 | 0.10 | 0.00 | 0.00 | 0.01 | 0.11 | 0.25 | ▇▁▁▁▂ |
| number_of_users | Cameroon | 4 | 0.71 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.01 | ▇▂▂▂▆ |
| number_of_users | Canada | 1 | 0.93 | 17.08 | 11.00 | 0.46 | 9.12 | 16.93 | 27.56 | 30.46 | ▅▃▃▂▇ |
| number_of_users | Cape Verde | 4 | 0.71 | 1.06 | 1.18 | 0.00 | 0.02 | 0.86 | 1.64 | 3.22 | ▇▁▅▂▂ |
| number_of_users | Cayman Islands | 9 | 0.36 | 19.61 | 17.91 | 0.00 | 0.00 | 31.70 | 32.81 | 33.53 | ▅▁▁▁▇ |
| number_of_users | Central African Rep. | 6 | 0.57 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▁▁▇▁▁ |
| number_of_users | Chad | 4 | 0.71 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▇▁▁▁▂ |
| number_of_users | Channel Islands | 14 | 0.00 | NaN | NaN | NA | NA | NA | NA | NA | |
| number_of_users | Chile | 2 | 0.86 | 4.49 | 3.90 | 0.00 | 1.00 | 3.66 | 7.93 | 10.45 | ▇▃▃▂▆ |
| number_of_users | China | 2 | 0.86 | 3.20 | 3.30 | 0.00 | 0.20 | 2.39 | 5.34 | 9.44 | ▇▃▃▂▃ |
| number_of_users | Colombia | 2 | 0.86 | 1.57 | 1.96 | 0.00 | 0.07 | 0.52 | 2.86 | 5.60 | ▇▁▂▁▁ |
| number_of_users | Comoros | 4 | 0.71 | 0.01 | 0.01 | 0.00 | 0.00 | 0.00 | 0.01 | 0.02 | ▇▁▂▁▁ |
| number_of_users | Congo, Dem. Rep. | 4 | 0.71 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.01 | ▇▁▁▁▂ |
| number_of_users | Congo, Rep. | 5 | 0.64 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▇▁▁▁▁ |
| number_of_users | Costa Rica | 4 | 0.71 | 1.88 | 1.94 | 0.00 | 0.43 | 1.47 | 2.31 | 6.19 | ▇▅▁▂▂ |
| number_of_users | Cote d’Ivoire | 4 | 0.71 | 0.03 | 0.03 | 0.00 | 0.00 | 0.02 | 0.05 | 0.05 | ▇▁▁▂▆ |
| number_of_users | Croatia | 4 | 0.71 | 6.32 | 6.89 | 0.00 | 0.20 | 4.14 | 11.06 | 18.19 | ▇▂▂▂▃ |
| number_of_users | Cuba | 4 | 0.71 | 0.01 | 0.01 | 0.00 | 0.00 | 0.00 | 0.02 | 0.03 | ▇▁▁▂▁ |
| number_of_users | Cyprus | 4 | 0.71 | 6.93 | 6.77 | 0.26 | 1.17 | 4.55 | 12.55 | 17.63 | ▇▂▂▂▃ |
| number_of_users | Czech Rep. | 1 | 0.93 | 6.11 | 6.81 | 0.00 | 0.06 | 2.31 | 12.92 | 16.88 | ▇▁▁▂▃ |
| number_of_users | Denmark | 2 | 0.86 | 20.68 | 14.78 | 0.00 | 7.41 | 21.81 | 34.88 | 37.72 | ▅▃▂▂▇ |
| number_of_users | Djibouti | 5 | 0.64 | 0.22 | 0.33 | 0.00 | 0.00 | 0.02 | 0.29 | 0.91 | ▇▁▁▁▁ |
| number_of_users | Dominica | 2 | 0.86 | 5.77 | 4.79 | 0.00 | 2.49 | 4.82 | 9.80 | 13.81 | ▆▇▂▃▃ |
| number_of_users | Dominican Rep. | 4 | 0.71 | 1.29 | 1.31 | 0.00 | 0.23 | 0.87 | 2.16 | 3.63 | ▇▂▂▂▃ |
| number_of_users | Ecuador | 4 | 0.71 | 0.56 | 0.62 | 0.02 | 0.06 | 0.27 | 1.01 | 1.69 | ▇▁▁▁▂ |
| number_of_users | Egypt | 4 | 0.71 | 0.55 | 0.62 | 0.00 | 0.08 | 0.27 | 0.89 | 1.79 | ▇▁▁▁▁ |
| number_of_users | El Salvador | 4 | 0.71 | 1.13 | 1.02 | 0.00 | 0.37 | 0.86 | 1.88 | 2.83 | ▇▃▂▂▃ |
| number_of_users | Equatorial Guinea | 4 | 0.71 | 0.03 | 0.05 | 0.00 | 0.00 | 0.03 | 0.03 | 0.17 | ▇▁▁▁▁ |
| number_of_users | Eritrea | 1 | 0.93 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▇▁▁▁▁ |
| number_of_users | Estonia | 4 | 0.71 | 14.07 | 8.35 | 1.28 | 7.57 | 15.84 | 20.45 | 25.10 | ▅▅▂▅▇ |
| number_of_users | Ethiopia | 4 | 0.71 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▇▂▁▁▂ |
| number_of_users | Faeroe Islands | 4 | 0.71 | 17.34 | 14.62 | 0.12 | 2.26 | 19.62 | 30.41 | 33.40 | ▆▂▁▁▇ |
| number_of_users | Fiji | 4 | 0.71 | 0.90 | 0.91 | 0.00 | 0.00 | 0.94 | 1.47 | 2.70 | ▇▃▆▁▂ |
| number_of_users | Finland | 2 | 0.86 | 16.72 | 12.49 | 0.00 | 4.59 | 18.84 | 28.61 | 30.57 | ▆▂▂▂▇ |
| number_of_users | France | 1 | 0.93 | 13.20 | 12.67 | 0.02 | 0.98 | 10.49 | 24.68 | 32.89 | ▇▁▁▂▃ |
| number_of_users | French Polynesia | 4 | 0.71 | 5.62 | 4.88 | 0.01 | 0.74 | 5.69 | 10.10 | 11.90 | ▇▂▂▂▆ |
| number_of_users | Gabon | 4 | 0.71 | 0.11 | 0.10 | 0.00 | 0.02 | 0.12 | 0.15 | 0.27 | ▇▁▇▁▃ |
| number_of_users | Gambia | 5 | 0.64 | 0.01 | 0.01 | 0.00 | 0.00 | 0.00 | 0.02 | 0.02 | ▇▂▁▁▇ |
| number_of_users | Georgia | 4 | 0.71 | 1.35 | 1.94 | 0.01 | 0.04 | 0.33 | 2.18 | 5.70 | ▇▁▂▁▁ |
| number_of_users | Germany | 2 | 0.86 | 13.81 | 12.10 | 0.00 | 3.55 | 10.78 | 24.84 | 31.90 | ▇▂▃▂▅ |
| number_of_users | Ghana | 4 | 0.71 | 0.06 | 0.07 | 0.00 | 0.00 | 0.03 | 0.09 | 0.21 | ▇▃▃▁▂ |
| number_of_users | Gibraltar | 10 | 0.29 | 16.86 | 19.54 | 0.00 | 0.00 | 15.89 | 32.75 | 35.68 | ▇▁▁▁▇ |
| number_of_users | Greece | 1 | 0.93 | 5.06 | 7.29 | 0.00 | 0.00 | 0.47 | 9.09 | 19.95 | ▇▁▁▁▂ |
| number_of_users | Greenland | 4 | 0.71 | 11.85 | 9.48 | 0.00 | 1.62 | 14.38 | 20.54 | 22.15 | ▆▂▂▂▇ |
| number_of_users | Grenada | 5 | 0.64 | 5.67 | 5.08 | 0.00 | 0.59 | 5.38 | 8.29 | 13.88 | ▇▅▅▁▅ |
| number_of_users | Guam | 9 | 0.36 | 1.51 | 0.24 | 1.11 | 1.54 | 1.56 | 1.68 | 1.69 | ▃▁▁▇▇ |
| number_of_users | Guatemala | 4 | 0.71 | 0.45 | 0.60 | 0.00 | 0.00 | 0.26 | 0.62 | 1.80 | ▇▂▁▁▁ |
| number_of_users | Guinea | 5 | 0.64 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.01 | ▇▁▁▁▁ |
| number_of_users | Guinea-Bissau | 6 | 0.57 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▁▁▇▁▁ |
| number_of_users | Guyana | 5 | 0.64 | 0.41 | 0.52 | 0.00 | 0.00 | 0.27 | 0.68 | 1.48 | ▇▂▂▂▂ |
| number_of_users | Haiti | 6 | 0.57 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▁▁▇▁▁ |
| number_of_users | Honduras | 5 | 0.64 | 0.11 | 0.33 | 0.00 | 0.00 | 0.00 | 0.00 | 1.00 | ▇▁▁▁▁ |
| number_of_users | Hong Kong, China | 1 | 0.93 | 18.45 | 10.62 | 0.17 | 10.67 | 22.37 | 27.42 | 29.87 | ▂▂▁▂▇ |
| number_of_users | Hungary | 2 | 0.86 | 7.94 | 7.72 | 0.00 | 0.90 | 5.26 | 14.49 | 19.56 | ▇▃▁▃▅ |
| number_of_users | Iceland | 1 | 0.93 | 17.97 | 13.98 | 0.00 | 3.66 | 19.09 | 31.43 | 34.34 | ▆▂▃▂▇ |
| number_of_users | India | 1 | 0.93 | 0.20 | 0.29 | 0.00 | 0.00 | 0.02 | 0.27 | 0.90 | ▇▂▁▁▁ |
| number_of_users | Indonesia | 2 | 0.86 | 0.21 | 0.29 | 0.00 | 0.01 | 0.04 | 0.36 | 0.79 | ▇▁▂▁▂ |
| number_of_users | Iran | 5 | 0.64 | 0.23 | 0.26 | 0.00 | 0.02 | 0.14 | 0.41 | 0.68 | ▇▂▂▂▃ |
| number_of_users | Iraq | 7 | 0.50 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▇▃▃▃▇ |
| number_of_users | Ireland | 1 | 0.93 | 7.58 | 8.37 | 0.00 | 0.00 | 3.74 | 14.60 | 21.04 | ▇▁▁▂▃ |
| number_of_users | Isle of Man | 14 | 0.00 | NaN | NaN | NA | NA | NA | NA | NA | |
| number_of_users | Israel | 1 | 0.93 | 12.27 | 10.28 | 0.00 | 0.68 | 14.39 | 21.29 | 24.71 | ▇▂▂▂▇ |
| number_of_users | Italy | 2 | 0.86 | 9.89 | 8.51 | 0.00 | 1.29 | 9.88 | 17.50 | 21.92 | ▇▂▂▃▅ |
| number_of_users | Jamaica | 4 | 0.71 | 2.17 | 1.66 | 0.12 | 0.51 | 2.13 | 3.58 | 4.32 | ▇▅▂▂▇ |
| number_of_users | Japan | 1 | 0.93 | 13.42 | 10.13 | 0.03 | 3.02 | 15.31 | 22.15 | 26.71 | ▇▂▃▃▇ |
| number_of_users | Jordan | 4 | 0.71 | 1.23 | 1.35 | 0.01 | 0.12 | 0.66 | 2.17 | 3.44 | ▇▂▂▂▃ |
| number_of_users | Kazakhstan | 4 | 0.71 | 1.85 | 2.90 | 0.00 | 0.01 | 0.11 | 3.13 | 8.74 | ▇▁▂▁▁ |
| number_of_users | Kenya | 5 | 0.64 | 0.02 | 0.02 | 0.00 | 0.00 | 0.01 | 0.02 | 0.05 | ▇▃▂▁▃ |
| number_of_users | Kiribati | 10 | 0.29 | 0.22 | 0.45 | 0.00 | 0.00 | 0.00 | 0.22 | 0.90 | ▇▁▁▁▂ |
| number_of_users | Korea, Dem. Rep. | 2 | 0.86 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▁▁▇▁▁ |
| number_of_users | Korea, Rep. | 1 | 0.93 | 21.59 | 11.91 | 0.03 | 16.48 | 24.81 | 30.36 | 35.18 | ▃▂▂▆▇ |
| number_of_users | Kosovo | 14 | 0.00 | NaN | NaN | NA | NA | NA | NA | NA | |
| number_of_users | Kuwait | 4 | 0.71 | 1.10 | 0.52 | 0.25 | 0.69 | 1.19 | 1.53 | 1.70 | ▃▂▃▂▇ |
| number_of_users | Kyrgyzstan | 5 | 0.64 | 0.12 | 0.14 | 0.00 | 0.04 | 0.05 | 0.28 | 0.36 | ▇▁▁▂▁ |
| number_of_users | Laos | 4 | 0.71 | 0.05 | 0.07 | 0.00 | 0.00 | 0.01 | 0.10 | 0.19 | ▇▁▂▁▁ |
| number_of_users | Latvia | 1 | 0.93 | 6.26 | 8.08 | 0.00 | 0.14 | 2.12 | 14.09 | 19.42 | ▇▁▁▁▃ |
| number_of_users | Lebanon | 4 | 0.71 | 3.13 | 1.82 | 0.00 | 1.83 | 3.92 | 4.67 | 4.73 | ▃▂▂▂▇ |
| number_of_users | Lesotho | 5 | 0.64 | 0.01 | 0.01 | 0.00 | 0.00 | 0.00 | 0.01 | 0.02 | ▇▃▁▁▃ |
| number_of_users | Liberia | 8 | 0.43 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▇▁▁▂▅ |
| number_of_users | Libya | 6 | 0.57 | 0.40 | 0.48 | 0.00 | 0.00 | 0.16 | 0.82 | 1.15 | ▇▁▁▂▃ |
| number_of_users | Liechtenstein | 5 | 0.64 | 32.90 | 23.44 | 4.27 | 13.80 | 28.58 | 55.18 | 63.83 | ▇▂▅▁▇ |
| number_of_users | Lithuania | 1 | 0.93 | 7.12 | 7.74 | 0.00 | 0.07 | 3.76 | 15.04 | 20.81 | ▇▁▁▂▂ |
| number_of_users | Luxembourg | 1 | 0.93 | 13.05 | 13.52 | 0.00 | 0.28 | 7.97 | 26.81 | 33.21 | ▇▁▁▁▅ |
| number_of_users | Macao, China | 3 | 0.79 | 13.50 | 9.31 | 0.86 | 4.91 | 14.13 | 22.65 | 24.15 | ▆▃▂▂▇ |
| number_of_users | Macedonia, FYR | 5 | 0.64 | 4.36 | 5.04 | 0.00 | 0.00 | 1.79 | 8.82 | 12.47 | ▇▂▁▂▃ |
| number_of_users | Madagascar | 4 | 0.71 | 0.01 | 0.01 | 0.00 | 0.00 | 0.00 | 0.02 | 0.03 | ▇▂▂▂▃ |
| number_of_users | Malawi | 5 | 0.64 | 0.01 | 0.01 | 0.00 | 0.00 | 0.00 | 0.02 | 0.03 | ▇▂▂▂▂ |
| number_of_users | Malaysia | 1 | 0.93 | 2.16 | 2.56 | 0.00 | 0.02 | 0.99 | 3.79 | 7.32 | ▇▂▁▁▂ |
| number_of_users | Maldives | 1 | 0.93 | 1.68 | 2.10 | 0.00 | 0.00 | 0.25 | 3.41 | 4.99 | ▇▁▁▁▃ |
| number_of_users | Mali | 4 | 0.71 | 0.01 | 0.01 | 0.00 | 0.00 | 0.01 | 0.02 | 0.02 | ▇▁▁▂▆ |
| number_of_users | Malta | 3 | 0.79 | 13.19 | 9.75 | 0.43 | 5.08 | 12.73 | 21.72 | 28.02 | ▇▂▃▂▆ |
| number_of_users | Marshall Islands | 6 | 0.57 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▁▁▇▁▁ |
| number_of_users | Mauritania | 4 | 0.71 | 0.07 | 0.09 | 0.00 | 0.00 | 0.02 | 0.16 | 0.19 | ▇▁▁▁▃ |
| number_of_users | Mauritius | 4 | 0.71 | 2.00 | 2.34 | 0.00 | 0.12 | 1.10 | 3.32 | 6.18 | ▇▃▂▁▃ |
| number_of_users | Mayotte | 12 | 0.14 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▁▁▇▁▁ |
| number_of_users | Mexico | 1 | 0.93 | 2.73 | 3.50 | 0.00 | 0.05 | 1.01 | 4.09 | 9.98 | ▇▁▁▁▂ |
| number_of_users | Micronesia, Fed. Sts. | 6 | 0.57 | 0.15 | 0.31 | 0.00 | 0.00 | 0.03 | 0.09 | 0.90 | ▇▁▁▁▁ |
| number_of_users | Moldova | 4 | 0.71 | 1.85 | 2.65 | 0.01 | 0.03 | 0.45 | 2.79 | 7.55 | ▇▁▁▁▁ |
| number_of_users | Monaco | 14 | 0.00 | NaN | NaN | NA | NA | NA | NA | NA | |
| number_of_users | Mongolia | 4 | 0.71 | 0.57 | 0.88 | 0.00 | 0.02 | 0.10 | 0.98 | 2.60 | ▇▁▂▁▁ |
| number_of_users | Montenegro | 8 | 0.43 | 4.32 | 3.61 | 0.00 | 1.56 | 4.01 | 7.58 | 8.42 | ▇▃▁▃▇ |
| number_of_users | Morocco | 4 | 0.71 | 0.85 | 0.72 | 0.00 | 0.06 | 1.05 | 1.53 | 1.56 | ▆▁▂▁▇ |
| number_of_users | Mozambique | 5 | 0.64 | 0.02 | 0.03 | 0.00 | 0.00 | 0.00 | 0.05 | 0.06 | ▇▁▂▂▃ |
| number_of_users | Myanmar | 3 | 0.79 | 0.01 | 0.01 | 0.00 | 0.00 | 0.00 | 0.02 | 0.03 | ▇▁▁▁▂ |
| number_of_users | Namibia | 4 | 0.71 | 0.05 | 0.13 | 0.00 | 0.00 | 0.01 | 0.01 | 0.42 | ▇▁▁▁▁ |
| number_of_users | Nepal | 4 | 0.71 | 0.03 | 0.06 | 0.00 | 0.00 | 0.00 | 0.04 | 0.20 | ▇▂▁▁▁ |
| number_of_users | Netherlands | 2 | 0.86 | 20.43 | 14.88 | 0.48 | 6.16 | 22.41 | 34.04 | 38.10 | ▆▂▂▂▇ |
| number_of_users | New Caledonia | 1 | 0.93 | 4.75 | 5.57 | 0.00 | 0.06 | 2.24 | 8.38 | 15.46 | ▇▁▂▁▂ |
| number_of_users | New Zealand | 1 | 0.93 | 8.98 | 9.88 | 0.00 | 0.44 | 4.69 | 20.17 | 24.93 | ▇▁▁▁▅ |
| number_of_users | Nicaragua | 3 | 0.79 | 0.33 | 0.32 | 0.01 | 0.06 | 0.19 | 0.57 | 0.82 | ▇▂▃▂▃ |
| number_of_users | Niger | 4 | 0.71 | 0.00 | 0.01 | 0.00 | 0.00 | 0.00 | 0.00 | 0.02 | ▇▁▁▁▁ |
| number_of_users | Nigeria | 5 | 0.64 | 0.02 | 0.03 | 0.00 | 0.00 | 0.00 | 0.04 | 0.06 | ▇▁▂▂▃ |
| number_of_users | Northern Mariana Islands | 5 | 0.64 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▁▁▇▁▁ |
| number_of_users | Norway | 2 | 0.86 | 17.66 | 14.17 | 0.00 | 3.88 | 18.03 | 31.14 | 35.26 | ▇▂▂▃▇ |
| number_of_users | Oman | 4 | 0.71 | 0.66 | 0.65 | 0.00 | 0.01 | 0.67 | 1.12 | 1.63 | ▇▂▃▂▃ |
| number_of_users | Pakistan | 5 | 0.64 | 0.07 | 0.11 | 0.00 | 0.00 | 0.02 | 0.09 | 0.31 | ▇▁▁▁▁ |
| number_of_users | Palau | 5 | 0.64 | 0.48 | 0.35 | 0.00 | 0.37 | 0.50 | 0.55 | 1.17 | ▃▂▇▁▂ |
| number_of_users | Panama | 4 | 0.71 | 3.05 | 2.99 | 0.26 | 0.49 | 1.98 | 5.44 | 7.84 | ▇▁▃▂▃ |
| number_of_users | Papua New Guinea | 4 | 0.71 | 0.02 | 0.03 | 0.00 | 0.00 | 0.00 | 0.03 | 0.09 | ▇▁▁▁▁ |
| number_of_users | Paraguay | 3 | 0.79 | 0.12 | 0.13 | 0.00 | 0.01 | 0.09 | 0.17 | 0.44 | ▇▅▃▁▂ |
| number_of_users | Peru | 1 | 0.93 | 1.15 | 1.18 | 0.00 | 0.09 | 0.84 | 2.02 | 3.14 | ▇▁▂▁▃ |
| number_of_users | Philippines | 1 | 0.93 | 0.47 | 0.70 | 0.00 | 0.01 | 0.11 | 0.56 | 1.88 | ▇▁▁▁▂ |
| number_of_users | Poland | 1 | 0.93 | 4.63 | 5.38 | 0.00 | 0.03 | 2.29 | 10.45 | 12.99 | ▇▁▁▁▃ |
| number_of_users | Portugal | 1 | 0.93 | 8.24 | 7.20 | 0.00 | 0.96 | 7.98 | 14.26 | 19.30 | ▇▂▃▅▃ |
| number_of_users | Puerto Rico | 4 | 0.71 | 5.25 | 5.08 | 0.06 | 1.61 | 3.43 | 9.24 | 13.86 | ▇▆▁▂▃ |
| number_of_users | Qatar | 1 | 0.93 | 3.22 | 3.61 | 0.00 | 0.00 | 1.53 | 7.38 | 8.84 | ▇▁▁▁▅ |
| number_of_users | Romania | 4 | 0.71 | 5.56 | 5.73 | 0.03 | 0.59 | 3.40 | 10.91 | 13.90 | ▇▂▁▂▅ |
| number_of_users | Russia | 1 | 0.93 | 2.62 | 3.84 | 0.00 | 0.00 | 0.47 | 3.45 | 11.08 | ▇▁▁▁▂ |
| number_of_users | Rwanda | 4 | 0.71 | 0.01 | 0.01 | 0.00 | 0.00 | 0.01 | 0.02 | 0.03 | ▇▁▇▂▇ |
| number_of_users | Saint Kitts and Nevis | 5 | 0.64 | 15.47 | 9.27 | 1.07 | 9.06 | 17.67 | 21.73 | 28.08 | ▅▂▂▇▅ |
| number_of_users | Saint Lucia | 5 | 0.64 | 5.67 | 4.24 | 0.00 | 2.34 | 4.99 | 9.09 | 11.60 | ▇▇▃▇▇ |
| number_of_users | Saint Martin | 14 | 0.00 | NaN | NaN | NA | NA | NA | NA | NA | |
| number_of_users | Saint Vincent and the Grenadines | 1 | 0.93 | 3.83 | 4.29 | 0.00 | 0.08 | 1.22 | 7.31 | 11.47 | ▇▁▁▂▂ |
| number_of_users | Samoa | 4 | 0.71 | 0.05 | 0.04 | 0.00 | 0.00 | 0.05 | 0.08 | 0.11 | ▇▂▂▂▆ |
| number_of_users | San Marino | 6 | 0.57 | 12.41 | 12.76 | 2.07 | 3.92 | 4.99 | 19.75 | 32.03 | ▇▁▂▁▃ |
| number_of_users | Sao Tome and Principe | 5 | 0.64 | 0.07 | 0.13 | 0.00 | 0.00 | 0.00 | 0.08 | 0.35 | ▇▁▁▁▁ |
| number_of_users | Saudi Arabia | 2 | 0.86 | 1.57 | 2.10 | 0.00 | 0.14 | 0.29 | 2.83 | 5.45 | ▇▁▁▁▂ |
| number_of_users | Senegal | 4 | 0.71 | 0.24 | 0.22 | 0.00 | 0.04 | 0.21 | 0.38 | 0.63 | ▇▂▃▃▂ |
| number_of_users | Serbia | 8 | 0.43 | 5.43 | 4.19 | 0.45 | 2.33 | 5.32 | 7.61 | 11.77 | ▇▃▃▃▃ |
| number_of_users | Seychelles | 4 | 0.71 | 2.27 | 2.40 | 0.00 | 0.11 | 2.03 | 3.31 | 7.22 | ▇▁▅▂▂ |
| number_of_users | Sierra Leone | 8 | 0.43 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▁▁▇▁▁ |
| number_of_users | Singapore | 1 | 0.93 | 12.19 | 8.95 | 0.25 | 3.65 | 13.08 | 19.53 | 24.99 | ▇▃▂▆▆ |
| number_of_users | Slovak Republic | 4 | 0.71 | 5.37 | 4.99 | 0.00 | 0.68 | 4.51 | 9.40 | 12.79 | ▇▂▂▃▃ |
| number_of_users | Slovenia | 4 | 0.71 | 12.04 | 8.93 | 0.28 | 3.62 | 11.89 | 20.05 | 24.02 | ▇▂▅▂▇ |
| number_of_users | Solomon Islands | 4 | 0.71 | 0.15 | 0.15 | 0.00 | 0.01 | 0.12 | 0.27 | 0.38 | ▇▃▂▂▃ |
| number_of_users | Somalia | 6 | 0.57 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | ▁▁▇▁▁ |
| number_of_users | South Africa | 5 | 0.64 | 0.59 | 0.50 | 0.01 | 0.13 | 0.70 | 0.87 | 1.49 | ▇▂▇▂▂ |
| number_of_users | Spain | 2 | 0.86 | 10.50 | 8.67 | 0.00 | 2.55 | 9.78 | 18.32 | 22.87 | ▇▃▂▃▆ |
| number_of_users | Sri Lanka | 4 | 0.71 | 0.31 | 0.38 | 0.00 | 0.04 | 0.11 | 0.45 | 1.09 | ▇▁▁▁▁ |
| number_of_users | Sudan | 4 | 0.71 | 0.10 | 0.15 | 0.00 | 0.00 | 0.00 | 0.11 | 0.38 | ▇▂▁▁▂ |
| number_of_users | Suriname | 4 | 0.71 | 0.75 | 0.96 | 0.00 | 0.05 | 0.37 | 1.04 | 2.99 | ▇▂▁▁▁ |
| number_of_users | Swaziland | 1 | 0.93 | 0.03 | 0.06 | 0.00 | 0.00 | 0.00 | 0.00 | 0.15 | ▇▁▁▁▂ |
| number_of_users | Sweden | 1 | 0.93 | 17.49 | 12.96 | 0.00 | 6.60 | 15.68 | 30.34 | 31.85 | ▃▃▁▁▇ |
| number_of_users | Switzerland | 1 | 0.93 | 17.20 | 14.68 | 0.00 | 1.94 | 16.61 | 31.53 | 37.16 | ▇▂▂▃▆ |
| number_of_users | Syria | 4 | 0.71 | 0.06 | 0.11 | 0.00 | 0.00 | 0.02 | 0.05 | 0.33 | ▇▁▁▁▁ |
| number_of_users | Tajikistan | 7 | 0.50 | 0.03 | 0.03 | 0.00 | 0.00 | 0.05 | 0.06 | 0.07 | ▆▁▁▁▇ |
| number_of_users | Tanzania | 4 | 0.71 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.01 | 0.01 | ▇▁▂▃▆ |
| number_of_users | Thailand | 4 | 0.71 | 0.63 | 1.46 | 0.00 | 0.00 | 0.05 | 0.15 | 4.61 | ▇▁▁▁▁ |
| number_of_users | Timor-Leste | 4 | 0.71 | 0.01 | 0.02 | 0.00 | 0.00 | 0.00 | 0.01 | 0.04 | ▇▁▁▁▂ |
| number_of_users | Togo | 4 | 0.71 | 0.02 | 0.02 | 0.00 | 0.00 | 0.00 | 0.03 | 0.06 | ▇▁▁▁▁ |
| number_of_users | Tonga | 4 | 0.71 | 0.50 | 0.38 | 0.00 | 0.10 | 0.63 | 0.75 | 0.97 | ▆▂▁▇▃ |
| number_of_users | Trinidad and Tobago | 4 | 0.71 | 3.21 | 4.13 | 0.00 | 0.13 | 1.19 | 5.48 | 10.81 | ▇▁▁▁▂ |
| number_of_users | Tunisia | 3 | 0.79 | 1.08 | 1.63 | 0.00 | 0.00 | 0.18 | 1.57 | 4.57 | ▇▁▁▁▁ |
| number_of_users | Turkey | 1 | 0.93 | 3.17 | 3.87 | 0.00 | 0.02 | 0.86 | 6.79 | 9.73 | ▇▁▁▁▃ |
| number_of_users | Turkmenistan | 11 | 0.21 | 0.01 | 0.01 | 0.00 | 0.01 | 0.01 | 0.01 | 0.01 | ▇▁▁▇▇ |
| number_of_users | Turks and Caicos Islands | 14 | 0.00 | NaN | NaN | NA | NA | NA | NA | NA | |
| number_of_users | Tuvalu | 5 | 0.64 | 1.51 | 1.40 | 0.00 | 0.00 | 1.55 | 2.77 | 3.26 | ▇▁▂▂▆ |
| number_of_users | Uganda | 4 | 0.71 | 0.02 | 0.05 | 0.00 | 0.00 | 0.00 | 0.01 | 0.16 | ▇▁▁▁▁ |
| number_of_users | Ukraine | 5 | 0.64 | 1.91 | 2.30 | 0.00 | 0.00 | 1.11 | 3.46 | 6.44 | ▇▂▂▂▂ |
| number_of_users | United Arab Emirates | 1 | 0.93 | 3.69 | 4.09 | 0.00 | 0.27 | 1.53 | 7.03 | 10.47 | ▇▁▁▁▃ |
| number_of_users | United Kingdom | 3 | 0.79 | 15.55 | 12.32 | 0.09 | 3.76 | 16.44 | 26.86 | 31.46 | ▇▂▂▂▇ |
| number_of_users | United States | 1 | 0.93 | 13.59 | 10.13 | 0.26 | 4.49 | 12.76 | 23.31 | 27.71 | ▇▃▂▃▇ |
| number_of_users | Uruguay | 4 | 0.71 | 3.64 | 4.03 | 0.00 | 0.20 | 2.14 | 6.26 | 10.95 | ▇▂▂▂▃ |
| number_of_users | Uzbekistan | 4 | 0.71 | 0.10 | 0.13 | 0.00 | 0.01 | 0.03 | 0.20 | 0.32 | ▇▁▁▁▂ |
| number_of_users | Vanuatu | 4 | 0.71 | 0.07 | 0.08 | 0.00 | 0.01 | 0.04 | 0.08 | 0.21 | ▇▃▂▁▃ |
| number_of_users | Venezuela | 2 | 0.86 | 1.92 | 2.05 | 0.00 | 0.27 | 1.07 | 3.53 | 5.40 | ▇▂▁▁▃ |
| number_of_users | Vietnam | 4 | 0.71 | 1.28 | 1.62 | 0.00 | 0.02 | 0.44 | 2.19 | 4.18 | ▇▁▁▁▂ |
| number_of_users | Virgin Islands (U.S.) | 5 | 0.64 | 3.63 | 3.55 | 0.00 | 0.00 | 2.71 | 6.75 | 8.27 | ▇▂▁▂▆ |
| number_of_users | West Bank and Gaza | 7 | 0.50 | 0.34 | 0.56 | 0.00 | 0.00 | 0.00 | 0.47 | 1.45 | ▇▁▂▁▂ |
| number_of_users | Yemen, Rep. | 4 | 0.71 | 0.08 | 0.12 | 0.00 | 0.00 | 0.01 | 0.10 | 0.35 | ▇▁▁▁▁ |
| number_of_users | Zambia | 3 | 0.79 | 0.02 | 0.03 | 0.00 | 0.00 | 0.00 | 0.04 | 0.08 | ▇▂▁▁▂ |
| number_of_users | Zimbabwe | 4 | 0.71 | 0.11 | 0.08 | 0.01 | 0.06 | 0.08 | 0.14 | 0.26 | ▇▇▅▁▅ |
library(ggplot2)
#install.packages("ggrepel") - if needed
library(ggrepel)Warning: package 'ggrepel' was built under R version 3.6.3
ggplot(data_years, aes(x=year, y=number_of_users))+
geom_smooth(se = FALSE, lwd = .5) +
geom_line(aes(group=country, color=country))+
geom_point(aes(color=country),size=2)+
labs(x="Year",
y="Number of internet users per 100 people")+
guides(color=FALSE)+
ggtitle("Number of internet users per 100 people")`geom_smooth()` using method = 'loess' and formula 'y ~ x'
Warning: Removed 874 rows containing non-finite values (stat_smooth).
Warning: Removed 789 row(s) containing missing values (geom_path).
Warning: Removed 874 rows containing missing values (geom_point).
Recall the Task Menu:
# install.packages("gapminder") - if needed
library(gapminder)
summary(gapminder) country continent year lifeExp
Afghanistan: 12 Africa :624 Min. :1952 Min. :23.60
Albania : 12 Americas:300 1st Qu.:1966 1st Qu.:48.20
Algeria : 12 Asia :396 Median :1980 Median :60.71
Angola : 12 Europe :360 Mean :1980 Mean :59.47
Argentina : 12 Oceania : 24 3rd Qu.:1993 3rd Qu.:70.85
Australia : 12 Max. :2007 Max. :82.60
(Other) :1632
pop gdpPercap
Min. :6.001e+04 Min. : 241.2
1st Qu.:2.794e+06 1st Qu.: 1202.1
Median :7.024e+06 Median : 3531.8
Mean :2.960e+07 Mean : 7215.3
3rd Qu.:1.959e+07 3rd Qu.: 9325.5
Max. :1.319e+09 Max. :113523.1
gapminder %>%
group_by(continent) %>%
select(gdpPercap) %>%
summarise(min=min(gdpPercap), max=max(gdpPercap)) %>%
knitr::kable()Adding missing grouping variables: `continent`
| continent | min | max |
|---|---|---|
| Africa | 241.1659 | 21951.21 |
| Americas | 1201.6372 | 42951.65 |
| Asia | 331.0000 | 113523.13 |
| Europe | 973.5332 | 49357.19 |
| Oceania | 10039.5956 | 34435.37 |
ggplot(gapminder, aes(x=year, y=gdpPercap))+
geom_smooth(se = FALSE, lwd = .5) +
geom_line(aes(group=continent, color=continent))+
geom_point(aes(color=continent),size=2)+
labs(x="Year",
y="GDP Per Capita")+
ggtitle("Changes in GDP per capita over time on all continents")`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
## Changes in GDP per capita in all countries over time
ggplot(gapminder, aes(x=year, y=gdpPercap))+
geom_smooth(se = FALSE, lwd = .5) +
geom_line(aes(group=country, color=country))+
geom_point(aes(color=country),size=2)+
labs(x="Year",
y="GDP Per Capita")+
guides(color=FALSE)+
ggtitle("Changes in GDP per capita in all countries over times")`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
gapminder %>%
group_by(continent, country) %>%
select(gdpPercap) %>%
summarise(min=min(gdpPercap), max=max(gdpPercap)) %>%
knitr::kable()Adding missing grouping variables: `continent`, `country`
| continent | country | min | max |
|---|---|---|---|
| Africa | Algeria | 2449.0082 | 6223.3675 |
| Africa | Angola | 2277.1409 | 5522.7764 |
| Africa | Benin | 949.4991 | 1441.2849 |
| Africa | Botswana | 851.2411 | 12569.8518 |
| Africa | Burkina Faso | 543.2552 | 1217.0330 |
| Africa | Burundi | 339.2965 | 631.6999 |
| Africa | Cameroon | 1172.6677 | 2602.6642 |
| Africa | Central African Republic | 706.0165 | 1193.0688 |
| Africa | Chad | 797.9081 | 1704.0637 |
| Africa | Comoros | 986.1479 | 1937.5777 |
| Africa | Congo, Dem. Rep. | 241.1659 | 905.8602 |
| Africa | Congo, Rep. | 2125.6214 | 4879.5075 |
| Africa | Cote d’Ivoire | 1388.5947 | 2602.7102 |
| Africa | Djibouti | 1895.0170 | 3694.2124 |
| Africa | Egypt | 1418.8224 | 5581.1810 |
| Africa | Equatorial Guinea | 375.6431 | 12154.0897 |
| Africa | Eritrea | 328.9406 | 913.4708 |
| Africa | Ethiopia | 362.1463 | 690.8056 |
| Africa | Gabon | 4293.4765 | 21745.5733 |
| Africa | Gambia | 485.2307 | 884.7553 |
| Africa | Ghana | 847.0061 | 1327.6089 |
| Africa | Guinea | 510.1965 | 945.5836 |
| Africa | Guinea-Bissau | 299.8503 | 838.1240 |
| Africa | Kenya | 853.5409 | 1463.2493 |
| Africa | Lesotho | 298.8462 | 1569.3314 |
| Africa | Liberia | 414.5073 | 803.0055 |
| Africa | Libya | 2387.5481 | 21951.2118 |
| Africa | Madagascar | 894.6371 | 1748.5630 |
| Africa | Malawi | 369.1651 | 759.3499 |
| Africa | Mali | 452.3370 | 1042.5816 |
| Africa | Mauritania | 743.1159 | 1803.1515 |
| Africa | Mauritius | 1967.9557 | 10956.9911 |
| Africa | Morocco | 1566.3535 | 3820.1752 |
| Africa | Mozambique | 389.8762 | 823.6856 |
| Africa | Namibia | 2423.7804 | 4811.0604 |
| Africa | Niger | 580.3052 | 1054.3849 |
| Africa | Nigeria | 1014.5141 | 2013.9773 |
| Africa | Reunion | 2718.8853 | 7670.1226 |
| Africa | Rwanda | 493.3239 | 881.5706 |
| Africa | Sao Tome and Principe | 860.7369 | 1890.2181 |
| Africa | Senegal | 1367.8994 | 1712.4721 |
| Africa | Sierra Leone | 574.6482 | 1465.0108 |
| Africa | Somalia | 882.0818 | 1450.9925 |
| Africa | South Africa | 4725.2955 | 9269.6578 |
| Africa | Sudan | 1492.1970 | 2602.3950 |
| Africa | Swaziland | 1148.3766 | 4513.4806 |
| Africa | Tanzania | 698.5356 | 1107.4822 |
| Africa | Togo | 859.8087 | 1649.6602 |
| Africa | Tunisia | 1395.2325 | 7092.9230 |
| Africa | Uganda | 617.7244 | 1056.3801 |
| Africa | Zambia | 1071.3538 | 1777.0773 |
| Africa | Zimbabwe | 406.8841 | 799.3622 |
| Americas | Argentina | 5911.3151 | 12779.3796 |
| Americas | Bolivia | 2127.6863 | 3822.1371 |
| Americas | Brazil | 2108.9444 | 9065.8008 |
| Americas | Canada | 11367.1611 | 36319.2350 |
| Americas | Chile | 3939.9788 | 13171.6388 |
| Americas | Colombia | 2144.1151 | 7006.5804 |
| Americas | Costa Rica | 2627.0095 | 9645.0614 |
| Americas | Cuba | 5180.7559 | 8948.1029 |
| Americas | Dominican Republic | 1397.7171 | 6025.3748 |
| Americas | Ecuador | 3522.1107 | 7429.4559 |
| Americas | El Salvador | 3048.3029 | 5728.3535 |
| Americas | Guatemala | 2428.2378 | 5186.0500 |
| Americas | Haiti | 1201.6372 | 2011.1595 |
| Americas | Honduras | 2194.9262 | 3548.3308 |
| Americas | Jamaica | 2898.5309 | 7433.8893 |
| Americas | Mexico | 3478.1255 | 11977.5750 |
| Americas | Nicaragua | 2170.1517 | 5486.3711 |
| Americas | Panama | 2480.3803 | 9809.1856 |
| Americas | Paraguay | 1952.3087 | 4258.5036 |
| Americas | Peru | 3758.5234 | 7408.9056 |
| Americas | Puerto Rico | 3081.9598 | 19328.7090 |
| Americas | Trinidad and Tobago | 3023.2719 | 18008.5092 |
| Americas | United States | 13990.4821 | 42951.6531 |
| Americas | Uruguay | 5444.6196 | 10611.4630 |
| Americas | Venezuela | 7689.7998 | 13143.9510 |
| Asia | Afghanistan | 635.3414 | 978.0114 |
| Asia | Bahrain | 9867.0848 | 29796.0483 |
| Asia | Bangladesh | 630.2336 | 1391.2538 |
| Asia | Cambodia | 368.4693 | 1713.7787 |
| Asia | China | 400.4486 | 4959.1149 |
| Asia | Hong Kong, China | 3054.4212 | 39724.9787 |
| Asia | India | 546.5657 | 2452.2104 |
| Asia | Indonesia | 749.6817 | 3540.6516 |
| Asia | Iran | 3035.3260 | 11888.5951 |
| Asia | Iraq | 3076.2398 | 14688.2351 |
| Asia | Israel | 4086.5221 | 25523.2771 |
| Asia | Japan | 3216.9563 | 31656.0681 |
| Asia | Jordan | 1546.9078 | 4519.4612 |
| Asia | Korea, Dem. Rep. | 1088.2778 | 4106.5253 |
| Asia | Korea, Rep. | 1030.5922 | 23348.1397 |
| Asia | Kuwait | 28118.4300 | 113523.1329 |
| Asia | Lebanon | 4834.8041 | 10461.0587 |
| Asia | Malaysia | 1810.0670 | 12451.6558 |
| Asia | Mongolia | 786.5669 | 3095.7723 |
| Asia | Myanmar | 331.0000 | 944.0000 |
| Asia | Nepal | 545.8657 | 1091.3598 |
| Asia | Oman | 1828.2303 | 22316.1929 |
| Asia | Pakistan | 684.5971 | 2605.9476 |
| Asia | Philippines | 1272.8810 | 3190.4810 |
| Asia | Saudi Arabia | 6459.5548 | 34167.7626 |
| Asia | Singapore | 2315.1382 | 47143.1796 |
| Asia | Sri Lanka | 1072.5466 | 3970.0954 |
| Asia | Syria | 1643.4854 | 4184.5481 |
| Asia | Taiwan | 1206.9479 | 28718.2768 |
| Asia | Thailand | 757.7974 | 7458.3963 |
| Asia | Vietnam | 605.0665 | 2441.5764 |
| Asia | West Bank and Gaza | 1515.5923 | 7110.6676 |
| Asia | Yemen, Rep. | 781.7176 | 2280.7699 |
| Europe | Albania | 1601.0561 | 5937.0295 |
| Europe | Austria | 6137.0765 | 36126.4927 |
| Europe | Belgium | 8343.1051 | 33692.6051 |
| Europe | Bosnia and Herzegovina | 973.5332 | 7446.2988 |
| Europe | Bulgaria | 2444.2866 | 10680.7928 |
| Europe | Croatia | 3119.2365 | 14619.2227 |
| Europe | Czech Republic | 6876.1403 | 22833.3085 |
| Europe | Denmark | 9692.3852 | 35278.4187 |
| Europe | Finland | 6424.5191 | 33207.0844 |
| Europe | France | 7029.8093 | 30470.0167 |
| Europe | Germany | 7144.1144 | 32170.3744 |
| Europe | Greece | 3530.6901 | 27538.4119 |
| Europe | Hungary | 5263.6738 | 18008.9444 |
| Europe | Iceland | 7267.6884 | 36180.7892 |
| Europe | Ireland | 5210.2803 | 40675.9964 |
| Europe | Italy | 4931.4042 | 28569.7197 |
| Europe | Montenegro | 2647.5856 | 11732.5102 |
| Europe | Netherlands | 8941.5719 | 36797.9333 |
| Europe | Norway | 10095.4217 | 49357.1902 |
| Europe | Poland | 4029.3297 | 15389.9247 |
| Europe | Portugal | 3068.3199 | 20509.6478 |
| Europe | Romania | 3144.6132 | 10808.4756 |
| Europe | Serbia | 3581.4594 | 15870.8785 |
| Europe | Slovak Republic | 5074.6591 | 18678.3144 |
| Europe | Slovenia | 4215.0417 | 25768.2576 |
| Europe | Spain | 3834.0347 | 28821.0637 |
| Europe | Sweden | 8527.8447 | 33859.7484 |
| Europe | Switzerland | 14734.2327 | 37506.4191 |
| Europe | Turkey | 1969.1010 | 8458.2764 |
| Europe | United Kingdom | 9979.5085 | 33203.2613 |
| Oceania | Australia | 10039.5956 | 34435.3674 |
| Oceania | New Zealand | 10556.5757 | 25185.0091 |
| ## Changes i | n GDP in on all continents | over time |
ggplot(gapminder, aes(x=year, y=gdpPercap))+
geom_smooth(se = FALSE, lwd = .5) +
geom_line(aes(group=continent, color=continent))+
geom_point(aes(color=continent),size=2)+
labs(x="Year",
y="GDP per capita")+
ggtitle("GDP changes over years on all continents")`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
gapminder %>%
group_by(continent, country) %>%
select(lifeExp) %>%
summarise(min=min(lifeExp), max=max(lifeExp)) %>%
knitr::kable()Adding missing grouping variables: `continent`, `country`
| continent | country | min | max |
|---|---|---|---|
| Africa | Algeria | 43.077 | 72.301 |
| Africa | Angola | 30.015 | 42.731 |
| Africa | Benin | 38.223 | 56.728 |
| Africa | Botswana | 46.634 | 63.622 |
| Africa | Burkina Faso | 31.975 | 52.295 |
| Africa | Burundi | 39.031 | 49.580 |
| Africa | Cameroon | 38.523 | 54.985 |
| Africa | Central African Republic | 35.463 | 50.485 |
| Africa | Chad | 38.092 | 51.724 |
| Africa | Comoros | 40.715 | 65.152 |
| Africa | Congo, Dem. Rep. | 39.143 | 47.804 |
| Africa | Congo, Rep. | 42.111 | 57.470 |
| Africa | Cote d’Ivoire | 40.477 | 54.655 |
| Africa | Djibouti | 34.812 | 54.791 |
| Africa | Egypt | 41.893 | 71.338 |
| Africa | Equatorial Guinea | 34.482 | 51.579 |
| Africa | Eritrea | 35.928 | 58.040 |
| Africa | Ethiopia | 34.078 | 52.947 |
| Africa | Gabon | 37.003 | 61.366 |
| Africa | Gambia | 30.000 | 59.448 |
| Africa | Ghana | 43.149 | 60.022 |
| Africa | Guinea | 33.609 | 56.007 |
| Africa | Guinea-Bissau | 32.500 | 46.388 |
| Africa | Kenya | 42.270 | 59.339 |
| Africa | Lesotho | 42.138 | 59.685 |
| Africa | Liberia | 38.480 | 46.027 |
| Africa | Libya | 42.723 | 73.952 |
| Africa | Madagascar | 36.681 | 59.443 |
| Africa | Malawi | 36.256 | 49.420 |
| Africa | Mali | 33.685 | 54.467 |
| Africa | Mauritania | 40.543 | 64.164 |
| Africa | Mauritius | 50.986 | 72.801 |
| Africa | Morocco | 42.873 | 71.164 |
| Africa | Mozambique | 31.286 | 46.344 |
| Africa | Namibia | 41.725 | 61.999 |
| Africa | Niger | 37.444 | 56.867 |
| Africa | Nigeria | 36.324 | 47.472 |
| Africa | Reunion | 52.724 | 76.442 |
| Africa | Rwanda | 23.599 | 46.242 |
| Africa | Sao Tome and Principe | 46.471 | 65.528 |
| Africa | Senegal | 37.278 | 63.062 |
| Africa | Sierra Leone | 30.331 | 42.568 |
| Africa | Somalia | 32.978 | 48.159 |
| Africa | South Africa | 45.009 | 61.888 |
| Africa | Sudan | 38.635 | 58.556 |
| Africa | Swaziland | 39.613 | 58.474 |
| Africa | Tanzania | 41.215 | 52.517 |
| Africa | Togo | 38.596 | 58.420 |
| Africa | Tunisia | 44.600 | 73.923 |
| Africa | Uganda | 39.978 | 51.542 |
| Africa | Zambia | 39.193 | 51.821 |
| Africa | Zimbabwe | 39.989 | 62.351 |
| Americas | Argentina | 62.485 | 75.320 |
| Americas | Bolivia | 40.414 | 65.554 |
| Americas | Brazil | 50.917 | 72.390 |
| Americas | Canada | 68.750 | 80.653 |
| Americas | Chile | 54.745 | 78.553 |
| Americas | Colombia | 50.643 | 72.889 |
| Americas | Costa Rica | 57.206 | 78.782 |
| Americas | Cuba | 59.421 | 78.273 |
| Americas | Dominican Republic | 45.928 | 72.235 |
| Americas | Ecuador | 48.357 | 74.994 |
| Americas | El Salvador | 45.262 | 71.878 |
| Americas | Guatemala | 42.023 | 70.259 |
| Americas | Haiti | 37.579 | 60.916 |
| Americas | Honduras | 41.912 | 70.198 |
| Americas | Jamaica | 58.530 | 72.567 |
| Americas | Mexico | 50.789 | 76.195 |
| Americas | Nicaragua | 42.314 | 72.899 |
| Americas | Panama | 55.191 | 75.537 |
| Americas | Paraguay | 62.649 | 71.752 |
| Americas | Peru | 43.902 | 71.421 |
| Americas | Puerto Rico | 64.280 | 78.746 |
| Americas | Trinidad and Tobago | 59.100 | 69.862 |
| Americas | United States | 68.440 | 78.242 |
| Americas | Uruguay | 66.071 | 76.384 |
| Americas | Venezuela | 55.088 | 73.747 |
| Asia | Afghanistan | 28.801 | 43.828 |
| Asia | Bahrain | 50.939 | 75.635 |
| Asia | Bangladesh | 37.484 | 64.062 |
| Asia | Cambodia | 31.220 | 59.723 |
| Asia | China | 44.000 | 72.961 |
| Asia | Hong Kong, China | 60.960 | 82.208 |
| Asia | India | 37.373 | 64.698 |
| Asia | Indonesia | 37.468 | 70.650 |
| Asia | Iran | 44.869 | 70.964 |
| Asia | Iraq | 45.320 | 65.044 |
| Asia | Israel | 65.390 | 80.745 |
| Asia | Japan | 63.030 | 82.603 |
| Asia | Jordan | 43.158 | 72.535 |
| Asia | Korea, Dem. Rep. | 50.056 | 70.647 |
| Asia | Korea, Rep. | 47.453 | 78.623 |
| Asia | Kuwait | 55.565 | 77.588 |
| Asia | Lebanon | 55.928 | 71.993 |
| Asia | Malaysia | 48.463 | 74.241 |
| Asia | Mongolia | 42.244 | 66.803 |
| Asia | Myanmar | 36.319 | 62.069 |
| Asia | Nepal | 36.157 | 63.785 |
| Asia | Oman | 37.578 | 75.640 |
| Asia | Pakistan | 43.436 | 65.483 |
| Asia | Philippines | 47.752 | 71.688 |
| Asia | Saudi Arabia | 39.875 | 72.777 |
| Asia | Singapore | 60.396 | 79.972 |
| Asia | Sri Lanka | 57.593 | 72.396 |
| Asia | Syria | 45.883 | 74.143 |
| Asia | Taiwan | 58.500 | 78.400 |
| Asia | Thailand | 50.848 | 70.616 |
| Asia | Vietnam | 40.412 | 74.249 |
| Asia | West Bank and Gaza | 43.160 | 73.422 |
| Asia | Yemen, Rep. | 32.548 | 62.698 |
| Europe | Albania | 55.230 | 76.423 |
| Europe | Austria | 66.800 | 79.829 |
| Europe | Belgium | 68.000 | 79.441 |
| Europe | Bosnia and Herzegovina | 53.820 | 74.852 |
| Europe | Bulgaria | 59.600 | 73.005 |
| Europe | Croatia | 61.210 | 75.748 |
| Europe | Czech Republic | 66.870 | 76.486 |
| Europe | Denmark | 70.780 | 78.332 |
| Europe | Finland | 66.550 | 79.313 |
| Europe | France | 67.410 | 80.657 |
| Europe | Germany | 67.500 | 79.406 |
| Europe | Greece | 65.860 | 79.483 |
| Europe | Hungary | 64.030 | 73.338 |
| Europe | Iceland | 72.490 | 81.757 |
| Europe | Ireland | 66.910 | 78.885 |
| Europe | Italy | 65.940 | 80.546 |
| Europe | Montenegro | 59.164 | 75.445 |
| Europe | Netherlands | 72.130 | 79.762 |
| Europe | Norway | 72.670 | 80.196 |
| Europe | Poland | 61.310 | 75.563 |
| Europe | Portugal | 59.820 | 78.098 |
| Europe | Romania | 61.050 | 72.476 |
| Europe | Serbia | 57.996 | 74.002 |
| Europe | Slovak Republic | 64.360 | 74.663 |
| Europe | Slovenia | 65.570 | 77.926 |
| Europe | Spain | 64.940 | 80.941 |
| Europe | Sweden | 71.860 | 80.884 |
| Europe | Switzerland | 69.620 | 81.701 |
| Europe | Turkey | 43.585 | 71.777 |
| Europe | United Kingdom | 69.180 | 79.425 |
| Oceania | Australia | 69.120 | 81.235 |
| Oceania | New Zealand | 69.390 | 80.204 |
| ## Life expe | ctancy on all continents, a | ll countr | ies |
ggplot(gapminder, aes(x=year, y=lifeExp))+
geom_smooth(se = FALSE, lwd = .5) +
geom_line(aes(group=continent, color=continent))+
geom_point(aes(color=continent),size=2)+
labs(x="Year",
y="life expectancy")+
ggtitle("Life Expectancy changes over years in all countries")`geom_smooth()` using method = 'gam' and formula 'y ~ s(x, bs = "cs")'
* Report the absolute and/or relative abundance of countries with low life expectancy over time by continent: Compute some measure of worldwide life expectancy - you decide - a mean or median or some other quantile or perhaps your current age. Then determine how many countries on each continent have a life expectancy less than this benchmark, for each year.
life_under_fourty <- gapminder %>%
group_by(continent, country) %>%
select(lifeExp) %>%
filter(lifeExp<40)Adding missing grouping variables: `continent`, `country`
select(life_under_fourty, lifeExp) %>%
summarise(min=min(lifeExp), max=max(lifeExp)) %>%
knitr::kable()Adding missing grouping variables: `continent`, `country`
| continent | country | min | max |
|---|---|---|---|
| Africa | Angola | 30.015 | 39.942 |
| Africa | Benin | 38.223 | 38.223 |
| Africa | Burkina Faso | 31.975 | 37.814 |
| Africa | Burundi | 39.031 | 39.031 |
| Africa | Cameroon | 38.523 | 38.523 |
| Africa | Central African Republic | 35.463 | 39.475 |
| Africa | Chad | 38.092 | 39.881 |
| Africa | Congo, Dem. Rep. | 39.143 | 39.143 |
| Africa | Djibouti | 34.812 | 39.693 |
| Africa | Equatorial Guinea | 34.482 | 38.987 |
| Africa | Eritrea | 35.928 | 38.047 |
| Africa | Ethiopia | 34.078 | 36.667 |
| Africa | Gabon | 37.003 | 38.999 |
| Africa | Gambia | 30.000 | 38.308 |
| Africa | Guinea | 33.609 | 38.842 |
| Africa | Guinea-Bissau | 32.500 | 39.327 |
| Africa | Liberia | 38.480 | 39.486 |
| Africa | Madagascar | 36.681 | 38.865 |
| Africa | Malawi | 36.256 | 39.487 |
| Africa | Mali | 33.685 | 39.977 |
| Africa | Mozambique | 31.286 | 38.113 |
| Africa | Niger | 37.444 | 39.487 |
| Africa | Nigeria | 36.324 | 39.360 |
| Africa | Rwanda | 23.599 | 36.087 |
| Africa | Senegal | 37.278 | 39.329 |
| Africa | Sierra Leone | 30.331 | 39.897 |
| Africa | Somalia | 32.978 | 39.658 |
| Africa | Sudan | 38.635 | 39.624 |
| Africa | Swaziland | 39.613 | 39.613 |
| Africa | Togo | 38.596 | 38.596 |
| Africa | Uganda | 39.978 | 39.978 |
| Africa | Zambia | 39.193 | 39.193 |
| Africa | Zimbabwe | 39.989 | 39.989 |
| Americas | Haiti | 37.579 | 37.579 |
| Asia | Afghanistan | 28.801 | 39.854 |
| Asia | Bangladesh | 37.484 | 39.348 |
| Asia | Cambodia | 31.220 | 39.417 |
| Asia | India | 37.373 | 37.373 |
| Asia | Indonesia | 37.468 | 39.918 |
| Asia | Myanmar | 36.319 | 36.319 |
| Asia | Nepal | 36.157 | 39.393 |
| Asia | Oman | 37.578 | 37.578 |
| Asia | Saudi Arabia | 39.875 | 39.875 |
| Asia | Yemen, Rep. | 32.548 | 39.848 |
low_life_exp<-gapminder %>%
group_by(continent, country) %>%
select(lifeExp) %>%
filter(lifeExp<median(lifeExp))Adding missing grouping variables: `continent`, `country`
select(low_life_exp, lifeExp) %>%
summarise(min=min(lifeExp), max=max(lifeExp)) %>%
knitr::kable()Adding missing grouping variables: `continent`, `country`
| continent | country | min | max |
|---|---|---|---|
| Africa | Algeria | 43.077 | 58.01400 |
| Africa | Angola | 30.015 | 39.48300 |
| Africa | Benin | 38.223 | 49.19000 |
| Africa | Botswana | 46.634 | 52.55600 |
| Africa | Burkina Faso | 31.975 | 46.13700 |
| Africa | Burundi | 39.031 | 44.73600 |
| Africa | Cameroon | 38.523 | 49.35500 |
| Africa | Central African Republic | 35.463 | 43.45700 |
| Africa | Chad | 38.092 | 47.38300 |
| Africa | Comoros | 40.715 | 50.93900 |
| Africa | Congo, Dem. Rep. | 39.143 | 44.96600 |
| Africa | Congo, Rep. | 42.111 | 52.97000 |
| Africa | Cote d’Ivoire | 40.477 | 47.99100 |
| Africa | Djibouti | 34.812 | 46.51900 |
| Africa | Egypt | 41.893 | 53.31900 |
| Africa | Equatorial Guinea | 34.482 | 42.02400 |
| Africa | Eritrea | 35.928 | 44.14200 |
| Africa | Ethiopia | 34.078 | 44.51000 |
| Africa | Gabon | 37.003 | 52.79000 |
| Africa | Gambia | 30.000 | 41.84200 |
| Africa | Ghana | 43.149 | 51.75600 |
| Africa | Guinea | 33.609 | 40.76200 |
| Africa | Guinea-Bissau | 32.500 | 37.46500 |
| Africa | Kenya | 42.270 | 53.55900 |
| Africa | Lesotho | 42.138 | 48.49200 |
| Africa | Liberia | 38.480 | 42.22100 |
| Africa | Libya | 42.723 | 57.44200 |
| Africa | Madagascar | 36.681 | 46.88100 |
| Africa | Malawi | 36.256 | 43.76700 |
| Africa | Mali | 33.685 | 41.71400 |
| Africa | Mauritania | 40.543 | 50.85200 |
| Africa | Mauritius | 50.986 | 64.93000 |
| Africa | Morocco | 42.873 | 55.73000 |
| Africa | Mozambique | 31.286 | 42.08200 |
| Africa | Namibia | 41.725 | 52.90600 |
| Africa | Niger | 37.444 | 41.29100 |
| Africa | Nigeria | 36.324 | 44.51400 |
| Africa | Reunion | 52.724 | 67.06400 |
| Africa | Rwanda | 23.599 | 43.41300 |
| Africa | Sao Tome and Principe | 46.471 | 58.55000 |
| Africa | Senegal | 37.278 | 48.87900 |
| Africa | Sierra Leone | 30.331 | 36.78800 |
| Africa | Somalia | 32.978 | 40.97300 |
| Africa | South Africa | 45.009 | 53.36500 |
| Africa | Sudan | 38.635 | 47.80000 |
| Africa | Swaziland | 39.613 | 46.63300 |
| Africa | Tanzania | 41.215 | 48.46600 |
| Africa | Togo | 38.596 | 52.88700 |
| Africa | Tunisia | 44.600 | 59.83700 |
| Africa | Uganda | 39.978 | 48.05100 |
| Africa | Zambia | 39.193 | 46.02300 |
| Africa | Zimbabwe | 39.989 | 52.35800 |
| Americas | Argentina | 62.485 | 68.48100 |
| Americas | Bolivia | 40.414 | 50.02300 |
| Americas | Brazil | 50.917 | 61.48900 |
| Americas | Canada | 68.750 | 74.21000 |
| Americas | Chile | 54.745 | 67.05200 |
| Americas | Colombia | 50.643 | 63.83700 |
| Americas | Costa Rica | 57.206 | 70.75000 |
| Americas | Cuba | 59.421 | 72.64900 |
| Americas | Dominican Republic | 45.928 | 61.78800 |
| Americas | Ecuador | 48.357 | 61.31000 |
| Americas | El Salvador | 45.262 | 56.69600 |
| Americas | Guatemala | 42.023 | 56.02900 |
| Americas | Haiti | 37.579 | 49.92300 |
| Americas | Honduras | 41.912 | 57.40200 |
| Americas | Jamaica | 58.530 | 70.11000 |
| Americas | Mexico | 50.789 | 65.03200 |
| Americas | Nicaragua | 42.314 | 57.47000 |
| Americas | Panama | 55.191 | 68.68100 |
| Americas | Paraguay | 62.649 | 66.35300 |
| Americas | Peru | 43.902 | 58.44700 |
| Americas | Puerto Rico | 64.280 | 73.44000 |
| Americas | Trinidad and Tobago | 59.100 | 68.30000 |
| Americas | United States | 68.440 | 73.38000 |
| Americas | Uruguay | 66.071 | 69.48100 |
| Americas | Venezuela | 55.088 | 67.45600 |
| Asia | Afghanistan | 28.801 | 38.43800 |
| Asia | Bahrain | 50.939 | 65.59300 |
| Asia | Bangladesh | 37.484 | 46.92300 |
| Asia | Cambodia | 31.220 | 45.41500 |
| Asia | China | 44.000 | 63.96736 |
| Asia | Hong Kong, China | 60.960 | 73.60000 |
| Asia | India | 37.373 | 54.20800 |
| Asia | Indonesia | 37.468 | 52.70200 |
| Asia | Iran | 44.869 | 57.70200 |
| Asia | Iraq | 45.320 | 57.04600 |
| Asia | Israel | 65.390 | 73.06000 |
| Asia | Japan | 63.030 | 75.38000 |
| Asia | Jordan | 43.158 | 61.13400 |
| Asia | Korea, Dem. Rep. | 50.056 | 66.66200 |
| Asia | Korea, Rep. | 47.453 | 64.76600 |
| Asia | Kuwait | 55.565 | 69.34300 |
| Asia | Lebanon | 55.928 | 66.09900 |
| Asia | Malaysia | 48.463 | 65.25600 |
| Asia | Mongolia | 42.244 | 55.49100 |
| Asia | Myanmar | 36.319 | 56.05900 |
| Asia | Nepal | 36.157 | 46.74800 |
| Asia | Oman | 37.578 | 57.36700 |
| Asia | Pakistan | 43.436 | 54.04300 |
| Asia | Philippines | 47.752 | 60.06000 |
| Asia | Saudi Arabia | 39.875 | 58.69000 |
| Asia | Singapore | 60.396 | 70.79500 |
| Asia | Sri Lanka | 57.593 | 65.94900 |
| Asia | Syria | 45.883 | 61.19500 |
| Asia | Taiwan | 58.500 | 70.59000 |
| Asia | Thailand | 50.848 | 62.49400 |
| Asia | Vietnam | 40.412 | 55.76400 |
| Asia | West Bank and Gaza | 43.160 | 60.76500 |
| Asia | Yemen, Rep. | 32.548 | 44.17500 |
| Europe | Albania | 55.230 | 68.93000 |
| Europe | Austria | 66.800 | 72.17000 |
| Europe | Belgium | 68.000 | 72.80000 |
| Europe | Bosnia and Herzegovina | 53.820 | 69.86000 |
| Europe | Bulgaria | 59.600 | 70.81000 |
| Europe | Croatia | 61.210 | 70.46000 |
| Europe | Czech Republic | 66.870 | 70.71000 |
| Europe | Denmark | 70.780 | 74.63000 |
| Europe | Finland | 66.550 | 72.52000 |
| Europe | France | 67.410 | 73.83000 |
| Europe | Germany | 67.500 | 72.50000 |
| Europe | Greece | 65.860 | 73.68000 |
| Europe | Hungary | 64.030 | 69.50000 |
| Europe | Iceland | 72.490 | 76.11000 |
| Europe | Ireland | 66.910 | 72.03000 |
| Europe | Italy | 65.940 | 73.48000 |
| Europe | Montenegro | 59.164 | 73.06600 |
| Europe | Netherlands | 72.130 | 75.24000 |
| Europe | Norway | 72.670 | 75.37000 |
| Europe | Poland | 61.310 | 70.85000 |
| Europe | Portugal | 59.820 | 70.41000 |
| Europe | Romania | 61.050 | 69.36000 |
| Europe | Serbia | 57.996 | 70.16200 |
| Europe | Slovak Republic | 64.360 | 70.80000 |
| Europe | Slovenia | 65.570 | 70.97000 |
| Europe | Spain | 64.940 | 74.39000 |
| Europe | Sweden | 71.860 | 75.44000 |
| Europe | Switzerland | 69.620 | 75.39000 |
| Europe | Turkey | 43.585 | 59.50700 |
| Europe | United Kingdom | 69.180 | 72.76000 |
| Oceania | Australia | 69.120 | 73.49000 |
| Oceania | New Zealand | 69.390 | 72.22000 |
african_countries<-gapminder %>%
group_by(continent, country) %>%
filter(continent=="Africa")
select(african_countries, gdpPercap)%>%
summarise(min=min(gdpPercap), max=max(gdpPercap)) %>%
knitr::kable()Adding missing grouping variables: `continent`, `country`
| continent | country | min | max |
|---|---|---|---|
| Africa | Algeria | 2449.0082 | 6223.3675 |
| Africa | Angola | 2277.1409 | 5522.7764 |
| Africa | Benin | 949.4991 | 1441.2849 |
| Africa | Botswana | 851.2411 | 12569.8518 |
| Africa | Burkina Faso | 543.2552 | 1217.0330 |
| Africa | Burundi | 339.2965 | 631.6999 |
| Africa | Cameroon | 1172.6677 | 2602.6642 |
| Africa | Central African Republic | 706.0165 | 1193.0688 |
| Africa | Chad | 797.9081 | 1704.0637 |
| Africa | Comoros | 986.1479 | 1937.5777 |
| Africa | Congo, Dem. Rep. | 241.1659 | 905.8602 |
| Africa | Congo, Rep. | 2125.6214 | 4879.5075 |
| Africa | Cote d’Ivoire | 1388.5947 | 2602.7102 |
| Africa | Djibouti | 1895.0170 | 3694.2124 |
| Africa | Egypt | 1418.8224 | 5581.1810 |
| Africa | Equatorial Guinea | 375.6431 | 12154.0897 |
| Africa | Eritrea | 328.9406 | 913.4708 |
| Africa | Ethiopia | 362.1463 | 690.8056 |
| Africa | Gabon | 4293.4765 | 21745.5733 |
| Africa | Gambia | 485.2307 | 884.7553 |
| Africa | Ghana | 847.0061 | 1327.6089 |
| Africa | Guinea | 510.1965 | 945.5836 |
| Africa | Guinea-Bissau | 299.8503 | 838.1240 |
| Africa | Kenya | 853.5409 | 1463.2493 |
| Africa | Lesotho | 298.8462 | 1569.3314 |
| Africa | Liberia | 414.5073 | 803.0055 |
| Africa | Libya | 2387.5481 | 21951.2118 |
| Africa | Madagascar | 894.6371 | 1748.5630 |
| Africa | Malawi | 369.1651 | 759.3499 |
| Africa | Mali | 452.3370 | 1042.5816 |
| Africa | Mauritania | 743.1159 | 1803.1515 |
| Africa | Mauritius | 1967.9557 | 10956.9911 |
| Africa | Morocco | 1566.3535 | 3820.1752 |
| Africa | Mozambique | 389.8762 | 823.6856 |
| Africa | Namibia | 2423.7804 | 4811.0604 |
| Africa | Niger | 580.3052 | 1054.3849 |
| Africa | Nigeria | 1014.5141 | 2013.9773 |
| Africa | Reunion | 2718.8853 | 7670.1226 |
| Africa | Rwanda | 493.3239 | 881.5706 |
| Africa | Sao Tome and Principe | 860.7369 | 1890.2181 |
| Africa | Senegal | 1367.8994 | 1712.4721 |
| Africa | Sierra Leone | 574.6482 | 1465.0108 |
| Africa | Somalia | 882.0818 | 1450.9925 |
| Africa | South Africa | 4725.2955 | 9269.6578 |
| Africa | Sudan | 1492.1970 | 2602.3950 |
| Africa | Swaziland | 1148.3766 | 4513.4806 |
| Africa | Tanzania | 698.5356 | 1107.4822 |
| Africa | Togo | 859.8087 | 1649.6602 |
| Africa | Tunisia | 1395.2325 | 7092.9230 |
| Africa | Uganda | 617.7244 | 1056.3801 |
| Africa | Zambia | 1071.3538 | 1777.0773 |
| Africa | Zimbabwe | 406.8841 | 799.3622 |
ggplot(african_countries, aes(x=year, y=gdpPercap))+
geom_smooth(se = FALSE, lwd = .5) +
geom_line(aes(group=country, color=country))+
geom_point(aes(color=country),size=2)+
labs(x="Year",
y="GDP per capita")+
ggtitle("GDP changes over years in African countries")+
guides(color=FALSE)`geom_smooth()` using method = 'loess' and formula 'y ~ x'
ggplot(african_countries, aes(x=year, y=lifeExp))+
geom_smooth(se = FALSE, lwd = .5) +
geom_line(aes(group=continent, color=country))+
geom_point(aes(color=country),size=2)+
labs(x="Year",
y="life expectancy")+
ggtitle("Life Expectancy changes over years in African countries")+
guides(color=FALSE)`geom_smooth()` using method = 'loess' and formula 'y ~ x'
ggplot(african_countries, aes(x=gdpPercap, y=lifeExp))+
geom_smooth(se = FALSE, lwd = .5) +
geom_line(aes(group=continent, color=country))+
geom_point(aes(color=country),size=2)+
labs(x="GDP per capitar",
y="life expectancy")+
ggtitle("Correlation between GDP nad Life Expectancy in African countries")+
guides(color=FALSE)`geom_smooth()` using method = 'loess' and formula 'y ~ x'
African continent has been in the center of heated debates with respect to econimical equality, development and how it affects longevity as well as quality of life.Some African countries show significant econimical development and progress since 1960’s, couple of them peaked at 1980’s with the majority of African countries are staying in the lowest GDP per capita. The life expectancy also correlates with GDP and overall trend in African countries shows the life expectancy declining, as the GDP decreases, although for some countries, as GDP was increasing past 10000, the life expectancy went down.This points out to the fact that GDP can not be used as a sole predictor of life expectancy, but there might be some other social/political factors, which affect the life longevity in African countries.
european_countries<-gapminder %>%
group_by(continent, country) %>%
filter(continent=="Europe")
select(european_countries, gdpPercap)%>%
summarise(min=min(gdpPercap), max=max(gdpPercap)) %>%
knitr::kable()Adding missing grouping variables: `continent`, `country`
| continent | country | min | max |
|---|---|---|---|
| Europe | Albania | 1601.0561 | 5937.030 |
| Europe | Austria | 6137.0765 | 36126.493 |
| Europe | Belgium | 8343.1051 | 33692.605 |
| Europe | Bosnia and Herzegovina | 973.5332 | 7446.299 |
| Europe | Bulgaria | 2444.2866 | 10680.793 |
| Europe | Croatia | 3119.2365 | 14619.223 |
| Europe | Czech Republic | 6876.1403 | 22833.309 |
| Europe | Denmark | 9692.3852 | 35278.419 |
| Europe | Finland | 6424.5191 | 33207.084 |
| Europe | France | 7029.8093 | 30470.017 |
| Europe | Germany | 7144.1144 | 32170.374 |
| Europe | Greece | 3530.6901 | 27538.412 |
| Europe | Hungary | 5263.6738 | 18008.944 |
| Europe | Iceland | 7267.6884 | 36180.789 |
| Europe | Ireland | 5210.2803 | 40675.996 |
| Europe | Italy | 4931.4042 | 28569.720 |
| Europe | Montenegro | 2647.5856 | 11732.510 |
| Europe | Netherlands | 8941.5719 | 36797.933 |
| Europe | Norway | 10095.4217 | 49357.190 |
| Europe | Poland | 4029.3297 | 15389.925 |
| Europe | Portugal | 3068.3199 | 20509.648 |
| Europe | Romania | 3144.6132 | 10808.476 |
| Europe | Serbia | 3581.4594 | 15870.879 |
| Europe | Slovak Republic | 5074.6591 | 18678.314 |
| Europe | Slovenia | 4215.0417 | 25768.258 |
| Europe | Spain | 3834.0347 | 28821.064 |
| Europe | Sweden | 8527.8447 | 33859.748 |
| Europe | Switzerland | 14734.2327 | 37506.419 |
| Europe | Turkey | 1969.1010 | 8458.276 |
| Europe | United Kingdom | 9979.5085 | 33203.261 |
ggplot(european_countries, aes(x=year, y=gdpPercap))+
geom_smooth(se = FALSE, lwd = .5) +
geom_line(aes(group=country, color=country))+
geom_point(aes(color=country),size=2)+
labs(x="Year",
y="GDP per capita")+
ggtitle("GDP changes over years in European countries")+
guides(color=FALSE)`geom_smooth()` using method = 'loess' and formula 'y ~ x'
ggplot(european_countries, aes(x=year, y=lifeExp))+
geom_smooth(se = FALSE, lwd = .5) +
geom_line(aes(group=continent, color=country))+
geom_point(aes(color=country),size=2)+
labs(x="Year",
y="life expectancy")+
ggtitle("Life Expectancy changes over years in Europen countries")+
guides(color=FALSE)`geom_smooth()` using method = 'loess' and formula 'y ~ x'
ggplot(european_countries, aes(x=gdpPercap, y=lifeExp))+
geom_smooth(se = FALSE, lwd = .5) +
geom_line(aes(group=continent, color=country))+
geom_point(aes(color=country),size=2)+
labs(x="GDP per capitar",
y="life expectancy")+
ggtitle("Correlation between GDP and Life Expectancy in European countries")+
guides(color=FALSE)`geom_smooth()` using method = 'loess' and formula 'y ~ x'
The European countries went through a period of economical development and mostly steady increase in GDP per capita afte WWII. At the same time the life expectancy of people living in European countries also steadily increased. There appears to be a strong correlation between GDP and life expectancy.