Learn R Programming

bidux

Overview

The {bidux} package helps Shiny developers create more effective dashboards using the Behavioral Insight Design (BID) Framework. If you’ve ever wondered why users struggle with your carefully crafted dashboards, or why your beautifully visualized data doesn’t drive the decisions you expected, this package is for you.

The core insight: Technical excellence ≠ User success. Even the most sophisticated analysis can fail if users can’t quickly understand and act on it.

The BID framework bridges this gap by integrating behavioral science, UX best practices, and data storytelling techniques into a systematic 5-stage process:

  1. Interpret the User’s Need - Like defining your research question and understanding your data
  2. Notice the Problem - Like identifying data quality issues or analytical bottlenecks
  3. Anticipate User Behavior - Like checking for statistical biases that could skew results
  4. Structure the Dashboard - Like choosing the right visualization or model architecture
  5. Validate & Empower the User - Like testing your model and ensuring stakeholders can act on results

Installation

You can install the released version of bidux from CRAN with:

install.packages("bidux")

And the development version from this repo with:

# install.packages("pak")
pak::pak("jrwinget/bidux")

Quick Start

Need immediate UX suggestions? Use bid_quick_suggest():

library(bidux)

# Get quick suggestions for a specific problem
suggestions <- bid_quick_suggest(
  problem = "Users are overwhelmed by too many filter options"
)

# View ranked suggestions with component recommendations
print(suggestions)

Full BID Workflow

For comprehensive dashboard redesigns, use the complete 5-stage process:

# Document a complete BID process
process <- bid_interpret(
  central_question = "How are our marketing campaigns performing across different channels?",
  data_story = new_data_story(
    hook = "Recent campaign performance varies significantly across channels",
    context = "We've invested in 6 different marketing channels over the past quarter",
    tension = "ROI metrics show inconsistent results, with some channels underperforming",
    resolution = "Identify top-performing channels and key performance drivers"
  )
) |>
  bid_notice(
    problem = "Users are overwhelmed by too many filter options and struggle to find relevant insights",
    evidence = "User testing shows 65% of first-time users fail to complete their intended task within 2 minutes"
  ) |>
  bid_anticipate(
    bias_mitigations = list(
      anchoring = "Include previous period performance as reference points",
      framing = "Provide toggle between ROI improvement vs. ROI gap views"
    )
  ) |>
  bid_structure() |>
  bid_validate(
    summary_panel = "Executive summary highlighting top and bottom performers, key trends, and recommended actions",
    next_steps = c(
      "Review performance of bottom 2 channels",
      "Increase budget for top-performing channel",
      "Schedule team meeting to discuss optimization strategy"
    )
  )

# View implementation suggestions for specific packages
bid_suggest_components(process, package = "bslib")

# Generate comprehensive reports
bid_report(process, format = "html")

Data-Driven UX with Telemetry

New in 0.3.2: Enhanced telemetry workflow transforms real user behavior data into actionable BID insights.

# Modern approach: analyze telemetry data with bid_telemetry()
# Returns a clean tibble of issues (without legacy list structure)
issues <- bid_telemetry("telemetry.sqlite")
print(issues)  # Shows organized issue summary with severity levels

# Adjust sensitivity with presets
strict_issues <- bid_telemetry(
  "telemetry.sqlite",
  thresholds = bid_telemetry_presets("strict")    # or "moderate", "relaxed"
)

# Focus on critical issues using tidy workflows
library(dplyr)

critical_issues <- issues |>
  filter(severity == "critical") |>
  arrange(desc(impact_rate))

# Convert high-priority issues to BID Notice stages
notices <- bid_notices(
  critical_issues,
  previous_stage = interpret_result
)

# Use telemetry flags to inform structure decisions
flags <- bid_flags(issues)
structure_result <- bid_structure(
  previous_stage = anticipate_result,
  telemetry_flags = flags  # Influences layout selection
)

The bid_telemetry() function automatically identifies five key friction indicators:

  • Unused Inputs: UI controls rarely interacted with
  • Delayed Interactions: Long time-to-first-action patterns
  • Frequent Errors: Recurring error patterns that disrupt workflows
  • Navigation Drop-offs: Pages or tabs users rarely visit
  • Confusion Patterns: Rapid repeated changes indicating user uncertainty

Function comparison: - bid_telemetry(): Modern API returning a clean tibble (recommended for new code) - bid_ingest_telemetry(): Legacy API returning hybrid object with list structure (for backward compatibility)

Key Features

Behavioral Science Integration

  • Bias Mitigation: Address anchoring, framing, confirmation bias, and choice overload
  • Cognitive Load Management: Implement progressive disclosure and visual hierarchy
  • Peak-End Rule: Structure experiences for positive, actionable endings

Implementation Support

  • Component Suggestions: Get tailored recommendations for {bslib}, {reactable}, {echarts4r}, and more
  • Layout Selection: Automatic layout recommendations based on content and telemetry flags
  • Concept Dictionary: Access 50+ behavioral science concepts with implementation tips

Real User Data Integration

  • Telemetry Analysis: Transform usage patterns into design insights
  • Evidence-Based Design: Ground design decisions in actual user behavior
  • Iterative Improvement: Track UX improvements with before/after telemetry comparison

Learning More

The BID framework is based on established behavioral science and UX design principles. Explore the concept dictionary:

# Browse all available concepts
bid_concepts() |>
  select(concept, category, description)

# Get detailed information about specific concepts
bid_concept("Processing Fluency")
bid_concept("Hick's Law")

# Search for concepts by keyword
bid_concepts("cognitive") |>
  select(concept, implementation_tips)

Getting Help

  • Browse the documentation: help(package = "bidux")
  • Read the vignettes:
    • vignette("behavioral-science-primer"): Behavioral science for data scientists
    • vignette("introduction-to-bid"): Framework overview and core principles
    • vignette("telemetry-integration"): Data-driven UX workflows
    • vignette("practical-examples"): Practical dashboard examples
    • vignette("getting-started"): Complete walk-through with examples
    • vignette("concepts-reference"): Behavioral science concepts with practical implementation
    • vignette("advanced-workflows"): Advanced BID workflows
  • Visit the BID framework repository: https://github.com/jrwinget/bid-framework

Code of Conduct

Please note that the bidux project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.

Copy Link

Version

Install

install.packages('bidux')

Monthly Downloads

201

Version

0.3.3

License

MIT + file LICENSE

Maintainer

Jeremy Winget

Last Published

November 19th, 2025

Functions in bidux (0.3.3)

bid_notices

Create multiple Notice stages from telemetry issues
bid_flags

Extract telemetry flags from bid_issues object
bid_get_quiet

Get current quiet mode setting
bid_quick_suggest

Quick UX Suggestions for R Dashboard Developers
bid_notice_issue

Create Notice stage from individual telemetry issue
bid_set_quiet

Set global quiet mode for bidux functions
bid_result

Constructor for BID result collection objects
bidux-package

bidux: Behavioral Insight Design: A Toolkit for Integrating Behavioral Science in UI/UX Design
bid_structure

Document Dashboard Structure Stage in BID Framework
bid_telemetry_presets

Get predefined telemetry sensitivity presets
bid_validate

Document User Validation Stage in BID Framework
bid_with_quiet

Temporarily suppress bidux messages
bid_stage

Constructor for BID stage objects
bid_telemetry

Concise telemetry analysis with tidy output
bid_suggest_components

Suggest UI Components Based on BID Framework Analysis
.calculate_severity_metrics

Calculate severity metrics for an issue
extract_stage

Extract specific stage from bid_result
create_error_notice

Create notice stage for error patterns
.flags_from_issues

Extract global telemetry flags from issues and events
extract_stage1_theory

Extract theory concepts from Stage 1 (Notice)
detect_telemetry_format

Auto-detect telemetry format from file extension
build_groups_with_suggestions

Build suggestion groups organized by concept
find_error_patterns

Find error patterns in telemetry
create_navigation_notice

Create notice stage for navigation issues
.suggest_theory_from_text

Suggest theory from text with confidence scoring and messaging
create_delay_notice

Create notice stage for delayed interactions
get_accessibility_recommendations

Get accessibility recommendations for a given context
create_unused_input_notice

Create notice stage for unused input
build_concept_group

Build suggestions for a specific concept
get_default_layout_mappings

Get default layout mappings (fallback)
.create_issues_tibble

Create tidy issues tibble from notice issues list
find_confusion_patterns

Find confusion patterns (rapid repeated changes)
get_concepts_data

Internal function to get concepts data from external files
get_default_concepts_data

Get default concepts data with lazy loading
find_navigation_dropoffs

Find navigation drop-offs or underused pages
get_concept_bias_mappings

Get bias mitigation strategies for concepts
get_metadata

Get metadata from bid_stage object
get_default_theory_mappings

Get default theory mappings (fallback)
find_delayed_sessions

Find sessions with delayed first interaction
get_onboarding_suggestions

Generate User Onboarding suggestions
get_cognitive_load_suggestions

Generate Cognitive Load Theory suggestions
create_confusion_notice

Create notice stage for confusion patterns
get_consolidated_suggestion_rules

Get consolidated suggestion rules for all BID stages
format_label

Format field label based on output format
deduplicate_warnings_suggestions

Remove duplicate warning-suggestion pairs
get_layout_concepts

Get concepts recommended for a layout
get_stage

Get stage name from bid_stage object
is_bid_stage

Check if object is a bid_stage
get_dual_processing_suggestions

Generate Dual-Processing Theory suggestions
load_concept_bias_mappings

Load concept-bias mappings
flatten_suggestions_to_tibble

Convert nested suggestion groups to flat tibble
load_accessibility_guidelines

Load accessibility guidelines
find_unused_inputs

Find unused or under-used inputs
infer_concepts_from_story

Infer concepts from Stage 2 (Interpret) story elements
print.bid_bias_mitigations

Print method for bias mitigations objects
new_user_personas

Create user personas tibble
.classify_issue_type

Classify issue type from issue key
get_proximity_suggestions

Generate Principle of Proximity suggestions
layout_rationale

Generate layout selection rationale
get_progressive_disclosure_suggestions

Generate Progressive Disclosure suggestions
get_fallback_suggestion

Generate fallback suggestions for stages without specific rules
get_fallback_concepts_data

Fallback concepts data for emergency use
get_visual_hierarchy_suggestions

Generate Visual Hierarchy suggestions
new_data_story

Create a data story object
is_complete

Check if workflow is complete (has all 5 stages)
new_bias_mitigations

Create bias mitigations tibble
load_layout_mappings

Load layout-concept mappings
new_bid_stage

Create a BID stage result object (internal constructor)
normalize_telemetry_columns

Normalize telemetry column names
get_information_scent_suggestions

Generate Information Scent suggestions
load_theory_mappings

Load theory mappings from external file or use defaults
get_generic_suggestions

Generate generic suggestions for unrecognized concepts
new_bid_result

Create a BID result collection object (internal constructor)
load_concepts_data

Load concepts data from external file with caching
print.bid_issues

Print method for bid_issues objects
print.bid_result

Print method for BID result objects
print.bid_data_story

Print method for data story objects
safe_stage_data_story_access

Safe access to data_story elements from previous stage
safe_lower

Safely convert text to lowercase with null handling
rank_and_sort_suggestions

Rank and sort suggestions within each group
print.bid_user_personas

Print method for user personas objects
validate_concepts_data_structure

Validate loaded concepts data structure
validate_bid_stage

Validate BID stage object
print.bid_stage

Print method for BID stage objects
read_telemetry_json

Read telemetry from JSON log file
structure_suggestions

Generate ranked, concept-grouped, actionable UI/UX suggestions
suggest_layout_from_previous

Suggest layout based on previous stage content using heuristics
summary.bid_result

Summary method for BID result objects
suggest_theory_from_mappings

Suggest theory based on problem and evidence using mappings
summary.bid_stage

Summary method for BID stage objects
read_telemetry_sqlite

Read telemetry from SQLite database
validate_bid_result

Validate BID result object
validate_param

Common validation utility for bidux functions (DRY principle)
read_telemetry_data

Read telemetry data from file or connection
bid_address

Create Notice stage from single telemetry issue (sugar)
assign_difficulty

Assign difficulty rating based on components and suggestion complexity
as_tibble.bid_issues

Convert bid_issues object to tibble
bid_anticipate

Document User Behavior Anticipation Stage in BID Framework
as_tibble.bid_stage

Convert bid_stage to tibble
bid_concept

Get detailed information about a specific concept
bid_concepts

Search BID Framework Concepts
bid_notice

Document User Notice Stage in BID Framework
apply_suggestion_rules

Apply suggestion rules to context data
assign_category

Assign category based on suggestion content and concept
bid_ingest_telemetry

Ingest telemetry data and identify UX friction points
bid_interpret

Document User Interpretation Stage in BID Framework
adjust_suggestion_score

Apply context-based scoring adjustments
bid_report

Generate BID Framework Report
bid_pipeline

Create pipeline of Notice stages from top telemetry issues (sugar)