Prompt Details
Model
Chat - (gpt-5.5)
Token size
866
Example input
[DATASET]: an e-commerce sales dataset with columns order_id, order_date, product_category, region, units, unit_price, revenue, and customer_id, covering about 50,000 orders over two years
[ANALYSIS_GOAL]: what is driving revenue and how sales trend over time and across regions
[AUDIENCE]: C-suite executives
[TOOL]: Python with matplotlib/seaborn
[DETAIL_LEVEL]: a full visualisation plan
Example output
1. Dataset read
| Variable | Type | Role in analysis | Key relationships worth visualising | Priority for goal |
| --- | --- | --- | --- | --- |
| order_id | Discrete identifier | Transaction grain | Order frequency, duplicate checks | Low |
| order_date | Temporal | Time axis | Trends, seasonality, growth rate, anomalies | Highest |
| product_category | Nominal categorical | Revenue driver segmentation | Revenue contribution, mix shifts, category trends | Highest |
| region | Nominal categorical | Geographic segmentation | Regional comparisons, market concentration, trend differences | Highest |
| units | Continuous (count-like) | Volume metric | Volume vs revenue, outliers, demand patterns | Medium |
| unit_price | Continuous | Pricing metric | Revenue composition, pricing distribution, premium vs low-cost categories | Medium |
| revenue | Continuous | Core KPI | Trend, distribution, concentration, contribution analysis | Highest |
| customer_id | Discrete identifier | Customer behaviour | Repeat purchase patterns, customer concentration | Medium |
Relationships that matter most
Revenue over time → identifies growth, seasonality, and shocks.
Revenue by category → identifies commercial drivers.
Revenue by region → identifies geographic performance differences.
Category × region interaction → reveals where categories succeed or fail.
Units vs revenue / price vs revenue → separates pricing effects from demand effects.
Revenue concentration → detects overreliance on a few categories or regions.
2. Chart recommendations
| Relationship | Recommended chart | Why (perceptual + analytical) | Alternative | What to watch out for |
| --- | --- | --- | --- | --- |
| Revenue trend over time | Line chart | Position along a common scale is the most accurate perceptual encoding; ideal for trend and seasonality detection | Area chart | Avoid dual axes unless units are standardised |
| Revenue by product category | Sorted horizontal bar chart | Length comparisons are highly accurate; executives scan ranked categories quickly | Treemap | Too many categories reduce readability |
| Revenue by region over time | Small-multiple line charts | Preserves trend shape while reducing overlap clutter; enables regional comparison | Multi-line chart | Shared axes required for fair comparison |
| Category contribution to total revenue | 100% stacked bar chart | Shows changing composition over time; easy part-to-whole reading | Stacked area chart | Hard to compare middle segments precisely |
| Revenue distribution by category | Box plot | Displays spread, skew, and outliers compactly | Violin plot | Outliers may dominate scaling |
| Units vs revenue | Scatter plot with regression line | Reveals relationships and clusters; useful for separating volume-driven vs price-driven growth | Hexbin plot | Overplotting with 50k points |
| Region × category revenue intensity | Heatmap | Color intensity supports matrix scanning efficiently | Highlight table | Sequential palette must be perceptually uniform |
| Monthly revenue change | Waterfall chart | Shows additive contributions to growth/decline clearly | Diverging bar chart | Ensure clear baseline and ordering |
| Top customers concentration | Pareto chart | Combines ranking and cumulative share insight | Lorenz curve | Executive audiences may misread cumulative axis |
Recommended executive-core chart set
For a C-suite audience, prioritise:
Revenue trend line chart
Revenue by category bar chart
Regional small multiples
Category-region heatmap
KPI cards with sparklines
These maximise interpretability and reduce cognitive load.
3. Colour palette
Categorical palette (colour-blind safe, WCAG 2.1 AA-aware)
| Purpose | HEX |
| --- | --- |
| Blue | #0072B2 |
| Orange | #E69F00 |
| Green | #009E73 |
| Vermillion | #D55E00 |
| Purple | #CC79A7 |
| Sky blue | #56B4E9 |
| Yellow | #F0E442 |
| Dark gray | #4D4D4D |
Rationale: Based on proven colour-blind-safe palettes (similar to Okabe-Ito); high hue separation improves categorical discrimination and executive readability.
Sequential palette (for heatmaps)
| Step | HEX |
| --- | --- |
| 1 | #F7FBFF |
| 2 | #C6DBEF |
| 3 | #6BAED6 |
| 4 | #3182BD |
| 5 | #08519C |
| 6 | #08306B |
Rationale: Monotonic luminance progression improves magnitude perception and preserves readability in grayscale printing.
Grayscale fallback
| Tone | HEX |
| --- | --- |
| Light | #D9D9D9 |
| Medium-light | #BDBDBD |
| Medium | #969696 |
| Medium-dark | #636363 |
| Dark | #252525 |
Use for: printed reports, accessibility fallback, monochrome exports.
4. Dashboard layout
Executive dashboard (recommended)
Design principles
Z-pattern reading: KPIs first, trends second, diagnostics last.
Minimal interaction burden.
Large typography for key metrics.
One primary message per chart.
ASCII wireframe
+-----------------------------------------------------------+
| KPI Revenue | KPI Growth % | KPI Avg Order | KPI Regions |
| Sparkline | Sparkline | Sparkline | Sparkline |
+-----------------------------------------------------------+
+-----------------------------+-----------------------------+
| Revenue Trend Over Time | Revenue by Category |
| (line chart) | (sorted horizontal bars) |
+-----------------------------+-----------------------------+
+-----------------------------+-----------------------------+
| Regional Trends | Region x Category Heatmap |
| (small multiples) | |
+-----------------------------+-----------------------------+
+-----------------------------------------------------------+
| Revenue Drivers Diagnostic |
| Scatter: Units vs Revenue |
+-----------------------------------------------------------+
Visual hierarchy
KPIs → immediate business status
Trend chart → macro performance
Category and region → revenue drivers
Diagnostic charts → operational interpretation
Interaction recommendations
Filters: date range, region, category
Hover tooltips with exact values
Default to monthly aggregation
Avoid more than 6–8 visible categories at once
5. Example to build it
Example: Revenue trend line chart in Python (matplotlib + seaborn)
Python
Execută
# Import libraries
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# Sample dataset (10 rows)
data = {
"order_date": [
"2025-01-01", "2025-01-15", "2025-02-01", "2025-02-15",
"2025-03-01", "2025-03-15", "2025-04-01", "2025-04-15",
"2025-05-01", "2025-05-15"
],
"region": [
"North", "South", "North", "West",
"East", "South", "West", "North",
"East", "South"
],
"revenue": [
1200, 1500, 1700, 1600,
1800, 2100, 2200, 2400,
2300, 2600
]
}
# Create DataFrame
df = pd.DataFrame(data)
# Convert dates to datetime
df["order_date"] = pd.to_datetime(df["order_date"])
# Aggregate monthly revenue
monthly_revenue = (
df.groupby(pd.Grouper(key="order_date", freq="M"))["revenue"]
.sum()
.reset_index()
)
# Set visual theme
sns.set_theme(style="whitegrid")
# Create figure
fig, ax = plt.subplots(figsize=(10, 5))
# Plot revenue trend
sns.lineplot(
data=monthly_revenue,
x="order_date",
y="revenue",
marker="o",
linewidth=2,
ax=ax
)
# Add chart title and labels
ax.set_title("Monthly Revenue Trend", fontsize=16, weight="bold")
ax.set_xlabel("Month")
ax.set_ylabel("Revenue")
# Improve date formatting
fig.autofmt_xdate()
# Add annotations as lightweight tooltips substitute
for x, y in zip(monthly_revenue["order_date"], monthly_revenue["revenue"]):
ax.annotate(
f"${y:,.0f}",
(x, y),
textcoords="offset points",
xytext=(0, 8),
ha="center",
fontsize=9
)
# Reduce unnecessary visual clutter
sns.despine()
# Display chart
plt.tight_layout()
plt.show()
Additional implementation guidance
Heatmap
Use pivot_table(index="region", columns="product_category", values="revenue", aggfunc="sum")
Plot with sns.heatmap(..., cmap=sequential_palette, annot=True)
Small multiples
Use sns.relplot(kind="line", col="region", col_wrap=2)
Keep all y-axis limits identical
Executive formatting
Use:
font sizes ≥ 12 pt
limited gridlines
direct labels where possible
no 3D effects
no rainbow palettes
6. How to read it
For executives
What the charts show
Whether revenue growth is accelerating or slowing, and which categories/regions drive it.
If you see X, do Y
One category dominates growth → protect supply chain and margin exposure.
A region lags while others grow → investigate pricing, logistics, or local competition.
Revenue grows but units stay flat → check if growth is price-driven rather than demand-driven.
Red flags
Sharp seasonal drops
Revenue concentrated in one region/category
High volatility month-to-month
Growth driven only by price increases
For analysts
Metric definitions
Revenue = units × unit_price
Monthly revenue should be aggregated at consistent calendar intervals.
Cautions
Correlation between units and revenue does not imply demand causation; pricing changes may dominate.
Regional differences may reflect customer mix, not operational quality.
Follow-up questions
Are returns/refunds excluded?
Do category trends differ by season?
Is growth driven by new or repeat customers?
For data scientists
Statistical and modelling considerations
Aggregate to monthly granularity for executive dashboards to reduce noise.
Use log scaling if revenue distribution is highly skewed.
Winsorise or inspect extreme outliers before regression analysis.
Data-quality checks
Duplicate order_id
Missing dates or categories
Negative revenue values
Inconsistent regional labels
Next-step ideas
Customer segmentation (RFM: Recency, Frequency, Monetary value)
Revenue forecasting with time-series models
Category uplift modelling
Regional clustering analysis
Price elasticity estimation
By purchasing this prompt, you agree to our terms of service
GPT-5.5
Turn any dataset into a clear visualization plan. Describe your data and goal and get a variable breakdown, the best charts for each relationship (with perceptual and analytical reasons), an accessible HEX palette, a dashboard layout, ready-to-use example code for your chosen tool, and a how-to-read-it guide for executives, analysts, and data scientists. For analysts and BI developers. Real, runnable code only, no fake APIs. Five variables set the dataset, goal, audience, tool, and detail.
...more
Added 1 day ago
