Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Putting instructions in Rmds #15

Merged
merged 8 commits into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 20 additions & 3 deletions calendly.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ output: html_document
date: "`r format(Sys.time(), '%d %B, %Y')`"
---

## Setting up Calendly


## Preview

```{r, echo = FALSE, hide = TRUE}
Expand All @@ -23,3 +20,23 @@ calendly <- readr::read_tsv(file.path("metricminer_data", "calendly", "calendly.
```{r}
knitr::kable(calendly)
```

## Setting Up Calendly

1. To set up calendly authorization [go here](https://calendly.com/integrations/api_webhooks) and click "Generate Token".
2. Underneath "Choose a name for this token" pick a name that will remind you of this project.
3. Click "Create Token" and it will send you an authorization code to your email.
4. Click "Copy Token" and keep this handy.
5. Return to your metricminer dashboard repository and go to `Settings` > `Secrets and variables` > `Actions`.
6. Click on `New repository secret`. Name your new secret *exactly* `METRICMINER_CALENDLY`
7. Paste your token into the `Secret` box and then click the green "Add secret" button.

After you've set up authorization you'll need to check the following items in the `_config_automation.yml` file.

- [ ] In the `config_automation.yml` file, make sure that `refresh-calendly` is set to "yes".
- [ ] Optionally, if you are saving data to google, specify a googlesheet ID you'd like the CRAN data to be saved to. This will only be relevant if you've set `data_dest` to `google`.
```
###### Calendly ######
refresh-calendly: yes
calendly_googlesheet:
```
20 changes: 17 additions & 3 deletions citations.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ output: html_document
date: "`r format(Sys.time(), '%d %B, %Y')`"
---

## Setting up Citations


## Preview

```{r, echo = FALSE, hide = TRUE, message = FALSE}
Expand Down Expand Up @@ -42,3 +39,20 @@ citations %>%
count(original_paper)
```

## 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`.
18 changes: 15 additions & 3 deletions cran.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ output: html_document
date: "`r format(Sys.time(), '%d %B, %Y')`"
---

## Setting up CRAN


## Preview

```{r}
Expand Down Expand Up @@ -48,3 +45,18 @@ ggplot(cran_stats, aes(Month, monthly_downloads, group=package, color = package)
y = "Monthly Downloads",
color = "R Packages")
```

## Setting up CRAN

In the `_config_automation.yml` you will need to specify a few things.

```
###### CRAN ######
refresh-cran: yes
cran_packages: [ metricminer, ottrpal ]
cran_googlesheet:
```

- [ ] In the `config_automation.yml` file, make sure that `refresh-cran` is set to "yes".
- [ ] In the `cran_packages` of your `config_automation.yml`, type the names of the packages that you'd like to collect data from on CRAN. Type them exactly as they are spelled, case sensitive, separated by commas. Delete the example package names we've put there.
- [ ] Optionally, if you are saving data to google, specify a googlesheet ID in `cran_googlesheet` you'd like the CRAN data to be saved to. This will only be relevant if you've set `data_dest` to `google`.
18 changes: 16 additions & 2 deletions github.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ output: html_document
date: "`r format(Sys.time(), '%d %B, %Y')`"
---

## Setting up GitHub

## Preview

```{r, echo = FALSE, hide = TRUE}
Expand All @@ -22,3 +20,19 @@ github <- readr::read_tsv(file.path("metricminer_data", "github", "github_timeco
```{r}
knitr::kable(github)
```

### Setting up GitHub

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).

In the `_config_automation.yml` you will need to specify items in the GitHub section.
```
###### GitHub ######
refresh-github: yes
github_repos: [ fhdsl/metricminer, fhdsl/metricminer.org ]
github_googlesheet:
```

- [ ] In the `_config_automation.yml` file, make sure that `refresh-github` is set to "yes".
- [ ] 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.
- [ ] 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`.
29 changes: 29 additions & 0 deletions googleanalytics.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,32 @@ knitr::kable(ga_dimensions)
```{r}
knitr::kable(ga_link_clicks)
```

### Setting up Google Analytics

[Follow the steps from the above section to authenticate Google](#setting-up-google-authentication) -- make sure that the account you have authenticated for has access to the Google Analytics properties you wish to collect.

We'll need to collect the Google Analytics property IDs for the websites you want to retrieve data from.

1. Go to https://analytics.google.com/ -- You may have to login. These instructions are assuming you have already set up Google Analytics and have been collecting data.
2. Then click on the website at the top of the navbar. It will bring you to a dropdown that shows all your websites.

<img src = "resources/images/google-analytics-dropdown.png" width = "50%">

4 .Click on one of the websites where you'd like to retrieve data from. The URL will look something like this:
```
https://analytics.google.com/analytics/web/?authuser=1#/p<PROPERTY_ID_HERE>/reports/home
```
5. Copy the property id and put it in the `ga_property_ids:` part of the `_config_automation.yml`.

Repeat these same steps for all the properties you'd like to collect data for, separating the IDs by commas. Delete the example IDs we have put there as placeholders.

```
###### Google Analytics ######
refresh-ga: yes
ga_property_ids: [ 422671031, 422558989 ]
ga_googlesheet:
```

- [ ] In the `config_automation.yml` file, make sure that `refresh-ga` is set to "yes".
- [ ] Optionally, if you are saving data to Google, specify a googlesheet ID in `ga_googlesheet` you'd like the GitHub data to be saved to. This will only be relevant if you've set `data_dest` to `google`.
29 changes: 23 additions & 6 deletions googleforms.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ output: html_document
date: "`r format(Sys.time(), '%d %B, %Y')`"
---

## Setting up Google Forms

## Preview

## Preview

```{r, echo = FALSE, hide = TRUE}
Expand All @@ -18,12 +14,33 @@ yaml <- yaml::read_yaml(file.path(root_dir, "_config_automation.yml"))
googleform_1 <- readr::read_tsv(file.path("metricminer_data", "googleforms", "a_cool_survey.tsv"))
googleform_2 <- readr::read_tsv(file.path("metricminer_data", "googleforms", "another_even_cooler_survey.tsv"))

## For google

```

```{r}
googleform_1

googleform_2
```

## Setting up Google Forms

[Follow the steps from the above section to authenticate Google](#setting-up-google-authentication) -- make sure that the account you have authenticated for has access to the Google Forms you wish to collect.

Go to a form you'd like to collect data from. The URL should look something like this:
```
https://docs.google.com/forms/u/1/d/<GOOGLE_FORM_ID_HERE>/edit?usp=drive_web
```
Extract the Google Form ID from the URL and put it in the `google_forms` section of the `_config_automation.yml` file.
Do this for each form you'd like to collect data from and separate the form IDs with commas. Delete the example IDs we have put there as placeholders.

```
###### Google Forms ######
refresh-googleforms: yes
google_forms: [
1pbFfgUPYH2w9zEoCDjCa4HFOxzEhGOseufw28Xxmd-o,
1JjmsiuVoGSxvl-1M_oWittcftO955tijzeNc-cgJlo8 ]
googleforms_googlesheet:
```

- [ ] In the `config_automation.yml` file, make sure that `refresh-googleforms` is set to "yes".
- [ ] Optionally, if you are saving data to Google, specify a googlesheet ID in `googleforms_googlesheet` you'd like the GitHub data to be saved to. This will only be relevant if you've set `data_dest` to `google`.
23 changes: 18 additions & 5 deletions slido.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ output: html_document
date: "`r format(Sys.time(), '%d %B, %Y')`"
---

## Setting up Slido

## Preview

## Preview

```{r, echo = FALSE, hide = TRUE}
Expand All @@ -19,6 +15,23 @@ joined_participants <- readr::read_tsv(file.path("metricminer_data", "slido", "J
leaderboard <- readr::read_tsv(file.path("metricminer_data", "slido", "Leaderboard.tsv"))
polls <- readr::read_tsv(file.path("metricminer_data", "slido", "Polls-overall.tsv"))
questions <- readr::read_tsv(file.path("metricminer_data", "slido", "Questions.tsv"))
```

### Setting up Slido

This is assuming you have already exported Slido data to a google drive folder. See [Slido instructions here](https://community.slido.com/analytics-and-exports-44/export-your-questions-poll-results-quiz-leaderboard-and-ideas-532) for how to do that. Navigate to the Google Drive folder that has the Slidos you'd like to collect. Get the URL for this folder. It should look like this:

## For google
```
https://drive.google.com/drive/u/1/folders/<SOME_FOLDER_ID_HERE>
```

Put the folder id from this URL in your `drive_id:` category in the `_config_automation.yml` file.
```
###### Slido ######
refresh-slido: yes
drive_id: 1XWXHHyj32Uw_UyaUJrqp6S--hHnM0-7l
slido_googlesheet:
```

- [ ] In the `config_automation.yml` file, make sure that `refresh-slido` is set to "yes".
- [ ] Optionally, if you are saving data to Google, specify a googlesheet ID in `slido_googlesheet` that you'd like the GitHub data to be saved to. This will only be relevant if you've set `data_dest` to `google`.
23 changes: 21 additions & 2 deletions youtube.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ output: html_document
date: "`r format(Sys.time(), '%d %B, %Y')`"
---

## Setting up Youtube

## Preview

```{r, echo = FALSE, hide = TRUE}
Expand All @@ -21,3 +19,24 @@ youtube <- readr::read_tsv(file.path("metricminer_data", "youtube", "youtube.tsv
```{r}
knitr::kable(youtube)
```

### Setting up YouTube

[Follow the steps from the above section to authenticate Google](#setting-up-google-authentication) -- make sure that the account you have authenticated for has access to the YouTube you wish to collect.

Go to a video you'd like to collect data from. The URL should look something like this:
```
https://www.youtube.com/watch?v=<YOUTUBE_VIDEO_ID_HERE>
```
Extract the Youtube Video ID from the URL and put it in the `video_ids` section of the `_config_automation.yml` file. Delete the example IDs we have put there as placeholders.
Do this for each video you'd like to collect data from and separate the IDs with commas.

```
###### YouTube ######
refresh-youtube: yes
video_ids: [ XN_QPRrJZAw, YkYnni-WuaQ ]
youtube_googlesheet:
```

- [ ] In the `config_automation.yml` file, make sure that `refresh-slido` is set to "yes".
- [ ] Optionally, if you are saving data to Google, specify a googlesheet ID in `youtube_googlesheet` that you'd like the GitHub data to be saved to. This will only be relevant if you've set `data_dest` to `google`.
Loading