library(readr)
internet_readr <- read_csv("world_internet_usage.csv")
## Parsed with column specification:
## cols(
##   country = col_character(),
##   `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_double(),
##   `2012` = col_double()
## )
head(internet_readr)
## # A tibble: 6 x 14
##   country   `2000` `2001` `2002` `2003` `2004` `2005` `2006` `2007` `2008`
##   <chr>      <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>
## 1 China      1.78   2.64    4.60   6.20   7.30   8.52  10.5   16.0    22.6
## 2 Mexico     5.08   7.04   11.9   12.9   14.1   17.2   19.5   20.8    21.7
## 3 Panama     6.55   7.27    8.52   9.99  11.1   11.5   17.4   22.3    33.8
## 4 Senegal    0.400  0.980   1.01   2.10   4.39   4.79   5.61   7.70   10.6
## 5 Singapore 36.0   41.7    47.0   53.8   62.0   61.0   59.0   69.9    69.0
## 6 United A… 23.6   26.3    28.3   29.5   30.1   40.0   52.0   61.0    63.0
## # ... with 4 more variables: `2009` <dbl>, `2010` <dbl>, `2011` <dbl>,
## #   `2012` <dbl>
tidy_internet_readr <- 
internet_readr %>%
gather(`2000`,`2001`,`2002`,`2003`,`2004`,`2005`,`2006`,`2007`,`2008`,`2009`,`2010`,`2011`,`2012`, key="year", value="usage")

tidy_internet_readr
## # A tibble: 91 x 3
##    country              year   usage
##    <chr>                <chr>  <dbl>
##  1 China                2000   1.78 
##  2 Mexico               2000   5.08 
##  3 Panama               2000   6.55 
##  4 Senegal              2000   0.400
##  5 Singapore            2000  36.0  
##  6 United Arab Emirates 2000  23.6  
##  7 United States        2000  43.1  
##  8 China                2001   2.64 
##  9 Mexico               2001   7.04 
## 10 Panama               2001   7.27 
## # ... with 81 more rows
library(ggplot2)
g <- ggplot(tidy_internet_readr,aes(tidy_internet_readr$year, tidy_internet_readr$usage, group=country, color=country))
g + geom_line()+geom_point() + theme_economist() + labs(title = "Internet Usage per 100 people", x = "Year",y ="Usage")