βJimmyβ Zhenning Xu
Department of Management & Marketing, CSU Bakersfield
github.com/utjimmyx | zxu3 at
csub.edu
π― Goal: Showcase how Claude AI can scale traditional business analytics projects β and how faculty can bring this approach into their own courses.
This article accompanies the presentation βScaling Business Analytics Projects with AI-Assisted Developmentβ delivered at the CSU AI Faculty Workshop (2026), Session 2.1: Teaching with AI in the Business Curriculum.
Three key ideas covered:
Most students can analyze data. Fewer can communicate it interactively.
βAI offers brand new solutions to cross-disciplinary areas that may lead to new ways of thinking and discoveries.β
The opportunity in front of us:
Traditional analytics courses produce students who can run a regression or build a chart. But stakeholders β managers, clients, policymakers β need to interact with data, not receive a static PDF. Shiny bridges that gap.
Students who complete this project will be able to:
| # | Objective |
|---|---|
| 1 | Inform or improve business operations and systems thinking |
| 2 | Cross disciplinary boundaries with data-driven tools |
| 3 | Recognize AI as an engine for opportunity and growth |
| 4 | Build new skills that reflect todayβs workforce needs |
| 5 | Solve old problems in new AI-assisted ways |
These objectives connect directly to the broader CSU AI initiative: preparing graduates who are not just AI consumers, but AI-empowered professionals.
Shiny turns R code into interactive web applications β no JavaScript required.
| Traditional Analysis | Shiny App |
|---|---|
| Static chart in a report | Interactive, filterable chart |
| Emailed to one person | Shareable with anyone via a URL |
| Re-run manually each time | Updates instantly with user input |
| Code hidden from stakeholders | Results front and center |
Shiny is a bridge between analytics and communication. It makes studentsβ work usable by non-technical audiences β a skill gap that employers consistently identify.
A Shiny app has two parts that talk to each other:
βββββββββββββββββββββββ βββββββββββββββββββββββ
β UI β ββββ> β Server β
β What the user sees β β Logic that reacts β
β Inputs + Layout β <ββββ β to user input β
βββββββββββββββββββββββ βββββββββββββββββββββββ
Four core benefits for students:
The key conceptual leap is reactivity: think of inputs as live variables, and outputs as expressions that βlistenβ to them. Once students grasp this, everything else follows.
The UI defines layout and controls, completely separate from business logic.
library(shiny)
ui <- fluidPage(
titlePanel("Sales Dashboard"),
sidebarLayout(
sidebarPanel(
selectInput("region", "Select Region:",
choices = c("North", "South", "East", "West")),
sliderInput("year", "Year Range:",
min = 2018, max = 2024,
value = c(2020, 2024))
),
mainPanel(
plotOutput("salesPlot"),
tableOutput("summaryTable")
)
)
)Notice that students define the interface entirely separately from the logic. This separation encourages clear thinking about what the user needs versus how the data is processed.
server <- function(input, output, session) {
filtered_data <- reactive({
sales_data |>
filter(region == input$region,
year >= input$year[1],
year <= input$year[2])
})
output$salesPlot <- renderPlot({
ggplot(filtered_data(), aes(x = year, y = revenue)) +
geom_line(color = "steelblue", linewidth = 1.2) +
labs(title = paste("Revenue β", input$region),
x = "Year", y = "Revenue ($)")
})
output$summaryTable <- renderTable({
filtered_data() |>
summarise(Total = sum(revenue), Avg = mean(revenue))
})
}The reactive() expression is the most important concept
here. filtered_data() is computed once and shared by both
the plot and the table β efficient and clean. This is where AI
shines: Claude can write the first draft of server logic in
seconds, letting students focus on whether the logic makes business
sense.
How students actually use Claude AI in this project:
[Student describes a business question in plain English]
Β Β Β Β Β Β Β Β Β β
[Claude drafts the initial UI and server code]
Β Β Β Β Β Β Β Β Β β
[Student runs the app, tests it, finds issues]
Β Β Β Β Β Β Β Β Β β
[Student pastes errors into Claude for explanation]
Β Β Β Β Β Β Β Β Β β
[Claude suggests a fix + explains why]
Β Β Β Β Β Β Β Β Β β
[Student refines based on user feedback]
Β Β Β Β Β Β Β Β Β β
[Repeat
until the app answers the business question]
This workflow builds real professional skills: problem decomposition, debugging, iteration, and communication. AI accelerates the cycle β but students stay in the driverβs seat. They must validate outputs, check logic, and ensure the app remains meaningful.
Examples of effective AI prompts from this project:
βοΈ βWrite a Shiny app that lets users filter a sales dataset by region and displays a bar chart.β
π βMy renderPlot is not responding to input$region β what is wrong?β
β βHow do I add a downloadButton so users can export the filtered table as a CSV?β
β»οΈ βRewrite this server function to be more efficient using reactive expressions.β
The skill is knowing what to ask β not just accepting what AI returns.
Prompt engineering is itself a teachable and transferable skill. Students who write clearer, more specific prompts get better code β and this directly mirrors the professional communication skills we already teach in business courses.
Starting prompt given to Claude AI:
βI have a dataset called
mtcars. Build a Shiny app with a dropdown to select a numeric variable and a slider for the number of bins. Show an interactive histogram and a summary statistics table below it.β
# Claude writes this β student runs, understands, and improves it
shinyApp(ui = ui, server = server) # functional app in ~30 secondsThe result is a fully working analytics app, ready for students to customize. Claude handles the scaffolding; students handle the meaning and the business logic.
Students can also embed Shiny widgets directly inside an R Markdown document, combining narrative, code, and a live app in one shareable file:
selectInput("variable", "Choose a variable:", choices = names(mtcars))
renderPlot({
hist(mtcars[[input$variable]],
col = "steelblue", border = "white",
main = paste("Distribution of", input$variable))
})This format is especially powerful for capstone projects and client-facing reports β students can document their methodology alongside a live, explorable result.
Deliverable: A Shiny app that answers a real business question.
| Requirement | Purpose |
|---|---|
| One business dataset | Grounds the app in real context |
| At least two user inputs | Demonstrates reactivity |
| One chart + one table | Covers visual and tabular communication |
| Short AI reflection (~1 page) | Builds metacognitive awareness |
| 3-minute class presentation | Practices explaining to non-technical audiences |
Graded on: clarity of the business question, usability of the interface, and quality of the reflection.
The reflection is the most important differentiator β it forces students to think about how they used AI, not just that they used it. This is where the deepest learning happens.
These outcomes map directly to the five learning objectives above β AI does not replace the learning; it removes the friction that previously blocked it.
| Resource | Link |
|---|---|
| Claude AI | claude.ai |
| Shiny documentation | shiny.posit.co |
| R Markdown guide | rmarkdown.rstudio.com |
| RPubs | rpubs.com |
βJimmyβ Zhenning Xu
Department of Management & Marketing, CSU Bakersfield
π github.com/utjimmyx
π§ zxu3 at csub.edu
Presented at the CSU AI Faculty Workshop, Session 2.1: Teaching with AI in the Business Curriculum. Chair: Neil Shahrasbi, Department of Information Systems, SFSU.