6 A dashboard fit for a CEO

 

This chapter covers

  • Building an interactive metrics dashboard
  • Wrangling data using the Pandas library
  • Caching the results of functions to improve Streamlit app performance
  • Creating filters, panels, and other widgets in a dashboard
  • Developing data visualizations and charts using Plotly

Ever wondered how executives at large companies manage to stay on top of the businesses they run? Imagine the complexity and the sheer number of products and services offered by a company like Amazon, 3M, or Google. How can one person make sense of it all? How do they know if their business is meeting expectations and what areas need their focus?

In well-run companies, the answer—or part of it—is metrics. Executives rely on a carefully curated set of metrics, or numbers, that provide a high-level overview of the company’s performance. Metrics help leaders make informed decisions, identify potential issues before they become major problems, and pinpoint areas where the company can improve or innovate.

However, metrics alone are not enough—they need to be presented in a clear and digestible way. That's where dashboards come into play. A good dashboard allows users to explore various cuts of data, transforming raw data into a story, highlighting what's important, and helping leaders stay focused on the bigger picture.

6.1 A metrics dashboard

6.1.1 Stating the concept

6.1.2 Defining the requirements

6.1.3 Visualizing the user experience

6.1.4 Brainstorming the implementation

6.2 Loading the data

6.2.1 The Pandas library

6.2.2 Reading and displaying a dataframe

6.2.3 Caching data

6.3 Prepping and filtering the data

6.3.1 Creating a filter panel

6.3.2 Creating a date range selector

6.4 Calculating and displaying metrics

6.4.1 Calculating the metrics

6.4.2 Setting up the metrics configuration

6.4.3 Formatting the metrics

6.4.4 Displaying the metrics

6.5 Constructing visualizations

6.5.1 Creating a time series chart

6.5.2 Creating a pie chart

6.6 Summary