Package: brightspaceR 0.1.0

brightspaceR: Access D2L 'Brightspace' Data Sets via the 'BDS' API

Connect to the D2L 'Brightspace' Data Sets ('BDS') API via 'OAuth2', download all available datasets as tidy data frames with proper types, join them using convenience functions that know the foreign key relationships, and analyse student engagement, performance, and retention with ready-made analytics functions.

Authors:Peeyoosh Chandra [aut, cre]

brightspaceR_0.1.0.tar.gz
brightspaceR_0.1.0.zip(r-4.7-any)brightspaceR_0.1.0.zip(r-4.6-any)brightspaceR_0.1.0.zip(r-4.5-any)
brightspaceR_0.1.0.tgz(r-4.6-any)brightspaceR_0.1.0.tgz(r-4.5-any)
brightspaceR_0.1.0.tar.gz(r-4.7-any)brightspaceR_0.1.0.tar.gz(r-4.6-any)
brightspaceR_0.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
brightspaceR/json (API)

# Install 'brightspaceR' in R:
install.packages('brightspaceR', repos = c('https://pcstrategyandopsco.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/pcstrategyandopsco/brightspacer/issues

Pkgdown/docs site:https://pcstrategyandopsco.github.io

On CRAN:

Conda:

4.86 score 2 stars 512 downloads 54 exports 39 dependencies

Last updated from:9e87b6f2bf. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK150
source / vignettesOK216
linux-release-x86_64OK169
macos-release-arm64OK122
macos-oldrel-arm64OK136
windows-develOK82
windows-releaseOK79
windows-oldrelOK83
wasm-releaseOK117

Exports:bs_ads_filterbs_ads_job_statusbs_api_versionbs_apply_diffsbs_apply_field_policybs_assessment_performancebs_assignment_completionbs_authbs_auth_refreshbs_auth_tokenbs_check_scopesbs_clean_namesbs_configbs_config_setbs_course_engagementbs_course_summarybs_create_ads_jobbs_deauthbs_diff_manifestbs_download_adsbs_download_allbs_download_datasetbs_engagement_scorebs_engagement_summarybs_enrich_enrollmentsbs_filter_test_usersbs_get_adsbs_get_ads_schemabs_get_datasetbs_get_dataset_currentbs_get_schemabs_get_timezonebs_grade_summarybs_has_tokenbs_identify_at_riskbs_joinbs_join_content_progressbs_join_enrollments_gradesbs_join_enrollments_orgunitsbs_join_enrollments_rolesbs_join_grades_objectsbs_join_users_enrollmentsbs_list_adsbs_list_ads_jobsbs_list_ads_schemasbs_list_datasetsbs_list_extractsbs_list_schemasbs_org_idbs_pseudonymise_dfbs_pseudonymise_idbs_retention_summarybs_set_timezonebs_summarize_enrollments

Dependencies:askpassbitbit64clicliprconfigcpp11crayoncurldplyrgenericsgluehmshttr2lifecyclelubridatemagrittropensslpillarpkgconfigprettyunitsprogresspurrrR6rappdirsreadrrlangstringistringrsystibbletidyselecttimechangetzdbutf8vctrsvroomwithryaml

MCP Server: Design and Implementation
The Problem | Design Principles | Compute where compute belongs | Visualization: interactive HTML first, static PNG fallback | Outcome-oriented tools | Progressive disclosure | Server instructions | Architecture | Persistent workspace | Output directory | Smart result formatting | Column summary helper | Response helpers | Size guard | Defensive execution | Tool Reference | Discovery tools | Analysis tools | Types of Analysis | Enrollment analytics | Grade performance | Student engagement | Course health | Cross-dataset joins | Reporting and dashboards | Typical Conversation Flow | PII Field Policy | Policy file | Default policy | Custom policy | Where filtering happens | ID Pseudonymisation | How it works | Which columns are hashed | Where it runs | Combined effect with field policy | Audit Logging | Security Considerations

Last update: 2026-07-09
Started: 2026-03-06

Privacy Compliance and De-identification Standards
Standards Reference | ENISA — Pseudonymisation Techniques and Best Practices | NIST SP 800-188 — De-Identifying Government Datasets | NIST IR 8053 — De-Identification of Personal Information | ISO 25237:2017 — Health Informatics: Pseudonymization | GDPR Article 4(5) + EDPB Guidelines 01/2025 on Pseudonymisation | FERPA — De-Identification of Education Records | HIPAA Safe Harbor and Expert Determination | Compliance Summary | What the MCP Server Does Automatically | Applying Privacy Protections in R Scripts | Step 1: Suppress direct identifiers | Step 2: Pseudonymise person-referencing IDs | Step 3: Apply minimum cell sizes (for FERPA compliance) | Step 4: Generalise dates (optional, for stronger de-identification) | Step 5: Audit trail | Complete Example: FERPA-Aligned Analysis Script | Key Principles | Further Reading

Last update: 2026-03-18
Started: 2026-03-18

MCP Server Setup
Prerequisites | Locating the server script | Claude Desktop setup | Step 1: Find your config file | Step 2: Add the brightspaceR server | Step 3: Restart Claude Desktop | Step 4: Verify the connection | Claude Code (CLI) setup | Option A: Global configuration (~/.claude.json) | Option B: Project-level configuration (.mcp.json) | Verify in Claude Code | Environment variables | Available tools | Example conversation | Security | Troubleshooting | Server not starting | Authentication failures | No tools appearing in Claude Desktop | Visualisations not appearing

Last update: 2026-03-18
Started: 2026-03-08

MCP Server Test Script
Test 1: Auth check | Test 2: Dataset discovery | Test 3: Keyword search | Test 4: Dataset description with column stats | Test 5: Simple execute_r -- scalar result | Test 6: execute_r -- data frame result | Test 7: execute_r -- persistent workspace | Test 8: Interactive Chart.js chart | Test 8b: Static ggplot fallback | Test 9: get_data_summary -- basic | Test 10: get_data_summary -- with filter | Test 11: get_data_summary -- with group_by | Test 12: execute_r -- join and analyze | Test 13: execute_r -- error handling | Test 14: Multi-step analysis (integration test) | Test 15: Removed tools are gone | Test 16: list_schemas | Test 17: AST code inspection -- blocked code | Test 18: AST code inspection -- blocked package access | Test 19: AST code inspection -- safe code passes | Test 20: PII field policy -- Users dataset | Test 21: PII field policy -- Grade Results | Test 22: Audit log exists | Test 23: ID pseudonymisation — UserId is hashed | Troubleshooting

Last update: 2026-03-18
Started: 2026-03-06

OAuth2 Setup for Brightspace Data Sets
Step 1: Register an OAuth2 Application | About the Redirect URI | About Scopes | Tier 1: BDS only (minimum) | Tier 2: BDS + ADS (recommended) | Verifying scopes | Scope reference | Step 2: Configure Your R Environment | Option A: Config file (recommended) | Option B: Environment variables | Credential resolution order | Step 3: Authenticate | Token Caching and Refresh | Non-interactive Environments (Scheduled Scripts) | Step 4: Verify It Works | Troubleshooting | "No client ID found" | Browser doesn't open | "No authorization code found in the redirect URL" | 403 Forbidden errors | Token expired and won't refresh | References

Last update: 2026-03-10
Started: 2026-03-06

Getting Started with brightspaceR
Overview | Prerequisites | Discovering Datasets | Downloading Datasets | Joining Datasets | Column Types and Schemas | Advanced Data Sets (ADS) | Configuration | Cleaning Up

Last update: 2026-03-08
Started: 2026-03-06

Building an Interactive Dashboard
Strategy | Step 1: Create the Rmd template | Step 2: Data preparation chunk | Step 3: HTML layout with inline R | Step 4: Chart.js with inline R data | Step 5: CSS styling | Rendering | Parameterised reports | Using with the MCP server | Why Chart.js instead of plotly?

Last update: 2026-03-06
Started: 2026-03-06

Convenience Functions: Joins, Schemas, and Data Wrangling
Fetching datasets | Single dataset by name | Discovery | Bulk download | Joining datasets | Smart join: bs_join() | Named join functions | Chaining joins | Schemas and column types | Why schemas matter | Registered schemas | Inspecting a schema | Unknown datasets | Column name conversion | Common patterns | Enrollment counts by role | Grade summary for a course | Active users in the last 90 days | Content completion rates

Last update: 2026-03-06
Started: 2026-03-06

Shiny App Example: LMS Explorer
Prerequisites | The complete app | Running the app | How it works | Data loading | Filtering | Chart rendering | Extending the app | Adding authentication | Adding a download button | Scheduled data refresh | Deploying to Posit Connect / shinyapps.io

Last update: 2026-03-06
Started: 2026-03-06

Readme and manuals

Help Manual

Help pageTopics
Build an ADS export filterbs_ads_filter
Check ADS export job statusbs_ads_job_status
Get or set the Brightspace API versionbs_api_version
Apply a PII field policy to a data framebs_apply_field_policy
Summarize assessment performance per user per quizbs_assessment_performance
Summarize assignment submission completionbs_assignment_completion
Authenticate with Brightspacebs_auth
Authenticate with a refresh tokenbs_auth_refresh
Set Brightspace authentication token directlybs_auth_token
Test Brightspace API scope accessbs_check_scopes
Convert column names from PascalCase to snake_casebs_clean_names
Read Brightspace credentials from a config filebs_config
Create or update a Brightspace config filebs_config_set
Calculate per-user per-course engagement metricsbs_course_engagement
Summarize course effectivenessbs_course_summary
Create an ADS export jobbs_create_ads_job
Clear Brightspace authenticationbs_deauth
Inspect the extract manifest from a merged BDS datasetbs_diff_manifest
Download a completed ADS exportbs_download_ads
Download all available datasetsbs_download_all
Download a dataset extractbs_download_dataset
Add a composite engagement scorebs_engagement_score
Summarize engagement by grouping dimensionbs_engagement_summary
Enrich enrollments with org unit and user detailsbs_enrich_enrollments
Filter test users from a datasetbs_filter_test_users
Get an ADS dataset by name (convenience wrapper)bs_get_ads
Get the schema for an ADS datasetbs_get_ads_schema
Get a dataset by namebs_get_dataset
Get current dataset by merging full and differential extractsbs_get_dataset_current
Get the schema for a datasetbs_get_schema
Get the current Brightspace analytics timezonebs_get_timezone
Summarize grades with percentagesbs_grade_summary
Check if authenticated with Brightspacebs_has_token
Identify at-risk studentsbs_identify_at_risk
Smart join two BDS tibblesbs_join
Join content objects with user progressbs_join_content_progress
Join enrollments with grade resultsbs_join_enrollments_grades
Join enrollments with org unitsbs_join_enrollments_orgunits
Join enrollments with role detailsbs_join_enrollments_roles
Join grade results with grade objectsbs_join_grades_objects
Join users with enrollmentsbs_join_users_enrollments
List available Advanced Data Setsbs_list_ads
List all submitted ADS export jobsbs_list_ads_jobs
List all registered ADS dataset schemasbs_list_ads_schemas
List available Brightspace Data Setsbs_list_datasets
List available extracts for a datasetbs_list_extracts
List all registered dataset schemasbs_list_schemas
Get the root organisation IDbs_org_id
Pseudonymise person-referencing ID columns in a data framebs_pseudonymise_df
Pseudonymise a vector of IDsbs_pseudonymise_id
Summarize retention and dropout ratesbs_retention_summary
Set the timezone for Brightspace analyticsbs_set_timezone
Summarize enrollments to one row per user per coursebs_summarize_enrollments