generated from jhudsl/OTTR_Template_Website
-
Notifications
You must be signed in to change notification settings - Fork 0
/
citations.Rmd
74 lines (55 loc) · 2.74 KB
/
citations.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
---
title: "Citations"
output:
html_document:
toc: true
toc_float: true
toc_collapsed: true
date: "`r format(Sys.time(), '%d %B, %Y')`"
---
## Preview
```{r, echo = FALSE, hide = TRUE, message = FALSE}
root_dir <- rprojroot::find_root(rprojroot::has_dir(".git"))
yaml <- yaml::read_yaml(file.path(root_dir, "_config_automation.yml"))
citations <- readr::read_tsv(file.path("metricminer_data", "citations", "citations.tsv"))
```
```{r, include = FALSE}
## For google
# citations <- googlesheets4::read_sheet(yaml$citations_googlesheet)
```
Here we show how to get the total counts per original paper:
```{r,message=FALSE}
library(dplyr)
# here we remove duplicates if there are any of the same titles of citing papers for each original paper and then get a count of the number of rows for each original paper (aka how many times it is cited)
citations %>%
distinct(original_paper, cite_titles, .keep_all = TRUE) %>%
count(original_paper)
```
## Data information
Column information:
- `original_paper` shows papers that we have captured citation information about
- `cite_titles` shows papers that cite the original paper
- `links`column shows the link for the paper that cites the original paper (the `cite_titles` papers).
```{r, message = FALSE}
knitr::kable(citations)
```
## Setting up Citations
1. Go to: https://scholar.google.com/scholar
2. Search for the paper you are looking for the citation count.
3. Then click the `Cited by ___` button below the title of the paper
4. Copy and paste this in the `_config_automation.yml` file in the `citation_papers` section.
```
###### Citations ######
refresh-citations: yes
citation_papers: [
"https://scholar.google.com/scholar?cites=6140457238337460780",
"https://scholar.google.com/scholar?cites=15945159957067506879" ]
citation_googlesheet:
```
- [ ] In the `config_automation.yml` file, make sure that `refresh-citations` is set to "yes".
- [ ] Optionally, if you are saving data to google, specify a googlesheet ID in `citation_googlesheet` if you'd like the citation data to be saved to. This will only be relevant if you've set `data_dest` to `google`.
## Customizing Citation Data
In order to customize the data you are downloading from Google Scholar you can modify the
`refresh-scripts/refresh-citations.R` script in your repository.
You can take a look at the [`metricminer` R package documentation](https://hutchdatascience.org/metricminer/articles/getting-started.html) for more details about the functions and what is possible.
If you have a metric need that is not currently fulfilled by `metricminer` or `metricminer-dashboard` we encourage you to [file a GitHub issue with us and let us know about your new feature idea (or bug report)](https://github.com/fhdsl/metricminer/issues/new/choose).