search_ieee: Automatic search on IEEE database

View source: R/Record_search.R

search_ieeeR Documentation

Automatic search on IEEE database

Description

Perform a search on https://ieeexplore.ieee.org/Xplore/home.jsp.

Usage

search_ieee(
  query,
  year_query = NULL,
  additional_fields = NULL,
  api_key = getOption("baysren.ieee_api_key"),
  allow_web_scraping = TRUE,
  wait_for = 20,
  record_limit = NULL
)

Arguments

query

A boolean query with AND/OR/NOT operators, brackets for term grouping and quotation marks for n-grams.

year_query

A year based filtering query. See clean_date_filter_arg() for more info.

additional_fields

Additional fields to add to the query. Will not be normalized, so it must already follow WOS specific syntax.

api_key

Necessary to use IEEE APIs. See details.

allow_web_scraping

If api_key is NULL, web scraping can be attempted to collect the records. This approach is not suggested in production and may fail with a large number of results. See Details.

wait_for

If web scraping is used, a certain amount of time is needed to let the IEEE page load completely before collecting the results. This delay depends on the user network and browser speed, thus the default 20 seconds may not be sufficient.

record_limit

A limit on the number of records collected.

Details

If an API key is available, the IEEE API will be used, otherwise Google Chrome APIs through the crrri package will be used to scrape records simulating a manual user search. This second method is not ensured to work and IEEE may blacklist your IP if abused.

Value

A data frame of records.

Examples

## Not run: 
# Initial query to be built on domain knowledge. It accepts OR, AND, NOT
# boolean operators and round brackets to group terms.
query <- '((model OR models OR modeling OR network OR networks) AND
(dissemination OR transmission OR spread OR diffusion) AND (nosocomial OR
hospital OR "long-term-care" OR "long term care" OR "longterm care" OR
"long-term care" OR "healthcare associated") AND (infection OR resistance OR
resistant))'

# Year filter. The framework converts it to the API-specific format seamlessly.
# common logical comparators can be used, i.e. <, <=, >, >=, while dashes
# denotes inclusive date intervals. A single year restricts results to one year
# period.
year_filter <- "2010-2020"

records <- search_ieee(query, year_filter)

## End(Not run)

bakaburg1/BaySREn documentation built on March 30, 2022, 12:16 a.m.