Skip to content

Commit 95824ce

Browse files
authored
Merge pull request #2 from fhdsl/siteSetUp
setting up style and datat for anvil
2 parents 3533a5b + d5a3f3a commit 95824ce

File tree

13 files changed

+71
-512
lines changed

13 files changed

+71
-512
lines changed

_site.yml

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
1-
name: metricminer dashboard
1+
name: AnVIL Outreach Metric Dashboard
22
output_dir: 'docs'
33
navbar:
4-
title: metricminer dashboard
4+
title: AnVIL Outreach Metric Dashboard
55
left:
66
- text: Home
77
href: index.html
88
icon: fa-home
9-
- text: Calendly
10-
href: calendly.html
11-
icon: fa-calendar
129
- text: Citations
1310
href: citations.html
1411
icon: fa-scroll
15-
- text: CRAN
16-
href: cran.html
17-
icon: fa-r
12+
#- text: Bioconductor
13+
# href: bioconductor.html
14+
# icon: fa-r
1815
- text: GitHub
1916
href: github.html
2017
icon: fa-github
2118
- text: Google Analytics
2219
href: googleanalytics.html
2320
icon: fa-google
24-
#- text: Slido
25-
# href: slido.html
26-
# icon: a-square-poll-vertical
2721
- text: Youtube
2822
href: youtube.html
2923
icon: fa-play

bioconductor.Rmd

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
title: "Bioconductor"
3+
output:
4+
html_document:
5+
toc: true
6+
toc_float: true
7+
toc_collapsed: true
8+
date: "`r format(Sys.time(), '%d %B, %Y')`"
9+
---
10+
11+
## Preview
12+
13+
```{r, eval = FALSE, echo = FALSE, hide = TRUE, message = FALSE}
14+
library(tidyverse)
15+
16+
root_dir <- rprojroot::find_root(rprojroot::has_dir(".git"))
17+
yaml <- yaml::read_yaml(file.path(root_dir, "_config_automation.yml"))
18+
19+
## For github
20+
cran <- readr::read_tsv(file.path("metricminer_data", "cran", "cran.tsv"))
21+
```
22+
23+
Total Bioconductor downloads for all packages:
24+
25+
```{r, eval = FALSE}
26+
cran %>% dplyr::summarize(download_total = sum(count))
27+
```
28+
CRAN package downloads over time, summarized by month.
29+
30+
```{r, eval = FALSE, message = FALSE}
31+
cran_stats <- cran %>%
32+
separate(date, into=c("year", "month name", "day"), sep = "-") %>%
33+
unite("Month", c("year", "month name"), sep='-', remove=TRUE) %>%
34+
group_by(Month, package) %>%
35+
summarise(monthly_downloads = sum(count)) %>% #summarize monthly downloads by package
36+
filter(monthly_downloads > 0) #drop the 0's
37+
38+
ggplot(cran_stats, aes(Month, monthly_downloads, group=package, color = package)) +
39+
geom_line() +
40+
geom_point() +
41+
theme(panel.background = element_blank(), panel.grid = element_blank()) +
42+
theme(axis.text.x = element_text(angle = 90)) +
43+
labs(x = NULL,
44+
y = "Monthly Downloads",
45+
color = "R Packages")
46+
```

calendly.Rmd

Lines changed: 0 additions & 55 deletions
This file was deleted.

citations.Rmd

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ output:
88
date: "`r format(Sys.time(), '%d %B, %Y')`"
99
---
1010

11+
Currently this is capped at reporting 10 citations per paper. But this will be fixed soon.
12+
1113
## Preview
1214

1315
```{r, echo = FALSE, hide = TRUE, message = FALSE}
@@ -44,31 +46,3 @@ Column information:
4446
```{r, message = FALSE}
4547
knitr::kable(citations)
4648
```
47-
48-
## Setting up Citations
49-
50-
1. Go to: https://scholar.google.com/scholar
51-
2. Search for the paper you are looking for the citation count.
52-
3. Then click the `Cited by ___` button below the title of the paper
53-
4. Copy and paste this in the `_config_automation.yml` file in the `citation_papers` section.
54-
55-
```
56-
###### Citations ######
57-
refresh-citations: yes
58-
citation_papers: [
59-
"https://scholar.google.com/scholar?cites=6140457238337460780",
60-
"https://scholar.google.com/scholar?cites=15945159957067506879" ]
61-
citation_googlesheet:
62-
```
63-
- [ ] In the `_config_automation.yml` file, make sure that `refresh-citations` is set to "yes".
64-
- [ ] 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`.
65-
66-
67-
## Customizing Citation Data
68-
69-
In order to customize the data you are downloading from Google Scholar you can modify the
70-
`refresh-scripts/refresh-citations.R` script in your repository.
71-
72-
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.
73-
74-
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).

cran.Rmd

Lines changed: 0 additions & 73 deletions
This file was deleted.

github.Rmd

Lines changed: 13 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "GitHub"
3-
output:
3+
output:
44
html_document:
55
toc: true
66
toc_float: true
@@ -21,39 +21,35 @@ yaml <- yaml::read_yaml(file.path(root_dir, "_config_automation.yml"))
2121
## For github
2222
github_overall <- readr::read_tsv(file.path("metricminer_data", "github", "github.tsv"))
2323
github_timecourse <- readr::read_tsv(file.path("metricminer_data", "github", "github_timecourse.tsv"))
24-
25-
## For google
26-
# github_overall <- googlesheets4::read_sheet(yaml$github_googlesheet, sheet = "overall_stats")
27-
# github_timecourse <- googlesheets4::read_sheet(yaml$github_googlesheet, sheet = "timecourse")
2824
```
2925

3026
Contributions to a repository example:
3127

3228
```{r echo = FALSE, hide = TRUE, message=FALSE, warning = FALSE}
33-
github_overall %>%
34-
ggplot(aes(x = repo_name, y = total_contributions)) +
35-
geom_bar(stat = "identity", fill = "lavender") +
29+
github_overall %>%
30+
ggplot(aes(x = repo_name, y = total_contributions)) +
31+
geom_bar(stat = "identity", fill = "lavender") +
3632
theme_classic()
3733
```
3834

39-
Views of a GitHub Repository over time
35+
Views of a GitHub Repository over time
4036

4137
```{r echo = FALSE, hide = TRUE, message=FALSE}
42-
github_timecourse %>%
43-
ggplot(aes(x = timestamp, y = count_views, fill = repo, color = repo)) +
44-
geom_line(stat = "identity") +
45-
theme_classic() +
38+
github_timecourse %>%
39+
ggplot(aes(x = timestamp, y = count_views, fill = repo, color = repo)) +
40+
geom_line(stat = "identity") +
41+
theme_classic() +
4642
ylab("date")
4743
```
4844

49-
## Data information
45+
## Data information
5046

5147
Data information for `github overall data`:
5248

53-
- `num_forks` shows the number of times this repo has been forked. NA means it has never been forked.
49+
- `num_forks` shows the number of times this repo has been forked. NA means it has never been forked.
5450
- `num_contributors` how many people have contributed to this repo
5551
- `num_stars` how many people have starred this repo?
56-
- `health_percentage` what percentage of ["good software health" items as described by GitHub](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/about-community-profiles-for-public-repositories) does this repo have?
52+
- `health_percentage` what percentage of ["good software health" items as described by GitHub](https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/about-community-profiles-for-public-repositories) does this repo have?
5753

5854
```{r, message=FALSE}
5955
knitr::kable(github_overall)
@@ -62,36 +58,11 @@ knitr::kable(github_overall)
6258
Data information for `github timecourse`:
6359

6460
- `timestamp` shows the date the counts correspond to
65-
- `count_clones` tells the number of clones made on this day. NAs generally indicate no one cloned the repository that day.
61+
- `count_clones` tells the number of clones made on this day. NAs generally indicate no one cloned the repository that day.
6662
- `unique_clones` tells how many people did these clones come from? NAs generally indicate no one cloned the repository that day.
6763
- `count_views` how many views did the repo get on this day? NAs generally indicate no one viewed the repository that date
6864
- `unique_views` how many people were those views from? NAs generally indicate no one viewed the repository that date
6965

7066
```{r, message=FALSE}
7167
knitr::kable(github_timecourse)
7268
```
73-
74-
## Setting up GitHub
75-
76-
At this point you should already have your GitHub authorization set up for your metricminer dashboard by having [followed the instructions above.](#setting-up-your-dashboard-repository).
77-
78-
In the `_config_automation.yml` you will need to specify items in the GitHub section.
79-
```
80-
###### GitHub ######
81-
refresh-github: yes
82-
github_repos: [ fhdsl/metricminer, fhdsl/metricminer.org ]
83-
github_googlesheet:
84-
```
85-
86-
- [ ] In the `_config_automation.yml` file, make sure that `refresh-github` is set to "yes".
87-
- [ ] In `github_repos` of your `_config_automation.yml`, specify the names of the repositories you'd like to collect data from in `github_repos`. Make sure it includes the `owner/repository` e.g. `fhdsl/metricminer` not just `metricminer`. Commas need to separate the repositories. Delete the example repositories we put there.
88-
- [ ] Optionally, if you are saving data to Google, specify a googlesheet ID in `github_googlesheet` you'd like the GitHub data to be saved to. This will only be relevant if you've set `data_dest` to `google`.
89-
90-
## Customizing GitHub Data
91-
92-
In order to customize the data you are downloading from GitHub you can modify the
93-
`refresh-scripts/refresh-github.R` script in your repository.
94-
95-
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.
96-
97-
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).

0 commit comments

Comments
 (0)