Abstract
Scientific data visualization is a critical aspect of fully understanding data patterns and trends. To date, the majority of data visualizations in nursing research – as with other biomedical fields – have been static. The availability of electronic scientific journal articles (which are quickly becoming the norm) has created new opportunities for dynamic and interactive data visualization which carry added cognitive benefits and support the ability to understand data more fully. Therefore, here we highlight the benefits of R, an open-source programming language, for scientific data visualization, with a specific focus on creating dynamic, interactive figures using the R shiny package. For R users, we have included a tutorial with example code to create three increasingly complex shiny applications. For individuals more interested in understanding the potential of R shiny as an innovative tool to interact with research data, we have included links to online versions of the examples that do not require any programming or R experience. We believe that widespread adoption of dynamic and interactive scientific data visualization will further support nurse scientists’ higher-level mission of advancing our understanding of health and wellness of individuals and communities.
Keywords: genomics, omics, nurse scientists, data science, visual analytics, information visualization
Introduction
Research conducted by nurse scientists is highly innovative and tremendously impactful in improving health, recovery, quality of life, and wellness for individuals and communities. The evolution of nursing – as with other biomedical fields – has included a progressive focus on increasingly complex omic-based approaches, data science, and data analytics (Agarwal et al., 2022; Al-Zaiti et al., 2020; Barcelona et al., 2021; Harris et al., 2021; Heinsberg et al., 2021; Koleck, Topaz et al., 2021). In parallel, the way that researchers present and consume data is changing. While scientific journal articles were once available only in printed form, they are now increasingly being accessed via online platforms. As such, research products and scientific figures are no longer destined to be static.
Data visualization, particularly that with interactive and dynamic capabilities, is an important methodological tool for nursing research as it supports nurse scientists in: (1) making novel discoveries via a comprehensive understanding of the structure and underlying patterns of data; (2) creating public resources and tools for data dissemination; and (3) facilitating translation of research findings. While ‘point-and-click’ software such as SPSS and Stata are among the most commonly used statistical programs in health research (Masuadi et al., 2021), they carry important limitations that restrict analysis and subsequent visualization of large, multidimensional data sets that are quickly becoming the norm. R (Team, 2018), an open-source programming language, is an ideal alternative that not only supports state-of-the science data quality control and analysis workflows (Dreisbach & Koleck, 2020; Wright et al., 2019), but also the development of innovative, user-friendly, and even interactive figures to efficiently and effectively display data. Widespread adoption of R for data visualization will further support nurse scientists’ higher-level mission of advancing our understanding of health and wellness of individuals and communities.
In this article, we highlight the benefits of R for scientific data visualization, with a specific focus on creating dynamic, interactive figures using the R shiny package. First, we provide a brief introduction to R programming and key graphical tools ggplot2 (Wickham, 2016), ggplotly (Wickham, 2016), and shiny (Chang et al., 2021). Next, we provide a tutorial with example code for three increasingly complex shiny applications. Finally, we demonstrate the application of innovative scientific visualization in nursing research by highlighting shiny exemplars created and/or used by nurse scientists. To further underscore the value of shiny applications in nursing research, we will be referencing a fictitious, nursing-focused research scenario throughout this paper.
Scenario
Suppose you and your research group conduct a study to examine genetic variation of the symptom experience in individuals with diabetes. The purpose of your study is to determine the association between 20 single nucleotide polymorphisms (SNPs) and three symptoms measured as quantitative traits (fatigue, pain, and psychological distress) in 1000 individuals with type 2 diabetes. You and your team collect the data and are putting together a paper to disseminate your results. We will return to this scenario throughout this paper.
High-Quality Graphics In R
There are many benefits to R that make it the ideal programming language for nurse scientists, particularly those who use omic-based approaches in their research. R is virtually unlimited in its analytical capacity, supports reproducible and transparent workflows, and is freely available to anyone with computer/internet access. While its status as a publicly sourced software means that packages do not come with formal customer care or a guarantee, there is an impressive community of R users who are continuously developing and sharing new utilities, maintaining packages, and helping others troubleshoot issues through public platforms (e.g., Stack Overflow). As such, R is updated regularly and the constant influx of new packages, functions, and tools means that there is often no need to “reinvent the wheel” (for both data analytics and visualization). Wright et al. (2019) provide an excellent introduction to transparent and reproducible science for nurse scientists focusing on R, RStudio, Git, and Github that we recommend as a primer to this paper. In addition, common terminology used throughout this paper can be found in Table 1, while training resources for R programming generally, and data visualization specifically, can be found in Supplementary Table S1.
Table 1.
Terminology.
Terminology | ||
---|---|---|
Term | Description | Link (If Applicable) |
R | Open-source programming language | https://www.r-project.org |
R studio | Integrated development environment for R programming; includes console, syntax editor, environment, history, etc. | https://www.rstudio.com |
R package | Bundled sources of reproducible R code containing reusable functions and sometimes data/documentation | |
R function | Existing code bundled to perform a specific task (e.g., mean() computes the mean value in R) | |
Git | An open-source version control system | |
GitHub | Web-based version control repository for code management and sharing | https://github.com |
ggplot2 | R package for creating graphics | https://ggplot2.tidyverse.org |
ggplotly | R function to convert ggplot2 figures into interactive graphics | https://plotly.com/ggplot2/ |
shiny | R package to build interactive web applications directly from R | https://shiny.rstudio.com |
User interface (ui) | Controls the structure and appearance of the shiny application (i.e., application shell) | |
Server | Includes the instructions and code for implementing the application (e.g., processing data and output) | |
Widgets | User input style options (e.g., radio button, slider, etc.) | https://shiny.rstudio.com/gallery/widget-gallery.html |
Layouts | Facilities for laying out the components/user interface of a shiny application | https://shiny.rstudio.com/articles/layout-guide.html |
Fluid page | A web design strategy to define how much space elements of the application should occupy that also helps auto scale the application based on the size of the user’s screen (e.g., use of the fluidPage shiny function referenced in Examples 1–2) | |
Reactive function | A function that uses widget input and returns a value, re-executing as the input changes | |
shinyapps.io | Online platform to securely deploy and host shiny applications | https://www.shinyapps.io |
While other programming languages such as Python (Python Software Foundation, n.d.) may be preferred for specific tasks (e.g., machine learning), R is generally accepted as the ideal tool for data visualization. There are several helpful R packages and functions designed to support data visualization, all which progressively build on each other. For example, the ggplot2 package (Wickham, 2016) creates sophisticated and customizable (but static) plots of superior quality (Holtz, 2018). As shown in Figure 1, based on the scenario described above, we used ggplot2 to create a histogram of the symptom ‘fatigue’ with the data colored by the genotype of ‘snp_1’.
Figure 1.
Histogram of a single symptom (fatigue) colored by genotype at a single nucleotide polymorphism (snp_1) created with ggplot2.
Recent expansion of the ggplot2 package includes the ggplotly() function, which supports the conversion of high-quality but static ggplots into interactive graphics. This conversion allows one to zoom in or pan across a figure and even hover over specific points/lines to return a text box with customizable information (e.g., coordinates/exact values, participant identification numbers, etc.). A limitation of both ggplot and ggplotly plots, however, is that they must be updated manually to investigate different combinations of data. For example, in our scenario described above, our focus on three symptoms and 20 SNPs would require 60 different plots to fully interrogate all of the possible SNP x symptom histogram combinations.
The shiny package (Chang et al., 2021) addresses this shortcoming by taking ggplot2 and ggplotly one step further by supporting the construction of interactive web applications in R, preventing the need for many static plots (Example: https://lwheinsberg.shinyapps.io/NurShinyExample1/). R shiny applications reactively update in response to user-defined input, allowing the user to easily customize a plot based on their preferences/interests. One of the greatest benefits of R shiny applications is that they can be hosted on websites and shared publicly without R software or code, replacing the functionality of applications created in traditional platforms that are no longer fully supported (e.g., Java, Flash). Notably, these applications do not require any programming or R experience from the user, making data accessible for scientific collaborators without R experience as well as non-technical community partners.
In addition to being easy to use, R shiny applications are quite simple to build once a baseline understanding of R programming is developed, overcoming the “coding hurdle” for many scientists. Simplicity of construction stems from an array of prefabricated widgets (i.e., a component of an application interface), an extensive library of R packages/functions, and automatic binding between input and output options in the design stage. Furthermore, well-documented and built in R functions allow developers to extend the utility of shiny applications with Cascading Style Sheet (CSS) themes, HyperText Markup Language (HTML) widgets, JavaScript actions, and more, resulting in user-friendly, visually appealing, and elegant interactive figures with little programmer effort. Because the application creator has control over all coding elements – including the appearance of the application and output – there is incredible flexibility, and applications can range from basic to quite complex to suit nearly any conceivable purpose. We believe such shiny applications have the potential to revolutionize nursing research by supporting graphically appealing and easy-to-understand scientific visualization to support innovative interpretation of data, novel discoveries, impactful dissemination, and translation of research findings.
Tutorial: How to Create a Shiny Application
To demonstrate the functionality of shiny applications and encourage use in nursing research, we created a nursing-focused, introductory tutorial targeted toward individuals with a basic to intermediate understanding of R programming. The tutorial aims to (1) describe the fundamental R code needed to create a shiny application and (2) provide example code for three increasingly complex shiny applications that build upon the scenario outlined above. To follow along with the tutorial, see our executable and annotated example code available at https://github.com/lwheinsberg/NurShiny. For individuals with less interest in learning R, but a greater interest in simply understanding the potential of R shiny as an innovative tool for nursing research, we have also provided links to online versions of the shiny applications that do not require any programming experience, knowledge of R, or installed software.
Fundamental R Code Needed to Create a Shiny Application
Shiny applications are constructed using two main sections of R code including (1) the user-interface and (2) the server. The user interface controls the structure and appearance of the application (i.e., application shell) while the server includes the instructions and code for implementing the application (e.g., user-input, processing data, and output by utilizing the R language and functions). In the sections below (Examples 1–3), and in the R markdown with executable and annotated code that accompanies this paper [https://github.com/lwheinsberg/NurShiny], we present three shiny applications to visualize the symptom and genotype data from the scenario outlined above. The simulated example data set (named ‘df’ in the example code below) matching the scenario described above consists of observations for 1000 individuals and includes data for the following variables: participant ID (id); 20 SNPs (snp_1, snp_2, snp_3, etc.) additively coded based on the number of minor allele copies; and levels of three quantitative symptoms (fatigue, pain, psychological distress).
Example 1
In Box 1–3 below (with more detailed annotation available in the fully executable code that accompanies this paper [https://github.com/lwheinsberg/NurShiny]), we present code to create a simple shiny application to display a histogram of each of our three symptoms colored by genotype (Figure 2, https://lwheinsberg.shinyapps.io/NurShinyExample1/).
Figure 2.
Example 1 shiny application. The above image is a screenshot of the Example 1 application which features user input drop down menus for symptom and single nucleotide polymorphism selection. The full interactive version of this shiny application can be found at https://lwheinsberg.shinyapps.io/NurShinyExample1/. Code to create this application can be found at https://github.com/lwheinsberg/NurShiny.
In the code to create the user interface for example 1 (Box 1), we open the application with the flexible function ‘fluidPage’ and store our user interface code in an object named ‘ui’ (line 2). We then title our application (line 4). While there are several layout options for shiny applications (e.g., top level, grid, tab set, etc. (Application Layout Guide, 2021)), we use the sidebar layout design (line 7) with a sidebar panel (line 8) and main panel (line 25) in this example. The sidebar panel houses the user input options (symptom and SNP specification, lines 11–22) while the main panel houses the application output (a histogram, line 27). For efficiency of handling the large number of SNPs, lines 20-21 call a previously created character vector named ‘snp_list’ which contains the identifiers for our 20 SNPs of interest (code to create character vector not shown here; see GitHub). There are many different input options for the user interface including action buttons that make application elements appear/disappear, check boxes, radio buttons, slider bars, and more. In our example application, we use simple dropdown menu options via the ‘selectInput’ function (lines 11 and 20). To learn more about developing the user interface, we recommend designer (Baldry, 2022), a novel and innovative R package that supports “drag and drop” design of user interface prototypes. The application not only makes designing elegant user interfaces quite simple, but also provides an excellent interactive learning opportunity as users are given the R code needed to replicate the user interface prototype in R.
Box 1: Example 1 user interface code to create the title, sidebar/main panels, and user input options.
1 # Create the user interface.
2 ui <- fluidPage (
3 # Title our application.
4 titlePanel("Dynamic Visualization of Symptoms by Genotype"),
5 # Specify use of a sidebar layout which places the questions for the user
6 # on the left/side panel and the main application output in the center/main panel.
7 sidebarLayout (
8 sidebarPanel( # Open sidebarPanel which contains user input options.
9 # Store symptom options in input variable named 'var' using the column name
10 # for each possible choice and set the default symptom to be 'Fatigue'.
11 selectInput("var", "1. Select symptom.",
12 choices=c("Fatigue"=c("Fatigue"), "Pain"=c("Pain"),
13 "Psychological distress"=c("Distress"), selected=c("Fatigue")),
14 # Add a break (i.e., blank line) between input variables.
15 br(),
16 # Mimic above for selection of polymorphism of interest, storing the user-specified
17 # input variable as 'snp'; to do this, we call a previously created character vector
18 # (see full GitHub code) called 'snp_list' which contains the IDs of all 20 SNPs
19 # in our simulated data set; set default SNP to be 'snp_1'.
20 selectInput ("snp", "2. Select single nucleotide polymorphism.",
21 choices=snp_list, selected=c ("snp_1"))
22 ), # Close sidebarPanel.
23 # Set up the main panel and tell our application that a plot (built
24 # within the server section below and named 'myhist') will be placed there.
25 mainPanel(
26 # Call the plot output.
27 plotOutput("myhist")
28 ) # Close mainPanel.
29 ) # Close sidebarLayout.
30 ) # Close user interface.
In the code to create the server for example 1 (Box 2), we open by using a function to call the input (created above in the user interface) in connection with the output (created below in the server), storing our server code in an object called ‘server’ (line 32). We then pass the user-defined symptom and genotype selections through reactive functions and store the column number (from the global object ‘df’ described above) for the user-defined selections in objects we have named ‘pheno_colm’ (for symptoms, lines 37–39) and ‘geno_colm’ (for SNPs, lines 41–43). Note that these objects are now functions and must be called using ‘()’ (e.g., call using ‘pheno_colm()’ versus traditional ‘pheno_colm’). We complete the server code using ggplot2 to create the histogram (lines 50–57), storing the plot in an output object called ‘myhist’ (line 48). The ‘myhist’ object is called in the user interface code above (Box 1, line 27) to place the plot in the main panel. For detailed information on constructing ggplot2 figures similar to the histogram created here, see the R graph gallery (Holtz, 2018).
Box 2: Example 1 server code to create an interactive histogram.
31 # Create the server.
32 server <- function(input, output) {
33 # Store the column number of the selected symptom and polymorphism variables
34 # as 'reactive' functions; note these numbers will change depending on what
35 # is selected by the user.
36 # Store phenotype (i.e., symptom) column number.
37 pheno_colm <- reactive({
38 which(names(df)==input$var) # Called from above user interface code.
39 })
40 # Store genotype column number.
41 geno_colm <- reactive({
42 which(names(df)==input$snp) # Called from above user interface code.
43 })
44 # Note once reactive functions are created, they must be called below using ()
45 # (e.g., 'pheno_colm()' versus 'pheno_colm').
46
47 # Create output (i.e., histogram) to be stored as 'myhist' and called above.
48 output$myhist <- renderPlot({ # Open renderPlot to create 'myhist'.
49 # Create histogram using ggplot, calling user-defined symptom (pheno_colm()).
50 ggplot(df, aes(x=df[,pheno_colm()], fill=as.factor(df[,geno_colm()]),
51 color= as.factor(df[,geno_colm()]))) +
52 geom_histogram(alpha = 0.9) +
53 labs(x=names(df[pheno_colm()]), y="Count") +
54 ggtitle(paste0("Histogram of", names(df[pheno_colm()]), "colored by",
55 names(df[geno_colm()]))) +
56 guides(fill=guide_legend(title=names(df[geno_colm()])),
57 color=guide_legend(title=names(df[geno_colm()])))
58 }) # Close renderPlot.
59 } # Close server.
Finally, we simply deploy the application (Box 3) using the ‘shinyApp’ function (line 62), connecting the user interface code created in Box 1 to the server code created in Box 2. As shown at https://lwheinsberg.shinyapps.io/NurShinyExample1/, and in the GitHub code that accompanies this paper, our shiny application efficiently and elegantly displays 60 different histograms with little effort beyond that required to create the single static histogram depicted in Figure 1. Further, the shiny version of the figure demonstrates the added cognitive benefits of interactive data visualization compared with the static visualization. Options for application hosting and sharing are presented below following the discussion of Examples 2–3.
Box 3: Example 1 deployment code.
60 # Deploy the shiny application! (And
61 # celebrate because it worked!).
62 shinyApp(ui, server)
Example 2
In the R markdown code that accompanies this paper [https://github.com/lwheinsberg/NurShiny], we present a slightly more complex example application by expanding the code above to add tabs to present additional data visualizations (Figure 3, https://lwheinsberg.shinyapps.io/NurShinyExample2/). On the first tab, we recreate the histogram from Example 1. On the second tab (static view shown in Figure 3), we add a sina with violin plot which displays customized hover text via an interactive ggplotly layer. This additional interactive feature allows the user to hover over elements of the plot to see the exact symptom score (by hovering over a point) and density values (by hovering over a portion of the density plot) in a pop-up box. Finally, on the third tab, we add a summary table with count, minimum/maximum values, mean, standard deviation, median, and interquartile range of each symptom by genotype.
Figure 3.
Example 2 shiny application. The above image is a screenshot of the Example 2 application which features user input drop down menus for symptom and single nucleotide polymorphism selection and tabs to display the histogram created in Example 1 as well as sina with violin plots and a summary table of the data. The full interactive version of this shiny application can be found at https://lwheinsberg.shinyapps.io/NurShinyExample2/. Code to create this application can be found at https://github.com/lwheinsberg/NurShiny.
Example 3
Finally, in the R markdown code that accompanies this paper [https://github.com/lwheinsberg/NurShiny] we add even more complexity to our application in Example 3 (Figure 4, https://lwheinsberg.shinyapps.io/NurShinyExample3/). Specifically, we create a more advanced user interface which allows the user to navigate the application using ‘pages’. On the first page, we add a ‘User guide’ with an application overview and instructions for the user. On pages 2–4, we recreate the histogram, sina with violin plot, and summary table from Example 2. On page 5, we add an interactive heatmap to display the correlation structure amongst the SNP data; on page 6, we add a scatterplot to display relationships between the symptom data, featuring dynamic tick marks to adjust the plot axes based on the zoom window selected (static view shown in Figure 4); and on the final page, we display developer contact information. In this example, we demonstrate how to use ‘conditional panels’ which allow user input options to vary across pages. For example, while the histogram page provides user input options prompting selection of a single symptom and single SNP, the scatterplot page provides user input options for two symptoms. Note that, depending on the complexity of the data and/or code, the functions used within the application (e.g., ggplotly), and the user’s internet speed, applications can sometimes be slow to render. To counter these potential issues, Example 3 features ‘spinners’ to let the user know a plot is loading.
Figure 4.
Example 3 shiny application. The above image is a screenshot of the more complex Example 3 application which features an elegant user interface, pages displaying a variety of different plots, conditional panels that vary across pages, and more. The full interactive version of this shiny application can be found at https://lwheinsberg.shinyapps.io/NurShinyExample3/. Code to create this application can be found at https://github.com/lwheinsberg/NurShiny.
Hosting and Sharing
There are flexible hosting options for sharing shiny applications that vary based on the application’s intended purpose. For example, if an application is built to simply visualize relationships between variables in a research group’s data set, R shiny applications can be viewed locally using R, which is particularly beneficial if protected health information is involved. Application code can also be deposited in a GitHub repository so that users around the world can access/run the code to view the application locally using R. The overarching benefit to this approach is that it is free, though it can only be used if data are simulated or if privacy/sharing agreements allow data to be deposited in repositories that are not access controlled. Likewise, this approach is limited in that it requires users to have R/R Studio installed and be familiar with the R language.
Alternatively, as with the examples presented in this paper, shiny applications can be hosted on the internet (e.g., personal website, shinyapps.io) which allows others to view/interact with the application without R installation or files containing R code. While data associated with applications hosted in this manner cannot be altered or accessed beyond the settings programmed by the developer, depending on the study-specific information (e.g., consent language, population sensitivity, use of protected health information, etc.) this option may require data sharing/security consultations with an institution’s Data Security Department and/or Institutional Review Board prior to application hosting. At the present date, use of shinyapps.io is free to a certain point (in terms of both the number of applications and associated user hours) but requires a monthly fee to support expanded use. While a detailed discussion of the complexities of digital storage and resource capacity for hosting shiny applications is beyond the scope of this paper (as they depend on where/how applications are hosted), generally speaking the figures do not require a large amount of space as the code/associated data is stored, while the figure is re-generated each time an individual accesses the application (i.e., redeploying the application resets the storage).
Extended Functionality
Beyond the examples we have shown here, shiny applications can be designed with features such as searchable tables that allow a user to filter a database by row, interactive maps, timeline visualizations, ‘debounce’ functions to counter “chatty” reactive expressions, and more as described in the more advanced tutorials referenced in Supplementary Table S1. Likewise, as mentioned above, shiny package tools can be extended to support CSS themes to further customize the graphical appearance, HTML extensions to add clickable hyperlinks within the user interface or the plot itself, or JavaScript actions like hiding an element or disabling input. Notably, because of well-documented R functions, all of these extensions can be capitalized on without background knowledge in CSS, HTML, JavaScript, etc., making shiny applications accessible to scientists who have only introductory training in R programming. This highly flexible tool can support elegant, adaptable, and effective scientific visualization, providing an incredible resource to further advance nursing research. In the next section, we highlight some innovative shiny applications built by and/or used by nurse scientists.
Exemplar Shiny Applications Created/Used by Nurse Scientists
The BDNF DNA Methylation Map
The ‘BDNF DNA Methylation Map’ is an open access web-based R shiny application created by Lacey Heinsberg, a nurse scientist, with oversight from Daniel Weeks, a statistical geneticist, at the University of Pittsburgh. This application (Heinsberg & Weeks, 2022) was designed to effectively synthesize and display results from a systematic review of epigenetic variation in the Brain-Derived Neurotrophic Factor (BDNF) gene and brain-related outcomes and correlates in humans. This interactive web application provides a to-scale depiction of the BDNF gene and allows users to customize a figure to interactively display BDNF DNA methylation sites associated with user-defined brain-related phenotypes. As a first-of-its kind application, this gene map not only synthesizes results in an organized and visually appealing manner, but also provides an important tool to BDNF and brain researchers in the community. The BDNF DNA Methylation Map is available at https://lwheinsberg.shinyapps.io/BDNF_DNAmMap/ for public use.
Mobile Health Data Visualization
Through an observational mobile health trial called “Diabetes Mobile Care,” Duke University nurse scientist Ryan Shaw and team developed personalized data visualizations using ggplot2 and R shiny to return results to research participants (Wood et al., 2019). This work was an important step not only in understanding the quality of the mobile health data, but also translating the data back to the participants to promote adaptive self-management among individuals with diabetes. Example data visualizations provided to participants can be viewed elsewhere (Wood et al., 2019).
Electronic Pharmacogenomics Assistant
The web-based ‘Electronic Pharmacogenomics Assistant (ePGA)’ is an open-access resource created using R shiny by pharmacogenomic researchers George Patrinos at the University of Patras and George Potamias at the Forth Institute of Computer Science. The ePGA provides state-of-the-science medication-genotype-phenotype data for researchers and clinicians interested in pharmacogenomics (Lakiotaki et al., 2016). Features of the ePGA translational system include searching for genetic risk factors associated with specific medications, matching individual genotype profiles with pharmacogenomic haplotype knowledge to flag medication-specific risks, and more (Lakiotaki et al., 2016). The ePGA resource is publicly available at http://www.epga.gr/ for public use.
NimbleMiner
‘NimbleMiner’ is an open access, multi-language text mining R shiny application created by Maxim Topaz, a nurse scientist at Columbia University. While it is not an application designed specifically for scientific data visualization, NimbleMiner is an innovative natural language processing system to mine clinical narratives in a nursing-sensitive manner (Topaz, 2019; Topaz et al., 2019). For example, if a user is interested in abstracting symptom information related to “nausea” from free text nursing notes, this application will both assist the user in identifying potentially similar clinical terms (e.g., “n/v”, “queasy”, etc.) and automatically labeling positive and negative instances of these terms (Koleck, Tatonetti et al., 2021). The user can also view basic data visualizations of labeling statistics. Given the diversity of nursing notes and abundance of abbreviations used within, this application offers incredible potential research and clinical impact (Topaz, 2019). Further, because it was designed as an R shiny application, it can be used by individuals with no prior knowledge of natural language processing or informatics. NimbleMiner is available at https://github.com/mtopaz/NimbleMiner for public use.
Conclusion
In sum, R shiny is an innovative tool that can better position nurse scientists to make novel discoveries, more easily interpret data, and disseminate and translate findings. Importantly, the availability of electronic publications presents opportunities for creative data sharing and supports an individual’s ability to interact with data in a more immersive fashion, while also promoting responsible conduct of research through transparency, rigor, and reproducibility. Beyond the examples shown here, there is extrinsic merit for shiny applications in nursing science and multilevel research focused on the individual, social environment, health care setting, community, and policy. To continue to advance nursing science and research, we present an open call for nurse scientist training in R programming and a continued push toward doctoral and postdoctoral training in data analytics, tools, workflows, and graphics/scientific data visualization.
Supplemental Material
Supplementary Material for Advancing Nursing Research Through Interactive Data Visualization With R Shiny by Lacey W. Heinsberg, Theresa A. Koleck, Mitali Ray, Daniel E. Weeks, and Yvette P. Conley in Biological Research For Nursing.
Acknowledgments
Our sincere thanks to the anonymous reviewers who took the time to thoughtfully evaluate this paper as their feedback improved the clarity and value of our work.
Authors’ Note: The funders had no role in the design/conduct of the study including writing of the manuscript or decision to publish the results.
Author Contributions: Conception: Heinsberg, LW, Conley, YP; design: Heinsberg, LW, Weeks, DF, Conley, YP; data acquisition: Heinsberg, LW; data analysis: Heinsberg, LW; drafted manuscript: Heinsberg, LW. All the authors contributed to interpretation, critically revised manuscript, gave final approval and agreed to be held accountable for all aspects of work, ensuring integrity and accuracy.
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding: The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: Research reported in this publication was supported by the National Institutes of Health under award numbers TL1TR001858, K99HD107030, T32HL083825, T32NR009759, and R00NR017651.
Data Availability: Availability of code and simulated data: https://github.com/lwheinsberg/NurShiny
Supplemental Material: Supplemental material for this article is available online.
ORCID iDs
Lacey W. Heinsberg https://orcid.org/0000-0002-7690-5485
Theresa A. Koleck https://orcid.org/0000-0002-2944-9034
Mitali Ray https://orcid.org/0000-0002-7175-8287
Daniel E. Weeks https://orcid.org/0000-0001-9410-7228
Yvette P. Conley https://orcid.org/0000-0002-1784-6067
References
- Agarwal K., Maki K. A., Vizioli C., Carnell S., Goodman E., Hurley M., Harris C., Colwell R., Steele K., Joseph P. V. (2022). The neuro-endo-microbio-ome study: A pilot study of neurobiological alterations pre- versus post-bariatric surgery. Biological Research for Nursing, 24(3), 362–378. 10.1177/10998004221085976 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Al-Zaiti S., Besomi L., Bouzid Z., Faramand Z., Frisch S., Martin-Gill C., Gregg R., Saba S., Callaway C., Sejdić E. (2020). Machine learning-based prediction of acute coronary syndrome using only the pre-hospital 12-lead electrocardiogram. Nature Communications, 11(1), 3966. 10.1038/s41467-020-17804-2 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Application layout guide . (2021). Shiny from R Studio. https://shiny.rstudio.com/articles/layout-guide.html
- Baldry A. (2022). designer: ‘‘Shiny” UI prototype builder. [Google Scholar]
- Barcelona V., Montalvo-Ortiz J. L., Wright M. L., Nagamatsu S. T., Dreisbach C., Crusto C. A., Sun Y. V., Taylor J. Y. (2021). DNA methylation changes in African American women with a history of preterm birth from the InterGEN study. BMC Genomic Data, 22(1), 30. 10.1186/s12863-021-00988-x [DOI] [PMC free article] [PubMed] [Google Scholar]
- Chang W., Cheng J., Allaire J., Sievert C., Schloerke B., Xie Y., Allen J., McPherson J., Dipert A., Borges B. (2021). shiny: Web application framework for R (R package version 1.7.1). https://cran.r-project.org/package=shiny [Google Scholar]
- Dreisbach C., Koleck T. A. (2020). The state of data science in genomic nursing. Biological Research for Nursing, 22(3), 309–318. 10.1177/1099800420915991 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Harris C. S., Miaskowski C. A., Dhruva A. A., Cataldo J., Kober K. M. (2021). Multi-staged data-integrated multi-omics analysis for symptom science research. Biological Research for Nursing, 23(4), 596–607. 10.1177/10998004211003980 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Heinsberg L., Weeks D., Alexander S., Minster R., Sherwood P., Poloyac S., S D., Crago E., Conley Y. (2021). Iron homeostasis pathway DNA methylation trajectories reveal a role for STEAP3 metalloreductase in patient outcomes after aneurysmal subarachnoid hemorrhage. Epigenetics Communications. Advance online publication. 10.1186/s43682-021-00003-5 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Heinsberg L. W., Weeks D. E. (2022). BDNF_DNAmMap. https://github.com/lwheinsberg/BDNF_DNAmMap [Google Scholar]
- Holtz Y. (2018). R graph gallery: ggplot2. https://r-graph-gallery.com/ggplot2-package.html [Google Scholar]
- Koleck T. A., Tatonetti N. P., Bakken S., Mitha S., Henderson M. M., George M., Miaskowski C., Smaldone A., Topaz M. (2021. a). Identifying symptom information in clinical notes using natural language processing. Nursing Research, 70(3), 173–183. 10.1097/NNR.0000000000000488 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Koleck T. A., Topaz M., Tatonetti N. P., George M., Miaskowski C., Smaldone A., Bakken S. (2021. b). Characterizing shared and distinct symptom clusters in common chronic conditions through natural language processing of nursing notes. Research in Nursing & Health, 44(6), 906–919. 10.1002/nur.22190 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lakiotaki K., Kartsaki E., Kanterakis A., Katsila T., Patrinos G. P., Potamias G. (2016). ePGA: A web-based information system for translational pharmacogenomics. PloS One, 11(9), Article e0162801. 10.1371/journal.pone.0162801 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Masuadi E., Mohamud M., Almutairi M., Alsunaidi A., Alswayed A. K., Aldhafeeri O. F. (2021). Trends in the usage of statistical software and their associated study designs in health sciences research: A bibliometric analysis. Cureus, 13(1), Article e12639. 10.7759/cureus.12639 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Python Software Foundation . (n.d.). Python. https://www.python.org/
- Team R. C. (2018). R: A language and environment for statistical computing (3.5.0). R Foundation for Statistical Computing. https://www.r-project.org/ [Google Scholar]
- Topaz M. (2019). NimbleMiner: A novel multi-lingual text mining application. Studies in Health Technology and Informatics, 264, 1608-1609. 10.3233/SHTI190558. [DOI] [PubMed] [Google Scholar]
- Topaz M., Murga L., Bar-Bachar O., McDonald M., Bowles K. (2019). NimbleMiner: An open-source nursing-sensitive natural language processing system based on word embedding. Computers, Informatics, Nursing: CIN, 37(11), 583–590. 10.1097/CIN.0000000000000557 [DOI] [PubMed] [Google Scholar]
- Wickham H. (2016). ggplot2: Elegant graphics for data analysis. Springer-Verlag. https://ggplot2.tidyverse.org [Google Scholar]
- Wood E., Yang Q., Steinberg D., Barnes A., Vaughn J., Vorderstrasse A., Crowley M., Henriquez C., Streicher M., Bass Blue D., Choi S., Shaw R. J. (2019). Diabetes mobile care: Aggregating and visualizing data from multiple mobile health technologies. In AMIA Joint Summits on Translational Science Proceedings. AMIA Joint Summits on Translational Science (pp. 202–211). Washington, DC. [PMC free article] [PubMed] [Google Scholar]
- Wright M. L., Higgins M., Taylor J. Y., Hertzberg V. S. (2019). NuRsing research in the 21st century: R you ready? Biological Research for Nursing, 21(1), 114–120. 10.1177/1099800418810514 [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Supplementary Material for Advancing Nursing Research Through Interactive Data Visualization With R Shiny by Lacey W. Heinsberg, Theresa A. Koleck, Mitali Ray, Daniel E. Weeks, and Yvette P. Conley in Biological Research For Nursing.