billboard-analytics / index.html
FPRZ's picture
Add 3 files
f6c0ace verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Billboard Digitalization Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&libraries=visualization"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.map-container {
height: 600px;
border-radius: 12px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.sidebar {
transition: all 0.3s ease;
}
.progress-bar {
height: 8px;
border-radius: 4px;
}
.chart-container {
height: 250px;
}
.heatmap-legend {
background: linear-gradient(to right, rgba(0, 0, 255, 0.2), rgba(0, 255, 0, 0.2), rgba(255, 255, 0, 0.2), rgba(255, 165, 0, 0.2), rgba(255, 0, 0, 0.2));
}
.billboard-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}
</style>
</head>
<body class="bg-gray-100">
<div class="flex h-screen overflow-hidden">
<!-- Sidebar -->
<div class="sidebar bg-indigo-800 text-white w-64 flex-shrink-0">
<div class="p-4 flex items-center space-x-2">
<i class="fas fa-ad text-2xl text-yellow-300"></i>
<h1 class="text-xl font-bold">Billboard Digitalization</h1>
</div>
<nav class="mt-8">
<div class="px-4 py-2 text-indigo-200 uppercase text-xs font-semibold">Main</div>
<a href="#" class="block px-4 py-3 text-white bg-indigo-900">
<i class="fas fa-map-marker-alt mr-2"></i> Map View
</a>
<a href="#" class="block px-4 py-3 text-indigo-200 hover:text-white hover:bg-indigo-700">
<i class="fas fa-list-ul mr-2"></i> Inventory
</a>
<a href="#" class="block px-4 py-3 text-indigo-200 hover:text-white hover:bg-indigo-700">
<i class="fas fa-chart-line mr-2"></i> Analytics
</a>
<a href="#" class="block px-4 py-3 text-indigo-200 hover:text-white hover:bg-indigo-700">
<i class="fas fa-exchange-alt mr-2"></i> Conversion
</a>
<div class="px-4 py-2 text-indigo-200 uppercase text-xs font-semibold mt-6">Reports</div>
<a href="#" class="block px-4 py-3 text-indigo-200 hover:text-white hover:bg-indigo-700">
<i class="fas fa-eye mr-2"></i> Viewability
</a>
<a href="#" class="block px-4 py-3 text-indigo-200 hover:text-white hover:bg-indigo-700">
<i class="fas fa-car mr-2"></i> Traffic
</a>
<a href="#" class="block px-4 py-3 text-indigo-200 hover:text-white hover:bg-indigo-700">
<i class="fas fa-dollar-sign mr-2"></i> Revenue
</a>
<div class="px-4 py-2 text-indigo-200 uppercase text-xs font-semibold mt-6">Settings</div>
<a href="#" class="block px-4 py-3 text-indigo-200 hover:text-white hover:bg-indigo-700">
<i class="fas fa-cog mr-2"></i> Preferences
</a>
<a href="#" class="block px-4 py-3 text-indigo-200 hover:text-white hover:bg-indigo-700">
<i class="fas fa-users mr-2"></i> Users
</a>
</nav>
</div>
<!-- Main Content -->
<div class="flex-1 overflow-auto">
<!-- Top Navigation -->
<header class="bg-white shadow-sm">
<div class="flex justify-between items-center px-6 py-4">
<div class="flex items-center space-x-4">
<button class="text-gray-500 focus:outline-none">
<i class="fas fa-bars"></i>
</button>
<h2 class="text-xl font-semibold text-gray-800">Billboard Digitalization Dashboard</h2>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<input type="text" placeholder="Search billboards..." class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i>
</div>
<button class="p-2 text-gray-500 hover:text-gray-700">
<i class="fas fa-bell"></i>
</button>
<div class="flex items-center space-x-2">
<img src="https://randomuser.me/api/portraits/men/32.jpg" alt="User" class="w-8 h-8 rounded-full">
<span class="text-sm font-medium">John Doe</span>
</div>
</div>
</div>
</header>
<!-- Dashboard Content -->
<main class="p-6">
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
<div class="bg-white rounded-lg shadow p-6">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500 text-sm">Total Billboards</p>
<h3 class="text-2xl font-bold mt-1">1,247</h3>
<p class="text-green-500 text-sm mt-2"><i class="fas fa-arrow-up mr-1"></i> 12% from last month</p>
</div>
<div class="bg-indigo-100 p-3 rounded-full">
<i class="fas fa-ad text-indigo-600 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500 text-sm">Avg. Viewability</p>
<h3 class="text-2xl font-bold mt-1">78%</h3>
<div class="w-full bg-gray-200 rounded-full h-2 mt-3">
<div class="bg-yellow-500 h-2 rounded-full" style="width: 78%"></div>
</div>
</div>
<div class="bg-yellow-100 p-3 rounded-full">
<i class="fas fa-eye text-yellow-600 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500 text-sm">Daily Traffic</p>
<h3 class="text-2xl font-bold mt-1">42,589</h3>
<p class="text-green-500 text-sm mt-2"><i class="fas fa-arrow-up mr-1"></i> 8% from last week</p>
</div>
<div class="bg-green-100 p-3 rounded-full">
<i class="fas fa-car text-green-600 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow p-6">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500 text-sm">Conversion Rate</p>
<h3 class="text-2xl font-bold mt-1">24%</h3>
<div class="w-full bg-gray-200 rounded-full h-2 mt-3">
<div class="bg-red-500 h-2 rounded-full" style="width: 24%"></div>
</div>
</div>
<div class="bg-red-100 p-3 rounded-full">
<i class="fas fa-exchange-alt text-red-600 text-xl"></i>
</div>
</div>
</div>
</div>
<!-- Map and Analytics -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
<!-- Map Container -->
<div class="lg:col-span-2 bg-white rounded-lg shadow p-4">
<div class="flex justify-between items-center mb-4">
<h3 class="font-semibold text-lg">Billboard Locations</h3>
<div class="flex space-x-2">
<button class="px-3 py-1 bg-indigo-600 text-white rounded-md text-sm flex items-center">
<i class="fas fa-layer-group mr-1"></i> Layers
</button>
<button class="px-3 py-1 bg-white border border-gray-300 rounded-md text-sm flex items-center">
<i class="fas fa-filter mr-1"></i> Filter
</button>
</div>
</div>
<div id="map" class="map-container"></div>
<div class="mt-3 flex justify-between items-center">
<div class="flex space-x-2">
<div class="flex items-center">
<div class="w-3 h-3 bg-red-500 rounded-full mr-1"></div>
<span class="text-xs">Low Viewability (<50%)</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 bg-yellow-500 rounded-full mr-1"></div>
<span class="text-xs">Medium (50-80%)</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 bg-green-500 rounded-full mr-1"></div>
<span class="text-xs">High (>80%)</span>
</div>
</div>
<button class="text-indigo-600 text-sm font-medium">
<i class="fas fa-expand mr-1"></i> Fullscreen
</button>
</div>
</div>
<!-- Billboard Details -->
<div class="bg-white rounded-lg shadow p-4 overflow-y-auto" style="max-height: 600px;">
<h3 class="font-semibold text-lg mb-4">Selected Billboard</h3>
<div class="bg-gray-100 rounded-lg p-4 mb-4">
<div class="flex justify-between items-start">
<div>
<h4 class="font-medium">Times Square Mega Billboard</h4>
<p class="text-gray-500 text-sm">ID: BBD-4872</p>
</div>
<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded">Active</span>
</div>
<div class="mt-3 flex items-center text-sm">
<i class="fas fa-map-marker-alt text-gray-400 mr-1"></i>
<span>40.7577° N, 73.9857° W</span>
</div>
</div>
<div class="space-y-4">
<div>
<h4 class="text-sm font-medium text-gray-500 mb-1">Owner</h4>
<p class="text-sm">Lamar Advertising Co.</p>
</div>
<div>
<h4 class="text-sm font-medium text-gray-500 mb-1">Specifications</h4>
<div class="grid grid-cols-2 gap-2 text-sm">
<div>
<p class="text-gray-500">Type</p>
<p>Digital Billboard</p>
</div>
<div>
<p class="text-gray-500">Size</p>
<p>14.6m x 6.1m</p>
</div>
<div>
<p class="text-gray-500">Ratio</p>
<p>16:9</p>
</div>
<div>
<p class="text-gray-500">Illumination</p>
<p>LED Backlit</p>
</div>
</div>
</div>
<div>
<h4 class="text-sm font-medium text-gray-500 mb-1">Performance Metrics</h4>
<div class="space-y-2">
<div>
<div class="flex justify-between text-sm mb-1">
<span>Viewability</span>
<span>92%</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-green-500 h-2 rounded-full" style="width: 92%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Daily Impressions</span>
<span>1.2M</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-blue-500 h-2 rounded-full" style="width: 85%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>Conversion Potential</span>
<span>High</span>
</div>
<div class="w-full bg-gray-200 rounded-full h-2">
<div class="bg-purple-500 h-2 rounded-full" style="width: 76%"></div>
</div>
</div>
</div>
</div>
<div>
<h4 class="text-sm font-medium text-gray-500 mb-1">Traffic Data</h4>
<div class="grid grid-cols-3 gap-2 text-sm">
<div class="bg-gray-100 p-2 rounded text-center">
<p class="text-gray-500">Vehicles</p>
<p class="font-medium">42,589</p>
</div>
<div class="bg-gray-100 p-2 rounded text-center">
<p class="text-gray-500">Pedestrians</p>
<p class="font-medium">136,742</p>
</div>
<div class="bg-gray-100 p-2 rounded text-center">
<p class="text-gray-500">Avg. Speed</p>
<p class="font-medium">12 mph</p>
</div>
</div>
</div>
<button class="w-full bg-indigo-600 text-white py-2 rounded-md text-sm font-medium mt-4">
<i class="fas fa-exchange-alt mr-1"></i> Initiate Digital Conversion
</button>
</div>
</div>
</div>
<!-- Billboard List and Charts -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- Billboard List -->
<div class="bg-white rounded-lg shadow p-4">
<div class="flex justify-between items-center mb-4">
<h3 class="font-semibold text-lg">Top Billboards</h3>
<button class="text-indigo-600 text-sm font-medium">View All</button>
</div>
<div class="space-y-4">
<div class="billboard-card bg-white border border-gray-200 rounded-lg p-4 transition-all duration-300 cursor-pointer hover:shadow-md">
<div class="flex justify-between items-start">
<div>
<h4 class="font-medium">Sunset Strip Billboard</h4>
<p class="text-gray-500 text-sm">Los Angeles, CA</p>
</div>
<span class="bg-green-100 text-green-800 text-xs px-2 py-1 rounded">96%</span>
</div>
<div class="mt-3 flex justify-between text-sm">
<div>
<p class="text-gray-500">Daily Traffic</p>
<p class="font-medium">38,742</p>
</div>
<div>
<p class="text-gray-500">Size</p>
<p class="font-medium">10.6m x 5.2m</p>
</div>
</div>
</div>
<div class="billboard-card bg-white border border-gray-200 rounded-lg p-4 transition-all duration-300 cursor-pointer hover:shadow-md">
<div class="flex justify-between items-start">
<div>
<h4 class="font-medium">Michigan Ave Tower</h4>
<p class="text-gray-500 text-sm">Chicago, IL</p>
</div>
<span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded">72%</span>
</div>
<div class="mt-3 flex justify-between text-sm">
<div>
<p class="text-gray-500">Daily Traffic</p>
<p class="font-medium">29,156</p>
</div>
<div>
<p class="text-gray-500">Size</p>
<p class="font-medium">8.4m x 3.8m</p>
</div>
</div>
</div>
<div class="billboard-card bg-white border border-gray-200 rounded-lg p-4 transition-all duration-300 cursor-pointer hover:shadow-md">
<div class="flex justify-between items-start">
<div>
<h4 class="font-medium">Bay Bridge Signage</h4>
<p class="text-gray-500 text-sm">San Francisco, CA</p>
</div>
<span class="bg-red-100 text-red-800 text-xs px-2 py-1 rounded">43%</span>
</div>
<div class="mt-3 flex justify-between text-sm">
<div>
<p class="text-gray-500">Daily Traffic</p>
<p class="font-medium">52,891</p>
</div>
<div>
<p class="text-gray-500">Size</p>
<p class="font-medium">12.1m x 4.5m</p>
</div>
</div>
</div>
</div>
</div>
<!-- Viewability Chart -->
<div class="bg-white rounded-lg shadow p-4">
<div class="flex justify-between items-center mb-4">
<h3 class="font-semibold text-lg">Viewability by Type</h3>
<div class="flex space-x-2">
<button class="px-2 py-1 bg-white border border-gray-300 rounded-md text-xs">Week</button>
<button class="px-2 py-1 bg-indigo-600 text-white rounded-md text-xs">Month</button>
<button class="px-2 py-1 bg-white border border-gray-300 rounded-md text-xs">Year</button>
</div>
</div>
<div class="chart-container">
<canvas id="viewabilityChart"></canvas>
</div>
</div>
<!-- Traffic Heatmap -->
<div class="bg-white rounded-lg shadow p-4">
<div class="flex justify-between items-center mb-4">
<h3 class="font-semibold text-lg">Traffic Heatmap</h3>
<button class="text-indigo-600 text-sm font-medium">View Details</button>
</div>
<div class="chart-container">
<canvas id="trafficHeatmap"></canvas>
</div>
<div class="mt-3">
<div class="heatmap-legend h-4 rounded-md mb-2"></div>
<div class="flex justify-between text-xs text-gray-500">
<span>Low Traffic</span>
<span>Medium</span>
<span>High Traffic</span>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script>
// Initialize Google Map
function initMap() {
const map = new google.maps.Map(document.getElementById("map"), {
center: { lat: 40.7128, lng: -74.0060 },
zoom: 12,
styles: [
{
featureType: "poi.business",
stylers: [{ visibility: "off" }]
},
{
featureType: "transit",
elementType: "labels.icon",
stylers: [{ visibility: "off" }]
}
]
});
// Add sample billboard markers with different colors based on viewability
const billboards = [
{ lat: 40.7577, lng: -73.9857, viewability: 92, title: "Times Square Billboard", id: "BBD-4872" },
{ lat: 40.7580, lng: -73.9785, viewability: 85, title: "Broadway Tower", id: "BBD-5123" },
{ lat: 40.7510, lng: -73.9875, viewability: 78, title: "Madison Square", id: "BBD-4981" },
{ lat: 40.7400, lng: -73.9900, viewability: 65, title: "Flatiron District", id: "BBD-5234" },
{ lat: 40.7300, lng: -73.9950, viewability: 45, title: "Union Square", id: "BBD-5092" },
{ lat: 40.7150, lng: -74.0050, viewability: 92, title: "Wall Street", id: "BBD-5345" },
{ lat: 40.7050, lng: -74.0150, viewability: 72, title: "Battery Park", id: "BBD-5213" }
];
billboards.forEach(billboard => {
let color;
if (billboard.viewability >= 80) color = "green";
else if (billboard.viewability >= 50) color = "yellow";
else color = "red";
const marker = new google.maps.Marker({
position: { lat: billboard.lat, lng: billboard.lng },
map: map,
title: billboard.title,
icon: {
path: google.maps.SymbolPath.CIRCLE,
fillColor: color,
fillOpacity: 0.8,
strokeWeight: 0,
scale: 10
}
});
// Add click event to show info window
const infowindow = new google.maps.InfoWindow({
content: `
<div class="p-2">
<h4 class="font-medium">${billboard.title}</h4>
<p class="text-sm">ID: ${billboard.id}</p>
<p class="text-sm">Viewability: ${billboard.viewability}%</p>
<p class="text-sm">Lat: ${billboard.lat.toFixed(4)}, Lng: ${billboard.lng.toFixed(4)}</p>
</div>
`
});
marker.addListener("click", () => {
infowindow.open(map, marker);
});
});
// Add heatmap layer for traffic density
const heatmapData = [
{ location: new google.maps.LatLng(40.7577, -73.9857), weight: 0.9 },
{ location: new google.maps.LatLng(40.7580, -73.9785), weight: 0.7 },
{ location: new google.maps.LatLng(40.7510, -73.9875), weight: 0.6 },
{ location: new google.maps.LatLng(40.7400, -73.9900), weight: 0.5 },
{ location: new google.maps.LatLng(40.7300, -73.9950), weight: 0.4 },
{ location: new google.maps.LatLng(40.7150, -74.0050), weight: 0.8 },
{ location: new google.maps.LatLng(40.7050, -74.0150), weight: 0.6 }
];
const heatmap = new google.maps.visualization.HeatmapLayer({
data: heatmapData,
map: map,
radius: 30
});
}
// Initialize charts when DOM is loaded
document.addEventListener('DOMContentLoaded', function() {
// Viewability by Type Chart
const viewabilityCtx = document.getElementById('viewabilityChart').getContext('2d');
const viewabilityChart = new Chart(viewabilityCtx, {
type: 'bar',
data: {
labels: ['Digital', 'Bulletin', 'Poster', 'Wallscape', 'Transit'],
datasets: [{
label: 'Viewability %',
data: [85, 72, 65, 78, 68],
backgroundColor: [
'rgba(79, 70, 229, 0.7)',
'rgba(234, 88, 12, 0.7)',
'rgba(16, 185, 129, 0.7)',
'rgba(220, 38, 38, 0.7)',
'rgba(245, 158, 11, 0.7)'
],
borderColor: [
'rgba(79, 70, 229, 1)',
'rgba(234, 88, 12, 1)',
'rgba(16, 185, 129, 1)',
'rgba(220, 38, 38, 1)',
'rgba(245, 158, 11, 1)'
],
borderWidth: 1
}]
},
options: {
responsive: true,
maintainAspectRatio: false,
scales: {
y: {
beginAtZero: true,
max: 100,
ticks: {
callback: function(value) {
return value + '%';
}
}
}
},
plugins: {
legend: {
display: false
}
}
}
});
// Traffic Heatmap Chart
const trafficCtx = document.getElementById('trafficHeatmap').getContext('2d');
const trafficChart = new Chart(trafficCtx, {
type: 'line',
data: {
labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
datasets: [
{
label: 'Vehicles',
data: [32000, 35000, 38000, 42000, 45000, 28000, 22000],
borderColor: 'rgba(79, 70, 229, 1)',
backgroundColor: 'rgba(79, 70, 229, 0.1)',
tension: 0.3,
fill: true
},
{
label: 'Pedestrians',
data: [45000, 48000, 52000, 55000, 58000, 90000, 85000],
borderColor: 'rgba(16, 185, 129, 1)',
backgroundColor: 'rgba(16, 185, 129, 0.1)',
tension: 0.3,
fill: true
}
]
},
options: {
responsive: true,
maintainAspectRatio: false,
plugins: {
legend: {
position: 'top',
}
},
scales: {
y: {
beginAtZero: true
}
}
}
});
// Initialize Google Maps
initMap();
});
</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=FPRZ/billboard-analytics" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>