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

Initialize files #1

Merged
merged 4 commits into from
May 30, 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
39 changes: 0 additions & 39 deletions .github/switch_sync_repo.R

This file was deleted.

49 changes: 0 additions & 49 deletions .github/sync.yml

This file was deleted.

19 changes: 16 additions & 3 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,27 @@ jobs:
git merge -s recursive --strategy-option=theirs origin/${{ github.head_ref }} --allow-unrelated-histories
shell: bash

# Set up / install jq so that json credentials can be read in
- name: Install jq
uses: dcarbone/[email protected]

# We want a fresh run of the renders each time - so first delete old html files
- name: Delete old *.html
run: Rscript -e "rmarkdown::clean_site(preview = FALSE)"
run: Rscript -e "rmarkdown::clean_site(input = 'pages', preview = FALSE)"

# Now we want to render all the html files from the Rmd files
- name: Run render html
id: site
run: Rscript -e "rmarkdown::render_site()"
run: |
if [ ! -d .secrets ]; then
mkdir .secrets
fi
jq -n '${{ secrets.GS_SA_KEY }}' > .secrets/${{ secrets.GS_SA_FILENAME }}
if test -f .secrets/${{ secrets.GS_SA_FILENAME }}; then
echo "Key created!"
fi
Rscript --vanilla "resources/render.R"
rm -rf .secrets

# This checks on the steps before it and makes sure that they completed.
# If the renders didn't complete we don't want to commit the file changes
Expand All @@ -124,7 +137,7 @@ jobs:
echo "changes=$changes" >> $GITHUB_OUTPUT
git add . --force
git commit -m 'Render preview' || echo "No changes to commit"
git pull --set-upstream origin $branch_name --allow-unrelated-histories --strategy-option=ours
git pull --rebase --set-upstream origin $branch_name --allow-unrelated-histories --strategy-option=ours
git push --force || echo "No changes to commit"
shell: bash

Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/render-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,27 @@ jobs:
# use github PAT
token: ${{ secrets.GH_PAT }}

# Set up / install jq so that json credentials can be read in
- name: Install jq
uses: dcarbone/[email protected]

# We want a fresh run of the renders each time - so first delete old html files
- name: Delete old *.html
run: Rscript -e "rmarkdown::clean_site(preview = FALSE)"
run: Rscript -e "rmarkdown::clean_site(input = 'pages', preview = FALSE)"

# Now we want to render all the html files from the Rmd files
- name: Run render html
id: site
run: Rscript -e "rmarkdown::render_site()"
run: |
if [ ! -d .secrets ]; then
mkdir .secrets
fi
jq -n '${{ secrets.GS_SA_KEY }}' > .secrets/${{ secrets.GS_SA_FILENAME }}
if test -f .secrets/${{ secrets.GS_SA_FILENAME }}; then
echo "Key created!"
fi
Rscript --vanilla "resources/render.R"
rm -rf .secrets

# This checks on the steps before it and makes sure that they completed.
# If the renders didn't complete we don't want to commit the file changes
Expand All @@ -77,4 +90,6 @@ jobs:
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add --force docs/*
git commit -m 'Render site' || echo "No changes to commit"
git reset --hard HEAD
git pull --rebase --allow-unrelated-histories --strategy-option=ours
git push origin main || echo "No changes to push"
45 changes: 0 additions & 45 deletions .github/workflows/send-updates.yml

This file was deleted.

40 changes: 0 additions & 40 deletions .github/workflows/test-send-updates.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
.Rhistory
.RData
.Ruserdata
.secrets/*
.DS_Store
*/.DS_Store
52 changes: 52 additions & 0 deletions IdentifyTypeOfUsers.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: "Identify current vs potential users"
author: ""
date: ""
output: html_document
---

```{r, message = FALSE, echo = FALSE,results='hide', warning=FALSE}
library(tidyverse)
library(here)

knitr::knit_child("TidyData.Rmd") #inherit resultsTidy
```

```{r, message=FALSE, echo=FALSE}
resultsTidy %>%
group_by(UserType, CurrentUsageDescription) %>%
summarize(count = n()) %>%
mutate(CurrentUsageDescription = case_when(
CurrentUsageDescription == "For ongoing projects (e.g., consistent project development and/or work)" ~ "For ongoing projects:\nconsistent project development\nand/or work",
CurrentUsageDescription == "For completed/long-term projects (e.g., occasional updates/maintenance as needed)" ~ "For completed/long-term projects:\noccasional updates/maintenance\nas needed",
CurrentUsageDescription == "For short-term projects (e.g., short, intense bursts separated by a few months)" ~ "For short-term projects:\nshort, intense bursts\nseparated by a few months",
CurrentUsageDescription == "I do not currently use the AnVIL, but have in the past" ~ "I do not current use the AnVIL,\nbut have in the past",
CurrentUsageDescription == "I have never used the AnVIL, but have heard of it" ~ "I have never\nused the AnVIL",
CurrentUsageDescription == "I have never heard of the AnVIL" ~ "I have never\nheard of the AnVIL"
)) %>%
ggplot(aes(x = count, y = reorder(CurrentUsageDescription, count), fill = UserType)) +
scale_fill_manual(values = c("#E0DD10", "#035C94")) +
geom_bar(stat="identity", position ="stack") +
theme_classic() +
xlab("Count") +
ylab("") +
ggtitle("How would you describe your current usage\nof the AnVIL platform?") +
geom_text(aes(label = count, group = CurrentUsageDescription),
hjust = -0.5, size=2) +
theme(legend.title = element_blank())
```

## Takeaway

Of the ```r nrow(resultsTidy)``` responses, ```r nrow(resultsTidy %>% filter(UserType == "Current User"))``` were current users and ```r nrow(resultsTidy %>% filter(UserType == "Potential User"))``` were potential users. The majority of current users belonged to the group who use the AnVIL for ongoing projects while the majority of potential users were evenly split between those who have never used the AnVIL (but have heard of it) and those who used to previously use the AnVIL, but don't currently.

## Potential Follow-ups:

- Look to see if those potential users who previously used to use the AnVIL show similarity in overall trends with the rest of the potential users
- Directly ask why they no longer use the AnVIL

<details><summary>Description of variable definitions and steps in preparing and plotting the data</summary>

First, we group the data by the assigned `UserType` labels/categories and their related more detailed descriptions. Then we use `summarize` to count the occurrences for each of those categories. We use a mutate statement to better fit the detailed descriptions on the plot. We then send this data to ggplot with the count on the x-axis, and the usage descriptions on the y-axis (ordered by count so highest count is on the top). We fill with the user type description we've assigned. We manually scale the fill to be AnVIL colors and specify we want this to be a stacked bar chart. We then make edits for the theme and labels and finally add a geom_text label for the count next to the bars before we save the plot.

</details>
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
# OTTR for Websites!
# Analysis of the State of the AnVIL 2024 Poll
Analysis of the State of the AnVIL 2024 Poll

Get started by going to [ottrproject.org](https://www.ottrproject.org/getting_started.html)!
## Demographics

This is a template for creating websites from Rmd files hosted on GitHub with three helpful automations following a pull request to the repository: spelling check, broken link check, and website rendering.
### Institutional affiliation

- Check for spelling errors more intensively than RStudio and allow you to add words to the dictionary
- Check for broken links - you will be warned about broken links
- Automatic rendering of the website for previewing before merges
- Automatic rendering of the website upon merging to main
- Docker images that can be customized.
![Institutional affiliation](https://github.com/fhdsl/anvilPoll2024/blob/3c6a05514355bce61033481470f940645928b83e/plots/institutionalType_faceteduserType.png)

### Highest Degree attained
![Highest Degree attained](plots/degree_usertype.png)

### Genomics and Clinical Research Experience
![Research Experience](https://github.com/fhdsl/anvilPoll2024/blob/9178a9e2ca527eab98b8caeb3b31346e916113ab/plots/researchExperienceLevel_colorExperienceLevel_noUserTypeSplit.png)

## Insights

### Feature importance for current vs potential users
![Feature importance dumbbell plot](plots/dumbbellplot_xlim16_rankfeatures.png)
Loading
Loading