File size: 5,157 Bytes
8bd5805
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Radio Ad Performance Visualizer</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.tailwindcss.com"></script>
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
    <script src="https://unpkg.com/feather-icons"></script>
</head>
<body class="bg-gray-50 min-h-screen">
    <div class="container mx-auto px-4 py-8">
        <header class="mb-12">
            <h1 class="text-4xl font-bold text-gray-800 mb-2">📻 Radio Ad Performance</h1>
            <p class="text-gray-600">Visualizing campaign metrics over time</p>
        </header>

        <div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
            <!-- Installs Chart -->
            <div class="bg-white p-6 rounded-xl shadow-md">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-xl font-semibold text-gray-700">Installs Over Time</h2>
                    <div class="flex items-center text-indigo-600">
                        <i data-feather="download" class="mr-2"></i>
                        <span>Installs</span>
                    </div>
                </div>
                <div class="chart-container" style="position: relative; height:300px;">
                    <canvas id="installsChart"></canvas>
                </div>
            </div>

            <!-- Spend Chart -->
            <div class="bg-white p-6 rounded-xl shadow-md">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-xl font-semibold text-gray-700">Spend Over Time</h2>
                    <div class="flex items-center text-purple-600">
                        <i data-feather="dollar-sign" class="mr-2"></i>
                        <span>Spend</span>
                    </div>
                </div>
                <div class="chart-container" style="position: relative; height:300px;">
                    <canvas id="spendChart"></canvas>
                </div>
            </div>

            <!-- Combined Chart -->
            <div class="bg-white p-6 rounded-xl shadow-md lg:col-span-2">
                <div class="flex items-center justify-between mb-4">
                    <h2 class="text-xl font-semibold text-gray-700">Installs vs Spend</h2>
                    <div class="flex space-x-4">
                        <div class="flex items-center text-indigo-600">
                            <i data-feather="download" class="mr-2"></i>
                            <span>Installs</span>
                        </div>
                        <div class="flex items-center text-purple-600">
                            <i data-feather="dollar-sign" class="mr-2"></i>
                            <span>Spend</span>
                        </div>
                    </div>
                </div>
                <div class="chart-container" style="position: relative; height:400px;">
                    <canvas id="combinedChart"></canvas>
                </div>
            </div>

            <!-- Data Table -->
            <div class="bg-white p-6 rounded-xl shadow-md lg:col-span-2">
                <h2 class="text-xl font-semibold text-gray-700 mb-4">Performance Data</h2>
                <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">Period</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Duration</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Total Spend</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Installs</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Avg. CPI</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Installs/Day</th>
                                <th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Spend/Day</th>
                            </tr>
                        </thead>
                        <tbody class="bg-white divide-y divide-gray-200" id="dataTableBody">
                            <!-- Data will be inserted here by JavaScript -->
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>

    <script src="script.js"></script>
    <script>
        feather.replace();
    </script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>