Last active
January 2, 2017 05:44
-
-
Save tkb/6041457 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(WDI) | |
library(ggplot2) | |
#Grab GNI per capita data for Chile, Hungary and Uruguay | |
dat = WDI(indicator='NY.GNP.PCAP.CD', country=c('CL','HU','UY'), start=1960, end=2012) | |
#a quick plot with legend, title and lable | |
ggplot(dat, aes(year, NY.GNP.PCAP.CD, color=country)) + geom_line() | |
+ xlab('Year') + ylab('GDI per capita (Atlas Method USD)') | |
+ labs(title = "GNI Per Capita ($USD Atlas Method)") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment