Skip to content

Instantly share code, notes, and snippets.

View lebriggs's full-sized avatar

Laura Briggs lebriggs

View GitHub Profile
@bjulius
bjulius / gist:47264e8ba54704d7764ddd0ea3fd4b8f
Last active May 14, 2025 22:23
ggplot2 R code to create Nested Column Charts in Power BI
# This code creates an example Nested Column Chart of the type developed by Brittany Rosenau
# this code will produce the graphic below if you paste it into R Studio and run it
# to run it in a Power BI R visual, just import the csv into Power Query
# and then paste in the code below, changing df <- dataset
# note that "dataset" is the variable name used by convention in Power BI to call the table
# resulting from the previous step
# Load necessary libraries
library(ggplot2)
library(dplyr)