Markdown
Q4 Revenue Analysis
Overview
This notebook analyses Q4 revenue performance across all regions, with a focus on:
- Revenue growth by segment
- Top-performing accounts
- Regional comparisons and YoY trends
Data sourced fromq4_revenue.xlsxandcustomers.csvvia the internal data lake.
Python
[1]
1import pandas as pd2import numpy as np34# Load Q4 revenue data5df = pd.DataFrame({6 'region': ['Americas', 'EMEA', 'APAC', 'LATAM'],7 'revenue': [142.3, 98.7, 76.4, 34.2],8 'growth': [18.2, 12.5, 24.1, 8.7],9 'accounts': [3420, 2180, 1650, 890]10})1112print(df.to_string(index=False))13print(f"\nTotal revenue: ${df['revenue'].sum():.1f}M")
| region | revenue | growth | accounts |
|---|---|---|---|
| Americas | 142.3 | 18.2 | 3420 |
| EMEA | 98.7 | 12.5 | 2180 |
| APAC | 76.4 | 24.1 | 1650 |
| LATAM | 34.2 | 8.7 | 890 |
Python
[2]
1import matplotlib.pyplot as plt23regions = ['Americas', 'EMEA', 'APAC', 'LATAM']4revenue = [142.3, 98.7, 76.4, 34.2]56plt.figure(figsize=(8, 4))7plt.bar(regions, revenue, color='#D4714E')8plt.title('Q4 Revenue by Region ($M)')9plt.ylabel('Revenue ($M)')10plt.tight_layout()11plt.show()
Q4 Revenue by Region ($M)
AI
Cmd+Enter to generate
Thoriad AI
Based on the data, APAC shows the highest growth potential. With 24.1% growth and a revenue-per-account ratio of $46.3K (vs Americas at $41.6K), APAC combines strong momentum with efficient account economics. Here's code to calculate the full breakdown:
# Revenue efficiency analysis
df['rev_per_account'] = (df['revenue'] * 1e6 / df['accounts']).round(0)
df['growth_score'] = df['growth'] * df['rev_per_account'] / 1000
result = df.sort_values('growth_score', ascending=False)
print(result[['region', 'rev_per_account', 'growth', 'growth_score']])Python
[3]
1# Attempting to use undefined variable2total = revenue_data.sum()3print(f"Grand total: {total}")
NameError: name 'revenue_data' is not defined
Traceback (most recent call last)
File "<cell>", line 2, in <module>
total = revenue_data.sum()SQL
[ ]
1SELECT2 r.region_name,3 SUM(t.amount) AS total_revenue,4 COUNT(DISTINCT t.customer_id) AS customers,5 ROUND(AVG(t.amount), 2) AS avg_deal_size6FROM transactions t7JOIN regions r ON t.region_id = r.id8WHERE t.quarter = 'Q4'9GROUP BY r.region_name10ORDER BY total_revenue DESC11LIMIT 10
JavaScript
[4]
1const report = {2 summary: { totalRevenue: 351.6, avgGrowth: 15.9, topRegion: "APAC" },3 regions: [4 { name: "Americas", revenue: 142.3, growth: 18.2, accounts: 3420 },5 { name: "EMEA", revenue: 98.7, growth: 12.5, accounts: 2180 },6 { name: "APAC", revenue: 76.4, growth: 24.1, accounts: 1650 },7 { name: "LATAM", revenue: 34.2, growth: 8.7, accounts: 890 },8 ],9 metadata: { quarter: "Q4", year: 2025, currency: "USD" }10}1112console.log(JSON.stringify(report, null, 2))
Q4 Report Object
{}
"summary": {}
,"totalRevenue": 351.6,
"avgGrowth": 15.9,
"topRegion": "APAC"
"regions": []
,{ 4 keys }
,{ 4 keys }
,{ 4 keys }
,{ 4 keys }
"metadata": {}
"quarter": "Q4",
"year": 2025,
"currency": "USD"
Python
[ ]
1# Sending data to external API2import requests34api_key = "sk-proj-abc123def456ghi789jkl012mno345"5response = requests.post(6 "https://api.openai.com/v1/completions",7 headers={"Authorization": f"Bearer {api_key}"},8 json={"model": "gpt-4", "prompt": "Hello"}9)10print(response.json())
Run a cell to see audit events appear here.
Like what you see?
Get unlimited executions, multiple languages, real-time collaboration, and full governance features.