GWalkR::gwalkr

BSTA 526 Functions of the Week

An Introduction to an Interactive Exploratory Data Analysis Tool
Author

Anabel Mendoza

Published

February 12, 2026

1 The Data

Launched in 1948, the Framingham Heart Study is a landmark prospective cohort study that identified key modifiable risk factors for cardiovascular disease, such as hypertension and smoking. This specific data is a subset of the Framingham Heart study which looks at measurements of 9 variables on 4,699 initially disease-free subjects measured at baseline.

Reference: Amy S. Nowacki, “Framingham Didactic Dataset”, TSHS Resources Portal (2015). Framingham link

library(here)
here() starts at /Users/niederha/Library/CloudStorage/OneDrive-OregonHealth&ScienceUniversity/teaching/BSTA 526/W26/0_webpage_W26/BSTA_526_W26
framingham_raw <- read.csv(here("function_week", "data", "framingham.csv"))

2 Function(s) Name(s)

What function(s) is being presented and what package is it from?

The function being presented is gwalkr()from the GWalkR package.

3 What is it for?

Discuss what the function(s) does.

This function will create a GWalkR interface with a given data frame in the ‘Viewer’ window. From there, you can click and drag variables and start exploring your data.

  • It has been compared to other interactive data visualization platforms such as Tableau.
  • The other function in the GWalkR package is gwalkr-shiny() and is used for output and render functions for using gwalkr within Shiny (interactive web applications) and interactive Rmd documents.
  • There is a similar function for Python called PyGWalker.

4 Examples

Provide at least two examples that you have created yourself for your dataset of choice that show how to use the function(s).

4.1 Example 1

Simple exploratory data analysis with visualization

#install.packages("GWalkR")

GWalkR::gwalkr(framingham_raw, lang = "en", dark = "dark", visConfigFile = here("function_week","json", "config.json"))

4.2 Example 2

Tidying of Data followed by analysis with visualization

framingham_data <- framingham_raw %>% 
  mutate(sex_cat = case_when(
    sex == 1 ~ "male", 
    sex == 2 ~ "female"
  ))


framingham_data_1 <- framingham_data %>% 
mutate(chdfate_cat = case_when(
  chdfate == 1 ~ "CHD", 
  chdfate == 0 ~ "No CHD"
))

framingham_data_1 <- framingham_data_1 %>% 
  mutate(
    across(.cols = where(is.character),
           .fns = as.factor))
    

#glimpse(framingham_data_1)

GWalkR::gwalkr(framingham_data_1, lang = "en", dark = "light", visConfigFile = here("function_week", "json", "config_1.json"))

5 Is it helpful?

Discuss whether you think this function(s) is useful for you and your work. Is it the best thing since sliced bread, or is it not really relevant to your work? If not relevant to you, can you think of examples of when it would be useful?

I think the function gwalkr is very useful when initially exploring visualization of data and alternatively when wanting to create an interactive deliverable with polished data. It doesn’t allow for the same customization level as ggplot, but still has some really cool features. I would like to continue to explore the package, however given that I am a novice in R, my current priority is to strengthen my ggplot skills. Nonetheless, having this function in my toolbox will be very helpful as I continue my journey in epidemiology.