Communicate

Foundations Module 4: A Code-A-long

Welcome to Foundations code along for Module 4

In the communicate section of the Learning Analytics workflow, the focus is on effectively presenting and sharing the results of your analysis with stakeholders. This involves creating clear and compelling visualizations, writing comprehensive reports, and delivering presentations that highlight key insights and actionable recommendations.

The goal is to ensure that the findings are easily understood and can inform decision-making processes, ultimately leading to improved educational outcomes. Utilizing tools like ggplot2 for visualizations and packages like RMarkdown for report generation can enhance the clarity and impact of your communication.

Communicate

Flow

DASHBOARD Product

Process can be automated using R and R Markdown

Output can include interactive elements

Output as a stand alone html file - Universal file format - No requirement for password protected shiny server - Can continue to be distributed via email to restrict access

Navigation Bar — Icon, title, and author along with links to sub-pages (if more than one page is defined).

Pages, Rows, Columns, and Tabsets — Pages, rows and columns are defined using markdown headings (with optional attributes to control height, width, etc.). Tabsets can be used to further divide content within a row or column.

Cards, Sidebars, and Toolbars — Cards are containers for plots, data display, and free form content. The content of cards typically maps to cells in your notebook or source document. Sidebars and toolbars are used to present inputs within interactive dashboards.

Define output as flexdashboard in YAML header of R Markdown document:

---
title: "ADD A TITLE"
output:
  flexdashboard::flex_dashboard:
    theme: 
      version: 4
      bootswatch: pulse
    source_code: embed
  html_document:
    df_print: paged
editor_options: 
  chunk_output_type: console
---

dashboard template

Layout: Rows

---
title: "Focal (Top)"
format: dashboard
---
    
## Row {height=70%}

```{r}
```

## Row {height=30%}

```{r}
```

```{r}
```

Layout: Columns

---
title: "Focal (Top)"
format: 
  dashboard:
    orientation: columns
---
    
## Column {width=60%}

```{r}
```

## Column {width=40%}

```{r}
```

```{python}
```

Tabset

---
title: "Palmer Penguins"
format: dashboard
---
    
## Row

```{r}
```

## Row {.tabset}

```{r}
#| title: Chart 2
```

```{r}
#| title: Chart 3
```

Plots

Each code chunk makes a card, and can take a title

```{r}
#| title: GDP and Life Expectancy
library(gapminder)
library(tidyverse)
ggplot(gapminder, aes(x = gdpPercap, y = lifeExp, color = continent)) +
  geom_point()
```

Tables

Each code chunk makes a card, doesn’t have to have a title

```{r}
library(gapminder)
library(tidyverse)
library(gt)
gapminder |>
  group_by(continent, year) |>
  summarize(mean_lifeExp = round(mean(lifeExp), 1)) |>
  pivot_wider(names_from = continent, values_from = mean_lifeExp) |>
  gt()
```

Other features

  • Text content

  • Value boxes

  • Expanding cards

Dashboard deployment

Dashboards are typically just static HTML pages so can be deployed to any web server or web host!

Interactive Dashboards

https://quarto.org/docs/dashboards/interactivity/shiny-r

  • For interactive exploration, some dashboards can benefit from a live R backend

  • To do this with Quarto Dashboards, add interactive Shiny components

  • Deploy with or without a server!

Communicate in the LA workflow

The final(ish) step in our workflow/process is sharing the results of analysis with wider audience. Krumm et al.(2018) have outline the following 3-step process for communicating with education stakeholders what you have learned through analysis:

  1. Select. Communicating what one has learned involves selecting among those analyses that are most important and most useful to an intended audience, as well as selecting a form for displaying that information, such as a graph or table in static or interactive form, i.e.a “data product.”

  2. Polish. After creating initial versions of data products, research teams often spend time refining or polishing them, by adding or editing titles, labels, and notations and by working with colors and shapes to highlight key points.

  3. Narrate. Writing a narrative to accompany the data products involves, at a minimum, pairing a data product with its related research question, describing how best to interpret the data product, and explaining the ways in which the data product helps answer the research question.

Make a dashboard for your Stakeholder!

Create a Data Story with our current data set

  • Develop a research question
  • Add ggplot visualizations
  • Modeling visualizations
  • add a short write up for the intended stakeholders

Resources

Quarto Dashboard in R

Quarto Dashboard Gallery layouts

Quarto dashboard: Easy interactive dashboards for R

What’s next?