Created
January 25, 2015 23:01
-
-
Save shawngraham/0907ab2c2185cfe9f91b 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
install.packages("devtools") | |
devtools::install_github("ropensci/rdpla") | |
library('rdpla') | |
mykey = "PUT YOUR KEY FROM DP.LA HERE" | |
# do a query; here we want ids which we can feed to wget | |
itemlist = items(key=mykey, q="science", date_before=1900, page_size=100, fields=c("id")) | |
# this will write the ids to a list; you'll need to open it in a spreadsheet, remove the first row if it's not an id | |
write.csv(itemlist $data, "itemlist.csv", row.names=FALSE) | |
# save the csv to txt (utf 8), then you can pass to wget as in Exercise 4 at | |
# https://github.com/hist3907b-winter2015/module2-findingdata/blob/master/m2-exercises.md | |
# knowing the dp.la URL structure - right? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment