Design static and interactive charts with Matplotlib, Seaborn, and Plotly, assemble an executive business dashboard, and document data-driven findings.
Domain / Environment
Retail Business / Conda VM
Difficulty
Intermediate (2/5)
Course Module
Data Visualization
Deliverables
Dashboard Plot & HTML Interactive Panel
1. System Architecture & Process Workflow
The diagram below outlines the visualization compilation architecture. The raw sales database is ingested into a Pandas DataFrame, where KPIs are calculated. This structured data is mapped to static Matplotlib/Seaborn layouts (saving a 4-panel dashboard) and passed to Plotly to generate an interactive HTML chart.
2. Part 1: Step-by-Step Action Items & Key Execution Steps
STEP 1
Activate Python Virtual Environment
Point the terminal execution environment to the course conda sandbox environment.
$ conda activate ds_ai_ml
This command points active library pathways to the virtual sandbox libraries.
STEP 2
Create Project Folders inside Linux VM
Create a dedicated folder for the project files inside your guest VM home folder directory.
$ mkdir -p ~/Projects/data_viz && cd ~/Projects/data_viz
This compiles project files in one isolated directory structure.
STEP 3
Save Mock Sales Records CSV
Write transaction data containing date, category, sales numbers, and discount rates to a local file.
$ nano sales_records.csv
This opens nano editor. Paste the dataset template from Part 2, press **Ctrl + O** and **Enter** to save, and **Ctrl + X** to exit.
STEP 4
Install Visualizations Packages via Pip
Install Seaborn, Plotly, and default dependencies inside the active environment sandbox.
This installs scientific plotting extensions, loading components to compile interactive charts.
STEP 5
Create visualizer script file in VS Code
Launch VS Code and create a new script file inside the project workspace folder.
Launch VS Code via terminal "code ." -> Right-click in file tree explorer -> click New File -> Type: generate_dashboard.py -> Press Enter
This registers an empty file `generate_dashboard.py` inside the active directory editor workspace.
STEP 6
Load Python visualization logic
Paste the plotting code into the newly created python script file.
Click generate_dashboard.py -> Paste python code from Part 2 below -> Save file via Ctrl + S
This writes calculations and visual mapping instructions to code files on disk.
STEP 7
Execute script via terminal pane
Run the script using the python engine to compile the visual reports.
$ python generate_dashboard.py
This aggregates columns, saving a 4-pane static visualization dashboard PNG and an interactive Plotly HTML chart.
STEP 8
View Interactive HTML Chart in Firefox
Open the interactive HTML file inside Firefox to test filters and mouse-hover features.
$ firefox interactive_chart.html
This launches Firefox browser inside VM desktop, rendering dynamic responsive Plotly chart graphics.
3. Operational Pipeline Architecture
The flowchart below outlines the dashboard generation pipeline. It traces the steps from database parsing to aggregation, rendering static layouts, compiling HTML files, and verifying outputs in Firefox.
4. Part 2: Complete Deliverable Assets & Production Templates
To compile the visualizations, we need the raw database records and the Python script. Below is a line-by-line explanation of the code, followed by the combined template files.
Step-by-Step Code Construction
Lines 1 - 4
Import Visualization Packages
Include Pandas, Matplotlib, Seaborn, and Plotly modules in the script.
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import plotly.express as px
These commands load tabular engines, charting frameworks, seaborn themes, and dynamic web visualization components.
Lines 5 - 10
Compute Executive KPI summaries
Load the CSV dataset and compute total sales, total transactions, and averages.