Behavioral Insight Design: A Toolkit for Integrating Behavioral Science in UI/UX Design
Overview
Provides a framework and toolkit to guide R dashboard developers in implementing the Behavioral Insight Design (BID) framework. The package offers functions for documenting each of the five stages (Interpret, Notice, Anticipate, Structure, and Validate), along with a comprehensive concept dictionary. Works with both 'shiny' applications and 'Quarto' dashboards.
==========================
BREAKING CHANGES
- **Removed nested data_story format.** The
variablesandrelationshipsparameters have been removed fromnew_data_story(). Use the flat API instead:new_data_story(hook, context, tension, resolution). Seevignette("api-modernization")for migration guide. - **Removed layout auto-selection.** The
bid_structure()function no longer auto-selects layouts or includes alayoutfield in results. The Structure stage now focuses exclusively on concept-based suggestions. - **Removed layout-specific bias mitigations.** The
bid_anticipate()function no longer applies layout-dependent bias mappings. Use concept-based bias mitigations instead (auto-detected from Interpret stage content).
NEW FEATURES
- **OpenTelemetry (OTEL) integration for Shiny >= 1.12.0.**
bid_ingest_telemetry()andbid_telemetry()now support native Shiny OpenTelemetry span data in addition to shiny.telemetry events. OTEL spans are automatically detected and converted to the standard bidux event schema. Supported formats: OTLP JSON exports and OTEL-formatted SQLite databases. - **Automatic OTEL span-to-event conversion.** New utilities intelligently map OTEL span types to bidux events (session_start → login, session_end → logout, reactive/observe → input, output → output, navigation → navigation) with automatic ID extraction, error event handling, and duration calculation from span timestamps.
- **Enhanced telemetry readers.** New
read_otel_json()andread_otel_sqlite()functions handle OTLP-formatted telemetry data with robust parsing. Exported utilities (convert_otel_spans_to_events(),detect_otel_json(), etc.) enable custom OTEL workflows. - **Analytics recommendations for static dashboards.** New
bid_suggest_analytics()function recommends alternative analytics solutions (Plausible, Matomo, PostHog, etc.) for static Quarto dashboards where shiny.telemetry isn't available, with filtering by privacy preferences, budget, and self-hosting requirements.
IMPROVEMENTS
- **Unified telemetry pipeline.** Both shiny.telemetry and OTEL data flow through the same analysis pipeline, ensuring consistent friction detection regardless of telemetry source.
Show all changes in 0.4.0Hide the rest of the changes in 0.4.0
- **Enhanced documentation.** New
vignette("otel-integration")provides comprehensive setup guide for Shiny >= 1.12.0 OpenTelemetry. Updatedvignette("api-modernization")documents breaking changes and migration paths.
BUG FIXES
- Fixed edge cases in session ID extraction from nested OTEL attribute structures
- Improved error message extraction from OTEL span events
- Enhanced handling of reactive updates and observeEvent spans
- Corrected duration calculation for spans with missing end timestamps
TESTING
- Added 500+ new OTEL test cases covering span conversion, format detection, backward compatibility, and edge cases
- All 2472 tests passing with comprehensive coverage of new features and breaking changes
NOTES
- OpenTelemetry support requires Shiny >= 1.12.0 and optional
otelpackage installation - Existing shiny.telemetry code continues to work unchanged - no migration required for telemetry features
- See
vignette("api-modernization")for guidance on migrating from removed features
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-08
- ERROR12 OK, 1 ERROR2026-09-07
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
Show 2 earlier changesHide 2 earlier changes
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 125 (78 internal)includes a package overview page
- Examples that run
- 50%16 run in a plain check (2 of them under a condition) · 16 never run
- Exported functions with examples
- 62%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
- Advanced BID Workflows HTML
- Behavioral Science for Data Scientists HTML
- BID Framework Concepts: Practical Implementation HTML
- bidux API Modernization Features HTML
- Getting Started with bidux HTML
- Integrating {shiny.telemetry HTML
- Introduction to the BID Framework HTML
- Practical Examples: Dashboard Transformations HTML
- Quick Start: Improve Your Shiny Dashboard in 15 Minutes HTML
- Using Shiny's Native OpenTelemetry with Bidux HTML
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 92
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Releases over time
Issues over time
PRs over time
15 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/jrwinget/bidux on 2026-10-22.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Funding links: Buy Me a Coffee
GitHub Pages site last deployed 2026-02-27 · The repository has a site deploy workflow
pkgdown site last built 2026-02-27
Show all practicesHide 2 practices
This repository has an AI review tool set up.
- Copilot code reviewCommits: at least 1 accepting its review suggestions
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- RR 4.6.0 released · 2026-04-24
- 0.4.0Latest2026-02-27 · current release · diff ↗ ·
added 2 exports
bid_suggest_analytics, convert_otel_spans_to_events - 0.3.3
- 0.3.22025-10-28 · diff ↗ ·
added 7 exports
bid_get_quiet, bid_set_quiet, bid_telemetry_presets, bid_with_quiet, new_bias_mitigations, new_data_story, new_user_personas - 0.3.12025-09-08 · diff ↗ ·
added 6 exports
bid_address, bid_flags, bid_notice_issue, bid_notices, bid_pipeline, bid_telemetry - 0.3.0
- 0.1.02025-06-13
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2025-06-13
- Total releases
- 6 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 1.0 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("bidux")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-25, which the citation names so these numbers can be found later. More on citing and the projects behind them.