Communicate

LAW Module 4: A Code-a-long

Welcome to the LAW Code-a-long 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

Preparing Findings for Communication

Dashboards via Quarto

  • Process can be automated using R and R Markdown, and knitted using Quarto

  • Dashboards are valuable because they can include interactive elements

  • By using HTML, dashboards are :

    • Essentially universal and readable by any computer

    • Has no password protection for ease of distribution

  • Navigation bar: Icon, title, and author along with links to sub-pages if needed

  • Pages, rows, & columns: Defined using markdown headings (with optional attributes to control height, width, etc.)

  • Tabsets: Used to further divide content within a row or column

  • Cards: Containers for plots, data display, and free form content, typically mapped to cells in your notebook or source document

  • Sidebars and toolbars: 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
---

Basic Dashboard

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

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!

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?