Update this code such that it can create one more column called channel_level_tactic, under each channel we can have mulitple tactics, it is only for paid media, Lets have 10 to 20 tactic for each paid and then create data accordingly

import pandas as pd
import numpy as np

# Define channels with their multipliers, group, and spending ranges
channels = {
    "Google Ads": {"multiplier": 2.0, "group": "Paid", "spend_range": (5000, 12000)},
    "TV Ads": {"multiplier": 1.5, "group": "Paid", "spend_range": (5000, 12000)},
    "TikTok Ads": {"multiplier": 1.8, "group": "Paid", "spend_range": (5000, 12000)},
    "Meta Ads": {"multiplier": 1.6, "group": "Paid", "spend_range": (5000, 12000)},
    "X Ads": {"multiplier": 1.4, "group": "Paid", "spend_range": (5000, 12000)},
    "Instagram Ads": {"multiplier": 1.7, "group": "Paid", "spend_range": (5000, 12000)},
    "YouTube Reels": {"multiplier": 1.9, "group": "Paid", "spend_range": (5000, 12000)},
    "Affiliate Marketing": {"multiplier": 3.0, "group": "Paid", "spend_range": (5000, 12000)},
    "Email Marketing": {"multiplier": 4.0, "group": "Organic", "spend_range": (2000, 6000)},
    "SEO": {"multiplier": 5.0, "group": "Organic", "spend_range": (2000, 6000)},
}

# Create a date range for 110 weeks (over 2 years)
start_date = "2022-01-03"  # starting on a Monday
weeks = pd.date_range(start=start_date, periods=200, freq="W-MON")

# Set a seed for reproducibility
np.random.seed(42)

# Prepare a list for spending data (one row per channel per week)
spending_rows = []

# For each week, generate spending for each channel.
# Use channel-specific spending ranges.
for date in weeks:
    for channel, info in channels.items():
        low, high = info["spend_range"]
        # With 80% probability, generate a spend; otherwise 0.
        if np.random.rand() < 0.8:
            spend = np.random.uniform(low, high)
        else:
            spend = 0.0
        spending_rows.append(
            {
                "date": date.strftime("%Y-%m-%d"),
                "channel": channel,
                "channel_group": info["group"],
                "geo": "US",
                "spend": round(spend, 2),
            }
        )

# Create the spending DataFrame
spend_df = pd.DataFrame(spending_rows)

# Now, generate the revenue data.
# For each week, revenue = baseline + sum(spend * multiplier) + noise
baseline = 100000  # baseline revenue per week
revenue_rows = []

# Group spending data by week (date)
for date, group in spend_df.groupby("date"):
    contribution = 0
    for _, row in group.iterrows():
        channel = row["channel"]
        spend = row["spend"]
        multiplier = channels[channel]["multiplier"]
        contribution += spend * multiplier
    # Add a baseline and a small noise (±2000)
    noise = np.random.uniform(-2000, 2000)
    revenue = baseline + contribution + noise
    revenue_rows.append({"date": date, "geo": "US", "revenue": round(revenue, 2)})


# Create the revenue DataFrame
revenue_df = pd.DataFrame(revenue_rows)

revenue_df = revenue_df[revenue_df["date"] < "2025-04-11"]
spend_df = spend_df[spend_df["date"] < "2025-04-11"]

# Save the dataframes to CSV files
spend_df.to_csv("spending_data.csv", index=False)
revenue_df.to_csv("revenue_data.csv", index=False)

print("Spending data shape:", spend_df.shape)
print("Revenue data shape:", revenue_df.shape)
print("Files generated: spending_data.csv, revenue_data.csv")