Data Analytics project 17
Business Revenue Analysis Project
Build a complete business revenue analysis portfolio project with documented metrics, reproducible Python code, validation checks, and responsible interpretation.
Explore Data Analytics training in VizagView all project ideas
Business question
Is revenue meeting target, and how do month-over-month and year-over-year changes evolve?
Dataset and grain
Twenty-four synthetic months of subscription and services revenue with an illustrative monthly target.
Requirements
Python 3.10 or later with numpy and pandas installed.
Method and validation checks
Aggregate revenue streams by month, create an explicit target series, calculate absolute variance, attainment, month-over-month growth, and year-over-year growth.
- Monthly totals reconcile to revenue streams
- Target variance uses actual minus target
- Year-over-year uses a 12-month comparison
- Missing prior periods remain missing rather than zero
Complete Python code
Save the code as da_business_revenue_analysis.py. Review the stated model and field assumptions before using another dataset.
"""Analyse synthetic business revenue against monthly targets."""
from __future__ import annotations
import numpy as np
import pandas as pd
def make_demo_revenue(seed: int = 42) -> pd.DataFrame:
rng = np.random.default_rng(seed)
months = pd.date_range("2024-01-01", periods=24, freq="MS")
rows = []
for index, month in enumerate(months):
subscription = 2_000_000 * (1.025 ** index) + rng.normal(0, 70_000)
services = 780_000 + 90_000 * np.sin(2 * np.pi * index / 12) + rng.normal(0, 55_000)
rows.extend([(month, "Subscription", subscription), (month, "Services", services)])
return pd.DataFrame(rows, columns=["month", "stream", "revenue"])
def analyse_revenue(data: pd.DataFrame) -> pd.DataFrame:
monthly = data.groupby("month", as_index=False)["revenue"].sum().sort_values("month")
monthly["target"] = np.linspace(2_750_000, 4_250_000, len(monthly))
monthly["target_variance"] = monthly["revenue"] - monthly["target"]
monthly["attainment"] = monthly["revenue"] / monthly["target"]
monthly["mom_growth"] = monthly["revenue"].pct_change()
monthly["yoy_growth"] = monthly["revenue"].pct_change(12)
return monthly
def main() -> None:
result = analyse_revenue(make_demo_revenue())
print(result.tail(12).round(3).to_string(index=False))
print("Synthetic revenue and targets; variance identifies gaps but does not explain their drivers.")
if __name__ == "__main__":
main()
Build and run the project
Run python da_business_revenue_analysis.py to compare monthly total revenue with target, prior month, and prior year.
- Confirm the source grain and field definitions.
- Reconcile record counts and additive totals.
- Validate rate denominators and date filters.
- Review outliers and missing values.
- Read the interpretation limits before sharing conclusions.
Expected analytical output
A monthly table with actual revenue, target, variance, attainment, month-over-month growth, and year-over-year growth.
Interpretation and responsible-use limits
Synthetic revenue and targets do not describe a real business. Variance highlights where to investigate but cannot identify causes without price, volume, customer, timing, and accounting detail.
Ways to extend the project
Add forecast, price-volume-mix decomposition, recurring versus one-time revenue, currency, cohort retention, and driver annotations.
Continue learning Data Analytics
Try the next project, return to the Softenant project library, or explore the Data Analytics course in Vizag for guided SQL, Excel, Power BI, Python, dashboard, and portfolio practice.