The goal of petro.One is providing a reproducible platform for acquiring and analyzing metadata by searching papers on oil and gas from the OnePetro website.


The standard way of searching for papers in OnePetro is using a web browser entering the search terms for a particular paper we are looking for. The result will come as web pages containing dozens, hundreds or thousand of paper titles. We need to browse all the resulting pages to find the papers that have a good match with the subject we are researching. Although it has the capability to export to csv and xls files, they will need to be imported into another application to perform some analysis.

By using some statistical tools available through R, the search could turn in highly profitable in terms of time, matching quality and selection of the papers. The search keywords are entered thorugh the R console and the papers will return in a shape of a dataframe, which is identical to a spreadsheet: rows of paper titles and columns with details from the metadata extracted from the web page. With the dataframe already in our computers we could perform a thorough search and narrow down to the ideal papers for our research.


You can install petro.One from Github with:

Or, the latest development version with:

Or from CRAN with:


The package dependencies can be installed with:


Get the number of papers for the keyword neural network.

Let’s say we want to search the word neural network. How do we want to perform that search? Paper that contain the word neural or the word network, or papers that contain exactly the words neural network? In the former, we would use the option any, in the latter, all.

The option how = "any" means to search for papers that contain the word neural or the word network. Let’s take a look at the difference in returning results with any and how = all for the same keywords neural network. Here we make of use of two functions in petro.One: make_search_url() and get_papers_count().

Read papers from from_year to to_year

We can send a query where we specify the starting year and the ending year. In this example the option how = "all" means to search papers that contain exactly the words neural network as a difference to any which means search for any occurrence of the words. Of course, using any rather than all will yield many more results. We use two petro.One functions: make_search_url() to build the OnePetro search URL and onepetro_page_to_dataframe() to put the papers in a table.

And these are the terms that repeat more freqently:

Get papers by document type (dc_type)

We can also get paper by the type of document. In OnePetro it is called dc_type.

In this example we will be requesting only conference-paper type. Here we add to make_search_url() the parameter dc_type. Note also that we are adding another parameter rows to get 1000 rows instead of 10, 50 or 100 as the browser allows.

Only 4 on artificial intelligence from 1950 until 1980!

Finding the most frequent terms in well test

For this example we want to know about conference papers where the words well and test are found together in the papers.

Most frequent terms in well test

#> [1] 76
# plot most frequent terms
plot_bars(df, min.freq = min_freq)

How do the most frequent terms relate each other

Now, it is not enough for us to know what terms are the more repeating but how those freqent terms relate to each other. In the following plot you will see that the strength of the relationship between terms is reflected by the thickness of the connection lines.

plot_relationships(df, min.freq = min_freq, threshold = 0.075)

We can see that wells and well are connected strongly to horizontal, transient, pressure, flow, testing, reservoirs, fracture, and analysis. The rest of the words are frequent but not very much connected.


The summary functions allow us to group the papers by a preferred group:

  • by type of document
  • by publisher
  • by publication
  • by year

This will give you a summary of the count not the papers themselves.


my_url <- make_search_url(query = "artificial intelligence", 
                          how = "all")

By year of publication

name value
Since 2019 1
Since 2018 416
Since 2017 629
Since 2016 807
Since 2015 953
Since 2014 1056
Since 2013 1194
Since 2012 1324
Since 2011 1433
Since 2010 1549