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

Begin refactorings #11

Merged
merged 9 commits into from
Oct 22, 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
132 changes: 82 additions & 50 deletions anvilPoll2024MainAnalysis.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ ggsave(here("plots/degree_furthersimplified_usertype.png")) #set plot size

- Use this information (together with other info?) to try to cluster respondents/users into personas; see `PersonaStats.Rmd`


### Prepare and plot the data

<details><summary>Description of variable definitions and steps</summary>
Expand Down Expand Up @@ -320,7 +321,9 @@ PlotToolKnowledge_avg_score <-
geom_point(aes(color = UserType, shape = AnVILorNo))


PlotToolKnowledge_customization(PlotToolKnowledge_avg_score)
PlotToolKnowledge_avg_score %<>% PlotToolKnowledge_customization()

PlotToolKnowledge_avg_score

ggsave(here("plots/tooldataresourcecomfortscore_singlepanel.png"), w = 2200, h = 1350, units = "px")
```
Expand Down Expand Up @@ -461,28 +464,26 @@ We adjust various aspects of the theme like turning off the grid and background
genomicsExpPlot <- ggplot(experienceDf, aes(x=experienceLevel,y=n, fill = experienceLevel)) +
facet_grid(~researchType) +
geom_bar(stat="identity") +
theme_bw() +
theme(panel.background = element_blank(), panel.grid = element_blank()) +
theme(axis.text.x = element_text(angle = 45, hjust=1)) +
geom_text(
aes(label = after_stat(y), group = experienceLevel),
stat = 'summary', fun = sum, vjust = -0.5, size=2
) +
ylab("Count") + xlab ("Reported Experience Level") +
coord_cartesian(clip = "off") +
theme(plot.margin = margin(1,1,1,1.05, "cm")) +
scale_fill_manual(values = c("#035C94","#035385","#024A77","#024168", "#02395B")) +
theme(legend.position = "none")+
ggtitle("How much experience do you have analyzing the following data categories?")

genomicsExpPlot %<>% stylize_bar(usertypeColor = FALSE, sequentialColor = TRUE, ylabel = "Count", xlabel = "Reported Experience Level", rotate=55, hjustv = 1)

genomicsExpPlot

ggsave(here("plots/researchExperienceLevel_sequentialColor_noUserTypeSplit.png")) #set plot size
```

## Experience: Controlled Access Datasets

**Takeaway:** Over half of respondents report they are extremely interested in working with controlled access datasets.
**Takeaway:** Generally, over half of respondents report they are extremely interested in working with controlled access datasets.

For specific controlled access datasets ...

- Of the survey provided choices, respondents have accessed or are particularly interested in accessing [All of Us](https://www.researchallofus.org/), [UK Biobank](https://www.ukbiobank.ac.uk/enable-your-research/about-our-data), and [GTEx](https://anvilproject.org/data/consortia/GTEx) (though All of Us and UK Biobank are not currently AnVIL hosted).
- 2 respondents (moderately or extremely experienced with genomic data) specifically wrote in ["TCGA"](https://www.cancer.gov/ccg/research/genome-sequencing/tcga).
Expand Down Expand Up @@ -515,6 +516,40 @@ Since this is a select all that apply question, we expect that there will be mul

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

</details>

```{r}
dataInterest <- resultsTidy %>%
group_by(InterestControlledData) %>%
summarize(count = n())
```

<details><summary>Description of variable definitions and steps for preparing bar plot</summary>

</details>

```{r}
dataInterestPlot <- dataInterest %>%
ggplot(aes(x = InterestControlledData,
y = count,
fill = as.factor(InterestControlledData))) +
geom_bar(stat="identity") +
ggtitle("How interested are you in working with controlled access datasets?") +
coord_cartesian(clip = "off") +
theme(plot.margin = margin(1,1,1,1.1, "cm")) +
annotation_custom(textGrob("Extremely\ninterested", gp=gpar(fontsize=8, fontface = "bold")),xmin=5,xmax=5,ymin=-3.5,ymax=-3.5) +
annotation_custom(textGrob("Not at all\ninterested", gp=gpar(fontsize=8, fontface= "bold")),xmin=1,xmax=1,ymin=-3.5,ymax=-3.5) +
scale_y_continuous(breaks= pretty_breaks()) +
geom_text(aes(label = count, group = InterestControlledData),
vjust = -1, size=2)

dataInterestPlot %<>% stylize_bar(usertypeColor = FALSE, sequentialColor = TRUE, xlabel = "Interest level", ylabel = "Count")

dataInterestPlot
```

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

Using a function `prep_df_whichData()` which is in the `shared_functions.R` script since we'll be using this workflow a few times for different subsets of the data, because we want to be able to differentially display the data based on the experience status (experienced with clinical research, human genomics research, etc.) of the person saying they'd like access to the data.

We want to color the bars based on whether or not the controlled access dataset is available on the AnVIL currently. We create a dataframe `onAnVILDF` to report this. Used the [AnVIL dataset catalog/browser](https://explore.anvilproject.org/datasets) to find out this information. However, HPRC and GREGoR don't show up in that resource, but are both available per these sources: [Announcement for HPRC](https://anvilproject.org/news/2021/03/11/hprc-on-anvil), [Access for HPRC](https://anvilproject.org/data/consortia/HPRC), [Access for GREGoR](https://anvilproject.org/data/consortia/GREGoR). Both GMKF and TCGA are data hosted on other NCPI platforms that are accessible via AnVIL because of interoperability. (See: https://www.ncpi-acc.org/ and https://ncpi-data.org/platforms). We list these as non-AnVIL hosted since while accessible, they are not AnVIL hosted and inaccessible without NCPI. Finally, UDN is described as non-AnVIL hosted as it is in the Data submission pipeline and not yet available.
Expand Down Expand Up @@ -651,7 +686,9 @@ demoPlotRaw <- resultsTidy %>%
geom_bar(stat = "identity") +
ggtitle("Have you attended a monthly AnVIL Demo?")

stylize_bar(demoPlotRaw)
demoPlotRaw %<>% stylize_bar()

demoPlotRaw
```

#### Responses recoded to focus on awareness
Expand All @@ -666,8 +703,9 @@ demoPlot <- resultsTidy %>%
geom_bar(stat = "identity") +
ggtitle("Have you attended a monthly AnVIL Demo?")

stylize_bar(demoPlot) +
ylab("Awareness")
demoPlot %<>% stylize_bar(ylabel = "Awareness")

demoPlot
```

## Awareness: AnVIL Support Forum
Expand Down Expand Up @@ -716,7 +754,9 @@ forumPlotRaw <- ggplot(forumdf,
geom_bar(stat = "identity") +
ggtitle("Have you ever read or posted in our AnVIL Support Forum?")

stylize_bar(forumPlotRaw)
forumPlotRaw %<>% stylize_bar()

forumPlotRaw
```

#### Responses recoded to focus on awareness
Expand All @@ -726,8 +766,9 @@ forumPlot <- ggplot(forumdf, aes(y = forumAwareness, x = count, fill = UserType)
geom_bar(stat = "identity") +
ggtitle("Have you ever read or posted in our AnVIL Support Forum?")

stylize_bar(forumPlot) +
ylab("Awareness")
forumPlot %<>% stylize_bar(ylabel = "Awareness")

forumPlot
```

## Preferences: Feature Importance Ranking
Expand Down Expand Up @@ -903,18 +944,10 @@ toPlotTrainingRanks <- bind_rows(
tdumbbell <- ggplot(toPlotTrainingRanks, aes(x = avgRank, y = reorder(TrainingType, -avgRank))) +
geom_line() +
geom_point(aes(color = UserType), size = 3) +
theme(panel.background = element_blank()) + theme_bw() + theme(legend.position = "bottom") +
xlab("Average Rank") +
ylab("Training Workshop Modality") +
ggtitle("Please rank how/where you would prefer to attend\nAnVIL training workshops.") +
scale_color_manual(values = c("#E0DD10", "#035C94")) +
theme(legend.title=element_blank()) +
scale_x_continuous(breaks = 5:1, labels = 5:1, limits = c(1,5))+
scale_x_reverse(limits = c(5,1)) +
annotation_custom(textGrob("Most\npreferred", gp=gpar(fontsize=8, fontface = "bold")),xmin=-1,xmax=-1,ymin=-0.5,ymax=-0.5) +
annotation_custom(textGrob("Least\npreferred", gp=gpar(fontsize=8, fontface= "bold")),xmin=-5,xmax=-5,ymin=-0.5,ymax=-0.5) +
coord_cartesian(clip = "off") +
theme(plot.margin = margin(1,1,1,1.1, "cm"))
ggtitle("Please rank how/where you would prefer to attend\nAnVIL training workshops.")


tdumbbell %<>% stylize_dumbbell(preference = TRUE, xlabel = "Average Rank", ylabel = "Training Workshop Modality", xmax=5)

tdumbbell

Expand Down Expand Up @@ -955,8 +988,10 @@ whereRunPlot <- resultsTidy %>%
geom_bar(stat="identity") +
ggtitle("Where do you currently run analyses?")

stylize_bar(whereRunPlot) +
ylab("Platform")
whereRunPlot %<>% stylize_bar(ylabel = "Platform")

whereRunPlot

```

## Preferences: DMS compliance/data repositories
Expand Down Expand Up @@ -1006,19 +1041,15 @@ toPlotFundingSource <- resultsTidy %>% separate(FundingSources, c("WhichA", "Whi

```{r}

toPlotFundingSource %>% ggplot(aes(y = reorder(whichFundingSource,count), x = count, fill = UserType)) +
fundingSourcePlot <- toPlotFundingSource %>% ggplot(aes(y = reorder(whichFundingSource,count), x = count, fill = UserType)) +
geom_bar(position = "stack", stat = "identity") +
scale_fill_manual(values = c("#E0DD10", "#035C94")) +
theme_bw() +
ggtitle("What source(s) of funds do you use to pay for cloud computing?") +
xlab("Count") +
ylab("Funding Source") +
theme(panel.background = element_blank(),
panel.grid.minor.x = element_blank(),
panel.grid.minor.y = element_blank(),
panel.grid.major.y = element_blank())

ggsave(here("plots/fundingsources.png")) #set save size
ggtitle("What source(s) of funds do you use to pay for cloud computing?")

fundingSourcePlot %<>% stylize_bar(ylabel="Funding Source")

fundingSourcePlot

ggsave(here("plots/fundingsources.png"), plot = fundingSourcePlot) #set save size
```

## Returning User: Length of Use of the AnVIL
Expand All @@ -1038,10 +1069,10 @@ timeUsePlot <- resultsTidy %>%
vjust = -1, size=2) +
ggtitle("How long have you been using the AnVIL?")

stylize_bar(timeUsePlot, usertypeColor = FALSE, singleColor = TRUE) +
xlab("Years of Use") +
ylab("Count") +
theme(legend.position = "none")
timeUsePlot %<>% stylize_bar(usertypeColor = FALSE, singleColor = TRUE, xlabel = "Years of Use", ylabel = "Count")

timeUsePlot

```

## Returning User: Foreseeable Computational Needs
Expand All @@ -1065,8 +1096,9 @@ compNeedsPlot <- resultsTidy %>%
geom_bar(stat = "identity") +
ggtitle("What computational and storage resources do you foresee\nneeding in the next 12 months?")

stylize_bar(compNeedsPlot, usertypeColor = FALSE, singleColor = TRUE) +
theme(legend.position = "none")
compNeedsPlot %<>% stylize_bar(usertypeColor = FALSE, singleColor = TRUE)

compNeedsPlot
```


Expand All @@ -1092,10 +1124,10 @@ recLikePlot <- resultsTidy %>%
geom_text(aes(label = count, group = RecommendationLikelihood),
vjust = -1, size=2)

stylize_bar(recLikePlot, usertypeColor = FALSE, sequentialColor = TRUE) +
xlab("Recommendation likelihood") +
ylab("Count") +
theme(legend.position = "none")
recLikePlot %<>% stylize_bar(usertypeColor = FALSE, sequentialColor = TRUE, xlabel = "Recommendation likelihood", ylabel = "Count")

recLikePlot

```

## Session Info
Expand Down
76 changes: 7 additions & 69 deletions pages/Awareness.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ output: html_document
---

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

# Inherit `resultsTidy`
knitr::knit_child(here("TidyData.Rmd"))
# Inherit plots
knitr::knit_child(here("anvilPoll2024MainAnalysis.Rmd"))
# Import functions to stylize plots
source(here("resources/scripts/shared_functions.R"))
```
Expand All @@ -20,94 +19,33 @@ source(here("resources/scripts/shared_functions.R"))
## Raw responses

```{r echo=FALSE, message=FALSE}
demoPlotRaw <- resultsTidy %>%
group_by(UserType, AnVILDemo) %>%
summarize(count = n()) %>%
ggplot(aes(y=reorder(AnVILDemo, count),
x = count,
fill = UserType)) +
geom_bar(stat = "identity") +
ggtitle("Have you attended a monthly AnVIL Demo?")

stylize_bar(demoPlotRaw)
demoPlotRaw
```

## Awareness

```{r, message=FALSE, echo = FALSE}
demoPlot <- resultsTidy %>%
group_by(UserType, AnVILDemoAwareness) %>%
summarize(count = n()) %>%
ggplot(aes(y = AnVILDemoAwareness,
x = count,
fill = UserType)) +
geom_bar(stat = "identity") +
ggtitle("Have you attended a monthly AnVIL Demo?")

stylize_bar(demoPlot) +
ylab("Awareness")

demoPlot
```

## Takeaway

Most respondents have not attended an AnVIL Demo. To investigate whether this is an awareness issue, we aggregated all responses except `No, didn't know of`. We see that the majority of respondents are aware of AnVIL Demos. These responses are just distributed among different ways of utilizing the demos. Further, there's awareness among both current and potential AnVIL users.
Most respondents have not attended an AnVIL Demo. To investigate whether this is an awareness issue, we aggregated all responses except `No, didn't know of`. We see that the majority of respondents are aware of AnVIL Demos. These responses are just distributed among different ways of utilizing the demos. Further, there's awareness among both current and potential AnVIL users.

<br/>

# AnVIL Support Forum

```{r, message=FALSE, echo=FALSE}
forumdf <- resultsTidy %>%
mutate(AnVILSupportForum = str_replace(AnVILSupportForum,
pattern = "No, ",
replacement= "No ")) %>%
separate(AnVILSupportForum,
c("forumInteractionA", "forumInteractionB", "forumInteractionC"),
sep = ", ",
fill = "right") %>%
pivot_longer(starts_with("forumInteraction"), values_to = "forumInteractionDescription") %>%
group_by(UserType, CurrentUsageDescription, forumInteractionDescription) %>%
summarize(count = n()) %>%
drop_na() %>%
mutate(forumInteractionDescription =
factor(forumInteractionDescription, levels = c("Posted in", "Answered someone's post", "Read through others' posts", "No but aware of", "No didn't know of")),
forumAwareness = factor(
case_when(
forumInteractionDescription == "Posted in" ~ "Aware of",
forumInteractionDescription == "Answered someone's post" ~ "Aware of",
forumInteractionDescription == "Read through others' posts" ~ "Aware of",
forumInteractionDescription == "No but aware of" ~ "Aware of",
forumInteractionDescription == "No didn't know of" ~ "Not Aware of"
), levels = c("Not Aware of", "Aware of"))
)
```

## Raw Responses

```{r, message=FALSE, echo=FALSE}
forumPlotRaw <- ggplot(forumdf,
aes(y = reorder(forumInteractionDescription, count),
x = count,
fill = UserType)) +
geom_bar(stat = "identity") +
ggtitle("Have you ever read or posted in our AnVIL Support Forum?")

stylize_bar(forumPlotRaw)
forumPlotRaw
```

## Awareness

```{r, message=FALSE, echo=FALSE}
forumPlot <- ggplot(forumdf,
aes(y = forumAwareness,
x = count,
fill = UserType)) +
geom_bar(stat = "identity") +
ggtitle("Have you ever read or posted in our AnVIL Support Forum?")

stylize_bar(forumPlot) +
ylab("Awareness")
forumPlot
```

## Takeaway
Expand Down
Loading
Loading