knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(milestones)
One common operation to find milestones of the history of discoveries is to obtain the generations of citations. Some terminology is useful here. Say you have a set of target papers whose history you want to study. These target papers are called G0 (for generation). Now, the papers cited by the papers in G0 is called G1. Similarly, the papers cited by the papers in G1 are called G2 and so forth.
If you have data obtained from Web of Science, cited references are included, so it's easy to identify the next generation. What this vignette shows you is how to use the package to generate the search query to obtain the records for the next generation on Web of Science. Repeating these steps you can obtain many generations (though the size of the generations grows quickly, it's usually impractical to go beyond the 3rd).
First, read in your G0 data (an example dataset is available with this package).
wos_records = system.file("extdata", "optogenetics-G0.txt", package = "milestones", mustWork = T) G0 = read_biblio_data(wos_records)
Now run the function make_wos_query:
make_wos_query(G0, next_name = "G1")
This will generate a bunch of text files in the working folder, which contain search queries that can be copied and pasted on Web of Science to obtain the papers cited by G0. They are divided in multiple files, depending on the size of the search, to avoid the length limits of the Web of Science interface.
Once you do the searches on Web of Science and download the records, you'd have G1. If needed, you could obtain G2 by repeating the steps above. Notice that Web of Science only exports records in parts of 500, so if the search returns more results, you'll have multiple files. The read_biblio_data function can handle this, as shown below.
wos_records = system.file("extdata", c("optogenetics-G1.txt", "optogenetics-G1-2.txt"), package = "milestones", mustWork = T) G1 = read_biblio_data(wos_records) make_wos_query(G1, next_name = "G2") # generates text files with the queries for G2
Notice that Web of Science sometimes throws an error because the search is badly formatted. In this case, I recommend breaking the search query in two, repeatedly (like a binary search), until you find the problem. The culprit is usually a parenthesis, a quotation mark or some other strange character contained in the title of some document in the query.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.