| <!DOCTYPE html> |
| <html lang="en"> |
| <head> |
| <meta charset="UTF-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <title>Marketing Mix Modeling Studio</title> |
| <script src="https://cdn.tailwindcss.com"></script> |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> |
| <style> |
| .gradient-bg { |
| background: linear-gradient(135deg, #6B73FF 0%, #000DFF 50%, #00D4FF 100%); |
| } |
| .sidebar { |
| transition: all 0.3s ease; |
| } |
| .model-card:hover { |
| transform: translateY(-5px); |
| box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); |
| } |
| .dataset-item:hover { |
| background-color: rgba(59, 130, 246, 0.1); |
| } |
| #visualization-container { |
| min-height: 400px; |
| } |
| #data-preview { |
| max-height: 400px; |
| overflow-y: auto; |
| } |
| .transform-option:hover { |
| background-color: rgba(99, 102, 241, 0.1); |
| } |
| .tab-active { |
| border-bottom: 3px solid #4f46e5; |
| color: #4f46e5; |
| font-weight: 600; |
| } |
| </style> |
| </head> |
| <body class="bg-gray-50 font-sans"> |
| <div class="flex h-screen overflow-hidden"> |
| |
| <div class="sidebar bg-white w-64 border-r border-gray-200 flex flex-col"> |
| <div class="p-4 flex items-center justify-between border-b border-gray-200"> |
| <div class="flex items-center space-x-2"> |
| <div class="w-8 h-8 rounded-full gradient-bg flex items-center justify-center"> |
| <i class="fas fa-chart-pie text-white"></i> |
| </div> |
| <h1 class="text-xl font-bold text-gray-800">MMM Studio</h1> |
| </div> |
| <button id="sidebar-toggle" class="text-gray-500 hover:text-gray-700 md:hidden"> |
| <i class="fas fa-bars"></i> |
| </button> |
| </div> |
| <div class="flex-1 overflow-y-auto p-4"> |
| <div class="mb-6"> |
| <h2 class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2">Workflow</h2> |
| <nav> |
| <a href="#" class="flex items-center space-x-3 p-2 rounded-lg bg-blue-50 text-blue-600" id="data-tab"> |
| <i class="fas fa-database w-5"></i> |
| <span>1. Data Preparation</span> |
| </a> |
| <a href="#" class="flex items-center space-x-3 p-2 rounded-lg text-gray-700 hover:bg-gray-100 mt-1" id="transform-tab"> |
| <i class="fas fa-sliders-h w-5"></i> |
| <span>2. Transformations</span> |
| </a> |
| <a href="#" class="flex items-center space-x-3 p-2 rounded-lg text-gray-700 hover:bg-gray-100 mt-1" id="model-tab"> |
| <i class="fas fa-project-diagram w-5"></i> |
| <span>3. Model Setup</span> |
| </a> |
| <a href="#" class="flex items-center space-x-3 p-2 rounded-lg text-gray-700 hover:bg-gray-100 mt-1" id="results-tab"> |
| <i class="fas fa-chart-line w-5"></i> |
| <span>4. Results</span> |
| </a> |
| </nav> |
| </div> |
| <div> |
| <h2 class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2">Recent Projects</h2> |
| <div class="space-y-1"> |
| <a href="#" class="flex items-center space-x-2 p-2 text-sm rounded-lg text-gray-700 hover:bg-gray-100"> |
| <div class="w-2 h-2 rounded-full bg-green-500"></div> |
| <span>Q2 Campaign Analysis</span> |
| </a> |
| <a href="#" class="flex items-center space-x-2 p-2 text-sm rounded-lg text-gray-700 hover:bg-gray-100"> |
| <div class="w-2 h-2 rounded-full bg-blue-500"></div> |
| <span>Product Launch MMM</span> |
| </a> |
| <a href="#" class="flex items-center space-x-2 p-2 text-sm rounded-lg text-gray-700 hover:bg-gray-100"> |
| <div class="w-2 h-2 rounded-full bg-yellow-500"></div> |
| <span>Seasonal Impact Study</span> |
| </a> |
| </div> |
| </div> |
| </div> |
| <div class="p-4 border-t border-gray-200"> |
| <div class="flex items-center space-x-3"> |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-10 h-10 rounded-full"> |
| <div> |
| <p class="text-sm font-medium text-gray-800">Marketing Analyst</p> |
| <p class="text-xs text-gray-500">Last active: 2h ago</p> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div class="flex-1 overflow-auto"> |
| |
| <header class="bg-white border-b border-gray-200 p-4 flex items-center justify-between"> |
| <h2 class="text-2xl font-bold text-gray-800" id="current-step">Data Preparation</h2> |
| <div class="flex items-center space-x-4"> |
| <button class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 flex items-center"> |
| <i class="fas fa-play mr-2"></i> Run Model |
| </button> |
| <button class="p-2 text-gray-500 hover:text-gray-700"> |
| <i class="fas fa-save"></i> |
| </button> |
| <button class="p-2 text-gray-500 hover:text-gray-700"> |
| <i class="fas fa-question-circle"></i> |
| </button> |
| </div> |
| </header> |
|
|
| |
| <main class="p-6"> |
| |
| <div id="data-section" class="mb-8"> |
| <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100 mb-6"> |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">Upload Dataset</h3> |
| <div class="border-2 border-dashed border-gray-300 rounded-lg p-8 text-center"> |
| <i class="fas fa-cloud-upload-alt text-4xl text-gray-400 mb-3"></i> |
| <p class="text-gray-600 mb-2">Drag and drop your CSV or Excel file here</p> |
| <p class="text-sm text-gray-500 mb-4">or</p> |
| <input type="file" id="file-upload" class="hidden" accept=".csv,.xlsx,.xls"> |
| <label for="file-upload" class="px-4 py-2 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 cursor-pointer"> |
| Browse Files |
| </label> |
| <p class="text-xs text-gray-500 mt-3">Supports: CSV, XLSX (Max 50MB)</p> |
| </div> |
| </div> |
|
|
| <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100"> |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">Data Preview</h3> |
| <div id="data-preview" class="border border-gray-200 rounded-lg overflow-hidden"> |
| <div class="bg-gray-100 p-4 text-center text-gray-500"> |
| <i class="fas fa-table mr-2"></i> No data uploaded yet |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div id="transform-section" class="mb-8 hidden"> |
| <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100 mb-6"> |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">Available Transformations</h3> |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-4"> |
| <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300"> |
| <div class="flex items-center mb-2"> |
| <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3"> |
| <i class="fas fa-calculator text-indigo-600"></i> |
| </div> |
| <h4 class="font-medium">Log Transformation</h4> |
| </div> |
| <p class="text-sm text-gray-600">Apply logarithmic transformation to normalize data</p> |
| </div> |
| <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300"> |
| <div class="flex items-center mb-2"> |
| <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3"> |
| <i class="fas fa-calendar-alt text-indigo-600"></i> |
| </div> |
| <h4 class="font-medium">Date Aggregation</h4> |
| </div> |
| <p class="text-sm text-gray-600">Aggregate data by week, month or quarter</p> |
| </div> |
| <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300"> |
| <div class="flex items-center mb-2"> |
| <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3"> |
| <i class="fas fa-percentage text-indigo-600"></i> |
| </div> |
| <h4 class="font-medium">Normalization</h4> |
| </div> |
| <p class="text-sm text-gray-600">Scale variables to 0-1 range</p> |
| </div> |
| <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300"> |
| <div class="flex items-center mb-2"> |
| <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3"> |
| <i class="fas fa-wave-square text-indigo-600"></i> |
| </div> |
| <h4 class="font-medium">Adstock</h4> |
| </div> |
| <p class="text-sm text-gray-600">Apply adstock effect to media variables</p> |
| </div> |
| <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300"> |
| <div class="flex items-center mb-2"> |
| <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3"> |
| <i class="fas fa-random text-indigo-600"></i> |
| </div> |
| <h4 class="font-medium">Lag Variables</h4> |
| </div> |
| <p class="text-sm text-gray-600">Create lagged versions of variables</p> |
| </div> |
| <div class="transform-option border border-gray-200 rounded-lg p-4 cursor-pointer hover:border-indigo-300"> |
| <div class="flex items-center mb-2"> |
| <div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center mr-3"> |
| <i class="fas fa-filter text-indigo-600"></i> |
| </div> |
| <h4 class="font-medium">Outlier Treatment</h4> |
| </div> |
| <p class="text-sm text-gray-600">Detect and treat outliers</p> |
| </div> |
| </div> |
| </div> |
|
|
| <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100"> |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">Applied Transformations</h3> |
| <div class="border border-gray-200 rounded-lg p-4"> |
| <div class="text-center text-gray-500 py-8"> |
| <i class="fas fa-sliders-h text-2xl mb-2"></i> |
| <p>No transformations applied yet</p> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div id="model-section" class="mb-8 hidden"> |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6"> |
| <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100"> |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">Model Configuration</h3> |
| |
| <div class="mb-4"> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Target Variable</label> |
| <select class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-indigo-500"> |
| <option value="">Select target variable</option> |
| <option value="sales">Sales</option> |
| <option value="revenue">Revenue</option> |
| <option value="conversions">Conversions</option> |
| </select> |
| </div> |
| |
| <div class="mb-4"> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Media Variables</label> |
| <div class="border border-gray-200 rounded-lg p-2 max-h-40 overflow-y-auto"> |
| <div class="flex items-center mb-2"> |
| <input type="checkbox" id="tv" class="mr-2"> |
| <label for="tv">TV Spend</label> |
| </div> |
| <div class="flex items-center mb-2"> |
| <input type="checkbox" id="digital" class="mr-2"> |
| <label for="digital">Digital Spend</label> |
| </div> |
| <div class="flex items-center mb-2"> |
| <input type="checkbox" id="social" class="mr-2"> |
| <label for="social">Social Media</label> |
| </div> |
| <div class="flex items-center mb-2"> |
| <input type="checkbox" id="print" class="mr-2"> |
| <label for="print">Print Media</label> |
| </div> |
| <div class="flex items-center"> |
| <input type="checkbox" id="radio" class="mr-2"> |
| <label for="radio">Radio</label> |
| </div> |
| </div> |
| </div> |
| |
| <div class="mb-4"> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Control Variables</label> |
| <div class="border border-gray-200 rounded-lg p-2 max-h-40 overflow-y-auto"> |
| <div class="flex items-center mb-2"> |
| <input type="checkbox" id="price" class="mr-2"> |
| <label for="price">Price</label> |
| </div> |
| <div class="flex items-center mb-2"> |
| <input type="checkbox" id="promo" class="mr-2"> |
| <label for="promo">Promotions</label> |
| </div> |
| <div class="flex items-center mb-2"> |
| <input type="checkbox" id="season" class="mr-2"> |
| <label for="season">Seasonality</label> |
| </div> |
| <div class="flex items-center"> |
| <input type="checkbox" id="comp" class="mr-2"> |
| <label for="comp">Competitor Activity</label> |
| </div> |
| </div> |
| </div> |
| |
| <div class="mb-4"> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Model Type</label> |
| <select class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-indigo-500"> |
| <option value="linear">Linear Regression</option> |
| <option value="ridge">Ridge Regression</option> |
| <option value="lasso">LASSO Regression</option> |
| <option value="bayesian">Bayesian Regression</option> |
| </select> |
| </div> |
| </div> |
| |
| <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100"> |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">Model Parameters</h3> |
| |
| <div class="mb-4"> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Time Range</label> |
| <div class="flex space-x-2"> |
| <input type="date" class="border border-gray-300 rounded-lg px-3 py-2 flex-1"> |
| <span class="flex items-center">to</span> |
| <input type="date" class="border border-gray-300 rounded-lg px-3 py-2 flex-1"> |
| </div> |
| </div> |
| |
| <div class="mb-4"> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Train/Test Split</label> |
| <div class="flex items-center"> |
| <input type="range" min="50" max="90" value="80" class="w-full mr-3"> |
| <span class="text-sm font-medium">80%</span> |
| </div> |
| <p class="text-xs text-gray-500 mt-1">Percentage of data to use for training</p> |
| </div> |
| |
| <div class="mb-4"> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Adstock Parameters</label> |
| <div class="space-y-2"> |
| <div class="flex items-center justify-between"> |
| <span class="text-sm">TV Carryover</span> |
| <input type="number" min="0" max="1" step="0.1" value="0.5" class="w-16 border border-gray-300 rounded-lg px-2 py-1 text-right"> |
| </div> |
| <div class="flex items-center justify-between"> |
| <span class="text-sm">Digital Carryover</span> |
| <input type="number" min="0" max="1" step="0.1" value="0.3" class="w-16 border border-gray-300 rounded-lg px-2 py-1 text-right"> |
| </div> |
| <div class="flex items-center justify-between"> |
| <span class="text-sm">Social Carryover</span> |
| <input type="number" min="0" max="1" step="0.1" value="0.2" class="w-16 border border-gray-300 rounded-lg px-2 py-1 text-right"> |
| </div> |
| </div> |
| </div> |
| |
| <div class="mb-4"> |
| <label class="block text-sm font-medium text-gray-700 mb-1">Saturation Curve</label> |
| <select class="w-full border border-gray-300 rounded-lg px-3 py-2 focus:outline-none focus:ring-2 focus:ring-indigo-500"> |
| <option value="hill">Hill Function</option> |
| <option value="log">Logarithmic</option> |
| <option value="exp">Exponential</option> |
| </select> |
| </div> |
| </div> |
| </div> |
| </div> |
|
|
| |
| <div id="results-section" class="hidden"> |
| <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100 mb-6"> |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">Model Performance</h3> |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-4 mb-6"> |
| <div class="bg-gray-50 rounded-lg p-4 border border-gray-200"> |
| <p class="text-sm font-medium text-gray-500 mb-1">R-squared</p> |
| <p class="text-2xl font-bold text-gray-800">0.87</p> |
| <p class="text-xs text-green-500">Good fit</p> |
| </div> |
| <div class="bg-gray-50 rounded-lg p-4 border border-gray-200"> |
| <p class="text-sm font-medium text-gray-500 mb-1">MAPE</p> |
| <p class="text-2xl font-bold text-gray-800">12.5%</p> |
| <p class="text-xs text-yellow-500">Moderate error</p> |
| </div> |
| <div class="bg-gray-50 rounded-lg p-4 border border-gray-200"> |
| <p class="text-sm font-medium text-gray-500 mb-1">RMSE</p> |
| <p class="text-2xl font-bold text-gray-800">1,245</p> |
| <p class="text-xs text-green-500">Good precision</p> |
| </div> |
| </div> |
| |
| <div class="border border-gray-200 rounded-lg p-4"> |
| <div class="flex justify-between items-center mb-4"> |
| <h4 class="font-medium">Actual vs Predicted</h4> |
| <div class="flex space-x-2"> |
| <button class="px-3 py-1 bg-gray-100 rounded-lg text-sm">Weekly</button> |
| <button class="px-3 py-1 bg-indigo-600 text-white rounded-lg text-sm">Monthly</button> |
| <button class="px-3 py-1 bg-gray-100 rounded-lg text-sm">Quarterly</button> |
| </div> |
| </div> |
| <div id="visualization-container" class="bg-gray-50 rounded-lg p-4 h-64 flex items-center justify-center"> |
| <p class="text-gray-500">Run the model to see visualization</p> |
| </div> |
| </div> |
| </div> |
| |
| <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100"> |
| <h3 class="text-lg font-semibold text-gray-800 mb-4">ROI Analysis</h3> |
| <div class="overflow-x-auto"> |
| <table class="min-w-full divide-y divide-gray-200"> |
| <thead class="bg-gray-50"> |
| <tr> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Channel</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Spend</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Contribution</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ROI</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Efficiency</th> |
| </tr> |
| </thead> |
| <tbody class="bg-white divide-y divide-gray-200"> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">TV</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$1,250,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">32%</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">2.8</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">High</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Digital</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$850,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">28%</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-green-500">3.2</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Very High</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Social Media</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$320,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">18%</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-yellow-500">1.9</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Medium</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Print</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$180,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">12%</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-red-500">0.8</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Low</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">Radio</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$150,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">10%</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-yellow-500">1.2</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Medium</td> |
| </tr> |
| </tbody> |
| </table> |
| </div> |
| </div> |
| </div> |
| </main> |
| </div> |
| </div> |
|
|
| <script> |
| |
| document.getElementById('data-tab').addEventListener('click', function(e) { |
| e.preventDefault(); |
| showSection('data-section'); |
| document.getElementById('current-step').textContent = 'Data Preparation'; |
| setActiveTab('data-tab'); |
| }); |
| |
| document.getElementById('transform-tab').addEventListener('click', function(e) { |
| e.preventDefault(); |
| showSection('transform-section'); |
| document.getElementById('current-step').textContent = 'Data Transformations'; |
| setActiveTab('transform-tab'); |
| }); |
| |
| document.getElementById('model-tab').addEventListener('click', function(e) { |
| e.preventDefault(); |
| showSection('model-section'); |
| document.getElementById('current-step').textContent = 'Model Setup'; |
| setActiveTab('model-tab'); |
| }); |
| |
| document.getElementById('results-tab').addEventListener('click', function(e) { |
| e.preventDefault(); |
| showSection('results-section'); |
| document.getElementById('current-step').textContent = 'Model Results'; |
| setActiveTab('results-tab'); |
| }); |
| |
| function showSection(sectionId) { |
| |
| document.getElementById('data-section').classList.add('hidden'); |
| document.getElementById('transform-section').classList.add('hidden'); |
| document.getElementById('model-section').classList.add('hidden'); |
| document.getElementById('results-section').classList.add('hidden'); |
| |
| |
| document.getElementById(sectionId).classList.remove('hidden'); |
| } |
| |
| function setActiveTab(tabId) { |
| |
| document.getElementById('data-tab').classList.remove('bg-blue-50', 'text-blue-600'); |
| document.getElementById('transform-tab').classList.remove('bg-blue-50', 'text-blue-600'); |
| document.getElementById('model-tab').classList.remove('bg-blue-50', 'text-blue-600'); |
| document.getElementById('results-tab').classList.remove('bg-blue-50', 'text-blue-600'); |
| |
| |
| document.getElementById(tabId).classList.add('bg-blue-50', 'text-blue-600'); |
| } |
| |
| |
| document.getElementById('file-upload').addEventListener('change', function(e) { |
| const file = e.target.files[0]; |
| if (file) { |
| |
| setTimeout(() => { |
| |
| const previewHTML = ` |
| <table class="min-w-full divide-y divide-gray-200"> |
| <thead class="bg-gray-50"> |
| <tr> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Sales</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">TV Spend</th> |
| <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Digital Spend</th> |
| </tr> |
| </thead> |
| <tbody class="bg-white divide-y divide-gray-200"> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-01-01</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">125,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">50,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">25,000</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-01-08</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">135,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">55,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">28,000</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-01-15</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">145,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">60,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">30,000</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-01-22</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">155,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">65,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">32,000</td> |
| </tr> |
| <tr> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">2023-01-29</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">165,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">70,000</td> |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">35,000</td> |
| </tr> |
| </tbody> |
| </table> |
| `; |
| |
| document.getElementById('data-preview').innerHTML = previewHTML; |
| |
| |
| document.getElementById('transform-tab').classList.remove('text-gray-700'); |
| document.getElementById('transform-tab').classList.add('text-blue-600'); |
| }, 1000); |
| } |
| }); |
| |
| |
| document.getElementById('sidebar-toggle').addEventListener('click', function() { |
| const sidebar = document.querySelector('.sidebar'); |
| sidebar.classList.toggle('hidden'); |
| sidebar.classList.toggle('block'); |
| }); |
| </script> |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=marcessz/mmmstudio" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> |
| </html> |