knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

The dblp computer science bibliography at dblp.org provides open bibliographic information on major computer science journals and proceedings. Originally created at the University of Trier in 1993, dblp is now operated and further developed by Schloss Dagstuhl. This R package interfaces with the API, making data available to use from R.

Installation

You can install the development version of dblp from GitHub with:

#install.packages("devtools")
install_github("KTH-Library/dblp", dependencies = TRUE)

Example

This is a basic example which shows you how make a search :

library(dblp)
library(knitr)
library(stringr)
suppressPackageStartupMessages(library(dplyr))

# search for publications

dblp_search("quantum computer")$content %>%
  select(starts_with("info")) %>%
  mutate(result = paste(`info.title`, `info.ee`, `info.url`)) %>%
  select(result) %>%
  slice(1:5) %>%
  kable()

# crawl when there are many pages of results


search <- dblp_crawl("Royal Institute")$content

# display results
search %>%
  filter(str_detect(`info.ee`, "kth:diva")) %>%
  arrange(desc(`info.year`)) %>%
  # rename and order some named and indexed columns
  select(DOI = `info.doi`, 9:4) %>%
  # add a HTML link by combining title and use DOI for href
  mutate(link = sprintf("<a href='https://doi.org/%s'>%s...</a>", 
    DOI, str_sub(`info.title`, 1, 50))) %>%
  # pick out a few columns to display in a HTML table
  select(link, 1:4, -c("DOI", "info.ee"), `info.year`) %>%
  slice(1:5) %>%
  kable()

# search for venues

dblp_crawl("Europe", entity = "venues")$content %>%
  slice(1:5) %>%
  select(starts_with("info")) %>%
  kable()

# search for authors

dblp_crawl("maguire", entity = "authors")$content %>%
  select(starts_with("info")) %>%
  filter(stringr::str_starts(`info.author`, "Ger")) %>%
  kable()

Altmetric data for specific publication

How to retrieve Altmetric Count for a specific article using the Altmetric from the Altmetric Details Page - Counts Only API:

library(dblp)
library(dplyr)
library(knitr)
library(httr)

# DOIs found for a specific author
dois <- 
  dblp_search("Gerald Q. Maguire Jr.")$content %>% pull(`info.doi`)

# Pick one and retrieve Altmetric data from the
# Altmetric Details Page - Counts Only API
# https://docs.google.com/spreadsheets/d/1ndVY8Q2LOaZO_P_HDmSQulagjeUrS250mAL2N5V8GvY/edit#gid=0
# https://help.altmetric.com/support/solutions/articles/6000086844-sample-api-response

urls <- sprintf("https://api.altmetric.com/v1/doi/%s", dois)
resp <- GET(urls[6])
parsed <- content(resp)

link <- 
  sprintf("<a href='%s' title='%s'><img src='%s'></img>%s with DOI: %s</a>", 
        parsed$details_url, parsed$title, parsed$images$medium, parsed$title, parsed$doi)

We can now display a link to the Altmetric Details Page for this article:

cat(link)

Attribution for the above link:

Altmetrics data is provided by Altmetric.com, a research metrics company who track and collect the online conversations around millions of scholarly outputs. Altmetric continually monitors a variety of non-traditional sources to provide real-time updates on new mentions and shares of individual research outputs, which are collated and presented to users via the Altmetric details pages and badge visualisations. Each research output that Altmetric finds attention for is also given a score; a weighted count of the online attention it has received. Further information about how the Altmetric Attention Score is calculated is available here.



KTH-Library/dblp documentation built on Aug. 22, 2021, 10:55 a.m.