File size: 37,557 Bytes
9470788
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
<!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">
        <!-- Sidebar -->
        <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>

        <!-- Main Content -->
        <div class="flex-1 overflow-auto">
            <!-- Header -->
            <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 Content Area -->
            <main class="p-6">
                <!-- Data Preparation Section -->
                <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>

                <!-- Transformations Section -->
                <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>

                <!-- Model Setup Section -->
                <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>

                <!-- Results Section -->
                <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>
        // Tab navigation
        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) {
            // Hide all sections
            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');
            
            // Show selected section
            document.getElementById(sectionId).classList.remove('hidden');
        }
        
        function setActiveTab(tabId) {
            // Remove active class from all tabs
            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');
            
            // Add active class to selected tab
            document.getElementById(tabId).classList.add('bg-blue-50', 'text-blue-600');
        }
        
        // File upload simulation
        document.getElementById('file-upload').addEventListener('change', function(e) {
            const file = e.target.files[0];
            if (file) {
                // Simulate processing
                setTimeout(() => {
                    // Create a simple table preview
                    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;
                    
                    // Enable the next steps
                    document.getElementById('transform-tab').classList.remove('text-gray-700');
                    document.getElementById('transform-tab').classList.add('text-blue-600');
                }, 1000);
            }
        });
        
        // Sidebar toggle for mobile
        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>