Title: | Gathering Bibliographic Records from 'Digital Science Dimensions' Using 'DSL' API |
---|---|
Description: | A set of tools to extract bibliographic content from 'Digital Science Dimensions' using 'DSL' API <https://www.dimensions.ai/dimensions-apis/>. |
Authors: | Massimo Aria [cre, aut, cph] , Corrado Cuccurullo [aut] |
Maintainer: | Massimo Aria <[email protected]> |
License: | GPL-3 |
Version: | 0.0.3 |
Built: | 2024-11-05 04:28:07 UTC |
Source: | https://github.com/massimoaria/dimensionsr |
It gathers altemtric metadata from a DOI using Altmetric API (www.altmetric.com). A single research output may live online in multiple websites and can be talked about across dozens of different platforms.
Altmetric is a search engine which collects and collates all of this disparate information to obtain an informative view of the online activity surrounding your scholarly content.
altmetric(doi = "10.1016/j.joi.2017.08.007")
altmetric(doi = "10.1016/j.joi.2017.08.007")
doi |
is a character. It contains a list of DOIs. A DOI is a persistent identfier of a scholarly document. |
a data frame. Each row contains the full metadata record for each scholarly document.
For more extensive information about Altmetric, please visit: https://www.altmetric.com
## Not run: doi = "10.1016/j.joi.2017.08.007" df <- altmetric(doi = doi) ## End(Not run)
## Not run: doi = "10.1016/j.joi.2017.08.007" df <- altmetric(doi = doi) ## End(Not run)
It converts dimensions data, downloaded using DSL API, into a dataframe
dsApi2df(P, format = "bibliometrix")
dsApi2df(P, format = "bibliometrix")
P |
is a list in json dimensions structure downloaded using the function |
format |
is a character. If |
a dataframe containing bibliographic records or grants information.
To obtain a free access to Dimenions API fro no commercial use, please visit: https://ds.digital-science.com/NoCostAgreement
For more extensive information about dimensions API, please visit: https://www.dimensions.ai/dimensions-apis/
For more extensive information about bibliometrix R packagee, please visit: https://www.bibliometrix.org
# Example 1: Querying a collection of publications ## Not run: token <- dsAuth(username = "[email protected]", password = "mypassword") query <- dsQueryBuild(item = "publications", words = "bibliometric*", type = "article", categories = "management", start_year=1980,end_year = 2020) D <- dsApiRequest(token = token, query = query, limit = 50000) M <- dsApi2df(D) ## End(Not run) # Example 2: Querying a collection of grants ## Not run: token <- dsAuth(username = "[email protected]", password = "mypassword") query <- dsQueryBuild(item = "grants", words = "bibliometric*", type = "", categories = "management", start_year=1980,end_year = 2020) D <- dsApiRequest(token = token, query = query, limit = 50000) M <- dsApi2df(D) ## End(Not run)
# Example 1: Querying a collection of publications ## Not run: token <- dsAuth(username = "[email protected]", password = "mypassword") query <- dsQueryBuild(item = "publications", words = "bibliometric*", type = "article", categories = "management", start_year=1980,end_year = 2020) D <- dsApiRequest(token = token, query = query, limit = 50000) M <- dsApi2df(D) ## End(Not run) # Example 2: Querying a collection of grants ## Not run: token <- dsAuth(username = "[email protected]", password = "mypassword") query <- dsQueryBuild(item = "grants", words = "bibliometric*", type = "", categories = "management", start_year=1980,end_year = 2020) D <- dsApiRequest(token = token, query = query, limit = 50000) M <- dsApi2df(D) ## End(Not run)
It gathers bibliographic records from Digigtal Science Dimensions.
The function dsApiRequest
queries Dimensions using a DSL query formulated through the function dsQueryBuild
.
dsApiRequest( token, endpoint = "https://app.dimensions.ai/api/dsl.json", query, step = 100, limit = 50000, verbose = FALSE )
dsApiRequest( token, endpoint = "https://app.dimensions.ai/api/dsl.json", query, step = 100, limit = 50000, verbose = FALSE )
token |
is a character. It contains a valid token to query Dimensions database through DSL API. The token can be obtain using the function |
endpoint |
is a character. It contains the endpoint url of Dimensions API. Default is endpoint = "https://app.dimensions.ai/api/dsl.json". |
query |
is a character. It contains a search query formulated using the DSL API language. A query can be automatically generated using the function |
step |
is integer. It indicates the number of records to download at each API request. Default is |
limit |
is integer. It indicates the max number of records to download. limit cannot be higher than 50.000 (as stated by Dimensions rules). |
verbose |
is logical. |
a list cointaining bibliographic metadata downloaded from Dimensions.
To obtain a free access to Dimenions API for no commercial use, please visit: https://ds.digital-science.com/NoCostAgreement
For more extensive information about dimensions API, please visit: https://www.dimensions.ai/dimensions-apis/
## Not run: token <- dsAuth(username = "[email protected]", password = "mypassword") query <- dsQueryBuild(item = "publications", words = "bibliometric*", type = "article", categories = "management", start_year=1980,end_year = 2020) D <- dsApiRequest(token = token, query = query, limit = 50000) ## End(Not run)
## Not run: token <- dsAuth(username = "[email protected]", password = "mypassword") query <- dsQueryBuild(item = "publications", words = "bibliometric*", type = "article", categories = "management", start_year=1980,end_year = 2020) D <- dsApiRequest(token = token, query = query, limit = 50000) ## End(Not run)
It generates a token request to dimensions.ai using account and password.
dsAuth( username = NULL, password = NULL, key = NULL, auth_endpoint = "https://app.dimensions.ai/api/auth.json", verbose = FALSE )
dsAuth( username = NULL, password = NULL, key = NULL, auth_endpoint = "https://app.dimensions.ai/api/auth.json", verbose = FALSE )
username |
is a character. |
password |
is a character. |
key |
is a character. |
auth_endpoint |
is a character. It contains the authentication endpoint url of Dimensions. Default is auth_endpoint = "https://app.dimensions.ai/api/auth.json" |
verbose |
is logical. |
a character cointaining an token o use dimensions API.
To obtain a free access to Dimenions API fro no commercial use, please visit: https://ds.digital-science.com/NoCostAgreement
For more extensive information about Dimensions API, please visit: https://www.dimensions.ai/dimensions-apis/
# Obtain a token by username and password ## Not run: token <- dsAuth(username = "[email protected]", password = "mypassword") ## End(Not run) # Obtain a token by API Key ## Not run: token <- dsAuth(key = "myapikey") ## End(Not run)
# Obtain a token by username and password ## Not run: token <- dsAuth(username = "[email protected]", password = "mypassword") ## End(Not run) # Obtain a token by API Key ## Not run: token <- dsAuth(key = "myapikey") ## End(Not run)
Generate a DSL query from a set of parameters It generates a valid query, written following the Dimensions Search Language (DSL), from a set of search parameters.
dsQueryBuild( item = "publications", words = "bibliometric*", words_boolean_op = "OR", full.search = FALSE, type = "article", categories = "", output_fields = "basics + extras + categories + abstract", start_year = NULL, end_year = NULL )
dsQueryBuild( item = "publications", words = "bibliometric*", words_boolean_op = "OR", full.search = FALSE, type = "article", categories = "", output_fields = "basics + extras + categories + abstract", start_year = NULL, end_year = NULL )
item |
is a character. It indicates the type of document to search.
The argument can be equal to |
words |
is a character vector. It contains the search terms. |
words_boolean_op |
is character. It indicates which boolean operator have to be used to link words. It can be c("OR","AND"). Default is "OR". |
full.search |
is logical. If TRUE, full-text search finds all instances of a term (keyword) in a document, or group of documents. If False, the search finds all instances in titles and abstracts only. |
type |
is a character. It indicates the document type to include in the search. Default is |
categories |
is a character vector. It indicates the research categories to include in the search. If empty |
output_fields |
is a character. It contains fields which have to exported. Default is c("basics","extras","categories","abstract"). |
start_year |
is integer. It indicate the starting publication year of the search timespan. |
end_year |
is integer. It indicate the ending publication year of the search timespan. |
a character containing the query in DSL format.
For more extensive information about Dimensions Search Language (DSL), please visit: https://docs.dimensions.ai/dsl/
To obtain a free access to Dimenions API fro no commercial use, please visit: https://ds.digital-science.com/NoCostAgreement
## Not run: query <- dsQueryBuild(item = "publications", words = "bibliometric*", type = "article", categories = "management", start_year=1980,end_year = 2020) ## End(Not run)
## Not run: query <- dsQueryBuild(item = "publications", words = "bibliometric*", type = "article", categories = "management", start_year=1980,end_year = 2020) ## End(Not run)