{"id":17270897,"url":"https://github.com/muschellij2/rscopus","last_synced_at":"2025-04-09T09:03:45.294Z","repository":{"id":45361585,"uuid":"44287888","full_name":"muschellij2/rscopus","owner":"muschellij2","description":"Scopus Database API Interface to R","archived":false,"fork":false,"pushed_at":"2025-04-01T16:19:49.000Z","size":1184,"stargazers_count":77,"open_issues_count":5,"forks_count":16,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-01T17:39:26.559Z","etag":null,"topics":["bibliometrics","scopus","scopus-api"],"latest_commit_sha":null,"homepage":"","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/muschellij2.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-15T02:06:02.000Z","updated_at":"2025-04-01T16:19:53.000Z","dependencies_parsed_at":"2024-01-29T21:27:14.314Z","dependency_job_id":"0da302fc-c05e-4ffb-92ea-a08ef7049f92","html_url":"https://github.com/muschellij2/rscopus","commit_stats":{"total_commits":254,"total_committers":3,"mean_commits":84.66666666666667,"dds":0.007874015748031482,"last_synced_commit":"bf144768698aaf48cb376bfaf626b01b87a70f73"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muschellij2%2Frscopus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muschellij2%2Frscopus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muschellij2%2Frscopus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muschellij2%2Frscopus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muschellij2","download_url":"https://codeload.github.com/muschellij2/rscopus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008628,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bibliometrics","scopus","scopus-api"],"created_at":"2024-10-15T08:21:38.550Z","updated_at":"2025-04-09T09:03:45.267Z","avatar_url":"https://github.com/muschellij2.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\nR Package to interface with Elsevier and Scopus APIs\n\n\u003c!-- ![Sticker](sticker.png) --\u003e\n\u003cimg src=\"sticker.png\" width=\"100\"\u003e\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/rscopus)](https://CRAN.R-project.org/package=rscopus)\n[![](https://cranlogs.r-pkg.org/badges/rscopus)](https://cran.rstudio.com/web/packages/rscopus/index.html)\n[![R-CMD-check](https://github.com/muschellij2/rscopus/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/muschellij2/rscopus/actions/workflows/R-CMD-check.yaml)\n\u003c!-- badges: end --\u003e\n\n```{r setup, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\"\n)\n```\n\n# rscopus\n\nThe goal of rscopus is to provide an R Scopus Database 'API' Interface.\n\n## Installation\n\nYou can install `rscopus` from github with:\n\n```{r gh-installation, eval = FALSE}\n# install.packages(\"devtools\")\ndevtools::install_github(\"muschellij2/rscopus\")\n```\n\n## Steps to get API key\n\nIn order to use this package, you need an API key from https://dev.elsevier.com/sc_apis.html.  You should login from your institution and go to Create API Key.  You need to provide a website URL and a label, but the website can be your personal website, and agree to the terms of service.  \n\n\n1.  Go to https://dev.elsevier.com/user/login. Login or create a free account.\n2.  Click \"Create API Key\".  Put in a label, such as `rscopus key`.  Add a website.  http://example.com is fine if you do not have a site.\n3.  **Read** and agree to the TOS if you do indeed agree.\n4.  Add `Elsevier_API = \"API KEY GOES HERE\"` to `~/.Renviron` file, or add `export Elsevier_API=API KEY GOES HERE` to your `~/.bash_profile`. \n\nAlternatively, you you can either set the API key using `rscopus::set_api_key` or by `options(\"elsevier_api_key\" = api_key)`.  You can access the API key using `rscopus::get_api_key`. \n\nYou should be able to test out the API key using the [interactive Scopus APIs](https://dev.elsevier.com/scopus.html).\n\n### A note about API keys and IP addresses\nThe API Key is bound to a set of IP addresses, usually bound to your institution.  Therefore, if you are using this for a Shiny application, you must host the Shiny application from your institution servers in some way.  Also, you cannot access the Scopus API with this key if you are offsite and must VPN into the server or use a computing cluster with an institution IP.\n\nSee https://dev.elsevier.com/tecdoc_api_authentication.html\n\n\n## Example\n\nThis is a basic example which shows you how to solve a common problem:\n\n```{r example, eval = TRUE, message=FALSE}\nlibrary(rscopus)\nlibrary(dplyr)\nif (rscopus::is_elsevier_authorized()) {\n  res = author_df(last_name = \"Muschelli\", first_name = \"John\", verbose = FALSE, general = FALSE)\n  names(res)\n  head(res[, c(\"title\", \"journal\", \"description\")])\n  unique(res$au_id)\n  unique(as.character(res$affilname_1))\n  \n  all_dat = author_data(last_name = \"Muschelli\", \n                        first_name = \"John\", verbose = FALSE, general = TRUE)\n  res2 = all_dat$df\n  res2 = res2 %\u003e% \n    rename(journal = `prism:publicationName`,\n           title = `dc:title`,\n           description = `dc:description`)\n  head(res[, c(\"title\", \"journal\", \"description\")])\n}\n```\n\n## Using an Institution Token\n\nAs per https://dev.elsevier.com/tecdoc_api_authentication.html: \"Using a proprietary token (an \"Institutional Token\") created for you by our integration support team\", so you need to contact Scopus to get one.  If you have one and it's located in an object called `token`, you should be able to use it as:\n\n```{r, eval = FALSE}\n# token is from Scopus dev\nhdr = inst_token_header(token)\nres = author_df(last_name = \"Muschelli\", first_name = \"John\", verbose = FALSE, general = FALSE, headers = hdr)\n```\n\nbut I have not tried it extensively.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuschellij2%2Frscopus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuschellij2%2Frscopus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuschellij2%2Frscopus/lists"}