-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.Rmd
137 lines (92 loc) · 3.65 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# publicationsscraper
<!-- badges: start -->
<!-- badges: end -->
# Research and CRAN Publications Retrieval Package
## Overview
The `publicationsscraper` R package offers tools to retrieve research publications from Google Scholar and ORCID, along with CRAN package download statistics. It is tailored for academic researchers in the EBS department who wish to consolidate and analyze their research outputs, while also monitoring their contributions to CRAN, including publication updates and downloads.
The main functions included are:
- `find_cran_packages`: Searches for CRAN packages by an author's first and last name and returns relevant package information such as the number of downloads and last update date.
- `get_publications`: Retrieves publications from both Google Scholar and ORCID based on provided IDs.
- `get_all_publications`: Retrieves publications from multiple authors.
- `cran_all_pubs`: Combines CRAN package data for multiple authors.
## Installation
To install this package, you can clone the repository and load the package using:
```r
# Clone the repository
git clone <https://github.com/numbats/achievement-scraper.git>
# Install required packages
install.packages(c("pkgsearch", "tibble", "dplyr", "stringr", "scholar", "rorcid"))
# Load the package
devtools::load_all()
```
## Functions
## 1. `find_cran_packages`
This function retrieves information about CRAN packages authored by a specified individual. It returns a data frame containing the package name, number of downloads, the authors, and the last update date.
```{r}
library(publicationsscraper)
find_cran_packages("Michael", "Lydeamore")
```
## 2. `get_publications`
This function retrieves research publications from Google Scholar and ORCID, combining the results into a single data frame. It allows for flexibility in querying either platform based on the availability of IDs.
```{r}
#Example 1: Retrieve publications from both ORCID and Google Scholar
get_publications("0000-0002-2140-5352", "vamErfkAAAAJ")
```
```{r}
#Example 2: Retrieve publications only from Google Scholar
get_publications(NA, "vamErfkAAAAJ")
```
```{r}
#Example 3: Retrieve publications only from ORCID
get_publications("0000-0002-2140-5352", NA)
```
## 3. `get_all_publications`
This function takes a data frame of authors, each with an ORCID ID and a Google Scholar ID, and returns their combined publications.
```{r}
authors_df <- tibble::tibble(
orcid_id = c("0000-0002-2140-5352", "0000-0002-1825-0097", NA, "0000-0001-5109-3700"),
scholar_id = c(NA, "vamErfkAAAAJ", "4bahYMkAAAAJ", NA)
)
get_all_publications(authors_df)
```
## 4. `cran_all_pubs
This function retrieves CRAN package download statistics for multiple authors by their first and last names.
```{r}
cran_authors <- tibble::tibble(
first_name = c("Michael", "Rob"),
last_name = c("Lydeamore", "Hyndman")
)
cran_all_pubs(cran_authors)
```
## Dataset
`orcid_gsid.csv`
This dataset contains mappings between researchers' names and their respective ORCID and Google Scholar IDs. It is useful for linking and identifying academic profiles across different platforms.
```{r}
print(orcid_gsid)
```
## Dependencies
This package relies on the following R packages:
- pkgsearch
- tibble
- dplyr
- stringr
- scholar
- rorcid
You can install these dependencies using install.packages()
```{r eval=FALSE}
install.packages(c("pkgsearch", "tibble", "dplyr", "stringr", "scholar", "rorcid"))
```
## License
MIT License