Overview
This application is a small example that highlights how to integrate the {qrcode} package π¦ into shiny.
This might at first seem trivial β βjust generating a QR code?β β but when paired with the right information, QR codes can actually become a powerful way to communicate data and metadata π¦
For example, imagine embedding metadata about how a figure was generated β the selected Shiny inputs, slider values, and filters applied. Thatβs instant context. String interpolation is your friend here π―
Try it yourself π by scanning the QR with your π
π§© Data and Metadata Examples
You can easily enrich your QR codes with:
π System information: date, time, session ID
π€ User info: pulled automatically (e.g., session$user in Posit Connect)
π Data provenance: source files, query timestamps, or version numbers
When your app runs on Posit Connect, this becomes even more useful β you can automatically tag content with who generated it and when via the session object.
π‘ Why It Matters
On a more thematic level, QR codes offer a new layer of tractability in your analytics workflow. If your app generates outputs β say, plots or reports β you can encode contextual details about the data source or analysis parameters directly into a QR code.
Itβs like leaving a digital breadcrumb trail for reproducibility π§΅
π§± Where to Use Them
QR codes are super flexible β you can insert them into:
π Plots via {ggplot2} or {patchwork} (e.g. inset, or adjacent)
π Documents (PDF, DOCX, PPTX) using {officer}
π₯οΈ Directly inside your Shiny appβs UI
π Resources
If you find creative uses οΈπ‘ for them, I’d love to know about it. Be sure to also check out the other features of the {qrcode} package:
- π
Package Website - π»
Github Repository
Till next time, π»π΄