Core Workflows and Functions

engager package

2026-07-21

Overview

This vignette demonstrates the supported v0.1.0 core using the package’s public API:

Supported Functions

The package exposes additional interactive guidance helpers, but the functions below define the supported analysis workflow for v0.1.0:

Supported workflow functions ( 21 ):

Core Workflow

1. Load and Process Transcript

# Load a sample transcript
transcript_file <- system.file("extdata/test_transcripts/intro_statistics_week1.vtt",
  package = "engager"
)

# Load the transcript
transcript <- load_zoom_transcript(transcript_file)
cat("Transcript loaded with", nrow(transcript), "comments\n")
#> Transcript loaded with 56 comments

2. Process and Summarize

# Process transcript with privacy defaults
processed <- process_zoom_transcript(
  transcript_df = transcript,
  add_dead_air = TRUE,
  consolidate_comments = TRUE
)

metrics <- summarize_transcript_metrics(
  transcript_df = processed,
  names_exclude = c("dead_air")
)

head(metrics)
#> # A tibble: 4 × 13
#>   transcript_file   name      n duration wordcount comments perc_n perc_duration
#>   <chr>             <chr> <int>    <dbl>     <dbl> <I<list>  <dbl>         <dbl>
#> 1 intro_statistics… Stud…    14      155       361 <chr>      46.7         71.8 
#> 2 intro_statistics… Stud…     6       23        48 <chr>      20           10.6 
#> 3 intro_statistics… Stud…     5       19        37 <chr>      16.7          8.80
#> 4 intro_statistics… Stud…     5       19        40 <chr>      16.7          8.80
#> # ℹ 5 more variables: perc_wordcount <dbl>, n_perc <dbl>, duration_perc <dbl>,
#> #   wordcount_perc <dbl>, wpm <dbl>

3. Plot and Export

engagement_plot <- plot_users(
  metrics,
  metric = "n",
  facet_by = "none",
  mask_by = "name"
)
print(engagement_plot)


output_file <- tempfile(fileext = ".csv")
write_metrics(
  metrics,
  what = "engagement",
  path = output_file,
  comments_policy = "omit"
)
stopifnot(file.exists(output_file))
unlink(output_file)

4. Run a Privacy Review

# Check privacy risk with synthetic data
synthetic_data <- data.frame(
  name = c("Student A", "Student B", "Instructor"),
  message = c("Hello", "Good morning", "Welcome to class"),
  timestamp = c("00:01:00", "00:02:00", "00:00:30")
)

# Privacy review helpers flag recognized identifier-like columns. They do not
# prove that a data set or free-text field contains no identifying information.
privacy_review <- review_privacy_risks(synthetic_data, audit_log = FALSE)
privacy_review$pii_detected
#> [1] "name"
privacy_review$recommendations
#> [1] "PII detected in columns: name"                                                                                   
#> [2] "Consider using ensure_privacy() to mask identifiable data"                                                       
#> [3] "Review institutional privacy policies for data handling"                                                         
#> [4] "Ensure data access is limited to authorized personnel"                                                           
#> [5] "Use ensure_privacy(..., privacy_level = 'mask') or write_metrics(..., privacy_level = 'mask') for masked outputs"
#> [6] "Implement secure data storage and transmission"                                                                  
#> [7] "Train personnel on applicable privacy requirements"                                                              
#> [8] "Maintain audit trails for data access and modifications"

Function Categories

Transcript Processing

Analysis

Privacy Review

Name Matching

Utilities

Supported Boundaries

Users remain responsible for reviewing inputs, free text, outputs, sharing decisions, and institutional requirements.