Q1 revenue attribution·8 cells·Last run 2m ago · 2.4s · all green
Agents on this notebook
Markdown

Q1 revenue attribution

Break down where Q1 revenue came from: by region, channel, and segment. We expect North America to lead but want to confirm.

PromptMain
412ms
Show me total Q1 revenue by region, with the top 3 channels driving each region.
routed toMainResearchViz
SQLResearch
287ms · 4 rows
SELECT region, SUM(amount) AS total
FROM orders
WHERE quarter = 'Q1'
GROUP BY region
ORDER BY total DESC;
Table
· 4 rows
regiontotal
North America1,250,000
Europe982,000
Asia Pacific754,000
Latin America313,000
ChartViz
Q1 revenue by region
PythonResearch
1840ms
import pandas as pd
from prophet import Prophet

df = pd.DataFrame(queryResults)
df['ds'] = pd.to_datetime(df['day'])
df['y'] = df['signups']

m = Prophet(yearly_seasonality=True)
m.fit(df)
future = m.make_future_dataframe(periods=30)
forecast = m.predict(future)

save_model('signup_forecast_v3', m)
result = forecast[['ds','yhat','yhat_lower','yhat_upper']].to_dict('records')
Sandbox: pandas, numpy, scikit-learn, prophet, torchSaved signup_forecast_v3
ModelForecast
signup_forecast_v3
Trained model artifact.
MAPE
4.2%
Markdown

Findings: NA leads at 37% of total Q1, with Direct + Referral driving 68% of NA revenue. Europe under-indexes on paid acquisition vs. NA. Forecast model retrained: MAPE improved 0.8pt.

0 kept