r-visuals
R visual creation and ggplot2 patterns for PBIR reports. Automatically invoke when the user mentions "R visual", "ggplot2", "ggplot in Power BI", or asks to "create an R visual", "add an R chart", "write an R visual script", "inject an R script into Power BI".
npx skills add data-goblin/power-bi-agentic-development --skill r-visuals --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# R Visuals in Power BI (PBIR) > **Use `pbir` for every report mutation.** Read PBIR metadata only for diagnosis. If `pbir` is > unavailable or lacks an operation, stop and report the gap; never edit report JSON directly. R visuals execute R scripts (primarily ggplot2) to render static PNG images on the Power BI canvas. **ggplot2 is the preferred library** -- its grammar of graphics approach produces clean, publication-quality statistical visualizations with less code. R is particularly strong for statistical visualizations. ## Visual Identity - **visualType:** `scriptVisual` - **Data role:** `Values` (columns and measures, multiple allowed) - **Data variable:** `dataset` (data.frame, auto-injected) - **Row limit:** 150,000 rows - **Output:** Static PNG at 72 DPI -- no interactivity ## Workflow: Creating an R Visual ### Step 1: Add the Visual ```bash pbir add visual scriptVisual "Report.Report/Page.Page" --name RevenueByDateR \ --data "Values:Sales.Date" --data "Values:Sales.Revenue" ``` ### Step 2: Write the Script ```r library(ggplot2) p <- ggplot(dataset, aes(x=Date, y=Sales)) + geom_col(fill="#5B8DBE") + theme_minimal(base_size=12) + theme(panel.grid.major.x=element_blank()) pr
- Visual Identity
- Workflow: Creating an R Visual
- Step 1: Add the Visual
- Step 2: Write the Script
- Step 2b: Review
- Step 3: Inject the Script
- Step 4: Validate
- PBIR Format
- Supported Packages
- Power BI Service (R 4.3.3)
- Desktop
- Best Practices
- Limitations
- Script Structure Template
pbir add visual scriptVisual "Report.Report/Page.Page" --name RevenueByDateR \ pbir visuals r "Report.Report/Page.Page/RevenueByDateR.Visual" --script-file chart.r pbir visuals bind "Report.Report/Page.Page/RevenueByDateR.Visual" --show pbir validate "Report.Report" --all
What does the r-visuals skill do?
R visual creation and ggplot2 patterns for PBIR reports. Automatically invoke when the user mentions "R visual", "ggplot2", "ggplot in Power BI", or asks to "create an R visual", "add an R chart", "write an R visual script", "inject an R script into Power BI".
How do I install it?
Run `npx skills add data-goblin/power-bi-agentic-development --skill r-visuals --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From data-goblin/power-bi-agentic-development, a repository with 833 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
