November 06, 2026

Part 1: Why Build Simulations, Dashboards, and Apps?

Where This Session Fits

  • Simulations: using data we generate to understand uncertainty
  • Dashboards: summarizing data so decisions can be made quickly
  • Apps: letting a non-programmer explore the analysis on their own
  • Two toolchains: R (Shiny on shinyapps.io) and Python (Google Colab notebooks)

Description: This slide frames the session as a progression. A simulation helps us understand a problem, a dashboard communicates it, and an app lets a stakeholder interact with it. Every example later in the deck is a working project you can open and click through.

Simulation: Learning by Generating Data

Core idea

  • Create artificial data from assumptions we control
  • Repeat the process many times and watch the pattern in the results
  • Compare what we expect with what the data show

Typical business uses

  • Monte Carlo analysis of revenue, demand, or risk
  • Bootstrap confidence intervals for a metric
  • Simulated survey or conjoint data for practicing a method before using real data
  • Product performance questions such as battery life under different usage assumptions (see Example 5)

Description: Simulation is the safest way to learn an analytic method, because the “true” answer is known in advance. In my teaching I use simulated datasets for segmentation and conjoint exercises so students can check whether their model recovers the pattern we built in. Example 5 later in the deck is a simulation app built the same way.

From Simulation to Dashboard

  1. Define the question a decision-maker is asking
  2. Prepare the data (collected, scraped, or simulated)
  3. Choose a small set of metrics and visuals
  4. Add controls so the user can filter and compare
  5. Publish to a link anyone can open

Description: A dashboard is not a collection of charts. It is an answer to a specific question. These five steps are the workflow behind every project in this deck.

R and Python: Choosing the Right Tool

R with Shiny Python with Google Colab
Strength Interactive web apps and polished statistical graphics Notebook-style walkthroughs that run in the browser
Sharing A public link on shinyapps.io A shareable Colab link or a notebook on GitHub
Setup for users None, just open the link A Google account, then run the cells
Best for Stakeholder-facing dashboards Teaching, reproducible analysis, text and review mining

Description: The two tools complement each other. Use Shiny when the audience wants to click and explore, and Colab when they want to follow and reproduce the analysis step by step. Neither requires installing software.

Part 2: R Shiny Examples

Shiny in One Slide

  • A user interface that defines inputs (filters, sliders, search boxes) and outputs (charts, tables, maps)
  • A server that reacts to the inputs and recomputes the outputs
  • A hosting step that publishes the app to a public URL

Description: Shiny turns an R analysis into a web application without requiring web-development skills. The four examples that follow all use this structure, applied to search marketing, local real estate, finance, and search trends.

Example 1: SERP Analysis App

https://utjimmyx.shinyapps.io/serp/

  • Analyzes search engine results page (SERP) data
  • Helps users see who ranks for a keyword and how results are structured
  • Supports search marketing and SEO decisions

Description: I designed this app recently as a companion to my web scraping and SEO teaching material. It shows how scraped search data can move from a table in R to a tool a marketer can use without writing code.

Example 2: Real Estate Agents in Bakersfield

https://7d8g6z-zhenning-xu.shinyapps.io/property/

  • Analyzes real estate agents operating in the Bakersfield market
  • Lets users explore and compare agents through interactive controls

Description: I created this app recently as a local, practical case. It shows how an analytics project can serve a specific community and business question, and gives students a model for choosing a regional topic of their own.

Example 3: Stocks Dashboard

https://7d8g6z-zhenning-xu.shinyapps.io/stocks_2/

  • Presents stock market data in an interactive dashboard
  • Lets users select and compare securities and time periods

Description: Financial data is a natural fit for dashboards because the audience almost always wants to change the ticker or the date range. A few well-chosen controls can replace many static charts.

Example 4: Google Trends App

Part 3: Python and Google Colab Examples

Why Google Colab?

  • Runs in the browser with nothing to install
  • Combines narrative text, code, and results in one document
  • A single link lets students open and run the notebook
  • Notebooks can also be stored on GitHub for version control

Description: Colab removes the setup barrier that slows down many classes. The next two slides show two Python notebooks stored on GitHub that follow this pattern.

Example 5: Battery Life Simulation App

Open the battery life notebook on GitHub

  • A battery life simulation built in Python and shared as a notebook on GitHub
  • Step-by-step cells that users can run and modify to see how results change

Description: This is the simulation example in the deck and the Python counterpart to the Shiny apps. Instead of a web interface, the reader runs the notebook, changes the assumptions, and watches how the simulated battery life responds.

Example 6: Customer Review Analysis Notebook

Open the notebook on GitHub

  • An analysis of online customer reviews
  • A text analysis workflow in Python, stored in a public repository

Description: Review data is a rich source of customer feedback and connects to text analysis and natural language processing (NLP) methods. Because the notebook lives on GitHub, students can view it, download it, and open it in Colab.

Part 4: Putting It Together

All Examples at a Glance

# Project Tool Link
1 SERP analysis app R Shiny Open app
2 Bakersfield real estate agents R Shiny Open app
3 Stocks dashboard R Shiny Open app
4 Google Trends app R Shiny Open app
5 Battery life simulation app Python Open notebook
6 Customer review analysis Python Open on GitHub

Description: A reference list. Each project answers a different business question, but all follow the same path from data to a shareable link.

Design Principles We Applied

  • Start with the question, not the chart
  • Keep controls few and meaningful, so users are not overwhelmed
  • Make it self-explanatory, with clear labels and short instructions
  • Publish early, and improve from user feedback
  • Document the work, so others can reproduce it

Description: These principles apply equally to a Shiny app and a Colab notebook. They are also the grading criteria I suggest for student projects.

Student Project Ideas

  • Simulate customer data, then build a segmentation dashboard on it
  • Build a Shiny app for a local business question, as in the Bakersfield example
  • Turn a text analysis (reviews, headlines, social posts) into a Colab notebook
  • Track brand interest with Google Trends and present the findings in an app

Description: Each idea combines a simulation or dataset, an analysis method, and a published deliverable. Students can share finished work through RPubs, shinyapps.io, or GitHub.

Resources and Contact