Section 3: Visualization Techniques with BI Tools
A model’s insights are useless if they can’t be understood. This section is a hands-on introduction to modern business intelligence (BI) tools, focusing on how to create compelling, interactive dashboards that tell a clear story with your data.
Visualization Techniques with BI Tools (Tableau, Power BI)
From Data to Decisions: The Art of Visual Storytelling in Pharmacy.
24.3.1 The “Why”: A Picture is Worth a Thousand Rows
You have successfully navigated the complexities of the model development process. Your predictive model for 30-day readmissions has an impressive AUC of 0.85. You’ve prepared a detailed report, complete with tables of coefficients, p-values, and a meticulously documented confusion matrix. You present this to the Chief Medical Officer and the Director of Nursing. You are met with polite nods, confused stares, and a resounding lack of action. The project, for all its technical brilliance, has failed. Why?
Because a model’s output is not the same as a model’s insight. The raw numbers, statistics, and tables that are the native language of data scientists are a foreign language to most clinicians, administrators, and frontline staff. To drive change, you must do more than just present data; you must tell a compelling, intuitive, and actionable story with it. Data visualization is the language of that story. It is the essential bridge between complex analysis and operational decision-making.
For decades, pharmacists have been limited to the static, uninspiring world of Microsoft Excel charts. We’ve all seen the pixelated bar charts in PowerPoint presentations and the endless tables of numbers in annual reports. Modern Business Intelligence (BI) tools like Tableau and Power BI represent a revolutionary leap forward. They allow you to move from creating static snapshots of data to building dynamic, interactive “visual laboratories.” A dashboard built in one of these tools is not a picture; it’s a conversation. It invites the user—be it a pharmacy manager, a stewardship physician, or a C-suite executive—to explore the data, ask their own questions, and discover their own insights.
In this section, you will learn the core principles of effective data visualization and how to apply them within the context of these powerful BI tools. We will not be focused on the intricate “click-by-click” of building a chart, as that changes with every software update. Instead, we will focus on the timeless, strategic principles: how to choose the right chart for the right question, how to design for clarity and impact, and how to weave individual charts into a cohesive dashboard that tells a powerful story. Mastering this skill will elevate you from a data analyst who answers questions to a strategic leader who uses data to drive change.
Pharmacist Analogy: The P&T Committee Presentation
Imagine you are proposing to add a new, expensive PCSK9 inhibitor to the hospital formulary. You could simply hand the P&T Committee a 50-page binder containing the full text of the FOURIER and ODYSSEY OUTCOMES trials, along with raw budget impact spreadsheets. This is the equivalent of handing them the raw output of your data analysis. While technically complete, it is utterly ineffective. The committee members are busy, and they will not read it.
Instead, what do you do? You create a presentation. This presentation is your dashboard.
- You start with a single, clear slide showing a bar chart comparing the LDL reduction of the new drug versus existing statins. You’ve chosen the right visual to answer the question: “How effective is it?”
- Next, you show a line chart illustrating the Kaplan-Meier curve from the trial, visually demonstrating the reduction in cardiovascular events over time. You’ve chosen the right visual to answer: “Does it improve outcomes?”
- Then, you present a simple KPI card in a large font: “Number Needed to Treat: 48.” You’ve distilled a complex statistic into a single, powerful number.
- Finally, you show a waterfall chart that breaks down the budget impact: the high cost of the drug is partially offset by the projected savings from preventing heart attacks and strokes. You’ve told a nuanced financial story.
You have taken an overwhelming amount of raw data and translated it into a series of clear, purpose-built visuals that tell a story and lead to a specific decision. You use color to highlight your proposed drug. You keep your charts clean and simple. You allow the committee to ask questions, and you can flip back to the relevant chart to answer them. This is the art of data visualization. A BI dashboard is simply a dynamic, interactive version of the most effective P&T presentation you’ve ever given.
24.3.2 The Grammar of Graphics: Core Principles of Effective Visualization
Before touching any software, you must understand the foundational principles that separate a confusing chart from an insightful one. These principles are universal and apply whether you’re sketching on a whiteboard or building a complex dashboard in Tableau.
Principle 1: Choose the Right Chart for the Right Question
The most common mistake is choosing a visually exciting but inappropriate chart. Every chart type is designed to answer a specific type of question. Your first step is always to clarify what you are trying to show.
Masterclass Table: Matching Chart Types to Clinical Questions
| If your question is about… | You should use a… | Pharmacy Example | Avoid Using… |
|---|---|---|---|
| Comparison / Ranking of values between different categories. | Bar Chart (Vertical or Horizontal) | Comparing the total spend on different classes of antibiotics. | A pie chart. It is very difficult for the human eye to accurately compare the size of pie slices. |
| Showing a change over time. | Line Chart | Tracking the monthly C. difficile infection rate over the last two years. | A bar chart. While it works, a line chart is far more effective at showing the trend, seasonality, and slope of change. |
| Showing a part-to-whole relationship. | Pie Chart or Treemap | Breaking down the percentage of pharmacy interventions by type (e.g., renal dosing, drug interaction, clarification). | A series of bar charts. A pie chart is instantly recognizable as representing 100% of a whole. |
| Investigating the relationship between two numerical variables. | Scatter Plot | Is there a correlation between a patient’s BMI and their required dose of an anesthetic? | Two separate bar charts. A scatter plot is the only way to see the relationship for individual data points. |
| Visualizing the distribution of a single numerical variable. | Histogram or Box Plot | What is the distribution of turnaround times for STAT medication orders? | A line chart. A line chart implies a connection between points that doesn’t exist in a distribution. |
| Showing geospatial data. | Map | Visualizing opioid prescribing rates by zip code in your region. | A table. A map provides instant visual insight into geographic hotspots and clusters. |
Principle 2: Maximize the Data-Ink Ratio
This is a concept introduced by the visualization pioneer Edward Tufte. It states that a large share of the “ink” (or pixels) on a graphic should be dedicated to displaying the data itself, and non-essential “chart junk” should be eliminated. Your goal is clarity and minimalism.
Bad Example: Low Data-Ink Ratio
What’s Wrong Here?
- 3D Effect: Distorts the size of the slices, making accurate comparison impossible. Pure chart junk.
- Redundant Labels: The legend and the slice labels both show the drug name.
- Vibrant, Meaningless Colors: The bright colors are distracting and don’t encode any extra information.
- Heavy Gridlines/Borders: The dark background and borders are non-data ink that clutter the visual.
Good Example: High Data-Ink Ratio
What’s Right Here?
- Chart Choice: A horizontal bar chart is much better for comparing categories with long labels.
- Minimalism: No distracting background, borders, or gridlines. The data is the hero.
- Direct Labeling: The values are labeled directly on the bars, eliminating the need for an axis and making it easier to read.
- Strategic Use of Color: All bars are a neutral gray except for the one you want to draw attention to. The color has a purpose.
Principle 3: Use Pre-attentive Attributes to Guide the Eye
Pre-attentive attributes are the visual properties that our brains process subconsciously in milliseconds, before we even actively start paying attention to a chart. You can use these to strategically guide your audience’s attention to the most important parts of your story. Instead of making them hunt for the insight, you deliver it to them instantly.
Your Visual Toolkit
Think of these as the tools you can use to make an element “pop” from the background:
The Rule of One: The key is to use these sparingly. If you try to make everything stand out, nothing stands out. Pick the single most important insight on your chart and use one pre-attentive attribute to highlight it.
24.3.3 Meet the Tools: Tableau vs. Power BI
Tableau and Microsoft Power BI are the two undisputed leaders in the business intelligence market. While they have many similarities, they have different strengths and are often chosen for different reasons within a healthcare organization. As an analyst, you will likely encounter both.
| Feature | Tableau | Power BI | The Pharmacist’s Takeaway |
|---|---|---|---|
| Core Strength | Unparalleled data exploration and visual flexibility. Considered the “artist’s” tool for creating beautiful, highly customized visualizations. | Deep integration with the Microsoft ecosystem (Excel, Azure, SQL Server). Strong in data modeling and enterprise-level governance. | If your primary goal is to create stunning, public-facing visuals or to perform deep, exploratory analysis, Tableau often has the edge. If your hospital is heavily invested in Microsoft products, Power BI is the more natural and cost-effective fit. |
| User Interface | A clean, drag-and-drop canvas. Very intuitive for users who “think visually.” The “Shelves” (Columns, Rows, Marks, Filters) are easy to understand. | More similar to Excel and other Microsoft products, which can make it feel more familiar to business users but slightly more rigid for pure visualization. | Tableau often has a gentler learning curve for absolute beginners to visualization. Power BI is easier for those who are already Excel power users. |
| Cost | Generally more expensive, licensed on a per-user (“Creator,” “Explorer,” “Viewer”) basis. | More affordable, with a free desktop version for individual use and a lower-cost “Pro” license for sharing and collaboration. It’s often bundled with enterprise Microsoft 365 licenses. | Cost is a huge factor in hospital IT decisions. The attractive pricing of Power BI is a major reason for its rapid adoption in healthcare. |
| Data Connectivity | Connects to a vast array of data sources, from simple spreadsheets to complex cloud databases. | Excellent connectivity, especially within the Azure and Microsoft data ecosystem. | Both tools can connect to your EHR’s data warehouse (e.g., Epic’s Caboodle). This is not a major differentiator for most pharmacy use cases. |
The Tool Doesn’t Make the Analyst
It’s easy to get caught up in the “Tableau vs. Power BI” debate. The reality is that both are incredibly powerful tools. A great analyst can tell a compelling story with either one. A poor analyst can create a confusing mess with either one. Focus on mastering the principles of good visualization first. The skills of choosing the right chart, cleaning your data, and structuring a narrative are transferable. The specific clicks and menus of the software are secondary.
24.3.4 Masterclass Use Case: Building an Antimicrobial Stewardship Dashboard
Let’s walk through the conceptual process of building a dashboard from scratch. This is one of the most high-impact projects a pharmacy informatics analyst can undertake.
Step 1: The Clinical & Business Understanding
You meet with the Antimicrobial Stewardship Committee. Their goals are clear: reduce inappropriate antibiotic use, decrease costs, and monitor for resistance trends and unintended consequences (like C. diff infections). They are currently working from static, monthly PDF reports that are hard to interpret and always a month out of date. They need a single source of truth that is interactive and near-real-time.
Step 2: The Data Understanding & Preparation
You identify your data sources. You’ll need to work with IT to get access to:
- Medication Administration Records (MAR): To get every dose of every antibiotic given.
- Admissions, Discharge, Transfer (ADT) Data: To calculate patient days for normalizing your usage data.
- Drug Purchasing Data: To get the acquisition cost of each antibiotic.
- Microbiology Data: To access culture and sensitivity results for your antibiogram.
- Lab Data: To get C. difficile test results.
In the preparation phase, you would perform crucial calculations to create your key metrics, such as calculating Days of Therapy (DOT) and normalizing it per 1,000 patient days, or flagging specific restricted antibiotics as “Watch,” “Reserve,” etc.
Step 3 & 4: Modeling & Evaluation (Building the Visuals)
You begin building out the individual charts, each designed to answer a specific stewardship question. You then assemble them into a logical dashboard.
Antimicrobial Stewardship Program Dashboard
Total Antimicrobial Spend (YTD)
$4.2M
+8% vs. Last Year
Overall DOTs / 1000 Pt. Days
856
-5% vs. Last Year
New C. difficile Cases (This Month)
12
+1 vs. Last Month
DOTs / 1000 Pt. Days Over Time
Spend by Antimicrobial Class
Antibiogram: E. coli Susceptibility to Ciprofloxacin
Step 5: Deployment & Making it Interactive
You publish this dashboard to the hospital’s secure server. Now, the real magic happens. You add interactivity:
- Filters: You add filters for Hospital Unit, Service Line, and Specific Antibiotic. Now, the ICU manager can filter the entire dashboard to see only her unit’s data.
- Tooltips: When the user hovers over a point on the line chart, a tooltip appears showing the exact DOTs for that month and the top 3 drugs used.
- Dashboard Actions: You set up an action so that when a user clicks on “Carbapenems” in the bar chart, the line chart and the map both filter to show data only for carbapenems. This allows the stewardship pharmacist to instantly investigate if a spike in overall DOTs was driven by a specific drug class.
The static report that took days to create is now a dynamic, self-service analytics tool that provides answers in seconds. This frees you, the analyst, from running repetitive reports and allows you to focus on discovering new insights and building the next valuable tool.