Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
14 lines (11 sloc) 329 Bytes
library(RCurl)
library(plyr)
library(XML)
save_year <- function(year) {
url <- "http://www.ssa.gov/cgi-bin/popularnames.cgi"
data <- postForm(url, style = "post",
"number" = "p", "top" = "1000", "year" = year)
writeLines(data, paste("original/", year, ".html", sep=""))
}
years <- 1880:2008
l_ply(years, save_year)