Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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