Spaces:
Running
Running
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Office Space Visualization</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet"> | |
| <script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <style> | |
| .floor-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); | |
| } | |
| .progress-bar { | |
| transition: width 1s ease-in-out; | |
| } | |
| .department-tag { | |
| transition: all 0.3s ease; | |
| } | |
| .department-tag:hover { | |
| transform: scale(1.05); | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50"> | |
| <header class="bg-white shadow-sm"> | |
| <div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8"> | |
| <div class="flex justify-between items-center"> | |
| <h1 class="text-3xl font-bold text-gray-900"> | |
| <i data-feather="layout" class="inline mr-2"></i> | |
| Office Space Visualization | |
| </h1> | |
| <div class="flex items-center space-x-4"> | |
| <span class="text-sm text-gray-500">Last updated: Today</span> | |
| <button class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-md flex items-center"> | |
| <i data-feather="refresh-cw" class="w-4 h-4 mr-2"></i> | |
| Refresh | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <main class="max-w-7xl mx-auto py-6 sm:px-6 lg:px-8"> | |
| <!-- Summary Cards --> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-8"> | |
| <div class="bg-white rounded-lg shadow p-6" data-aos="fade-up"> | |
| <div class="flex items-center justify-between"> | |
| <h3 class="text-lg font-medium text-gray-900">Total Workstations</h3> | |
| <div class="bg-blue-100 p-2 rounded-full"> | |
| <i data-feather="monitor" class="text-blue-600 w-5 h-5"></i> | |
| </div> | |
| </div> | |
| <p class="mt-2 text-3xl font-bold text-gray-900">187</p> | |
| <div class="mt-4"> | |
| <div class="flex justify-between text-sm text-gray-500"> | |
| <span>Occupied</span> | |
| <span>91%</span> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-2.5 mt-1"> | |
| <div class="bg-blue-600 h-2.5 rounded-full progress-bar" style="width: 91%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow p-6" data-aos="fade-up" data-aos-delay="100"> | |
| <div class="flex items-center justify-between"> | |
| <h3 class="text-lg font-medium text-gray-900">Available Spaces</h3> | |
| <div class="bg-green-100 p-2 rounded-full"> | |
| <i data-feather="check-circle" class="text-green-600 w-5 h-5"></i> | |
| </div> | |
| </div> | |
| <p class="mt-2 text-3xl font-bold text-gray-900">17</p> | |
| <div class="mt-4"> | |
| <div class="flex justify-between text-sm text-gray-500"> | |
| <span>Shared</span> | |
| <span>4</span> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-2.5 mt-1"> | |
| <div class="bg-green-500 h-2.5 rounded-full progress-bar" style="width: 24%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-lg shadow p-6" data-aos="fade-up" data-aos-delay="200"> | |
| <div class="flex items-center justify-between"> | |
| <h3 class="text-lg font-medium text-gray-900">Departments</h3> | |
| <div class="bg-purple-100 p-2 rounded-full"> | |
| <i data-feather="users" class="text-purple-600 w-5 h-5"></i> | |
| </div> | |
| </div> | |
| <p class="mt-2 text-3xl font-bold text-gray-900">12</p> | |
| <div class="mt-4 flex flex-wrap gap-2"> | |
| <span class="department-tag bg-blue-100 text-blue-800 text-xs px-2 py-1 rounded">Finance</span> | |
| <span class="department-tag bg-green-100 text-green-800 text-xs px-2 py-1 rounded">Housing</span> | |
| <span class="department-tag bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded">CGP</span> | |
| <span class="department-tag bg-purple-100 text-purple-800 text-xs px-2 py-1 rounded">IT</span> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Floor Navigation --> | |
| <div class="mb-8"> | |
| <h2 class="text-xl font-semibold text-gray-800 mb-4">Floors Overview</h2> | |
| <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4"> | |
| <div class="floor-card bg-white rounded-lg shadow p-6 cursor-pointer transition-all duration-300" onclick="showFloorData(9)"> | |
| <div class="flex items-center space-x-3"> | |
| <div class="bg-blue-100 p-3 rounded-full"> | |
| <i data-feather="home" class="text-blue-600 w-6 h-6"></i> | |
| </div> | |
| <div> | |
| <h3 class="font-medium text-gray-900">9th Floor</h3> | |
| <p class="text-sm text-gray-500">94 workstations</p> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <div class="flex justify-between text-xs text-gray-500"> | |
| <span>91 occupied</span> | |
| <span>2 open</span> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-1.5 mt-1"> | |
| <div class="bg-blue-600 h-1.5 rounded-full" style="width: 97%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="floor-card bg-white rounded-lg shadow p-6 cursor-pointer transition-all duration-300" onclick="showFloorData(8)"> | |
| <div class="flex items-center space-x-3"> | |
| <div class="bg-green-100 p-3 rounded-full"> | |
| <i data-feather="home" class="text-green-600 w-6 h-6"></i> | |
| </div> | |
| <div> | |
| <h3 class="font-medium text-gray-900">8th Floor</h3> | |
| <p class="text-sm text-gray-500">22 workstations</p> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <div class="flex justify-between text-xs text-gray-500"> | |
| <span>14 occupied</span> | |
| <span>8 open</span> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-1.5 mt-1"> | |
| <div class="bg-green-500 h-1.5 rounded-full" style="width: 64%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="floor-card bg-white rounded-lg shadow p-6 cursor-pointer transition-all duration-300" onclick="showFloorData(6)"> | |
| <div class="flex items-center space-x-3"> | |
| <div class="bg-yellow-100 p-3 rounded-full"> | |
| <i data-feather="home" class="text-yellow-600 w-6 h-6"></i> | |
| </div> | |
| <div> | |
| <h3 class="font-medium text-gray-900">6th Floor</h3> | |
| <p class="text-sm text-gray-500">54 workstations</p> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <div class="flex justify-between text-xs text-gray-500"> | |
| <span>42 occupied</span> | |
| <span>11 open</span> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-1.5 mt-1"> | |
| <div class="bg-yellow-500 h-1.5 rounded-full" style="width: 78%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="floor-card bg-white rounded-lg shadow p-6 cursor-pointer transition-all duration-300" onclick="showFloorData(4)"> | |
| <div class="flex items-center space-x-3"> | |
| <div class="bg-purple-100 p-3 rounded-full"> | |
| <i data-feather="home" class="text-purple-600 w-6 h-6"></i> | |
| </div> | |
| <div> | |
| <h3 class="font-medium text-gray-900">4th Floor</h3> | |
| <p class="text-sm text-gray-500">34 workstations</p> | |
| </div> | |
| </div> | |
| <div class="mt-4"> | |
| <div class="flex justify-between text-xs text-gray-500"> | |
| <span>25 occupied</span> | |
| <span>2 open</span> | |
| </div> | |
| <div class="w-full bg-gray-200 rounded-full h-1.5 mt-1"> | |
| <div class="bg-purple-500 h-1.5 rounded-full" style="width: 93%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Data Visualization --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-8"> | |
| <!-- Department Distribution Chart --> | |
| <div class="bg-white p-6 rounded-lg shadow" data-aos="fade-right"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2 class="text-xl font-semibold text-gray-800">Department Distribution</h2> | |
| <div class="relative"> | |
| <select class="appearance-none bg-gray-100 border border-gray-300 text-gray-700 py-2 px-4 pr-8 rounded leading-tight focus:outline-none focus:bg-white focus:border-gray-500"> | |
| <option>All Floors</option> | |
| <option>9th Floor</option> | |
| <option>8th Floor</option> | |
| <option>6th Floor</option> | |
| <option>4th Floor</option> | |
| </select> | |
| <div class="pointer-events-none absolute inset-y-0 right-0 flex items-center px-2 text-gray-700"> | |
| <i data-feather="chevron-down" class="w-4 h-4"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="h-80"> | |
| <canvas id="departmentChart"></canvas> | |
| </div> | |
| </div> | |
| <!-- Occupancy vs Availability --> | |
| <div class="bg-white p-6 rounded-lg shadow" data-aos="fade-left"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h2 class="text-xl font-semibold text-gray-800">Occupancy vs Availability</h2> | |
| <div class="flex space-x-2"> | |
| <button class="bg-gray-100 hover:bg-gray-200 text-gray-800 px-3 py-1 rounded-md text-sm flex items-center"> | |
| <i data-feather="download" class="w-4 h-4 mr-1"></i> | |
| Export | |
| </button> | |
| </div> | |
| </div> | |
| <div class="h-80"> | |
| <canvas id="occupancyChart"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Detailed Floor Data --> | |
| <div class="mt-8 bg-white rounded-lg shadow overflow-hidden" data-aos="fade-up"> | |
| <div class="px-6 py-4 border-b border-gray-200"> | |
| <h2 class="text-xl font-semibold text-gray-800">Detailed Floor Data</h2> | |
| </div> | |
| <div class="overflow-x-auto"> | |
| <table class="min-w-full divide-y divide-gray-200"> | |
| <thead class="bg-gray-50"> | |
| <tr> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Floor</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Area</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Total</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Occupied</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Open</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Notes</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200" id="floorDataTable"> | |
| <!-- Data will be inserted here by JavaScript --> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </main> | |
| <footer class="bg-white border-t border-gray-200 mt-12"> | |
| <div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8"> | |
| <div class="flex flex-col md:flex-row justify-between items-center"> | |
| <p class="text-gray-500 text-sm">© 2023 Office Space Visualization. All rights reserved.</p> | |
| <div class="flex space-x-6 mt-4 md:mt-0"> | |
| <a href="#" class="text-gray-400 hover:text-gray-500"> | |
| <i data-feather="github" class="w-5 h-5"></i> | |
| </a> | |
| <a href="#" class="text-gray-400 hover:text-gray-500"> | |
| <i data-feather="twitter" class="w-5 h-5"></i> | |
| </a> | |
| <a href="#" class="text-gray-400 hover:text-gray-500"> | |
| <i data-feather="linkedin" class="w-5 h-5"></i> | |
| </a> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| // Initialize AOS and Feather Icons | |
| AOS.init(); | |
| feather.replace(); | |
| // Sample data | |
| const floorData = { | |
| 9: [ | |
| { area: "Development/Communications", total: 5, occupied: 5, open: 0, notes: "" }, | |
| { area: "Housing", total: 6, occupied: 6, open: 0, notes: "" }, | |
| { area: "Finance", total: 29, occupied: 28, open: 1, notes: "" }, | |
| { area: "CGP", total: 8, occupied: 7, open: 1, notes: "Shared" }, | |
| { area: "Services", total: 15, occupied: 15, open: 0, notes: "" }, | |
| { area: "Outside Meredith - Help Desk", total: 3, occupied: 3, open: 0, notes: "" }, | |
| { area: "Marina's Area", total: 4, occupied: 4, open: 0, notes: "" }, | |
| { area: "Development/Communications", total: 2, occupied: 2, open: 0, notes: "Shared" }, | |
| { area: "Services Project Manager/SD BI", total: 2, occupied: 1, open: 1, notes: "Accounting for a currently fully remote staff" }, | |
| { area: "Outside Mail Room", total: 4, occupied: 4, open: 0, notes: "" }, | |
| { area: "Finance", total: 3, occupied: 3, open: 0, notes: "" }, | |
| { area: "HR", total: 1, occupied: 1, open: 0, notes: "" }, | |
| { area: "Operations", total: 3, occupied: 3, open: 0, notes: "" }, | |
| { area: "Receptionist", total: 1, occupied: 1, open: 0, notes: "" }, | |
| { area: "Executive Assistant", total: 1, occupied: 1, open: 0, notes: "" }, | |
| { area: "Office Manager", total: 1, occupied: 1, open: 0, notes: "" } | |
| ], | |
| 8: [ | |
| { area: "Workstations - IT", total: 11, occupied: 3, open: 8, notes: "" }, | |
| { area: "Workstations - Care Transitions", total: 8, occupied: 8, open: 0, notes: "" }, | |
| { area: "Conference Room", total: 1, occupied: 1, open: 0, notes: "Dev Storage" }, | |
| { area: "Offices", total: 2, occupied: 2, open: 0, notes: "Shared" } | |
| ], | |
| 6: [ | |
| { area: "CGP Workstations", total: 33, occupied: 24, open: 9, notes: "Increased to reflect added staff" }, | |
| { area: "CGP Office(s)", total: 4, occupied: 4, open: 0, notes: "3 Shared Offices - 1-2 Staff; 1-3 Staff" }, | |
| { area: "APS Workstations", total: 16, occupied: 14, open: 2, notes: "" }, | |
| { area: "APS Office(s)", total: 1, occupied: 1, open: 0, notes: "" }, | |
| { area: "Reception", total: 1, occupied: 1, open: 0, notes: "" } | |
| ], | |
| 4: [ | |
| { area: "Workstations", total: 34, occupied: 25, open: 2, notes: "" }, | |
| { area: "Training Room", total: 1, occupied: 0, open: 0, notes: "" }, | |
| { area: "Reception", total: 1, occupied: 0, open: 0, notes: "" }, | |
| { area: "Conference Room", total: 1, occupied: 0, open: 0, notes: "" }, | |
| { area: "Offices", total: 8, occupied: 0, open: 0, notes: "" } | |
| ] | |
| }; | |
| // Function to show floor data in table | |
| function showFloorData(floor) { | |
| const tableBody = document.getElementById('floorDataTable'); | |
| tableBody.innerHTML = ''; | |
| floorData[floor].forEach(item => { | |
| const row = document.createElement('tr'); | |
| row.innerHTML = ` | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">${floor}th</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${item.area}</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${item.total}</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${item.occupied}</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${item.open}</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">${item.notes}</td> | |
| `; | |
| tableBody.appendChild(row); | |
| }); | |
| } | |
| // Initialize with 9th floor data | |
| showFloorData(9); | |
| // Charts | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Department Distribution Chart | |
| const deptCtx = document.getElementById('departmentChart').getContext('2d'); | |
| const deptChart = new Chart(deptCtx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['Finance', 'Housing', 'CGP', 'IT', 'Services', 'Development', 'Operations', 'HR', 'APS'], | |
| datasets: [{ | |
| data: [32, 12, 37, 11, 17, 7, 3, 1, 17], | |
| backgroundColor: [ | |
| '#3B82F6', | |
| '#10B981', | |
| '#F59E0B', | |
| '#8B5CF6', | |
| '#EC4899', | |
| '#6366F1', | |
| '#14B8A6', | |
| '#F97316', | |
| '#64748B' | |
| ], | |
| borderWidth: 1 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| position: 'right', | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| label: function(context) { | |
| const label = context.label || ''; | |
| const value = context.raw || 0; | |
| const total = context.dataset.data.reduce((a, b) => a + b, 0); | |
| const percentage = Math.round((value / total) * 100); | |
| return `${label}: ${value} (${percentage}%)`; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Occupancy vs Availability Chart | |
| const occCtx = document.getElementById('occupancyChart').getContext('2d'); | |
| const occChart = new Chart(occCtx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['9th Floor', '8th Floor', '6th Floor', '4th Floor'], | |
| datasets: [ | |
| { | |
| label: 'Occupied', | |
| data: [91, 14, 42, 25], | |
| backgroundColor: '#3B82F6', | |
| borderRadius: 4 | |
| }, | |
| { | |
| label: 'Available', | |
| data: [2, 8, 11, 2], | |
| backgroundColor: '#10B981', | |
| borderRadius: 4 | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| scales: { | |
| x: { | |
| stacked: true, | |
| }, | |
| y: { | |
| stacked: true, | |
| beginAtZero: true | |
| } | |
| }, | |
| plugins: { | |
| legend: { | |
| position: 'top', | |
| }, | |
| tooltip: { | |
| callbacks: { | |
| afterBody: function(context) { | |
| const dataset = context[0]; | |
| const total = dataset.dataset.data.reduce((a, b) => a + b, 0); | |
| const percentage = Math.round((dataset.raw / total) * 100); | |
| return `Percentage: ${percentage}%`; | |
| } | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| }); | |
| // Add hover effects to floor cards | |
| document.querySelectorAll('.floor-card').forEach(card => { | |
| card.addEventListener('mouseenter', function() { | |
| this.querySelector('i').style.transform = 'scale(1.1)'; | |
| }); | |
| card.addEventListener('mouseleave', function() { | |
| this.querySelector('i').style.transform = 'scale(1)'; | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |