dit bestand heeft als doel om een idee te geven van de hoeveelheid berichten er via de API afgehandeld moeten worden, per tijdsperiode, per stad/geagregeerd in het land.
3686 lines
176 KiB
HTML
3686 lines
176 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>ANPR Netherlands Analysis Dashboard - Full Year 2023 Report</title>
|
||
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
||
<style>
|
||
* {
|
||
margin: 0;
|
||
padding: 0;
|
||
box-sizing: border-box;
|
||
}
|
||
|
||
body {
|
||
font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
|
||
font-size: 14px;
|
||
line-height: 1.6;
|
||
background: linear-gradient(135deg, #2c5282 0%, #4a5568 100%);
|
||
color: #2c3e50;
|
||
min-height: 100vh;
|
||
}
|
||
|
||
.report-container {
|
||
max-width: 1200px;
|
||
margin: 20px auto;
|
||
padding: 30px;
|
||
background: rgba(255, 255, 255, 0.95);
|
||
backdrop-filter: blur(10px);
|
||
border-radius: 20px;
|
||
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
|
||
}
|
||
|
||
/* Header */
|
||
.report-header {
|
||
text-align: center;
|
||
background: linear-gradient(135deg, #2c5282, #4a5568);
|
||
color: white;
|
||
padding: 40px 20px;
|
||
margin: -30px -30px 40px -30px;
|
||
border-radius: 20px 20px 0 0;
|
||
}
|
||
|
||
.report-header h1 {
|
||
font-size: 32px;
|
||
font-weight: 600;
|
||
margin-bottom: 15px;
|
||
letter-spacing: 0.5px;
|
||
}
|
||
|
||
.report-header .subtitle {
|
||
font-size: 16px;
|
||
color: rgba(255, 255, 255, 0.9);
|
||
margin-bottom: 8px;
|
||
font-weight: 300;
|
||
}
|
||
|
||
.report-header .metadata {
|
||
font-size: 12px;
|
||
color: rgba(255, 255, 255, 0.8);
|
||
margin-top: 15px;
|
||
}
|
||
|
||
/* Navigation */
|
||
.nav-tabs {
|
||
display: flex;
|
||
margin-bottom: 30px;
|
||
background: rgba(255, 255, 255, 0.1);
|
||
backdrop-filter: blur(10px);
|
||
border-radius: 15px;
|
||
padding: 8px;
|
||
gap: 4px;
|
||
}
|
||
|
||
.nav-tab {
|
||
padding: 6px 8px;
|
||
background: transparent;
|
||
border: none;
|
||
cursor: pointer;
|
||
font-size: 11px;
|
||
font-weight: 500;
|
||
transition: all 0.3s ease;
|
||
border-radius: 8px;
|
||
color: #2c5282;
|
||
white-space: nowrap;
|
||
flex: 1;
|
||
text-align: center;
|
||
min-width: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
justify-content: center;
|
||
line-height: 1.1;
|
||
}
|
||
|
||
.nav-tab div {
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
.nav-tab:hover {
|
||
background: rgba(44, 82, 130, 0.1);
|
||
transform: translateY(-2px);
|
||
}
|
||
|
||
.nav-tab.active {
|
||
background: linear-gradient(135deg, #2c5282, #4a5568);
|
||
color: white;
|
||
box-shadow: 0 4px 15px rgba(44, 82, 130, 0.4);
|
||
}
|
||
|
||
/* Content sections */
|
||
.content-section {
|
||
display: none;
|
||
}
|
||
|
||
.content-section.active {
|
||
display: block;
|
||
}
|
||
|
||
/* Tables */
|
||
.data-table {
|
||
width: 100%;
|
||
border-collapse: collapse;
|
||
margin: 20px 0;
|
||
font-size: 14px;
|
||
border-radius: 12px;
|
||
overflow: hidden;
|
||
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
|
||
}
|
||
|
||
.data-table th,
|
||
.data-table td {
|
||
border: none;
|
||
padding: 12px 16px;
|
||
text-align: left;
|
||
}
|
||
|
||
.data-table th {
|
||
background: linear-gradient(135deg, #2c5282, #4a5568);
|
||
color: white;
|
||
font-weight: 600;
|
||
font-size: 13px;
|
||
}
|
||
|
||
.data-table .number {
|
||
text-align: right;
|
||
}
|
||
|
||
.data-table tr:nth-child(even) {
|
||
background: rgba(44, 82, 130, 0.05);
|
||
}
|
||
|
||
.data-table tr:hover {
|
||
background: rgba(44, 82, 130, 0.1);
|
||
transition: background-color 0.3s ease;
|
||
}
|
||
|
||
/* Statistics grid */
|
||
.stats-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
||
gap: 20px;
|
||
margin: 30px 0;
|
||
}
|
||
|
||
.stat-box {
|
||
background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
|
||
backdrop-filter: blur(10px);
|
||
border-radius: 16px;
|
||
padding: 24px;
|
||
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
|
||
border: 1px solid rgba(255,255,255,0.2);
|
||
transition: transform 0.3s ease, box-shadow 0.3s ease;
|
||
}
|
||
|
||
.stat-box:hover {
|
||
transform: translateY(-5px);
|
||
box-shadow: 0 12px 40px rgba(0,0,0,0.15);
|
||
}
|
||
|
||
.stat-box h3 {
|
||
font-size: 18px;
|
||
margin-bottom: 16px;
|
||
color: #2c5282;
|
||
font-weight: 600;
|
||
border-bottom: 2px solid #2c5282;
|
||
padding-bottom: 8px;
|
||
}
|
||
|
||
.stat-item {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
margin-bottom: 12px;
|
||
font-size: 14px;
|
||
padding: 8px 0;
|
||
border-bottom: 1px solid rgba(44, 82, 130, 0.1);
|
||
}
|
||
|
||
.stat-label {
|
||
font-weight: 500;
|
||
color: #2c3e50;
|
||
}
|
||
|
||
.stat-value {
|
||
text-align: right;
|
||
font-weight: 600;
|
||
color: #2c5282;
|
||
}
|
||
|
||
/* Charts */
|
||
.chart-container {
|
||
margin: 30px 0;
|
||
background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
|
||
backdrop-filter: blur(10px);
|
||
border-radius: 16px;
|
||
padding: 24px;
|
||
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
|
||
border: 1px solid rgba(255,255,255,0.2);
|
||
}
|
||
|
||
.chart-title {
|
||
font-size: 20px;
|
||
font-weight: 600;
|
||
margin-bottom: 20px;
|
||
text-align: center;
|
||
color: #2c5282;
|
||
}
|
||
|
||
.chart-wrapper {
|
||
position: relative;
|
||
height: 350px;
|
||
}
|
||
|
||
.chart-grid {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
gap: 30px;
|
||
}
|
||
|
||
/* Source attribution */
|
||
.sources {
|
||
margin-top: 40px;
|
||
padding: 24px;
|
||
background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
|
||
backdrop-filter: blur(10px);
|
||
border-radius: 16px;
|
||
box-shadow: 0 8px 32px rgba(0,0,0,0.1);
|
||
border: 1px solid rgba(255,255,255,0.2);
|
||
font-size: 14px;
|
||
color: #2c3e50;
|
||
}
|
||
|
||
.sources h3 {
|
||
font-size: 18px;
|
||
margin-bottom: 16px;
|
||
color: #2c5282;
|
||
font-weight: 600;
|
||
border-bottom: 2px solid #2c5282;
|
||
padding-bottom: 8px;
|
||
}
|
||
|
||
.sources ul {
|
||
margin-left: 24px;
|
||
}
|
||
|
||
.sources li {
|
||
margin-bottom: 8px;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
/* Limitations and corrections */
|
||
.limitations {
|
||
background: linear-gradient(135deg, rgba(255, 183, 77, 0.1), rgba(255, 206, 84, 0.1));
|
||
border: 1px solid rgba(255, 183, 77, 0.3);
|
||
border-radius: 16px;
|
||
padding: 24px;
|
||
margin: 30px 0;
|
||
backdrop-filter: blur(10px);
|
||
}
|
||
|
||
.limitations h3 {
|
||
font-size: 18px;
|
||
color: #d68910;
|
||
margin-bottom: 16px;
|
||
font-weight: 600;
|
||
border-bottom: 2px solid #d68910;
|
||
padding-bottom: 8px;
|
||
}
|
||
|
||
.limitations ul {
|
||
margin-left: 24px;
|
||
font-size: 14px;
|
||
}
|
||
|
||
.limitations li {
|
||
margin-bottom: 12px;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
/* Code examples */
|
||
.code-block {
|
||
background: linear-gradient(135deg, #2c3e50, #34495e);
|
||
border-radius: 12px;
|
||
padding: 20px;
|
||
font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
|
||
font-size: 13px;
|
||
margin: 20px 0;
|
||
overflow-x: auto;
|
||
color: #ecf0f1;
|
||
box-shadow: 0 4px 20px rgba(0,0,0,0.3);
|
||
}
|
||
|
||
.code-block pre {
|
||
margin: 0;
|
||
padding: 0;
|
||
background: transparent;
|
||
border: none;
|
||
font-family: inherit;
|
||
font-size: inherit;
|
||
color: inherit;
|
||
white-space: pre;
|
||
overflow-x: auto;
|
||
line-height: 1.5;
|
||
}
|
||
|
||
.code-block code {
|
||
font-family: inherit;
|
||
font-size: inherit;
|
||
color: inherit;
|
||
background: transparent;
|
||
padding: 0;
|
||
}
|
||
|
||
.code-header {
|
||
background: linear-gradient(135deg, #2c5282, #4a5568);
|
||
padding: 12px 20px;
|
||
margin: -20px -20px 20px -20px;
|
||
font-weight: 600;
|
||
font-size: 14px;
|
||
color: white;
|
||
border-radius: 12px 12px 0 0;
|
||
}
|
||
|
||
/* Methodology */
|
||
.methodology {
|
||
background: linear-gradient(135deg, rgba(44, 82, 130, 0.1), rgba(74, 85, 104, 0.1));
|
||
border: 1px solid rgba(44, 82, 130, 0.3);
|
||
border-radius: 16px;
|
||
padding: 24px;
|
||
margin: 30px 0;
|
||
backdrop-filter: blur(10px);
|
||
}
|
||
|
||
.methodology h3 {
|
||
font-size: 18px;
|
||
color: #2c5282;
|
||
margin-bottom: 16px;
|
||
font-weight: 600;
|
||
border-bottom: 2px solid #2c5282;
|
||
padding-bottom: 8px;
|
||
}
|
||
|
||
.methodology ul {
|
||
margin-left: 24px;
|
||
font-size: 14px;
|
||
}
|
||
|
||
/* Corrections highlight */
|
||
.correction {
|
||
background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
|
||
border-left: 4px solid #3498db;
|
||
border-radius: 0 12px 12px 0;
|
||
padding: 16px 20px;
|
||
margin: 20px 0;
|
||
font-size: 14px;
|
||
backdrop-filter: blur(5px);
|
||
box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
|
||
}
|
||
|
||
.correction strong {
|
||
color: #3498db;
|
||
font-weight: 600;
|
||
}
|
||
|
||
/* Foreign analysis */
|
||
.foreign-highlight {
|
||
background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
|
||
border: 1px solid rgba(59, 130, 246, 0.3);
|
||
border-radius: 12px;
|
||
padding: 20px;
|
||
margin: 20px 0;
|
||
backdrop-filter: blur(5px);
|
||
}
|
||
|
||
/* Hourly patterns */
|
||
.hourly-selector {
|
||
margin: 20px 0;
|
||
padding: 20px;
|
||
background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
|
||
backdrop-filter: blur(10px);
|
||
border-radius: 12px;
|
||
border: 1px solid rgba(255,255,255,0.2);
|
||
box-shadow: 0 4px 20px rgba(0,0,0,0.1);
|
||
}
|
||
|
||
.hourly-selector label {
|
||
font-weight: 600;
|
||
margin-right: 12px;
|
||
font-size: 14px;
|
||
color: #2c5282;
|
||
}
|
||
|
||
.hourly-selector select {
|
||
padding: 8px 12px;
|
||
font-size: 14px;
|
||
border: 1px solid #2c5282;
|
||
border-radius: 8px;
|
||
background: white;
|
||
color: #2c3e50;
|
||
}
|
||
|
||
/* Professional formatting */
|
||
.section-header {
|
||
font-size: 24px;
|
||
font-weight: 600;
|
||
margin: 40px 0 20px 0;
|
||
padding-bottom: 12px;
|
||
border-bottom: 3px solid #2c5282;
|
||
color: #2c5282;
|
||
}
|
||
|
||
.subsection-header {
|
||
font-size: 18px;
|
||
font-weight: 600;
|
||
margin: 30px 0 15px 0;
|
||
color: #2c3e50;
|
||
}
|
||
|
||
.paragraph {
|
||
margin-bottom: 16px;
|
||
text-align: left;
|
||
line-height: 1.6;
|
||
}
|
||
|
||
/* Responsive adjustments */
|
||
@media (max-width: 768px) {
|
||
.chart-grid {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
.stats-grid {
|
||
grid-template-columns: 1fr;
|
||
}
|
||
|
||
body {
|
||
font-size: 11px;
|
||
}
|
||
}
|
||
|
||
/* Print styles */
|
||
@media print {
|
||
.nav-tabs {
|
||
display: none;
|
||
}
|
||
|
||
.content-section {
|
||
display: block !important;
|
||
page-break-before: auto;
|
||
}
|
||
|
||
.chart-container {
|
||
page-break-inside: avoid;
|
||
}
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="report-container">
|
||
<!-- Report Header -->
|
||
<div class="report-header">
|
||
<h1>🚗 ANPR Netherlands Analysis</h1>
|
||
<div class="subtitle">Modern Traffic Analytics Dashboard</div>
|
||
<div class="subtitle">Utrecht → 45 Cities Smart Infrastructure Study</div>
|
||
<div class="metadata">
|
||
Report Date: September 2025 | Analysis Period: Full Year 2023 | Version: 3.1 (Corrected Classification)
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<!-- Navigation Tabs -->
|
||
<div class="nav-tabs">
|
||
<div class="nav-tab active" onclick="showSection('executive-summary')">
|
||
<div>Executive</div>
|
||
<div>Summary</div>
|
||
</div>
|
||
<div class="nav-tab" onclick="showSection('vehicle-classification')">
|
||
<div>Vehicle</div>
|
||
<div>Classification</div>
|
||
</div>
|
||
<div class="nav-tab" onclick="showSection('utrecht-baseline')">
|
||
<div>Utrecht</div>
|
||
<div>Baseline</div>
|
||
</div>
|
||
<div class="nav-tab" onclick="showSection('foreign-analysis')">
|
||
<div>Foreign</div>
|
||
<div>Vehicles</div>
|
||
</div>
|
||
<div class="nav-tab" onclick="showSection('hourly-patterns')">
|
||
<div>Temporal</div>
|
||
<div>Patterns</div>
|
||
</div>
|
||
<div class="nav-tab" onclick="showSection('data-transmission')">
|
||
<div>Data</div>
|
||
<div>Transmission</div>
|
||
</div>
|
||
<div class="nav-tab" onclick="showSection('national-scaling')">
|
||
<div>National</div>
|
||
<div>Scaling</div>
|
||
</div>
|
||
<div class="nav-tab" onclick="showSection('camera-analysis')">
|
||
<div>Camera</div>
|
||
<div>Analysis</div>
|
||
</div>
|
||
<div class="nav-tab" onclick="showSection('methodology')">
|
||
<div>Methodology</div>
|
||
<div> </div>
|
||
</div>
|
||
<div class="nav-tab" onclick="showSection('sources')">
|
||
<div>Sources &</div>
|
||
<div>References</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Executive Summary -->
|
||
<div id="executive-summary" class="content-section active">
|
||
<div class="section-header">Executive Summary</div>
|
||
|
||
<div class="paragraph">
|
||
This report presents a comprehensive analysis of Automatic Number Plate Recognition (ANPR) data from Utrecht Environmental Zone, serving as a benchmark for national deployment across 45 Dutch cities. The analysis covers 350 days of operational data (345 days from 2023 plus 5 days from late December 2022), encompassing 22,242,556 vehicle detections.
|
||
</div>
|
||
|
||
|
||
<div class="stats-grid">
|
||
<div class="stat-box">
|
||
<h3>Utrecht Baseline (Corrected)</h3>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Total Daily Detections:</span>
|
||
<span class="stat-value">63550</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Heavy Commercial (ZB):</span>
|
||
<span class="stat-value">724 (1.1%)</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Light Commercial (LB):</span>
|
||
<span class="stat-value">6993 (11.0%)</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Passenger Vehicles:</span>
|
||
<span class="stat-value">52,876 (83.2%)</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Unknown Foreign (FOR):</span>
|
||
<span class="stat-value">2,668 (4.2%)</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="stat-box">
|
||
<h3>Foreign Vehicle Analysis</h3>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Total Foreign Ratio:</span>
|
||
<span class="stat-value">4.43%</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Heavy Commercial Foreign:</span>
|
||
<span class="stat-value">0.01%</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Light Commercial Foreign:</span>
|
||
<span class="stat-value">0.09%</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Passenger Foreign:</span>
|
||
<span class="stat-value">0.07%</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="stat-box">
|
||
<h3>National Projections (Corrected)</h3>
|
||
<div class="stat-item">
|
||
<span class="stat-label">45 Cities Coverage:</span>
|
||
<span class="stat-value">7,938,259 residents</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Daily Detections National:</span>
|
||
<span class="stat-value">1,370,923</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Daily Data Volume:</span>
|
||
<span class="stat-value">19-1,250 MB*</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Monthly Data Volume:</span>
|
||
<span class="stat-value">0.6-37 GB*</span>
|
||
</div>
|
||
<div class="stat-item" style="font-size: 11px; font-style: italic;">
|
||
<span>*Depends on format & compression</span>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="stat-box">
|
||
<h3>Data Quality Assessment</h3>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Files Processed:</span>
|
||
<span class="stat-value">52 of 52</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Schema Issues:</span>
|
||
<span class="stat-value">2 schema types handled</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">Empty voertuigsoort:</span>
|
||
<span class="stat-value">1,250,150 records</span>
|
||
</div>
|
||
<div class="stat-item">
|
||
<span class="stat-label">FOR Class Records:</span>
|
||
<span class="stat-value">933,821</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="info-card" style="margin: 20px 0;">
|
||
<strong>📊 Data Volume Range Explanation:</strong> The wide range (19 MB to 1.25 GB daily) reflects different technology choices:
|
||
<ul style="margin: 10px 0 0 20px; font-size: 12px;">
|
||
<li><strong>Lower bound (19 MB):</strong> CSV format with minimal fields (6 columns) + GZIP compression (14.8 bytes/detection)</li>
|
||
<li><strong>Upper bound (1.25 GB):</strong> JSON format with full schema (31 fields) without compression (956 bytes/detection)</li>
|
||
<li><strong>Recommended:</strong> CSV or JSON with GZIP compression achieves 90%+ reduction in data transmission costs</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="chart-container">
|
||
<div class="chart-title">Utrecht Vehicle Classification Distribution (Corrected)</div>
|
||
<div class="chart-wrapper">
|
||
<canvas id="executiveChart"></canvas>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Utrecht Baseline -->
|
||
<div id="utrecht-baseline" class="content-section">
|
||
<div class="section-header">Utrecht Environmental Zone Baseline Analysis</div>
|
||
|
||
<div class="paragraph">
|
||
Utrecht serves as the benchmark city with a population of 367,984 residents (2023). The environmental zone ANPR system recorded 63550 daily detections on average, equivalent to 172.7 detections per 1,000 residents. This rate provides the scaling factor for national projections.
|
||
</div>
|
||
|
||
<div class="subsection-header">Statistical Summary</div>
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Metric</th>
|
||
<th>All Vehicles</th>
|
||
<th>Heavy Commercial</th>
|
||
<th>Light Commercial</th>
|
||
<th>Passenger</th>
|
||
<th>Unknown Foreign</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><strong>Daily Average</strong></td>
|
||
<td class="number">63550</td>
|
||
<td class="number">724</td>
|
||
<td class="number">6993</td>
|
||
<td class="number">52,876</td>
|
||
<td class="number">2,668</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Daily Minimum</strong></td>
|
||
<td class="number">39,894</td>
|
||
<td class="number">89</td>
|
||
<td class="number">1,723</td>
|
||
<td class="number">35,558</td>
|
||
<td class="number">78</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Daily Maximum</strong></td>
|
||
<td class="number">150,086</td>
|
||
<td class="number">2,476</td>
|
||
<td class="number">21,866</td>
|
||
<td class="number">122,892</td>
|
||
<td class="number">10,891</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Daily Median</strong></td>
|
||
<td class="number">62,505</td>
|
||
<td class="number">830</td>
|
||
<td class="number">8,091</td>
|
||
<td class="number">51,853</td>
|
||
<td class="number">2,460</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Percentage of Total</strong></td>
|
||
<td class="number">100.0%</td>
|
||
<td class="number">1.1%</td>
|
||
<td class="number">11.1%</td>
|
||
<td class="number">83.7%</td>
|
||
<td class="number">4.2%</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
<div class="chart-grid">
|
||
<div class="chart-container">
|
||
<div class="chart-title">Daily Detection Volume Range</div>
|
||
<div class="chart-wrapper">
|
||
<canvas id="utrechtRangeChart"></canvas>
|
||
</div>
|
||
</div>
|
||
<div class="chart-container">
|
||
<div class="chart-title">Vehicle Type Distribution</div>
|
||
<div class="chart-wrapper">
|
||
<canvas id="utrechtDistributionChart"></canvas>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Vehicle Classification -->
|
||
<div id="vehicle-classification" class="content-section">
|
||
<div class="section-header">Vehicle Classification Methodology</div>
|
||
|
||
<div class="methodology">
|
||
<h3>Classification Algorithm (3-Tier Priority System)</h3>
|
||
<p style="margin-bottom: 10px; font-style: italic;">Vehicles are classified using a hierarchical priority system where RDW Klasse codes have absolute authority:</p>
|
||
<ol style="margin-left: 20px;">
|
||
<li><strong>Priority 1: Klasse Codes (Authoritative RDW Classification)</strong>
|
||
<ul style="margin-top: 5px;">
|
||
<li><strong>Heavy Commercial:</strong> ZB, TRUCK, TRAILER, B, BK, BKH, LT, PD, DEF</li>
|
||
<li><strong>Light Commercial:</strong> LB, VAN, LC</li>
|
||
<li><strong>Passenger:</strong> P, BUS, M</li>
|
||
<li><strong>Unknown Foreign:</strong> FOR</li>
|
||
</ul>
|
||
</li>
|
||
<li><strong>Priority 2: EU Vehicle Categories (If Klasse Unclear)</strong>
|
||
<ul style="margin-top: 5px;">
|
||
<li><strong>Heavy (N2/N3/O3/O4):</strong> Goods transport >3.5 tonnes</li>
|
||
<li><strong>Light (N1/O1/O2):</strong> Goods transport ≤3.5 tonnes</li>
|
||
<li><strong>Passenger (M1/M2/M3/L):</strong> Passenger transport vehicles</li>
|
||
</ul>
|
||
</li>
|
||
<li><strong>Priority 3: Voertuigsoort Keywords (Fallback Only)</strong>
|
||
<ul style="margin-top: 5px;">
|
||
<li><strong>Heavy:</strong> vrachtauto, aanhangwagen, oplegger, truck, trailer</li>
|
||
<li><strong>Light:</strong> bedrijfsauto, bestelbus, bestelwagen, van</li>
|
||
<li><strong>Passenger:</strong> personenauto, bus, motor, trike, quad</li>
|
||
</ul>
|
||
</li>
|
||
</ol>
|
||
<div style="background: #fff3cd; padding: 10px; margin-top: 10px; border-left: 3px solid #ffc107;">
|
||
<strong>⚠️ Critical Fix:</strong> ZB (Zware Bedrijfsvoertuigen) vehicles are ALWAYS classified as heavy_commercial regardless of voertuigsoort field. This corrected 195,350 misclassified records where ZB vehicles had voertuigsoort="Bedrijfsauto".
|
||
</div>
|
||
</div>
|
||
|
||
<div class="subsection-header">Data Quality Issues Addressed</div>
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Issue Type</th>
|
||
<th>Records Affected</th>
|
||
<th>Resolution</th>
|
||
<th>Impact</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>ZB+Bedrijfsauto misclassification</td>
|
||
<td class="number">195,350</td>
|
||
<td>Klasse priority over voertuigsoort</td>
|
||
<td>Heavy commercial: 28→724 daily (26x correction)</td>
|
||
</tr>
|
||
<tr>
|
||
<td>FOR class vehicles</td>
|
||
<td class="number">933,821</td>
|
||
<td>Separate "Unknown Foreign" category</td>
|
||
<td>Better foreign vehicle tracking (4.2% of total)</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Dual CSV schema versions</td>
|
||
<td class="number">51 files</td>
|
||
<td>Unified processing (47 old + 4 new)</td>
|
||
<td>Complete 350-day coverage</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
<div class="chart-container">
|
||
<div class="chart-title">Enhanced Vehicle Classification Breakdown</div>
|
||
<div class="chart-wrapper">
|
||
<canvas id="classificationChart"></canvas>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Foreign Analysis -->
|
||
<div id="foreign-analysis" class="content-section">
|
||
<div class="section-header">Foreign Vehicle Analysis</div>
|
||
|
||
<div class="paragraph">
|
||
Foreign vehicles represent 4.43% of all ANPR detections in Utrecht's environmental zone. The analysis reveals significant variations in foreign vehicle ratios across different vehicle categories.
|
||
</div>
|
||
|
||
<div class="foreign-highlight">
|
||
<strong>Key Finding:</strong> Heavy commercial vehicles show the lowest foreign ratio at 0.01%, while light commercial and passenger vehicles show similar foreign presence at 0.09% and 0.07% respectively.
|
||
</div>
|
||
|
||
<div class="subsection-header">Foreign Vehicle Distribution by Category</div>
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Vehicle Category</th>
|
||
<th>Total Daily Average</th>
|
||
<th>Foreign Daily Average</th>
|
||
<th>Foreign Percentage</th>
|
||
<th>National Implications</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><strong>Heavy Commercial</strong></td>
|
||
<td class="number">724</td>
|
||
<td class="number">1.6</td>
|
||
<td class="number">0.01%</td>
|
||
<td>International freight corridors</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Light Commercial</strong></td>
|
||
<td class="number">6993</td>
|
||
<td class="number">56.5</td>
|
||
<td class="number">0.09%</td>
|
||
<td>Cross-border services</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Passenger Vehicles</strong></td>
|
||
<td class="number">52,876</td>
|
||
<td class="number">146</td>
|
||
<td class="number">0.07%</td>
|
||
<td>Tourism and commuting</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Unknown Foreign (FOR)</strong></td>
|
||
<td class="number">2,668</td>
|
||
<td class="number">2,668</td>
|
||
<td class="number">100.0%</td>
|
||
<td>Classification enhancement needed</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
<div class="chart-grid">
|
||
<div class="chart-container">
|
||
<div class="chart-title">Foreign vs Domestic Ratio by Category</div>
|
||
<div class="chart-wrapper">
|
||
<canvas id="foreignRatioChart"></canvas>
|
||
</div>
|
||
</div>
|
||
<div class="chart-container">
|
||
<div class="chart-title">Daily Foreign Vehicle Volume</div>
|
||
<div class="chart-wrapper">
|
||
<canvas id="foreignVolumeChart"></canvas>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Hourly Patterns -->
|
||
<div id="hourly-patterns" class="content-section">
|
||
<div class="section-header">Temporal Traffic Patterns</div>
|
||
|
||
<div class="paragraph">
|
||
Analysis of hourly traffic patterns aggregated by day of the week reveals distinct temporal variations in vehicle detection rates. Commercial vehicles show different patterns compared to passenger vehicles, with implications for environmental zone management.
|
||
</div>
|
||
|
||
<div class="hourly-selector">
|
||
<div style="margin-bottom: 15px;">
|
||
<label style="display: block; margin-bottom: 8px; font-weight: 600;">📅 Select Days of Week (Multiple):</label>
|
||
<div style="display: flex; flex-wrap: wrap; gap: 10px;">
|
||
<label style="display: flex; align-items: center; cursor: pointer;">
|
||
<input type="checkbox" id="day_Monday" value="Monday" onchange="updateHourlyChart(); updateCumulativeChart();" checked style="margin-right: 6px;">
|
||
Monday
|
||
</label>
|
||
<label style="display: flex; align-items: center; cursor: pointer;">
|
||
<input type="checkbox" id="day_Tuesday" value="Tuesday" onchange="updateHourlyChart(); updateCumulativeChart();" style="margin-right: 6px;">
|
||
Tuesday
|
||
</label>
|
||
<label style="display: flex; align-items: center; cursor: pointer;">
|
||
<input type="checkbox" id="day_Wednesday" value="Wednesday" onchange="updateHourlyChart(); updateCumulativeChart();" style="margin-right: 6px;">
|
||
Wednesday
|
||
</label>
|
||
<label style="display: flex; align-items: center; cursor: pointer;">
|
||
<input type="checkbox" id="day_Thursday" value="Thursday" onchange="updateHourlyChart(); updateCumulativeChart();" style="margin-right: 6px;">
|
||
Thursday
|
||
</label>
|
||
<label style="display: flex; align-items: center; cursor: pointer;">
|
||
<input type="checkbox" id="day_Friday" value="Friday" onchange="updateHourlyChart(); updateCumulativeChart();" style="margin-right: 6px;">
|
||
Friday
|
||
</label>
|
||
<label style="display: flex; align-items: center; cursor: pointer;">
|
||
<input type="checkbox" id="day_Saturday" value="Saturday" onchange="updateHourlyChart(); updateCumulativeChart();" style="margin-right: 6px;">
|
||
Saturday
|
||
</label>
|
||
<label style="display: flex; align-items: center; cursor: pointer;">
|
||
<input type="checkbox" id="day_Sunday" value="Sunday" onchange="updateHourlyChart(); updateCumulativeChart();" style="margin-right: 6px;">
|
||
Sunday
|
||
</label>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="margin-bottom: 15px;">
|
||
<label style="display: block; margin-bottom: 8px; font-weight: 600;">🚗 Select Vehicle Types (Multiple):</label>
|
||
<div style="display: flex; flex-wrap: wrap; gap: 10px;">
|
||
<label style="display: flex; align-items: center; cursor: pointer;">
|
||
<input type="checkbox" id="type_total" value="total" onchange="updateHourlyChart(); updateCumulativeChart();" checked style="margin-right: 6px;">
|
||
All Vehicles
|
||
</label>
|
||
<label style="display: flex; align-items: center; cursor: pointer;">
|
||
<input type="checkbox" id="type_heavy_commercial" value="heavy_commercial" onchange="updateHourlyChart(); updateCumulativeChart();" style="margin-right: 6px;">
|
||
Heavy Commercial
|
||
</label>
|
||
<label style="display: flex; align-items: center; cursor: pointer;">
|
||
<input type="checkbox" id="type_light_commercial" value="light_commercial" onchange="updateHourlyChart(); updateCumulativeChart();" style="margin-right: 6px;">
|
||
Light Commercial
|
||
</label>
|
||
<label style="display: flex; align-items: center; cursor: pointer;">
|
||
<input type="checkbox" id="type_passenger" value="passenger" onchange="updateHourlyChart(); updateCumulativeChart();" style="margin-right: 6px;">
|
||
Passenger Vehicles
|
||
</label>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="display: flex; gap: 10px; margin-bottom: 10px;">
|
||
<button onclick="selectAllDays()" style="padding: 6px 12px; background: #2c5282; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 12px;">Select All Days</button>
|
||
<button onclick="selectWeekdays()" style="padding: 6px 12px; background: #28a745; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 12px;">Weekdays Only</button>
|
||
<button onclick="selectWeekends()" style="padding: 6px 12px; background: #d69e2e; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 12px;">Weekends Only</button>
|
||
<button onclick="clearAllDays()" style="padding: 6px 12px; background: #c53030; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 12px;">Clear All</button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="chart-container">
|
||
<div class="chart-title">Hourly Traffic Patterns with Standard Deviation Bands</div>
|
||
<div class="chart-wrapper">
|
||
<canvas id="hourlyPatternsChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="chart-container" style="margin-top: 30px;">
|
||
<div class="chart-title">Cumulative Daily Vehicle Detections by Hour</div>
|
||
<div class="chart-wrapper">
|
||
<canvas id="cumulativeChart"></canvas>
|
||
</div>
|
||
<div style="margin-top: 10px; padding: 10px; background: #f8f9fa; border-radius: 4px;">
|
||
<div style="display: flex; justify-content: space-around; font-size: 13px;">
|
||
<div><strong>Total by Noon:</strong> <span id="noon-total">30,145</span> (<span id="noon-percent">47.4</span>%)</div>
|
||
<div><strong>Total by 18:00:</strong> <span id="evening-total">48,444</span> (<span id="evening-percent">76.2</span>%)</div>
|
||
<div><strong>Daily Total:</strong> <span id="day-total">63,550</span> (100%)</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="subsection-header">Peak Hour Analysis</div>
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Day of Week</th>
|
||
<th>Morning Peak (Hour)</th>
|
||
<th>Peak Volume</th>
|
||
<th>Evening Peak (Hour)</th>
|
||
<th>Peak Volume</th>
|
||
<th>Night Minimum</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>Monday</td>
|
||
<td class="number">08:00</td>
|
||
<td class="number">4,250</td>
|
||
<td class="number">17:00</td>
|
||
<td class="number">4,580</td>
|
||
<td class="number">02:00</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Tuesday</td>
|
||
<td class="number">08:00</td>
|
||
<td class="number">4,180</td>
|
||
<td class="number">17:00</td>
|
||
<td class="number">4,520</td>
|
||
<td class="number">02:00</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Wednesday</td>
|
||
<td class="number">08:00</td>
|
||
<td class="number">4,200</td>
|
||
<td class="number">17:00</td>
|
||
<td class="number">4,550</td>
|
||
<td class="number">02:00</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Thursday</td>
|
||
<td class="number">08:00</td>
|
||
<td class="number">4,220</td>
|
||
<td class="number">17:00</td>
|
||
<td class="number">4,570</td>
|
||
<td class="number">02:00</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Friday</td>
|
||
<td class="number">08:00</td>
|
||
<td class="number">4,300</td>
|
||
<td class="number">16:00</td>
|
||
<td class="number">4,650</td>
|
||
<td class="number">02:00</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Saturday</td>
|
||
<td class="number">10:00</td>
|
||
<td class="number">3,800</td>
|
||
<td class="number">15:00</td>
|
||
<td class="number">3,950</td>
|
||
<td class="number">04:00</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Sunday</td>
|
||
<td class="number">11:00</td>
|
||
<td class="number">3,200</td>
|
||
<td class="number">16:00</td>
|
||
<td class="number">3,400</td>
|
||
<td class="number">04:00</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<!-- National Scaling -->
|
||
<div id="national-scaling" class="content-section">
|
||
<div class="section-header">National Scaling Analysis</div>
|
||
|
||
<div class="paragraph">
|
||
Based on Utrecht's benchmark rate of 172.7 detections per 1,000 residents daily, the analysis projects national deployment across 45 major Dutch cities (G4 + G40). Select a data format scenario to see how it affects storage and transmission requirements.
|
||
</div>
|
||
<div class="info-card" style="margin: 15px 0;">
|
||
<strong>⚠️ Important:</strong> All values below are <strong>estimated projections</strong> based on Utrecht's observed traffic patterns. Actual detection volumes will vary significantly based on each city's unique traffic patterns, road network density, camera placement strategy, and local mobility characteristics.
|
||
</div>
|
||
|
||
<div class="control-section" style="background: #f8f9fa; padding: 20px; border-radius: 8px; margin: 20px 0;">
|
||
<div style="display: flex; align-items: center; gap: 20px;">
|
||
<div>
|
||
<label for="format-scenario-selector" style="font-weight: bold; margin-right: 10px;">
|
||
Data Format Scenario:
|
||
</label>
|
||
<select id="format-scenario-selector" onchange="updateNationalScaling()"
|
||
style="padding: 8px 12px; border: 2px solid #2c5282; border-radius: 4px; font-size: 14px; cursor: pointer;">
|
||
<optgroup label="CSV Formats">
|
||
<option value="csv-full-none" data-bytes="247.0">CSV Full - Uncompressed (247 bytes)</option>
|
||
<option value="csv-full-gzip" data-bytes="16.0">CSV Full - GZIP (16 bytes)</option>
|
||
<option value="csv-min-none" data-bytes="91.0">CSV Minimal - Uncompressed (91 bytes)</option>
|
||
<option value="csv-min-gzip" data-bytes="14.8" selected>CSV Minimal - GZIP (14.8 bytes)</option>
|
||
</optgroup>
|
||
<optgroup label="JSON Formats">
|
||
<option value="json-full-none" data-bytes="956.0">JSON Full - Uncompressed (956 bytes)</option>
|
||
<option value="json-full-gzip" data-bytes="22.4">JSON Full - GZIP (22.4 bytes)</option>
|
||
<option value="json-min-none" data-bytes="155.0">JSON Minimal - Uncompressed (155 bytes)</option>
|
||
<option value="json-min-gzip" data-bytes="15.3">JSON Minimal - GZIP (15.3 bytes)</option>
|
||
</optgroup>
|
||
</select>
|
||
</div>
|
||
<div id="scenario-summary" style="flex: 1; padding: 10px; background: white; border-radius: 4px; border-left: 4px solid #4caf50;">
|
||
<div style="font-size: 14px; color: #666;">
|
||
<strong>National Impact:</strong>
|
||
<span id="national-daily-data">19.3 MB/day</span> |
|
||
<span id="national-monthly-data">0.57 GB/month</span> |
|
||
<span id="national-yearly-data">6.8 GB/year</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="subsection-header">45-City Coverage Analysis</div>
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Rank</th>
|
||
<th>City</th>
|
||
<th>Category</th>
|
||
<th>Population</th>
|
||
<th>Daily Detections</th>
|
||
<th>Heavy Commercial</th>
|
||
<th>Light Commercial</th>
|
||
<th>Daily Data (MB)</th>
|
||
<th>Zero Emission Zone</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody id="nationalCitiesTable">
|
||
<!-- Populated by JavaScript -->
|
||
</tbody>
|
||
</table>
|
||
|
||
<div class="chart-container">
|
||
<div class="chart-title">National Deployment - Population vs Daily Detections (Dual Axis)</div>
|
||
<div class="chart-wrapper">
|
||
<canvas id="nationalScalingChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="subsection-header">Deployment Phase Analysis</div>
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Phase</th>
|
||
<th>Cities</th>
|
||
<th>Population</th>
|
||
<th>Daily Detections</th>
|
||
<th>Daily Data (Corrected)</th>
|
||
<th>Monthly Data (Corrected)</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><strong>Phase 1: G4</strong></td>
|
||
<td class="number">4</td>
|
||
<td class="number">2,553,188</td>
|
||
<td class="number">437,409</td>
|
||
<td class="number">85.1 MB</td>
|
||
<td class="number">2.50 GB</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Phase 2: Top 10</strong></td>
|
||
<td class="number">10</td>
|
||
<td class="number">4,360,735</td>
|
||
<td class="number">747,465</td>
|
||
<td class="number">145.4 MB</td>
|
||
<td class="number">4.26 GB</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Phase 3: All 45</strong></td>
|
||
<td class="number">45</td>
|
||
<td class="number">7,794,234</td>
|
||
<td class="number">1,319,655</td>
|
||
<td class="number">255.9 MB</td>
|
||
<td class="number">7.50 GB</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<!-- Data Transmission -->
|
||
<div id="data-transmission" class="content-section">
|
||
<div class="section-header">Data Transmission Analysis (Corrected)</div>
|
||
|
||
|
||
<div class="paragraph">
|
||
The corrected analysis reveals significantly higher data transmission requirements than initially estimated. Full schema analysis shows 31 columns per record with an average of 203.4 compressed bytes per detection.
|
||
</div>
|
||
|
||
|
||
<div class="subsection-header">Data Transmission Requirements (10-minute batch processing)</div>
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Format</th>
|
||
<th>Compression</th>
|
||
<th>Bytes/Detection</th>
|
||
<th>Utrecht Daily</th>
|
||
<th>Utrecht Monthly</th>
|
||
<th>National Daily</th>
|
||
<th>National Monthly</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr style="background-color: #f0f0f0;">
|
||
<td colspan="7"><strong>Full Dataset (31 columns/fields)</strong></td>
|
||
</tr>
|
||
<tr>
|
||
<td>CSV Full</td>
|
||
<td>None</td>
|
||
<td class="number">247.0</td>
|
||
<td class="number">15.0 MB</td>
|
||
<td class="number">0.44 GB</td>
|
||
<td class="number">322.9 MB</td>
|
||
<td class="number">9.46 GB</td>
|
||
</tr>
|
||
<tr>
|
||
<td>CSV Full</td>
|
||
<td>GZIP</td>
|
||
<td class="number">16.0</td>
|
||
<td class="number">1.0 MB</td>
|
||
<td class="number">0.03 GB</td>
|
||
<td class="number">20.9 MB</td>
|
||
<td class="number">0.61 GB</td>
|
||
</tr>
|
||
<tr>
|
||
<td>JSON Full</td>
|
||
<td>None</td>
|
||
<td class="number">956.0</td>
|
||
<td class="number">57.9 MB</td>
|
||
<td class="number">1.70 GB</td>
|
||
<td class="number">1.22 GB</td>
|
||
<td class="number">36.62 GB</td>
|
||
</tr>
|
||
<tr>
|
||
<td>JSON Full</td>
|
||
<td>GZIP</td>
|
||
<td class="number">22.4</td>
|
||
<td class="number">1.4 MB</td>
|
||
<td class="number">0.04 GB</td>
|
||
<td class="number">29.3 MB</td>
|
||
<td class="number">0.86 GB</td>
|
||
</tr>
|
||
<tr style="background-color: #f0f0f0;">
|
||
<td colspan="7"><strong>Minimal Dataset (6 essential columns/fields)</strong></td>
|
||
</tr>
|
||
<tr>
|
||
<td>CSV Minimal</td>
|
||
<td>None</td>
|
||
<td class="number">91.0</td>
|
||
<td class="number">5.5 MB</td>
|
||
<td class="number">0.16 GB</td>
|
||
<td class="number">119.0 MB</td>
|
||
<td class="number">3.49 GB</td>
|
||
</tr>
|
||
<tr>
|
||
<td>CSV Minimal</td>
|
||
<td>GZIP</td>
|
||
<td class="number">14.8</td>
|
||
<td class="number">0.9 MB</td>
|
||
<td class="number">0.03 GB</td>
|
||
<td class="number">19.3 MB</td>
|
||
<td class="number">0.57 GB</td>
|
||
</tr>
|
||
<tr>
|
||
<td>JSON Minimal</td>
|
||
<td>None</td>
|
||
<td class="number">155.0</td>
|
||
<td class="number">9.4 MB</td>
|
||
<td class="number">0.28 GB</td>
|
||
<td class="number">202.6 MB</td>
|
||
<td class="number">5.94 GB</td>
|
||
</tr>
|
||
<tr style="background-color: #e8f5e9;">
|
||
<td><strong>CSV Minimal</strong></td>
|
||
<td><strong>GZIP</strong></td>
|
||
<td class="number"><strong>14.8</strong></td>
|
||
<td class="number"><strong>0.9 MB</strong></td>
|
||
<td class="number"><strong>0.03 GB</strong></td>
|
||
<td class="number"><strong>19.3 MB</strong></td>
|
||
<td class="number"><strong>0.57 GB</strong></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
|
||
<div class="subsection-header">Transmission Cost Analysis</div>
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Transmission Method</th>
|
||
<th>Rate</th>
|
||
<th>Monthly Cost</th>
|
||
<th>Annual Cost</th>
|
||
<th>Notes</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><strong>Cloud Transfer</strong></td>
|
||
<td>€0.01/GB</td>
|
||
<td class="number">€0.01</td>
|
||
<td class="number">€0.07</td>
|
||
<td>Negligible cost</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Mobile Data (4G/5G)</strong></td>
|
||
<td>€0.10/MB</td>
|
||
<td class="number">€58</td>
|
||
<td class="number">€697</td>
|
||
<td>Moderate cost</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>Satellite</strong></td>
|
||
<td>€1.00/MB</td>
|
||
<td class="number">€580</td>
|
||
<td class="number">€6,966</td>
|
||
<td>High cost</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
<div class="info-card" style="margin-top: 15px;">
|
||
<strong>Note:</strong> Costs based on CSV Minimal + GZIP compression (14.8 bytes/detection) with 10-minute batching.
|
||
National volume: 19.3 MB/day, 0.57 GB/month.
|
||
</div>
|
||
|
||
<div class="subsection-header">Data Format Examples</div>
|
||
|
||
<div id="data-examples-container">
|
||
<div class="code-block">
|
||
<div class="code-header">CSV Structure (Full Dataset - 31 columns)<br>
|
||
<span style="font-size: 12px; color: #666;">📊 Uncompressed: 247 bytes/detection | 🗜️ GZIP: 16.0 bytes/detection</span></div>
|
||
<pre>
|
||
# Header Row (31 columns)
|
||
Id;Tijd(CET);Hash;Land;Klasse;Locatie;datum_eerste_afgifte_nederland;
|
||
datum_eerste_toelating;datum_tenaamstelling;europese_uitvoeringcategorie_toevoeging;
|
||
europese_voertuigcategorie;europese_voertuigcategorie_toevoeging;lengte;merk;
|
||
retrofit_roetfilter;voertuigsoort;zuinigheidslabel;brandstof_omschrijving;
|
||
brandstof_volgnummer;brandstofverbruik_buiten;brandstofverbruik_gecombineerd;
|
||
co2_uitstoot_gewogen;emissiecode_omschrijving;geluidsniveau_rijdend;
|
||
geluidsniveau_stationair;milieuklasse_eg_goedkeuring_licht;
|
||
milieuklasse_eg_goedkeuring_zwaar;uitstoot_deeltjes_licht;uitstoot_deeltjes_zwaar;
|
||
voertuigklasse;voertuigklasse_omschrijving
|
||
|
||
# Data Row 1: Passenger Vehicle (P)
|
||
"15621-1689019200-021";"2023-07-11 00:00:00.021";"L01DC335";"NL";"P";
|
||
"UMIZO-F-Abstederdijk";"";"20210102";"20221123";"0";"M1";"";"405";
|
||
"VOLKSWAGEN";"";"Personenauto";"";"Benzine";"1";"4.00";"4.60";"";
|
||
"6";"69";"73";"715/2007*2018/18";"";"";"";"";""
|
||
|
||
# Data Row 2: Light Commercial Vehicle (LB)
|
||
"15546-1689019398-238";"2023-07-11 00:03:18.238";"L002B08B";"NL";"LB";
|
||
"UMIZO-B-2-1-Krugerbrug";"";"20180406";"20210312";"0";"N1";"";"441";
|
||
"VOLKSWAGEN";"";"Bedrijfsauto";"";"Diesel";"1";"4.20";"4.70";"";
|
||
"6";"73";"72";"715/2007*2015/45";"";"0.00186";"";"";""
|
||
|
||
# Data Row 3: Bus (BUS)
|
||
"15546-1689019235-542";"2023-07-11 00:00:35.542";"L0025F11";"NL";"BUS";
|
||
"UMIZO-B-2-1-Krugerbrug";"";"20190102";"20190102";"0";"M3";"";"1300";
|
||
"HIGER";"";"Bus";"";"Diesel";"1";"";"";"";"6";"78";"94";"";
|
||
"595/2009*627/201";"";"";"2";"Klasse II"
|
||
</pre>
|
||
</div>
|
||
|
||
<div class="code-block">
|
||
<div class="code-header">CSV Structure (Minimal Dataset - 6 columns)<br>
|
||
<span style="font-size: 12px; color: #666;">📊 Uncompressed: 91 bytes/detection | 🗜️ GZIP: 14.8 bytes/detection</span></div>
|
||
<pre>
|
||
# Header Row (6 essential columns)
|
||
Id;Tijd(CET);Hash;Land;Klasse;Locatie
|
||
|
||
# Data Row 1: Passenger Vehicle (P)
|
||
"15621-1689019200-021";"2023-07-11 00:00:00.021";"L01DC335";"NL";"P";"UMIZO-F-Abstederdijk"
|
||
|
||
# Data Row 2: Light Commercial Vehicle (LB)
|
||
"15546-1689019398-238";"2023-07-11 00:03:18.238";"L002B08B";"NL";"LB";"UMIZO-B-2-1-Krugerbrug"
|
||
|
||
# Data Row 3: Bus (BUS)
|
||
"15546-1689019235-542";"2023-07-11 00:00:35.542";"L0025F11";"NL";"BUS";"UMIZO-B-2-1-Krugerbrug"
|
||
|
||
# Batch Processing (10-minute intervals):
|
||
# Uncompressed: 90 bytes per record
|
||
# GZIP Compressed: 6.2 bytes per record (93% compression)
|
||
# Daily Volume Utrecht: 0.4 MB | National: 8.1 MB
|
||
</pre>
|
||
</div>
|
||
|
||
<div class="code-block">
|
||
<div class="code-header">JSON API Format (Full Dataset - All 31 Columns)<br>
|
||
<span style="font-size: 12px; color: #666;">📊 Uncompressed: 956 bytes/detection | 🗜️ GZIP: 22.4 bytes/detection</span></div>
|
||
<pre>[
|
||
{
|
||
"id": "15621-1689019200-021",
|
||
"timestamp": "2023-07-11T00:00:00.021Z",
|
||
"hash": "L01DC335",
|
||
"country": "NL",
|
||
"vehicle_class": "P",
|
||
"location": "UMIZO-F-Abstederdijk",
|
||
"datum_eerste_afgifte_nederland": "",
|
||
"datum_eerste_toelating": "20210102",
|
||
"datum_tenaamstelling": "20221123",
|
||
"europese_uitvoeringcategorie_toevoeging": "",
|
||
"europese_voertuigcategorie": "M1",
|
||
"europese_voertuigcategorie_toevoeging": "",
|
||
"lengte": "405",
|
||
"merk": "VOLKSWAGEN",
|
||
"retrofit_roetfilter": "",
|
||
"voertuigsoort": "Personenauto",
|
||
"zuinigheidslabel": "",
|
||
"brandstof_omschrijving": "Benzine",
|
||
"brandstof_volgnummer": "1",
|
||
"brandstofverbruik_buiten": "4.00",
|
||
"brandstofverbruik_gecombineerd": "4.60",
|
||
"co2_uitstoot_gewogen": "105",
|
||
"emissiecode_omschrijving": "6",
|
||
"geluidsniveau_rijdend": "69",
|
||
"geluidsniveau_stationair": "73",
|
||
"milieuklasse_eg_goedkeuring_licht": "715/2007*2018/18",
|
||
"milieuklasse_eg_goedkeuring_zwaar": "",
|
||
"uitstoot_deeltjes_licht": "0.00045",
|
||
"uitstoot_deeltjes_zwaar": "",
|
||
"voertuigklasse": "2",
|
||
"voertuigklasse_omschrijving": "Klasse II"
|
||
},
|
||
{
|
||
"id": "15546-1689019398-238",
|
||
"timestamp": "2023-07-11T00:03:18.238Z",
|
||
"hash": "L002B08B",
|
||
"country": "NL",
|
||
"vehicle_class": "LB",
|
||
"location": "UMIZO-B-2-1-Krugerbrug",
|
||
"datum_eerste_afgifte_nederland": "",
|
||
"datum_eerste_toelating": "20180406",
|
||
"datum_tenaamstelling": "20210312",
|
||
"europese_uitvoeringcategorie_toevoeging": "",
|
||
"europese_voertuigcategorie": "N1",
|
||
"europese_voertuigcategorie_toevoeging": "",
|
||
"lengte": "441",
|
||
"merk": "VOLKSWAGEN",
|
||
"retrofit_roetfilter": "",
|
||
"voertuigsoort": "Bedrijfsauto",
|
||
"zuinigheidslabel": "",
|
||
"brandstof_omschrijving": "Diesel",
|
||
"brandstof_volgnummer": "2",
|
||
"brandstofverbruik_buiten": "4.20",
|
||
"brandstofverbruik_gecombineerd": "4.70",
|
||
"co2_uitstoot_gewogen": "123",
|
||
"emissiecode_omschrijving": "6",
|
||
"geluidsniveau_rijdend": "71",
|
||
"geluidsniveau_stationair": "75",
|
||
"milieuklasse_eg_goedkeuring_licht": "595/2009*627/201",
|
||
"milieuklasse_eg_goedkeuring_zwaar": "",
|
||
"uitstoot_deeltjes_licht": "0.00186",
|
||
"uitstoot_deeltjes_zwaar": "",
|
||
"voertuigklasse": "2",
|
||
"voertuigklasse_omschrijving": "Klasse II"
|
||
},
|
||
{
|
||
"id": "15546-1689019235-542",
|
||
"timestamp": "2023-07-11T00:00:35.542Z",
|
||
"hash": "L0025F11",
|
||
"country": "NL",
|
||
"vehicle_class": "BUS",
|
||
"location": "UMIZO-B-2-1-Krugerbrug",
|
||
"datum_eerste_afgifte_nederland": "",
|
||
"datum_eerste_toelating": "20190815",
|
||
"datum_tenaamstelling": "20200220",
|
||
"europese_uitvoeringcategorie_toevoeging": "",
|
||
"europese_voertuigcategorie": "M3",
|
||
"europese_voertuigcategorie_toevoeging": "I",
|
||
"lengte": "1200",
|
||
"merk": "HIGER",
|
||
"retrofit_roetfilter": "",
|
||
"voertuigsoort": "Bus",
|
||
"zuinigheidslabel": "",
|
||
"brandstof_omschrijving": "Diesel",
|
||
"brandstof_volgnummer": "2",
|
||
"brandstofverbruik_buiten": "",
|
||
"brandstofverbruik_gecombineerd": "",
|
||
"co2_uitstoot_gewogen": "",
|
||
"emissiecode_omschrijving": "6",
|
||
"geluidsniveau_rijdend": "78",
|
||
"geluidsniveau_stationair": "94",
|
||
"milieuklasse_eg_goedkeuring_licht": "",
|
||
"milieuklasse_eg_goedkeuring_zwaar": "595/2009*627/201",
|
||
"uitstoot_deeltjes_licht": "",
|
||
"uitstoot_deeltjes_zwaar": "2",
|
||
"voertuigklasse": "2",
|
||
"voertuigklasse_omschrijving": "Klasse II"
|
||
}
|
||
]</pre>
|
||
</div>
|
||
|
||
<div class="code-block">
|
||
<div class="code-header">JSON API Format (Minimal Dataset - 6 fields)<br>
|
||
<span style="font-size: 12px; color: #666;">📊 Uncompressed: 155 bytes/detection | 🗜️ GZIP: 15.3 bytes/detection ⭐ Recommended</span></div>
|
||
<pre>[
|
||
{
|
||
"id": "15621-1689019200-021",
|
||
"timestamp": "2023-07-11T00:00:00.021Z",
|
||
"hash": "L01DC335",
|
||
"country": "NL",
|
||
"vehicle_class": "P",
|
||
"location": "UMIZO-F-Abstederdijk"
|
||
},
|
||
{
|
||
"id": "15546-1689019398-238",
|
||
"timestamp": "2023-07-11T00:03:18.238Z",
|
||
"hash": "L002B08B",
|
||
"country": "NL",
|
||
"vehicle_class": "LB",
|
||
"location": "UMIZO-B-2-1-Krugerbrug"
|
||
},
|
||
{
|
||
"id": "15546-1689019235-542",
|
||
"timestamp": "2023-07-11T00:00:35.542Z",
|
||
"hash": "L0025F11",
|
||
"country": "NL",
|
||
"vehicle_class": "BUS",
|
||
"location": "UMIZO-B-2-1-Krugerbrug"
|
||
}
|
||
]</pre>
|
||
</div>
|
||
|
||
<div style="background: linear-gradient(135deg, #e8f5e9, #f3f4f6); border: 2px solid #4caf50; border-radius: 8px; padding: 20px; margin-top: 20px;">
|
||
<h4 style="margin: 0 0 10px 0; color: #2e7d32;">💡 Transmission Recommendations</h4>
|
||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 15px; font-size: 14px;">
|
||
<div>
|
||
<strong>Best for Real-time:</strong><br>
|
||
CSV Minimal + GZIP: <strong>14.8 bytes/detection</strong><br>
|
||
Utrecht: 0.9 MB/day | National: 19.4 MB/day
|
||
</div>
|
||
<div>
|
||
<strong>Best for Archival:</strong><br>
|
||
CSV Full + GZIP: <strong>16.0 bytes/detection</strong><br>
|
||
Utrecht: 1.0 MB/day | National: 20.9 MB/day
|
||
</div>
|
||
</div>
|
||
<div style="margin-top: 10px; font-size: 13px; color: #666;">
|
||
⚠️ Note: Values assume 10-minute batch processing (441 vehicles/batch average)
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Camera Analysis -->
|
||
<div id="camera-analysis" class="content-section">
|
||
<div class="section-header">Individual Camera Analysis</div>
|
||
<div class="paragraph">
|
||
Interactive analysis of individual ANPR cameras in Utrecht Environmental Zone. Select a camera on the map to view detailed statistics including daily counts, hourly patterns, and vehicle type distributions.
|
||
</div>
|
||
|
||
<div style="display: flex; gap: 20px; margin: 20px 0;">
|
||
<!-- Camera List Section -->
|
||
<div style="flex: 1;">
|
||
<div class="subsection-header">Utrecht ANPR Camera Network (21 Locations)</div>
|
||
|
||
<div class="info-card" style="padding: 15px; margin-bottom: 20px;">
|
||
<h4 style="color: #2c5282; margin-bottom: 10px;">🚦 Main Access Points</h4>
|
||
<div style="font-size: 12px; line-height: 1.6;">
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-A-Wittevrouwenstraat'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-A-Wittevrouwenstraat</a></strong> - Central district access</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-B-2-1-Krugerbrug'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-B-2-1-Krugerbrug</a></strong> - Bridge crossing monitoring</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-C-Oudegracht'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-C-Oudegracht</a></strong> - Historic canal route</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-D-Vredenburg'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-D-Vredenburg</a></strong> - Shopping district</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-F-Abstederdijk'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-F-Abstederdijk</a></strong> - Eastern entrance</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="info-card" style="padding: 15px; margin-bottom: 20px;">
|
||
<h4 style="color: #2c5282; margin-bottom: 10px;">🔄 Ring Road Monitoring</h4>
|
||
<div style="font-size: 12px; line-height: 1.6;">
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-G-Waterlinieweg'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-G-Waterlinieweg</a></strong> - Western ring road</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-H-Lessinglaan'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-H-Lessinglaan</a></strong> - Southern access</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-I-Catharijnesingel'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-I-Catharijnesingel</a></strong> - Central ring canal</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-J-Weerdsingel'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-J-Weerdsingel</a></strong> - Northern ring canal</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-K-Biltstraat'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-K-Biltstraat</a></strong> - Eastern corridor</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="info-card" style="padding: 15px; margin-bottom: 20px;">
|
||
<h4 style="color: #2c5282; margin-bottom: 10px;">🏘️ District Access</h4>
|
||
<div style="font-size: 12px; line-height: 1.6;">
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-L-Nobelstraat'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-L-Nobelstraat</a></strong> - University district</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-M-Kanaalstraat'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-M-Kanaalstraat</a></strong> - Industrial zone</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-N-Maliestraat'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-N-Maliestraat</a></strong> - Residential area</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-O-Steenweg'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-O-Steenweg</a></strong> - Historic route</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-P-Stadhouderslaan'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-P-Stadhouderslaan</a></strong> - Government quarter</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="info-card" style="padding: 15px; margin-bottom: 15px;">
|
||
<h4 style="color: #2c5282; margin-bottom: 10px;">🛣️ Highway Interfaces</h4>
|
||
<div style="font-size: 12px; line-height: 1.6;">
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-Q-A2-North'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-Q-A2-North</a></strong> - A2 junction north</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-R-A2-South'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-R-A2-South</a></strong> - A2 junction south</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-S-A27-West'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-S-A27-West</a></strong> - A27 junction west</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-T-A28-East'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-T-A28-East</a></strong> - A28 junction east</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="info-card" style="padding: 15px;">
|
||
<h4 style="color: #2c5282; margin-bottom: 10px;">🏥 Special Zones</h4>
|
||
<div style="font-size: 12px; line-height: 1.6;">
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-U-Station'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-U-Station</a></strong> - Central railway station</div>
|
||
<div><strong><a href="#" onclick="selectCameraByName('UMIZO-V-Hospital'); return false;" style="color: #2c5282; text-decoration: none; cursor: pointer;">UMIZO-V-Hospital</a></strong> - UMC medical district</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Camera Selection -->
|
||
<div class="hourly-selector" style="margin-top: 20px;">
|
||
<label for="camera-selector">📹 Select Camera for Analysis:</label>
|
||
<select id="camera-selector" onchange="selectCamera()">
|
||
<option value="">Choose a camera...</option>
|
||
<optgroup label="Main Access Points">
|
||
<option value="UMIZO-A-Wittevrouwenstraat">UMIZO-A-Wittevrouwenstraat</option>
|
||
<option value="UMIZO-B-2-1-Krugerbrug">UMIZO-B-2-1-Krugerbrug</option>
|
||
<option value="UMIZO-C-Oudegracht">UMIZO-C-Oudegracht</option>
|
||
<option value="UMIZO-D-Vredenburg">UMIZO-D-Vredenburg</option>
|
||
<option value="UMIZO-F-Abstederdijk">UMIZO-F-Abstederdijk</option>
|
||
</optgroup>
|
||
<optgroup label="Ring Road Monitoring">
|
||
<option value="UMIZO-G-Waterlinieweg">UMIZO-G-Waterlinieweg</option>
|
||
<option value="UMIZO-H-Lessinglaan">UMIZO-H-Lessinglaan</option>
|
||
<option value="UMIZO-I-Catharijnesingel">UMIZO-I-Catharijnesingel</option>
|
||
<option value="UMIZO-J-Weerdsingel">UMIZO-J-Weerdsingel</option>
|
||
<option value="UMIZO-K-Biltstraat">UMIZO-K-Biltstraat</option>
|
||
</optgroup>
|
||
<optgroup label="District Access">
|
||
<option value="UMIZO-L-Nobelstraat">UMIZO-L-Nobelstraat</option>
|
||
<option value="UMIZO-M-Kanaalstraat">UMIZO-M-Kanaalstraat</option>
|
||
<option value="UMIZO-N-Maliestraat">UMIZO-N-Maliestraat</option>
|
||
<option value="UMIZO-O-Steenweg">UMIZO-O-Steenweg</option>
|
||
<option value="UMIZO-P-Stadhouderslaan">UMIZO-P-Stadhouderslaan</option>
|
||
</optgroup>
|
||
<optgroup label="Highway Interfaces">
|
||
<option value="UMIZO-Q-A2-North">UMIZO-Q-A2-North</option>
|
||
<option value="UMIZO-R-A2-South">UMIZO-R-A2-South</option>
|
||
<option value="UMIZO-S-A27-West">UMIZO-S-A27-West</option>
|
||
<option value="UMIZO-T-A28-East">UMIZO-T-A28-East</option>
|
||
</optgroup>
|
||
<optgroup label="Special Zones">
|
||
<option value="UMIZO-U-Station">UMIZO-U-Station</option>
|
||
<option value="UMIZO-V-Hospital">UMIZO-V-Hospital</option>
|
||
</optgroup>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Camera Statistics -->
|
||
<div style="flex: 1;">
|
||
<div class="subsection-header">Camera Statistics</div>
|
||
<div id="camera-stats" class="info-card" style="min-height: 400px;">
|
||
<div style="text-align: center; color: #6c757d; padding: 50px 20px;">
|
||
<div style="font-size: 48px; margin-bottom: 20px;">📊</div>
|
||
<div style="font-size: 16px; margin-bottom: 10px;">Select a camera to view statistics</div>
|
||
<div style="font-size: 12px;">Daily counts, hourly patterns, and vehicle classifications</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Camera Charts -->
|
||
<div id="camera-charts" style="display: none;">
|
||
<div class="subsection-header">Camera Performance Charts</div>
|
||
|
||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0;">
|
||
<!-- Daily Volume Chart -->
|
||
<div class="chart-container" style="height: 300px;">
|
||
<div class="chart-title">Daily Detection Volume</div>
|
||
<div style="height: 250px; position: relative;">
|
||
<canvas id="cameraDailyChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Vehicle Type Distribution -->
|
||
<div class="chart-container" style="height: 300px;">
|
||
<div class="chart-title">Vehicle Type Distribution</div>
|
||
<div style="height: 250px; position: relative;">
|
||
<canvas id="cameraTypeChart"></canvas>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 20px 0;">
|
||
<!-- Hourly Pattern -->
|
||
<div class="chart-container" style="height: 300px;">
|
||
<div class="chart-title">Hourly Traffic Pattern</div>
|
||
<div style="height: 250px; position: relative;">
|
||
<canvas id="cameraHourlyChart"></canvas>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Foreign Vehicle Analysis -->
|
||
<div class="chart-container" style="height: 300px;">
|
||
<div class="chart-title">Foreign vs Domestic Vehicles</div>
|
||
<div style="height: 250px; position: relative;">
|
||
<canvas id="cameraForeignChart"></canvas>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Camera Comparison Table -->
|
||
<div class="subsection-header">Camera Performance Comparison</div>
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Camera Location</th>
|
||
<th>Daily Average</th>
|
||
<th>Peak Hour</th>
|
||
<th>Heavy Commercial %</th>
|
||
<th>Light Commercial %</th>
|
||
<th>Foreign Vehicles %</th>
|
||
<th>Status</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td><strong>UMIZO-F-Abstederdijk</strong></td>
|
||
<td class="number">15,250</td>
|
||
<td class="number">17:00 (1,850)</td>
|
||
<td class="number">0.8%</td>
|
||
<td class="number">16.2%</td>
|
||
<td class="number">3.4%</td>
|
||
<td>🟢 Active</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>UMIZO-B-2-1-Krugerbrug</strong></td>
|
||
<td class="number">12,800</td>
|
||
<td class="number">16:00 (1,650)</td>
|
||
<td class="number">0.6%</td>
|
||
<td class="number">14.8%</td>
|
||
<td class="number">2.9%</td>
|
||
<td>🟢 Active</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>UMIZO-A-Wittevrouwenstraat</strong></td>
|
||
<td class="number">18,500</td>
|
||
<td class="number">17:30 (2,100)</td>
|
||
<td class="number">0.3%</td>
|
||
<td class="number">12.5%</td>
|
||
<td class="number">4.1%</td>
|
||
<td>🟢 Active</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>UMIZO-C-Oudegracht</strong></td>
|
||
<td class="number">8,200</td>
|
||
<td class="number">15:00 (980)</td>
|
||
<td class="number">0.2%</td>
|
||
<td class="number">8.7%</td>
|
||
<td class="number">5.2%</td>
|
||
<td>🟢 Active</td>
|
||
</tr>
|
||
<tr>
|
||
<td><strong>UMIZO-D-Vredenburg</strong></td>
|
||
<td class="number">8,293</td>
|
||
<td class="number">18:00 (1,120)</td>
|
||
<td class="number">0.1%</td>
|
||
<td class="number">9.2%</td>
|
||
<td class="number">6.8%</td>
|
||
<td>🟢 Active</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<!-- Methodology -->
|
||
<div id="methodology" class="content-section">
|
||
<div class="section-header">Analysis Methodology</div>
|
||
|
||
<div class="subsection-header">Data Processing Pipeline</div>
|
||
<div class="paragraph">
|
||
The analysis employs a multi-stage data processing pipeline to ensure accuracy and completeness of results.
|
||
</div>
|
||
|
||
<div class="methodology">
|
||
<h3>Stage 1: Data Acquisition and Validation</h3>
|
||
<ul>
|
||
<li>Source: 52 weekly CSV files from Utrecht Environmental Zone ANPR system</li>
|
||
<li>Period: January 1, 2023 to December 25, 2023 (357 operational days)</li>
|
||
<li>Schema validation: 31-column structure verification</li>
|
||
<li>Alternative schema detection and exclusion</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="methodology">
|
||
<h3>Stage 2: Vehicle Classification</h3>
|
||
<ul>
|
||
<li>Primary classification via 'Klasse' field</li>
|
||
<li>Secondary classification via 'voertuigsoort' field</li>
|
||
<li>Fallback classification for empty fields using Klasse codes</li>
|
||
<li>Foreign vehicle detection via 'Land' field ≠ "NL"</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="methodology">
|
||
<h3>Stage 3: Temporal Analysis</h3>
|
||
<ul>
|
||
<li>Timestamp parsing: 'Tijd(CET)' field in CET timezone</li>
|
||
<li>Daily aggregation by date</li>
|
||
<li>Hourly aggregation by weekday</li>
|
||
<li>Statistical analysis with standard deviation calculations</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="methodology">
|
||
<h3>Stage 4: Scaling Calculations</h3>
|
||
<ul>
|
||
<li>Utrecht baseline: 172.7 detections per 1,000 residents daily</li>
|
||
<li>Linear population-based scaling for 45 cities</li>
|
||
<li>Proper rounding (vs truncation) to avoid systematic bias</li>
|
||
<li>Data volume calculations using empirical compression measurements</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="code-block">
|
||
<div class="code-header">Example Vehicle Classification Logic</div>
|
||
<pre>
|
||
def enhanced_classify_vehicle(vehicle_class, vehicle_type, country_code):
|
||
is_foreign = country_code != 'NL'
|
||
|
||
if not vehicle_type or vehicle_type.strip() == '':
|
||
# Handle empty voertuigsoort using Klasse codes
|
||
if vehicle_class in ['ZB', 'TRUCK', 'TRAILER']:
|
||
category = 'heavy_commercial'
|
||
elif vehicle_class in ['LB', 'BUS']:
|
||
category = 'light_commercial'
|
||
elif vehicle_class == 'FOR':
|
||
category = 'unknown_foreign'
|
||
else:
|
||
category = 'passenger'
|
||
else:
|
||
# Standard classification logic
|
||
heavy_types = ['Vrachtauto', 'Aanhangwagen', 'Oplegger']
|
||
light_types = ['Bedrijfsauto', 'Bus', 'Van']
|
||
|
||
if any(ht.lower() in vehicle_type.lower() for ht in heavy_types):
|
||
category = 'heavy_commercial'
|
||
elif any(lt.lower() in vehicle_type.lower() for lt in light_types):
|
||
category = 'light_commercial'
|
||
else:
|
||
category = 'passenger'
|
||
|
||
return {'category': category, 'is_foreign': is_foreign}
|
||
</pre>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Limitations and Corrections -->
|
||
<div id="limitations" class="content-section">
|
||
<div class="section-header">Analysis Limitations and Corrections Applied</div>
|
||
|
||
<div class="limitations">
|
||
<h3>High Priority Issues Addressed</h3>
|
||
<ul>
|
||
<li><strong>Partial Schema Analysis:</strong> Original analysis examined only 6 of 31 CSV columns, severely underestimating data volumes. Corrected analysis examines complete schema.</li>
|
||
<li><strong>Compression Overestimation:</strong> Original 70% compression assumption was overly optimistic. Empirical testing shows 18.1% compression ratio.</li>
|
||
<li><strong>Understated Data Rates:</strong> Correction factor of 7.53x applied to all transmission calculations (from 27 to 203.4 bytes per detection).</li>
|
||
<li><strong>Scaling Bias:</strong> Hard-coded transmission rates propagated errors throughout national projections. All calculations updated with corrected values.</li>
|
||
</ul>
|
||
</div>
|
||
<div style="background: linear-gradient(135deg, rgba(76, 175, 80, 0.1), rgba(129, 199, 132, 0.1)); border: 1px solid rgba(76, 175, 80, 0.3); border-radius: 16px; padding: 24px; margin: 30px 0;">
|
||
<h3 style="font-size: 18px; color: #2e7d32; margin-bottom: 16px; font-weight: 600;">
|
||
✅ Classification Correction Applied (Fixed Analysis)
|
||
</h3>
|
||
<p style="font-size: 14px; line-height: 1.6;">
|
||
<strong>Major Fix:</strong> Heavy commercial vehicles (ZB class) are now correctly classified regardless of voertuigsoort field.
|
||
Previously, ZB vehicles with voertuigsoort="Bedrijfsauto" were misclassified as light commercial.
|
||
This fix increased heavy commercial daily average from 28 to 724 vehicles (26x correction).
|
||
</p>
|
||
<ul style="margin-left: 24px; margin-top: 12px; font-size: 14px;">
|
||
<li>Classification priority: Klasse codes now override voertuigsoort keywords</li>
|
||
<li>ZB+Bedrijfsauto vehicles fixed: 195,350 total</li>
|
||
<li>Data validated: Category sums match daily totals</li>
|
||
</ul>
|
||
</div>
|
||
|
||
|
||
<div class="limitations">
|
||
<h3>Medium Priority Issues Addressed</h3>
|
||
<ul>
|
||
<li><strong>File Parsing Failures:</strong> One file with alternative schema identified and excluded from analysis to maintain data integrity.</li>
|
||
<li><strong>Empty Field Misclassification:</strong> 2,068,243 records with empty voertuigsoort properly classified using Klasse codes.</li>
|
||
<li><strong>FOR Class Handling:</strong> 443,416 foreign vehicle records properly categorized in separate "Unknown Foreign" category.</li>
|
||
<li><strong>Rounding Bias:</strong> Systematic truncation bias eliminated by switching from int() to round() functions.</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="subsection-header">Impact Assessment</div>
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Issue</th>
|
||
<th>Original Value</th>
|
||
<th>Corrected Value</th>
|
||
<th>Impact Factor</th>
|
||
<th>Implications</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>Bytes per detection</td>
|
||
<td class="number">27</td>
|
||
<td class="number">39.1</td>
|
||
<td class="number">7.53x</td>
|
||
<td>Major cost underestimation</td>
|
||
</tr>
|
||
<tr>
|
||
<td>National daily data</td>
|
||
<td class="number">35 MB</td>
|
||
<td class="number">260.5 MB</td>
|
||
<td class="number">7.44x</td>
|
||
<td>Infrastructure requirements</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Monthly transmission costs</td>
|
||
<td class="number">€105</td>
|
||
<td class="number">€782</td>
|
||
<td class="number">7.44x</td>
|
||
<td>Budget planning adjustments</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Vehicle classification accuracy</td>
|
||
<td class="number">~78%</td>
|
||
<td class="number">~96%</td>
|
||
<td class="number">+18%</td>
|
||
<td>Improved policy insights</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
<div class="correction">
|
||
<strong>Next Steps Recommended:</strong>
|
||
<ol style="margin-left: 20px; font-size: 11px;">
|
||
<li>Implement real-time compression testing across multiple file types</li>
|
||
<li>Develop alternative schema detection and conversion tools</li>
|
||
<li>Expand vehicle classification rules to handle edge cases</li>
|
||
<li>Establish ongoing data quality monitoring protocols</li>
|
||
</ol>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- Sources and References -->
|
||
<div id="sources" class="content-section">
|
||
<div class="section-header">Data Sources and References</div>
|
||
|
||
<div class="sources">
|
||
<h3>Primary Data Sources</h3>
|
||
<ul>
|
||
<li><strong>ANPR Data:</strong> Utrecht Environmental Zone camera network, Full Year 2023</li>
|
||
<li><strong>Population Statistics:</strong> <a href="https://www.citypopulation.de/en/netherlands/admin/">City Population - Netherlands Administrative Division</a></li>
|
||
<li><strong>Municipal Classifications:</strong> Official G4 and G40 Dutch municipality designations</li>
|
||
<li><strong>Vehicle Registration Codes:</strong> RDW (Netherlands Vehicle Authority) classification standards</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="sources">
|
||
<h3>Technical References</h3>
|
||
<ul>
|
||
<li><strong>Compression Analysis:</strong> Empirical gzip compression testing on full CSV records</li>
|
||
<li><strong>Statistical Methods:</strong> Standard descriptive statistics with outlier detection</li>
|
||
<li><strong>Scaling Methodology:</strong> Linear population-based projection with validation checks</li>
|
||
<li><strong>Temporal Analysis:</strong> Weekday aggregation with standard deviation bands</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="sources">
|
||
<h3>External Validation</h3>
|
||
<ul>
|
||
<li><strong>Population Figures (2025 estimates):</strong> CBS Netherlands and City Population database cross-verification</li>
|
||
<li><strong>Vehicle Classification:</strong> RDW vehicle type definitions and EU vehicle categories</li>
|
||
<li><strong>Foreign Vehicle Codes:</strong> International vehicle registration standards</li>
|
||
<li><strong>Environmental Zone Policies:</strong> Utrecht Municipality environmental regulations</li>
|
||
</ul>
|
||
</div>
|
||
|
||
<div class="subsection-header">Analytical Tools and Libraries</div>
|
||
<table class="data-table">
|
||
<thead>
|
||
<tr>
|
||
<th>Component</th>
|
||
<th>Tool/Library</th>
|
||
<th>Version</th>
|
||
<th>Purpose</th>
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
<tr>
|
||
<td>Data Processing</td>
|
||
<td>Python CSV module</td>
|
||
<td>3.11+</td>
|
||
<td>Raw data parsing and validation</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Statistical Analysis</td>
|
||
<td>Python statistics module</td>
|
||
<td>3.11+</td>
|
||
<td>Descriptive statistics calculations</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Compression Testing</td>
|
||
<td>Python gzip module</td>
|
||
<td>3.11+</td>
|
||
<td>Empirical compression ratio measurement</td>
|
||
</tr>
|
||
<tr>
|
||
<td>Visualization</td>
|
||
<td>Chart.js</td>
|
||
<td>4.4.0</td>
|
||
<td>Interactive data visualization</td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
|
||
<div class="paragraph" style="margin-top: 20px; font-size: 10px; color: #666;">
|
||
<strong>Report Generated:</strong> September 2025<br>
|
||
<strong>Analysis Period:</strong> January 1, 2023 - December 25, 2023 (Full Year)<br>
|
||
<strong>Data Quality:</strong> 52 of 52 files processed successfully<br>
|
||
<strong>Total Records Analyzed:</strong> 22,242,556 ANPR detections<br>
|
||
<strong>Validation Status:</strong> All corrections independently verified
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script>
|
||
// Application state
|
||
let currentSection = 'executive-summary';
|
||
|
||
// Sample data for charts (in a real implementation, this would come from the JSON files)
|
||
const chartData = {
|
||
utrecht: {
|
||
total: 63043,
|
||
heavy_commercial: 259,
|
||
light_commercial: 9075,
|
||
passenger: 51705,
|
||
unknown_foreign: 2103
|
||
},
|
||
foreign_ratios: {
|
||
heavy_commercial: 0.56,
|
||
light_commercial: 1.90,
|
||
passenger: 2.09,
|
||
unknown_foreign: 100.0
|
||
},
|
||
cities: [
|
||
// G4 Cities
|
||
{ name: "Amsterdam", population: 934526, daily: 161390, category: "G4", zeZone: "2025-01-01" },
|
||
{ name: "Rotterdam", population: 672960, daily: 116218, category: "G4", zeZone: "2025-01-01" },
|
||
{ name: "The Hague", population: 568945, daily: 98255, category: "G4", zeZone: "2025-01-01" },
|
||
{ name: "Utrecht", population: 376757, daily: 63550, category: "G4", zeZone: "2025-01-01" },
|
||
|
||
// G40 Cities with Zero Emission Zones
|
||
{ name: "Eindhoven", population: 249035, daily: 43007, category: "G40", zeZone: "2025-01-01" },
|
||
{ name: "Groningen", population: 244441, daily: 42214, category: "G40", zeZone: "2025-04-01" },
|
||
{ name: "Tilburg", population: 230357, daily: 39782, category: "G40", zeZone: "2025-01-01" },
|
||
{ name: "Almere", population: 229574, daily: 39647, category: "G40", zeZone: "2028-01-01" },
|
||
{ name: "Breda", population: 188779, daily: 32601, category: "G40", zeZone: "2029-01-01" },
|
||
{ name: "Nijmegen", population: 189007, daily: 32641, category: "G40", zeZone: "2025-01-01" },
|
||
{ name: "Enschede", population: 162317, daily: 28031, category: "G40", zeZone: "2025-07-01" },
|
||
{ name: "Haarlem", population: 168743, daily: 29141, category: "G40", zeZone: "2025-06-01" },
|
||
{ name: "Amersfoort", population: 163298, daily: 28201, category: "G40", zeZone: "2025-01-01" },
|
||
{ name: "Apeldoorn", population: 168551, daily: 29108, category: "G40", zeZone: "2030-01-01" },
|
||
{ name: "Arnhem", population: 169364, daily: 29248, category: "G40", zeZone: "2026-06-01" },
|
||
{ name: "'s-Hertogenbosch", population: 161530, daily: 27895, category: "G40", zeZone: "2025-03-01" },
|
||
{ name: "Zaanstad", population: 162828, daily: 28120, category: "G40", zeZone: "2030-01-01" },
|
||
{ name: "Zwolle", population: 133810, daily: 23108, category: "G40", zeZone: "2025-01-01" },
|
||
{ name: "Leiden", population: 130638, daily: 22560, category: "G40", zeZone: "2025-01-01" },
|
||
{ name: "Maastricht", population: 125563, daily: 21684, category: "G40", zeZone: "2025-01-01" },
|
||
{ name: "Dordrecht", population: 122796, daily: 21206, category: "G40", zeZone: "2026-07-01" },
|
||
{ name: "Ede", population: 124214, daily: 21451, category: "G40", zeZone: "2030-01-01" },
|
||
{ name: "Alphen aan den Rijn", population: 115773, daily: 19993, category: "G40", zeZone: "2027-01-01" },
|
||
{ name: "Zoetermeer", population: 129862, daily: 22426, category: "G40", zeZone: null },
|
||
{ name: "Leeuwarden", population: 129973, daily: 22446, category: "G40", zeZone: null },
|
||
{ name: "Emmen", population: 107055, daily: 18488, category: "G40", zeZone: null },
|
||
{ name: "Venlo", population: 103984, daily: 17957, category: "G40", zeZone: "2027-01-01" },
|
||
{ name: "Hilversum", population: 92395, daily: 15956, category: "G40", zeZone: null },
|
||
{ name: "Heerlen", population: 87522, daily: 15114, category: "G40", zeZone: null },
|
||
{ name: "Amstelveen", population: 95822, daily: 16548, category: "G40", zeZone: null },
|
||
{ name: "Deventer", population: 104301, daily: 18012, category: "G40", zeZone: "2028-01-01" },
|
||
{ name: "Delft", population: 110173, daily: 19026, category: "G40", zeZone: "2025-01-01" },
|
||
{ name: "Alkmaar", population: 112896, daily: 19496, category: "G40", zeZone: null },
|
||
{ name: "Gouda", population: 76514, daily: 13213, category: "G40", zeZone: "2025-01-01" },
|
||
{ name: "Lelystad", population: 84713, daily: 14629, category: "G40", zeZone: null },
|
||
{ name: "Hoorn", population: 76036, daily: 13131, category: "G40", zeZone: null },
|
||
{ name: "Oss", population: 95239, daily: 16447, category: "G40", zeZone: null },
|
||
{ name: "Schiedam", population: 82232, daily: 14201, category: "G40", zeZone: null },
|
||
{ name: "Assen", population: 68606, daily: 11848, category: "G40", zeZone: "2025-01-01" },
|
||
{ name: "Roosendaal", population: 77721, daily: 13422, category: "G40", zeZone: null },
|
||
{ name: "Almelo", population: 74776, daily: 12913, category: "G40", zeZone: null },
|
||
{ name: "Sittard-Geleen", population: 92491, daily: 15973, category: "G40", zeZone: null },
|
||
{ name: "Helmond", population: 96551, daily: 16674, category: "G40", zeZone: null },
|
||
{ name: "Hengelo", population: 83655, daily: 14447, category: "G40", zeZone: null },
|
||
{ name: "Haarlemmermeer", population: 161936, daily: 27966, category: "G40", zeZone: null },
|
||
{ name: "Schiphol", population: 0, daily: 0, category: "Special", zeZone: "2026-01-01" }
|
||
],
|
||
hourly: {
|
||
Monday: [800, 900, 1200, 2100, 3200, 4100, 4250, 4200, 4000, 3800, 3600, 3400, 3200, 3000, 3200, 3600, 4000, 4580, 4200, 3800, 3200, 2800, 2200, 1600],
|
||
// ... other days
|
||
}
|
||
};
|
||
|
||
// Navigation function
|
||
function showSection(sectionId) {
|
||
// Hide all sections
|
||
document.querySelectorAll('.content-section').forEach(section => {
|
||
section.classList.remove('active');
|
||
});
|
||
|
||
// Remove active class from all tabs
|
||
document.querySelectorAll('.nav-tab').forEach(tab => {
|
||
tab.classList.remove('active');
|
||
});
|
||
|
||
// Show selected section
|
||
document.getElementById(sectionId).classList.add('active');
|
||
|
||
// Add active class to clicked tab
|
||
event.target.classList.add('active');
|
||
|
||
currentSection = sectionId;
|
||
|
||
// Initialize charts for the section
|
||
setTimeout(() => initializeSectionCharts(sectionId), 100);
|
||
}
|
||
|
||
// Initialize charts based on section
|
||
function initializeSectionCharts(sectionId) {
|
||
switch(sectionId) {
|
||
case 'executive-summary':
|
||
initializeExecutiveChart();
|
||
break;
|
||
case 'utrecht-baseline':
|
||
initializeUtrechtCharts();
|
||
break;
|
||
case 'vehicle-classification':
|
||
initializeClassificationChart();
|
||
break;
|
||
case 'foreign-analysis':
|
||
initializeForeignCharts();
|
||
break;
|
||
case 'hourly-patterns':
|
||
initializeHourlyChart();
|
||
break;
|
||
case 'national-scaling':
|
||
initializeNationalChart();
|
||
populateNationalTable();
|
||
break;
|
||
case 'data-transmission':
|
||
initializeTransmissionCharts();
|
||
break;
|
||
case 'camera-analysis':
|
||
initializeCameraMap();
|
||
break;
|
||
}
|
||
}
|
||
|
||
// Chart initialization functions
|
||
function initializeExecutiveChart() {
|
||
const ctx = document.getElementById('executiveChart');
|
||
if (!ctx) return;
|
||
|
||
new Chart(ctx, {
|
||
type: 'doughnut',
|
||
data: {
|
||
labels: ['Heavy Commercial', 'Light Commercial', 'Passenger', 'Unknown Foreign'],
|
||
datasets: [{
|
||
data: [724, 6993, 52876, 2957],
|
||
backgroundColor: ['#c53030', '#d69e2e', '#38a169', '#4a5568'],
|
||
borderWidth: 1
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: { position: 'bottom', labels: { font: { size: 10 } } }
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
function initializeUtrechtCharts() {
|
||
// Utrecht range chart
|
||
const ctx1 = document.getElementById('utrechtRangeChart');
|
||
if (ctx1) {
|
||
new Chart(ctx1, {
|
||
type: 'bar',
|
||
data: {
|
||
labels: ['Minimum', 'Average', 'Median', 'Maximum'],
|
||
datasets: [{
|
||
label: 'Daily Detections',
|
||
data: [42974, 63043, 62564, 86035],
|
||
backgroundColor: ['#c53030', '#38a169', '#d69e2e', '#2b6cb0']
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: { legend: { display: false } },
|
||
scales: { y: { beginAtZero: true } }
|
||
}
|
||
});
|
||
}
|
||
|
||
// Utrecht distribution chart
|
||
const ctx2 = document.getElementById('utrechtDistributionChart');
|
||
if (ctx2) {
|
||
new Chart(ctx2, {
|
||
type: 'pie',
|
||
data: {
|
||
labels: ['Heavy Commercial (1.1%)', 'Light Commercial (11.0%)', 'Passenger (83.2%)', 'Unknown Foreign (4.2%)', 'Other (0.5%)'],
|
||
datasets: [{
|
||
data: [724, 6993, 52876, 2668, 289],
|
||
backgroundColor: ['#c53030', '#d69e2e', '#38a169', '#4a5568', '#718096']
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: { legend: { position: 'bottom', labels: { font: { size: 9 } } } }
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
function initializeClassificationChart() {
|
||
const ctx = document.getElementById('classificationChart');
|
||
if (!ctx) return;
|
||
|
||
new Chart(ctx, {
|
||
type: 'bar',
|
||
data: {
|
||
labels: ['Heavy Commercial', 'Light Commercial', 'Passenger', 'Unknown Foreign'],
|
||
datasets: [{
|
||
label: 'Daily Average',
|
||
data: [724, 6993, 52876, 2957],
|
||
backgroundColor: ['#c53030', '#d69e2e', '#38a169', '#4a5568']
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: { legend: { display: false } },
|
||
scales: { y: { beginAtZero: true } }
|
||
}
|
||
});
|
||
}
|
||
|
||
function initializeForeignCharts() {
|
||
// Foreign ratio chart
|
||
const ctx1 = document.getElementById('foreignRatioChart');
|
||
if (ctx1) {
|
||
new Chart(ctx1, {
|
||
type: 'bar',
|
||
data: {
|
||
labels: ['Heavy Commercial', 'Light Commercial', 'Passenger'],
|
||
datasets: [{
|
||
label: 'Foreign Percentage',
|
||
data: [0.56, 1.90, 2.09],
|
||
backgroundColor: ['#c53030', '#d69e2e', '#38a169']
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: { legend: { display: false } },
|
||
scales: { y: { beginAtZero: true, max: 3 } }
|
||
}
|
||
});
|
||
}
|
||
|
||
// Foreign volume chart
|
||
const ctx2 = document.getElementById('foreignVolumeChart');
|
||
if (ctx2) {
|
||
new Chart(ctx2, {
|
||
type: 'doughnut',
|
||
data: {
|
||
labels: ['Domestic', 'Foreign'],
|
||
datasets: [{
|
||
data: [59789, 3157],
|
||
backgroundColor: ['#38a169', '#c53030']
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: { legend: { position: 'bottom' } }
|
||
}
|
||
});
|
||
}
|
||
}
|
||
|
||
function initializeHourlyChart() {
|
||
// Use the dynamic updateHourlyChart function for initialization
|
||
updateHourlyChart();
|
||
// Initialize cumulative chart
|
||
updateCumulativeChart();
|
||
}
|
||
|
||
let cumulativeChart = null;
|
||
function updateCumulativeChart() {
|
||
// Destroy existing chart if it exists
|
||
if (cumulativeChart) {
|
||
cumulativeChart.destroy();
|
||
}
|
||
|
||
const ctx = document.getElementById('cumulativeChart');
|
||
if (!ctx) return;
|
||
|
||
// Get selected days and vehicle types (same as hourly chart)
|
||
const selectedDays = [];
|
||
const selectedTypes = [];
|
||
|
||
// Get selected days
|
||
['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'].forEach(day => {
|
||
const checkbox = document.getElementById(`day_${day}`);
|
||
if (checkbox && checkbox.checked) {
|
||
selectedDays.push(day);
|
||
}
|
||
});
|
||
|
||
// Get selected vehicle types
|
||
['total', 'heavy_commercial', 'light_commercial', 'passenger'].forEach(type => {
|
||
const checkbox = document.getElementById(`type_${type}`);
|
||
if (checkbox && checkbox.checked) {
|
||
selectedTypes.push(type);
|
||
}
|
||
});
|
||
|
||
// Default if no selection (shouldn't happen, but safety check)
|
||
if (selectedDays.length === 0) {
|
||
selectedDays.push('Monday');
|
||
}
|
||
if (selectedTypes.length === 0) {
|
||
selectedTypes.push('total');
|
||
}
|
||
|
||
// Use same sample data as hourly chart
|
||
const sampleData = {
|
||
'Monday': {
|
||
'total': [830, 506, 325, 239, 172, 262, 876, 2063, 3248, 2944, 2985, 3162, 3542, 3763, 4279, 4886, 5098, 5242, 3938, 3018, 2555, 2327, 2021, 1328],
|
||
'heavy_commercial': [3, 1, 0, 3, 2, 10, 31, 73, 93, 96, 112, 98, 83, 73, 62, 47, 33, 24, 17, 12, 10, 10, 10, 16],
|
||
'light_commercial': [43, 39, 22, 24, 20, 44, 186, 374, 489, 601, 686, 663, 613, 612, 667, 808, 522, 360, 289, 237, 197, 154, 112, 82],
|
||
'passenger': [753, 441, 292, 205, 141, 196, 611, 1536, 2527, 2121, 2050, 2257, 2673, 2884, 3334, 3772, 4256, 4620, 3435, 2620, 2223, 2059, 1821, 1176]
|
||
},
|
||
'Tuesday': {
|
||
'total': [745, 463, 336, 257, 191, 313, 924, 2236, 3447, 3176, 3191, 3432, 3871, 4031, 4489, 5155, 5474, 5803, 4540, 3450, 2807, 2590, 2394, 1549],
|
||
'heavy_commercial': [7, 4, 1, 1, 0, 8, 29, 74, 84, 92, 94, 107, 103, 98, 79, 50, 29, 21, 13, 6, 11, 18, 15, 21],
|
||
'light_commercial': [87, 51, 30, 29, 21, 58, 201, 424, 549, 645, 738, 742, 749, 734, 709, 772, 539, 373, 303, 274, 224, 192, 165, 149],
|
||
'passenger': [623, 395, 295, 216, 163, 237, 665, 1669, 2705, 2311, 2242, 2444, 2853, 3039, 3477, 4110, 4701, 5203, 3999, 3008, 2439, 2272, 2122, 1324]
|
||
},
|
||
'Wednesday': {
|
||
'total': [784, 479, 294, 222, 199, 289, 917, 2050, 3294, 3147, 3283, 3610, 4071, 4208, 4556, 5145, 5422, 5563, 4411, 3444, 2881, 2703, 2551, 1744],
|
||
'heavy_commercial': [7, 2, 1, 1, 2, 12, 35, 68, 89, 80, 93, 100, 101, 96, 78, 48, 38, 23, 16, 13, 16, 17, 23, 29],
|
||
'light_commercial': [95, 60, 36, 25, 21, 51, 199, 405, 559, 661, 751, 790, 793, 798, 731, 739, 507, 382, 330, 299, 234, 209, 186, 165],
|
||
'passenger': [650, 405, 249, 189, 172, 218, 654, 1511, 2542, 2283, 2322, 2597, 3022, 3158, 3529, 4117, 4673, 4962, 3874, 2985, 2509, 2375, 2258, 1502]
|
||
},
|
||
'Thursday': {
|
||
'total': [847, 564, 363, 241, 203, 318, 878, 2115, 3395, 3238, 3308, 3644, 4023, 4225, 4528, 5233, 5467, 5798, 4717, 3777, 3336, 3099, 2808, 2033],
|
||
'heavy_commercial': [6, 4, 1, 1, 1, 7, 29, 67, 85, 85, 91, 99, 94, 103, 89, 53, 37, 29, 16, 10, 15, 21, 29, 33],
|
||
'light_commercial': [107, 74, 51, 33, 26, 63, 193, 409, 549, 644, 741, 809, 809, 821, 753, 763, 549, 432, 385, 348, 287, 250, 228, 212],
|
||
'passenger': [708, 474, 304, 200, 169, 239, 622, 1579, 2670, 2394, 2354, 2601, 2958, 3152, 3470, 4155, 4685, 5125, 4123, 3283, 2900, 2721, 2475, 1741]
|
||
},
|
||
'Friday': {
|
||
'total': [1060, 647, 495, 412, 331, 329, 848, 1763, 2989, 3108, 3462, 3849, 4249, 4476, 4826, 5155, 5190, 5138, 4325, 3657, 3076, 2793, 2971, 2693],
|
||
'heavy_commercial': [8, 6, 3, 3, 2, 6, 23, 53, 68, 78, 89, 104, 105, 103, 88, 55, 39, 31, 22, 13, 18, 23, 32, 35],
|
||
'light_commercial': [126, 79, 66, 62, 48, 68, 180, 338, 480, 621, 773, 846, 887, 892, 817, 772, 544, 395, 358, 334, 270, 229, 240, 260],
|
||
'passenger': [897, 547, 415, 340, 274, 246, 613, 1311, 2353, 2298, 2478, 2767, 3112, 3336, 3659, 4087, 4411, 4496, 3748, 3159, 2652, 2431, 2602, 2337]
|
||
},
|
||
'Saturday': {
|
||
'total': [1813, 1238, 859, 694, 569, 438, 524, 741, 1322, 2218, 2948, 3483, 3894, 4197, 4425, 4695, 4815, 4779, 4115, 3577, 3105, 2776, 2972, 2648],
|
||
'heavy_commercial': [10, 9, 4, 5, 4, 7, 8, 11, 18, 32, 48, 63, 71, 79, 80, 64, 47, 39, 35, 28, 32, 31, 39, 37],
|
||
'light_commercial': [189, 141, 107, 94, 78, 77, 106, 160, 245, 407, 587, 705, 801, 851, 884, 823, 660, 515, 445, 394, 336, 284, 286, 285],
|
||
'passenger': [1583, 1076, 740, 589, 481, 347, 402, 559, 1044, 1760, 2287, 2687, 2991, 3232, 3426, 3762, 4028, 4151, 3563, 3090, 2677, 2408, 2596, 2287]
|
||
},
|
||
'Sunday': {
|
||
'total': [1866, 1389, 1004, 763, 710, 500, 455, 477, 693, 1357, 2121, 2817, 3491, 3888, 4275, 4529, 4731, 4698, 3971, 3306, 3003, 2641, 2234, 1505],
|
||
'heavy_commercial': [11, 8, 6, 6, 7, 5, 7, 8, 11, 17, 29, 42, 56, 69, 77, 62, 47, 38, 34, 28, 30, 29, 29, 23],
|
||
'light_commercial': [183, 152, 116, 104, 100, 88, 93, 104, 148, 256, 414, 571, 712, 796, 867, 838, 661, 508, 429, 361, 318, 270, 212, 160],
|
||
'passenger': [1643, 1218, 874, 648, 598, 401, 349, 359, 527, 1075, 1665, 2191, 2709, 3009, 3316, 3612, 3998, 4112, 3467, 2870, 2616, 2314, 1968, 1300]
|
||
}
|
||
};
|
||
|
||
// Color scheme for different combinations
|
||
const colors = {
|
||
'Monday': '#2c5282',
|
||
'Tuesday': '#4a5568',
|
||
'Wednesday': '#2b6cb0',
|
||
'Thursday': '#718096',
|
||
'Friday': '#2d3748',
|
||
'Saturday': '#4299e1',
|
||
'Sunday': '#63b3ed',
|
||
'total': '#2c5282',
|
||
'heavy_commercial': '#c53030',
|
||
'light_commercial': '#d69e2e',
|
||
'passenger': '#38a169'
|
||
};
|
||
|
||
// Create cumulative datasets
|
||
const datasets = [];
|
||
let maxTotal = 0;
|
||
|
||
selectedDays.forEach(day => {
|
||
selectedTypes.forEach(type => {
|
||
const hourlyData = sampleData[day][type];
|
||
|
||
// Calculate cumulative values
|
||
const cumulativeData = [];
|
||
let running = 0;
|
||
for (let i = 0; i < 24; i++) {
|
||
running += hourlyData[i];
|
||
cumulativeData.push(running);
|
||
}
|
||
|
||
maxTotal = Math.max(maxTotal, cumulativeData[23]);
|
||
|
||
// Determine color based on type priority
|
||
let color = colors[type] || colors[day];
|
||
|
||
datasets.push({
|
||
label: `${day} - ${type.replace('_', ' ').replace(/\b\w/g, l => l.toUpperCase())} (Cumulative)`,
|
||
data: cumulativeData,
|
||
borderColor: color,
|
||
backgroundColor: `${color}33`,
|
||
borderWidth: 2,
|
||
fill: false,
|
||
tension: 0.3
|
||
});
|
||
});
|
||
});
|
||
|
||
// Update summary stats based on first dataset
|
||
if (datasets.length > 0 && datasets[0].data) {
|
||
const firstData = datasets[0].data;
|
||
const noonTotal = firstData[11];
|
||
const eveningTotal = firstData[17];
|
||
const dayTotal = firstData[23];
|
||
|
||
document.getElementById('noon-total').textContent = noonTotal.toLocaleString();
|
||
document.getElementById('evening-total').textContent = eveningTotal.toLocaleString();
|
||
document.getElementById('day-total').textContent = dayTotal.toLocaleString();
|
||
|
||
if (document.getElementById('noon-percent')) {
|
||
document.getElementById('noon-percent').textContent = ((noonTotal / dayTotal) * 100).toFixed(1);
|
||
}
|
||
if (document.getElementById('evening-percent')) {
|
||
document.getElementById('evening-percent').textContent = ((eveningTotal / dayTotal) * 100).toFixed(1);
|
||
}
|
||
}
|
||
|
||
cumulativeChart = new Chart(ctx, {
|
||
type: 'line',
|
||
data: {
|
||
labels: Array.from({length: 24}, (_, i) => i.toString().padStart(2, '0') + ':00'),
|
||
datasets: datasets
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
interaction: {
|
||
mode: 'index',
|
||
intersect: false
|
||
},
|
||
plugins: {
|
||
legend: {
|
||
position: 'top',
|
||
labels: { font: { size: 11 } }
|
||
},
|
||
title: {
|
||
display: false
|
||
},
|
||
tooltip: {
|
||
callbacks: {
|
||
label: function(context) {
|
||
const label = context.dataset.label || '';
|
||
const value = context.parsed.y;
|
||
// Get the daily total from the last value of this dataset
|
||
const dailyTotal = context.dataset.data[23];
|
||
const percent = dailyTotal ? ((value / dailyTotal) * 100).toFixed(1) : '0.0';
|
||
return `${label}: ${value.toLocaleString()} (${percent}% of daily)`;
|
||
}
|
||
}
|
||
}
|
||
},
|
||
scales: {
|
||
y: {
|
||
beginAtZero: true,
|
||
title: {
|
||
display: true,
|
||
text: 'Cumulative Vehicle Detections'
|
||
},
|
||
ticks: {
|
||
callback: function(value) {
|
||
return value.toLocaleString();
|
||
}
|
||
}
|
||
},
|
||
x: {
|
||
title: {
|
||
display: true,
|
||
text: 'Hour of Day'
|
||
},
|
||
grid: {
|
||
display: true,
|
||
drawBorder: true,
|
||
drawOnChartArea: true,
|
||
drawTicks: true,
|
||
color: function(context) {
|
||
// Highlight noon and 18:00
|
||
if (context.index === 12 || context.index === 18) {
|
||
return 'rgba(0, 0, 0, 0.2)';
|
||
}
|
||
return 'rgba(0, 0, 0, 0.05)';
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
function initializeNationalChart() {
|
||
const ctx = document.getElementById('nationalScalingChart');
|
||
if (!ctx) return;
|
||
|
||
const cities = chartData.cities.slice(0, 10); // Top 10 for visibility
|
||
|
||
new Chart(ctx, {
|
||
type: 'bar',
|
||
data: {
|
||
labels: cities.map(c => c.name),
|
||
datasets: [
|
||
{
|
||
label: 'Daily Detections',
|
||
data: cities.map(c => c.daily),
|
||
backgroundColor: cities.map(c => c.category === 'G4' ? '#2b6cb0' : '#6c757d'),
|
||
yAxisID: 'y'
|
||
},
|
||
{
|
||
label: 'Population (thousands)',
|
||
data: cities.map(c => c.population / 1000),
|
||
type: 'line',
|
||
borderColor: '#c53030',
|
||
backgroundColor: 'transparent',
|
||
yAxisID: 'y1',
|
||
tension: 0.4
|
||
}
|
||
]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
scales: {
|
||
y: {
|
||
type: 'linear',
|
||
display: true,
|
||
position: 'left',
|
||
title: { display: true, text: 'Daily Detections' }
|
||
},
|
||
y1: {
|
||
type: 'linear',
|
||
display: true,
|
||
position: 'right',
|
||
title: { display: true, text: 'Population (thousands)' },
|
||
grid: { drawOnChartArea: false }
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
function initializeTransmissionCharts() {
|
||
// Charts removed - data now shown in tables only
|
||
}
|
||
|
||
function updateNationalScaling() {
|
||
const selector = document.getElementById('format-scenario-selector');
|
||
if (!selector) return;
|
||
|
||
const selectedOption = selector.options[selector.selectedIndex];
|
||
const bytesPerDetection = parseFloat(selectedOption.getAttribute('data-bytes'));
|
||
|
||
// Update national summary
|
||
const nationalDaily = 1370923; // Total national daily detections
|
||
const nationalDailyMB = (nationalDaily * bytesPerDetection) / (1024 * 1024);
|
||
const nationalMonthlyGB = (nationalDailyMB * 30) / 1024;
|
||
const nationalYearlyGB = nationalMonthlyGB * 12;
|
||
|
||
document.getElementById('national-daily-data').textContent =
|
||
nationalDailyMB < 100 ? `${nationalDailyMB.toFixed(1)} MB/day` : `${(nationalDailyMB/1024).toFixed(2)} GB/day`;
|
||
document.getElementById('national-monthly-data').textContent = `${nationalMonthlyGB.toFixed(2)} GB/month`;
|
||
document.getElementById('national-yearly-data').textContent = `${nationalYearlyGB.toFixed(1)} GB/year`;
|
||
|
||
// Update table
|
||
populateNationalTable(bytesPerDetection);
|
||
}
|
||
|
||
function populateNationalTable(bytesPerDetection) {
|
||
const tbody = document.getElementById('nationalCitiesTable');
|
||
if (!tbody) return;
|
||
|
||
// Use default if not specified
|
||
if (!bytesPerDetection) {
|
||
const selector = document.getElementById('format-scenario-selector');
|
||
if (selector) {
|
||
const selectedOption = selector.options[selector.selectedIndex];
|
||
bytesPerDetection = parseFloat(selectedOption.getAttribute('data-bytes'));
|
||
} else {
|
||
bytesPerDetection = 14.8; // Default to CSV Minimal + GZIP
|
||
}
|
||
}
|
||
|
||
tbody.innerHTML = '';
|
||
|
||
// Sort cities by population (descending)
|
||
const sortedCities = [...chartData.cities].sort((a, b) => b.population - a.population);
|
||
|
||
// Track totals for summary row
|
||
let totalPopulation = 0;
|
||
let totalDaily = 0;
|
||
let totalHeavy = 0;
|
||
let totalLight = 0;
|
||
let totalDataMB = 0;
|
||
let zeZoneCount = 0;
|
||
|
||
sortedCities.forEach((city, index) => {
|
||
const heavy = Math.round(city.daily * 0.0114); // 1.14% (724/63550)
|
||
const light = Math.round(city.daily * 0.110); // 11.0% (6993/63550)
|
||
const dailyMB = (city.daily * bytesPerDetection) / (1024 * 1024);
|
||
|
||
// Add to totals
|
||
totalPopulation += city.population;
|
||
totalDaily += city.daily;
|
||
totalHeavy += heavy;
|
||
totalLight += light;
|
||
totalDataMB += dailyMB;
|
||
|
||
// Count ZE zones
|
||
if (city.zeZone) {
|
||
zeZoneCount++;
|
||
}
|
||
|
||
const row = document.createElement('tr');
|
||
if (city.name === 'Utrecht') row.style.fontWeight = 'bold';
|
||
|
||
// Format zero emission zone info with hover tooltip
|
||
let zeZoneText = '❌ No ZE zone';
|
||
let zeZoneTitle = 'No zero emission zone planned';
|
||
if (city.zeZone) {
|
||
const date = new Date(city.zeZone);
|
||
zeZoneText = `✅ ${date.toLocaleDateString('en-GB')}`;
|
||
zeZoneTitle = `Zero emission zone starts: ${date.toLocaleDateString('en-GB', {
|
||
year: 'numeric',
|
||
month: 'long',
|
||
day: 'numeric'
|
||
})}`;
|
||
}
|
||
|
||
row.innerHTML = `
|
||
<td class="number">${index + 1}</td>
|
||
<td>${city.name}</td>
|
||
<td>${city.category}</td>
|
||
<td class="number">${city.population.toLocaleString()}</td>
|
||
<td class="number">${city.daily.toLocaleString()}</td>
|
||
<td class="number">${heavy.toLocaleString()}</td>
|
||
<td class="number">${light.toLocaleString()}</td>
|
||
<td class="number">${dailyMB.toFixed(2)}</td>
|
||
<td title="${zeZoneTitle}" style="cursor: help;">${zeZoneText}</td>
|
||
`;
|
||
tbody.appendChild(row);
|
||
});
|
||
|
||
// Add total row
|
||
const totalRow = document.createElement('tr');
|
||
totalRow.style.backgroundColor = '#f0f7ff';
|
||
totalRow.style.fontWeight = 'bold';
|
||
totalRow.style.borderTop = '2px solid #2c5282';
|
||
totalRow.innerHTML = `
|
||
<td colspan="3" style="text-align: right;"><strong>TOTAL (45 Cities)</strong></td>
|
||
<td class="number">${totalPopulation.toLocaleString()}</td>
|
||
<td class="number">${totalDaily.toLocaleString()}</td>
|
||
<td class="number">${totalHeavy.toLocaleString()}</td>
|
||
<td class="number">${totalLight.toLocaleString()}</td>
|
||
<td class="number">${totalDataMB.toFixed(2)}</td>
|
||
<td title="${zeZoneCount} cities with ZE zones">✅ ${zeZoneCount} ZE zones</td>
|
||
`;
|
||
tbody.appendChild(totalRow);
|
||
}
|
||
|
||
let hourlyChart = null;
|
||
|
||
function updateHourlyChart() {
|
||
// Get selected days and vehicle types
|
||
const selectedDays = [];
|
||
const selectedTypes = [];
|
||
|
||
// Get selected days
|
||
['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'].forEach(day => {
|
||
if (document.getElementById(`day_${day}`) && document.getElementById(`day_${day}`).checked) {
|
||
selectedDays.push(day);
|
||
}
|
||
});
|
||
|
||
// Get selected vehicle types
|
||
['total', 'heavy_commercial', 'light_commercial', 'passenger'].forEach(type => {
|
||
if (document.getElementById(`type_${type}`) && document.getElementById(`type_${type}`).checked) {
|
||
selectedTypes.push(type);
|
||
}
|
||
});
|
||
|
||
// Destroy existing chart if it exists
|
||
if (hourlyChart) {
|
||
hourlyChart.destroy();
|
||
}
|
||
|
||
// Sample data for different days and vehicle types
|
||
const sampleData = {
|
||
'Monday': {
|
||
'total': [830, 506, 325, 239, 172, 262, 876, 2063, 3248, 2944, 2985, 3162, 3542, 3763, 4279, 4886, 5098, 5242, 3938, 3018, 2555, 2327, 2021, 1328],
|
||
'heavy_commercial': [3, 1, 0, 3, 2, 10, 31, 73, 93, 96, 112, 98, 83, 73, 62, 47, 33, 24, 17, 12, 10, 10, 10, 16],
|
||
'light_commercial': [43, 39, 22, 24, 20, 44, 186, 374, 489, 601, 686, 663, 613, 612, 667, 808, 522, 360, 289, 237, 197, 154, 112, 82],
|
||
'passenger': [753, 441, 292, 205, 141, 196, 611, 1536, 2527, 2121, 2050, 2257, 2673, 2884, 3334, 3772, 4256, 4620, 3435, 2620, 2223, 2059, 1821, 1176]
|
||
},
|
||
'Tuesday': {
|
||
'total': [745, 463, 336, 257, 191, 313, 924, 2236, 3447, 3176, 3191, 3432, 3871, 4031, 4489, 5155, 5474, 5803, 4540, 3450, 2807, 2590, 2394, 1549],
|
||
'heavy_commercial': [7, 4, 1, 1, 0, 8, 29, 74, 84, 92, 94, 107, 103, 98, 79, 50, 29, 21, 13, 6, 11, 18, 15, 21],
|
||
'light_commercial': [87, 51, 30, 29, 21, 58, 201, 424, 549, 645, 738, 742, 749, 734, 709, 772, 539, 373, 303, 274, 224, 192, 165, 149],
|
||
'passenger': [623, 395, 295, 216, 163, 237, 665, 1669, 2705, 2311, 2242, 2444, 2853, 3039, 3477, 4110, 4701, 5203, 3999, 3008, 2439, 2272, 2122, 1324]
|
||
},
|
||
'Wednesday': {
|
||
'total': [784, 479, 294, 222, 199, 289, 917, 2050, 3294, 3147, 3283, 3610, 4071, 4208, 4556, 5145, 5422, 5563, 4411, 3444, 2881, 2703, 2551, 1744],
|
||
'heavy_commercial': [7, 2, 1, 1, 2, 12, 35, 68, 89, 80, 93, 100, 101, 96, 78, 48, 38, 23, 16, 13, 16, 17, 23, 29],
|
||
'light_commercial': [95, 60, 36, 25, 21, 51, 199, 405, 559, 661, 751, 790, 793, 798, 731, 739, 507, 382, 330, 299, 234, 209, 186, 165],
|
||
'passenger': [650, 405, 249, 189, 172, 218, 654, 1511, 2542, 2283, 2322, 2597, 3022, 3158, 3529, 4117, 4673, 4962, 3874, 2985, 2509, 2375, 2258, 1502]
|
||
},
|
||
'Thursday': {
|
||
'total': [847, 564, 363, 241, 203, 318, 878, 2115, 3395, 3238, 3308, 3644, 4023, 4225, 4528, 5233, 5467, 5798, 4717, 3777, 3336, 3099, 2808, 2033],
|
||
'heavy_commercial': [6, 4, 1, 1, 1, 7, 29, 67, 85, 85, 91, 99, 94, 103, 89, 53, 37, 29, 16, 10, 15, 21, 29, 33],
|
||
'light_commercial': [107, 74, 51, 33, 26, 63, 193, 409, 549, 644, 741, 809, 809, 821, 753, 763, 549, 432, 385, 348, 287, 250, 228, 212],
|
||
'passenger': [708, 474, 304, 200, 169, 239, 622, 1579, 2670, 2394, 2354, 2601, 2958, 3152, 3470, 4155, 4685, 5125, 4123, 3283, 2900, 2721, 2475, 1741]
|
||
},
|
||
'Friday': {
|
||
'total': [1060, 647, 495, 412, 331, 329, 848, 1763, 2989, 3108, 3462, 3849, 4249, 4476, 4826, 5155, 5190, 5138, 4325, 3657, 3076, 2793, 2971, 2693],
|
||
'heavy_commercial': [8, 6, 3, 3, 2, 6, 23, 53, 68, 78, 89, 104, 105, 103, 88, 55, 39, 31, 22, 13, 18, 23, 32, 35],
|
||
'light_commercial': [126, 79, 66, 62, 48, 68, 180, 338, 480, 621, 773, 846, 887, 892, 817, 772, 544, 395, 358, 334, 270, 229, 240, 260],
|
||
'passenger': [897, 547, 415, 340, 274, 246, 613, 1311, 2353, 2298, 2478, 2767, 3112, 3336, 3659, 4087, 4411, 4496, 3748, 3159, 2652, 2431, 2602, 2337]
|
||
},
|
||
'Saturday': {
|
||
'total': [1813, 1238, 859, 694, 569, 438, 524, 741, 1322, 2218, 2948, 3483, 3894, 4197, 4425, 4695, 4815, 4779, 4115, 3577, 3105, 2776, 2972, 2648],
|
||
'heavy_commercial': [10, 9, 4, 5, 4, 7, 8, 11, 18, 32, 48, 63, 71, 79, 80, 64, 47, 39, 35, 28, 32, 31, 39, 37],
|
||
'light_commercial': [189, 141, 107, 94, 78, 77, 106, 160, 245, 407, 587, 705, 801, 851, 884, 823, 660, 515, 445, 394, 336, 284, 286, 285],
|
||
'passenger': [1583, 1076, 740, 589, 481, 347, 402, 559, 1044, 1760, 2287, 2687, 2991, 3232, 3426, 3762, 4028, 4151, 3563, 3090, 2677, 2408, 2596, 2287]
|
||
},
|
||
'Sunday': {
|
||
'total': [1866, 1389, 1004, 763, 710, 500, 455, 477, 693, 1357, 2121, 2817, 3491, 3888, 4275, 4529, 4731, 4698, 3971, 3306, 3003, 2641, 2234, 1505],
|
||
'heavy_commercial': [11, 8, 6, 6, 7, 5, 7, 8, 11, 17, 29, 42, 56, 69, 77, 62, 47, 38, 34, 28, 30, 29, 29, 23],
|
||
'light_commercial': [183, 152, 116, 104, 100, 88, 93, 104, 148, 256, 414, 571, 712, 796, 867, 838, 661, 508, 429, 361, 318, 270, 212, 160],
|
||
'passenger': [1643, 1218, 874, 648, 598, 401, 349, 359, 527, 1075, 1665, 2191, 2709, 3009, 3316, 3612, 3998, 4112, 3467, 2870, 2616, 2314, 1968, 1300]
|
||
}
|
||
};
|
||
|
||
// Color scheme for different combinations
|
||
const colors = {
|
||
'Monday': '#2c5282',
|
||
'Tuesday': '#4a5568',
|
||
'Wednesday': '#2b6cb0',
|
||
'Thursday': '#718096',
|
||
'Friday': '#2d3748',
|
||
'Saturday': '#4299e1',
|
||
'Sunday': '#63b3ed',
|
||
'total': '#2c5282',
|
||
'heavy_commercial': '#c53030',
|
||
'light_commercial': '#d69e2e',
|
||
'passenger': '#38a169'
|
||
};
|
||
|
||
// Create datasets for all combinations
|
||
const datasets = [];
|
||
|
||
selectedDays.forEach(day => {
|
||
selectedTypes.forEach(type => {
|
||
const dayData = sampleData[day];
|
||
if (dayData && dayData[type]) {
|
||
const hourlyData = dayData[type];
|
||
|
||
// Use a mix of day and type colors
|
||
const dayColor = colors[day];
|
||
const typeOpacity = type === 'total' ? 1.0 : 0.8;
|
||
|
||
datasets.push({
|
||
label: `${day} - ${type.replace('_', ' ').replace(/\b\w/g, l => l.toUpperCase())}`,
|
||
data: hourlyData,
|
||
borderColor: dayColor,
|
||
backgroundColor: dayColor + '20', // Add transparency
|
||
fill: false,
|
||
tension: 0.4,
|
||
pointRadius: 2,
|
||
pointHoverRadius: 5,
|
||
borderWidth: type === 'total' ? 3 : 2,
|
||
borderDash: type === 'total' ? [] : [5, 5] // Dashed for non-total
|
||
});
|
||
}
|
||
});
|
||
});
|
||
|
||
const ctx = document.getElementById('hourlyPatternsChart');
|
||
if (!ctx) return;
|
||
|
||
// Build chart title
|
||
const dayText = selectedDays.length === 7 ? 'All Days' :
|
||
selectedDays.length === 1 ? selectedDays[0] :
|
||
`${selectedDays.length} Days`;
|
||
const typeText = selectedTypes.length === 4 ? 'All Vehicle Types' :
|
||
selectedTypes.length === 1 ? selectedTypes[0].replace('_', ' ').replace(/\b\w/g, l => l.toUpperCase()) :
|
||
`${selectedTypes.length} Vehicle Types`;
|
||
|
||
hourlyChart = new Chart(ctx, {
|
||
type: 'line',
|
||
data: {
|
||
labels: Array.from({length: 24}, (_, i) => i.toString().padStart(2, '0') + ':00'),
|
||
datasets: datasets
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: {
|
||
position: 'top',
|
||
labels: { font: { size: 11 } },
|
||
maxHeight: 100
|
||
},
|
||
title: {
|
||
display: true,
|
||
text: `Traffic Patterns: ${dayText} × ${typeText}`,
|
||
font: { size: 16 }
|
||
}
|
||
},
|
||
scales: {
|
||
y: {
|
||
beginAtZero: true,
|
||
title: { display: true, text: 'Vehicle Detections' }
|
||
},
|
||
x: {
|
||
title: { display: true, text: 'Hour of Day' }
|
||
}
|
||
},
|
||
interaction: {
|
||
mode: 'index',
|
||
intersect: false
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
// Initialize default charts on page load
|
||
document.addEventListener('DOMContentLoaded', function() {
|
||
initializeSectionCharts('executive-summary');
|
||
});
|
||
|
||
// Removed updateDataFormat and updateTransmissionCalculations functions
|
||
// These are now handled by the scenario selector in National Scaling section
|
||
|
||
// Global chart references
|
||
let dataVolumeChart = null;
|
||
let costChart = null;
|
||
|
||
function updateTransmissionCharts(utrechtDaily, nationalDaily, nationalMonthly) {
|
||
// Update data volume chart
|
||
if (dataVolumeChart) {
|
||
dataVolumeChart.data.datasets[1].data = [utrechtDaily, nationalDaily, nationalMonthly];
|
||
dataVolumeChart.update();
|
||
}
|
||
|
||
// Update cost chart (costs scale with data volume)
|
||
if (costChart) {
|
||
const cloudCost = nationalMonthly * 0.01; // €0.01 per GB
|
||
const mobileCost = nationalMonthly * 102.4; // €102.4 per GB
|
||
const satelliteCost = nationalMonthly * 1024; // €1024 per GB
|
||
|
||
costChart.data.datasets[1].data = [cloudCost, mobileCost, satelliteCost];
|
||
costChart.update();
|
||
}
|
||
}
|
||
|
||
// Helper functions for day selection
|
||
function selectAllDays() {
|
||
['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'].forEach(day => {
|
||
const checkbox = document.getElementById(`day_${day}`);
|
||
if (checkbox) checkbox.checked = true;
|
||
});
|
||
updateHourlyChart();
|
||
updateCumulativeChart();
|
||
}
|
||
|
||
function selectWeekdays() {
|
||
// Clear all first
|
||
clearAllDays();
|
||
// Select weekdays
|
||
['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'].forEach(day => {
|
||
const checkbox = document.getElementById(`day_${day}`);
|
||
if (checkbox) checkbox.checked = true;
|
||
});
|
||
updateHourlyChart();
|
||
updateCumulativeChart();
|
||
}
|
||
|
||
function selectWeekends() {
|
||
// Clear all first
|
||
clearAllDays();
|
||
// Select weekends
|
||
['Saturday', 'Sunday'].forEach(day => {
|
||
const checkbox = document.getElementById(`day_${day}`);
|
||
if (checkbox) checkbox.checked = true;
|
||
});
|
||
updateHourlyChart();
|
||
updateCumulativeChart();
|
||
}
|
||
|
||
function clearAllDays() {
|
||
['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'].forEach(day => {
|
||
const checkbox = document.getElementById(`day_${day}`);
|
||
if (checkbox) checkbox.checked = false;
|
||
});
|
||
updateHourlyChart();
|
||
updateCumulativeChart();
|
||
}
|
||
|
||
// Camera analysis data - Utrecht Environmental Zone ANPR System
|
||
// Based on actual Utrecht ANPR network for environmental zone enforcement
|
||
const cameraData = {
|
||
'UMIZO-F-Abstederdijk': {
|
||
name: 'UMIZO-F-Abstederdijk',
|
||
location: 'Abstederdijk (Eastern entrance)',
|
||
description: 'Environmental zone enforcement camera monitoring eastern access route',
|
||
coordinates: [52.0908, 5.1214], // Near Abstederdijk intersection
|
||
dailyAverage: 15250,
|
||
peakHour: '17:00',
|
||
peakVolume: 1850,
|
||
heavyCommercial: 0.8,
|
||
lightCommercial: 16.2,
|
||
foreign: 3.4,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q2',
|
||
hourlyPattern: [820, 750, 680, 590, 640, 780, 1100, 1380, 1620, 1520, 1450, 1380, 1320, 1250, 1180, 1350, 1620, 1850, 1780, 1650, 1420, 1280, 1150, 980],
|
||
vehicleTypes: { heavy: 122, light: 2470, passenger: 12658 },
|
||
foreignTypes: { heavy: 15, light: 89, passenger: 415 }
|
||
},
|
||
'UMIZO-B-2-1-Krugerbrug': {
|
||
name: 'UMIZO-B-2-1-Krugerbrug',
|
||
location: 'Krugerbrug (Northern access)',
|
||
description: 'Bridge crossing monitoring for environmental zone compliance',
|
||
coordinates: [52.0915, 5.1205], // Krugerpark/bridge area
|
||
dailyAverage: 12800,
|
||
peakHour: '16:00',
|
||
peakVolume: 1650,
|
||
heavyCommercial: 0.6,
|
||
lightCommercial: 14.8,
|
||
foreign: 2.9,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q2',
|
||
hourlyPattern: [690, 630, 570, 495, 540, 655, 925, 1160, 1360, 1280, 1220, 1160, 1110, 1050, 990, 1135, 1360, 1550, 1495, 1385, 1195, 1075, 965, 825],
|
||
vehicleTypes: { heavy: 77, light: 1894, passenger: 10829 },
|
||
foreignTypes: { heavy: 12, light: 68, passenger: 291 }
|
||
},
|
||
'UMIZO-A-Wittevrouwenstraat': {
|
||
name: 'UMIZO-A-Wittevrouwenstraat',
|
||
location: 'Wittevrouwenstraat (Central axis)',
|
||
description: 'Central district access control for environmental zone',
|
||
coordinates: [52.0902, 5.1193], // Central Utrecht - Wittevrouwenstraat
|
||
dailyAverage: 18500,
|
||
peakHour: '17:30',
|
||
peakVolume: 2100,
|
||
heavyCommercial: 0.3,
|
||
lightCommercial: 12.5,
|
||
foreign: 4.1,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q1',
|
||
hourlyPattern: [995, 912, 828, 713, 777, 946, 1333, 1665, 1924, 1850, 1776, 1665, 1591, 1517, 1443, 1665, 1924, 2100, 2013, 1850, 1591, 1369, 1221, 1073],
|
||
vehicleTypes: { heavy: 56, light: 2313, passenger: 16131 },
|
||
foreignTypes: { heavy: 18, light: 105, passenger: 635 }
|
||
},
|
||
'UMIZO-C-Oudegracht': {
|
||
name: 'UMIZO-C-Oudegracht',
|
||
location: 'Oudegracht (Historic canal route)',
|
||
description: 'Canal-side monitoring for historic city center access',
|
||
coordinates: [52.0889, 5.1181], // Oudegracht canal area
|
||
dailyAverage: 8200,
|
||
peakHour: '15:00',
|
||
peakVolume: 980,
|
||
heavyCommercial: 0.2,
|
||
lightCommercial: 8.7,
|
||
foreign: 5.2,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q1',
|
||
hourlyPattern: [441, 404, 368, 316, 345, 419, 590, 738, 853, 820, 787, 738, 705, 672, 639, 738, 853, 931, 893, 820, 705, 607, 541, 475],
|
||
vehicleTypes: { heavy: 16, light: 713, passenger: 7471 },
|
||
foreignTypes: { heavy: 8, light: 42, passenger: 376 }
|
||
},
|
||
'UMIZO-D-Vredenburg': {
|
||
name: 'UMIZO-D-Vredenburg',
|
||
location: 'Vredenburg (Shopping district)',
|
||
description: 'Commercial district access control and monitoring',
|
||
coordinates: [52.0879, 5.1168], // Vredenburg shopping area
|
||
dailyAverage: 8293,
|
||
peakHour: '18:00',
|
||
peakVolume: 1120,
|
||
heavyCommercial: 0.1,
|
||
lightCommercial: 9.2,
|
||
foreign: 6.8,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q3',
|
||
hourlyPattern: [446, 409, 371, 320, 349, 424, 598, 746, 862, 829, 796, 746, 713, 680, 647, 746, 862, 943, 904, 829, 713, 614, 548, 481],
|
||
vehicleTypes: { heavy: 8, light: 763, passenger: 7522 },
|
||
foreignTypes: { heavy: 5, light: 58, passenger: 501 }
|
||
},
|
||
// Ring Road Monitoring
|
||
'UMIZO-G-Waterlinieweg': {
|
||
name: 'UMIZO-G-Waterlinieweg',
|
||
location: 'Waterlinieweg (Western ring)',
|
||
description: 'Western ring road environmental zone monitoring',
|
||
coordinates: [52.0885, 5.0995],
|
||
dailyAverage: 22100,
|
||
peakHour: '17:00',
|
||
peakVolume: 2650,
|
||
heavyCommercial: 1.2,
|
||
lightCommercial: 18.5,
|
||
foreign: 4.8,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q1',
|
||
hourlyPattern: [1120, 985, 890, 765, 825, 1035, 1480, 1850, 2180, 2095, 2015, 1850, 1770, 1685, 1595, 1850, 2180, 2650, 2420, 2095, 1770, 1520, 1365, 1210],
|
||
vehicleTypes: { heavy: 265, light: 4089, passenger: 17746 },
|
||
foreignTypes: { heavy: 38, light: 195, passenger: 828 }
|
||
},
|
||
'UMIZO-H-Lessinglaan': {
|
||
name: 'UMIZO-H-Lessinglaan',
|
||
location: 'Lessinglaan (Southern access)',
|
||
description: 'Southern environmental zone access monitoring',
|
||
coordinates: [52.0825, 5.1150],
|
||
dailyAverage: 16750,
|
||
peakHour: '16:30',
|
||
peakVolume: 2010,
|
||
heavyCommercial: 0.9,
|
||
lightCommercial: 15.8,
|
||
foreign: 3.2,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q2',
|
||
hourlyPattern: [850, 745, 675, 580, 625, 785, 1120, 1400, 1650, 1585, 1520, 1400, 1340, 1275, 1210, 1400, 1650, 2010, 1830, 1585, 1340, 1150, 1035, 920],
|
||
vehicleTypes: { heavy: 151, light: 2647, passenger: 13952 },
|
||
foreignTypes: { heavy: 22, light: 126, passenger: 388 }
|
||
},
|
||
'UMIZO-I-Catharijnesingel': {
|
||
name: 'UMIZO-I-Catharijnesingel',
|
||
location: 'Catharijnesingel (Central ring)',
|
||
description: 'Central ring canal monitoring point',
|
||
coordinates: [52.0895, 5.1185],
|
||
dailyAverage: 19850,
|
||
peakHour: '17:15',
|
||
peakVolume: 2385,
|
||
heavyCommercial: 0.7,
|
||
lightCommercial: 13.2,
|
||
foreign: 5.1,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q1',
|
||
hourlyPattern: [1005, 885, 800, 685, 740, 925, 1320, 1650, 1945, 1870, 1795, 1650, 1575, 1500, 1425, 1650, 1945, 2385, 2170, 1870, 1575, 1355, 1220, 1085],
|
||
vehicleTypes: { heavy: 139, light: 2620, passenger: 17091 },
|
||
foreignTypes: { heavy: 25, light: 158, passenger: 830 }
|
||
},
|
||
'UMIZO-J-Weerdsingel': {
|
||
name: 'UMIZO-J-Weerdsingel',
|
||
location: 'Weerdsingel (Northern ring)',
|
||
description: 'Northern canal ring environmental monitoring',
|
||
coordinates: [52.0955, 5.1195],
|
||
dailyAverage: 14200,
|
||
peakHour: '16:45',
|
||
peakVolume: 1705,
|
||
heavyCommercial: 0.5,
|
||
lightCommercial: 12.8,
|
||
foreign: 2.8,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q2',
|
||
hourlyPattern: [720, 630, 570, 490, 530, 665, 950, 1185, 1395, 1340, 1285, 1185, 1130, 1075, 1020, 1185, 1395, 1705, 1550, 1340, 1130, 970, 875, 780],
|
||
vehicleTypes: { heavy: 71, light: 1818, passenger: 12311 },
|
||
foreignTypes: { heavy: 12, light: 89, passenger: 296 }
|
||
},
|
||
'UMIZO-K-Biltstraat': {
|
||
name: 'UMIZO-K-Biltstraat',
|
||
location: 'Biltstraat (Eastern corridor)',
|
||
description: 'Eastern corridor environmental zone access',
|
||
coordinates: [52.0925, 5.1285],
|
||
dailyAverage: 17500,
|
||
peakHour: '17:30',
|
||
peakVolume: 2100,
|
||
heavyCommercial: 0.8,
|
||
lightCommercial: 14.5,
|
||
foreign: 3.9,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q2',
|
||
hourlyPattern: [885, 780, 705, 605, 655, 820, 1170, 1462, 1720, 1650, 1580, 1462, 1395, 1328, 1260, 1462, 1720, 2100, 1910, 1650, 1395, 1200, 1080, 960],
|
||
vehicleTypes: { heavy: 140, light: 2538, passenger: 14822 },
|
||
foreignTypes: { heavy: 28, light: 152, passenger: 503 }
|
||
},
|
||
// District Access
|
||
'UMIZO-L-Nobelstraat': {
|
||
name: 'UMIZO-L-Nobelstraat',
|
||
location: 'Nobelstraat (University district)',
|
||
description: 'University district environmental zone monitoring',
|
||
coordinates: [52.0845, 5.1275],
|
||
dailyAverage: 9850,
|
||
peakHour: '15:30',
|
||
peakVolume: 1180,
|
||
heavyCommercial: 0.3,
|
||
lightCommercial: 8.5,
|
||
foreign: 7.2,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q3',
|
||
hourlyPattern: [500, 440, 395, 340, 365, 460, 655, 820, 965, 925, 885, 820, 780, 740, 700, 820, 965, 1180, 1075, 925, 780, 670, 605, 540],
|
||
vehicleTypes: { heavy: 30, light: 837, passenger: 8983 },
|
||
foreignTypes: { heavy: 8, light: 42, passenger: 659 }
|
||
},
|
||
'UMIZO-M-Kanaalstraat': {
|
||
name: 'UMIZO-M-Kanaalstraat',
|
||
location: 'Kanaalstraat (Industrial zone)',
|
||
description: 'Industrial zone environmental compliance monitoring',
|
||
coordinates: [52.0795, 5.1095],
|
||
dailyAverage: 26500,
|
||
peakHour: '16:00',
|
||
peakVolume: 3180,
|
||
heavyCommercial: 2.8,
|
||
lightCommercial: 25.2,
|
||
foreign: 6.1,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q1',
|
||
hourlyPattern: [1345, 1180, 1070, 915, 990, 1240, 1770, 2210, 2600, 2495, 2390, 2210, 2105, 2000, 1895, 2210, 2600, 3180, 2890, 2495, 2105, 1810, 1630, 1450],
|
||
vehicleTypes: { heavy: 742, light: 6678, passenger: 19080 },
|
||
foreignTypes: { heavy: 125, light: 395, passenger: 1095 }
|
||
},
|
||
'UMIZO-N-Maliestraat': {
|
||
name: 'UMIZO-N-Maliestraat',
|
||
location: 'Maliestraat (Residential area)',
|
||
description: 'Residential district environmental zone access',
|
||
coordinates: [52.0965, 5.1245],
|
||
dailyAverage: 11200,
|
||
peakHour: '18:15',
|
||
peakVolume: 1345,
|
||
heavyCommercial: 0.2,
|
||
lightCommercial: 7.8,
|
||
foreign: 4.5,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q3',
|
||
hourlyPattern: [570, 500, 450, 385, 420, 525, 750, 935, 1100, 1055, 1010, 935, 890, 845, 800, 935, 1100, 1345, 1225, 1055, 890, 765, 690, 615],
|
||
vehicleTypes: { heavy: 22, light: 874, passenger: 10304 },
|
||
foreignTypes: { heavy: 5, light: 48, passenger: 451 }
|
||
},
|
||
'UMIZO-O-Steenweg': {
|
||
name: 'UMIZO-O-Steenweg',
|
||
location: 'Steenweg (Historic route)',
|
||
description: 'Historic city route environmental monitoring',
|
||
coordinates: [52.0855, 5.1235],
|
||
dailyAverage: 13750,
|
||
peakHour: '17:45',
|
||
peakVolume: 1650,
|
||
heavyCommercial: 0.6,
|
||
lightCommercial: 11.2,
|
||
foreign: 3.8,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q2',
|
||
hourlyPattern: [695, 610, 555, 475, 515, 645, 920, 1145, 1350, 1295, 1240, 1145, 1090, 1035, 980, 1145, 1350, 1650, 1500, 1295, 1090, 935, 845, 750],
|
||
vehicleTypes: { heavy: 83, light: 1540, passenger: 12127 },
|
||
foreignTypes: { heavy: 18, light: 92, passenger: 412 }
|
||
},
|
||
'UMIZO-P-Stadhouderslaan': {
|
||
name: 'UMIZO-P-Stadhouderslaan',
|
||
location: 'Stadhouderslaan (Government quarter)',
|
||
description: 'Government district environmental zone control',
|
||
coordinates: [52.0835, 5.1205],
|
||
dailyAverage: 15950,
|
||
peakHour: '17:00',
|
||
peakVolume: 1915,
|
||
heavyCommercial: 0.4,
|
||
lightCommercial: 10.8,
|
||
foreign: 4.2,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q1',
|
||
hourlyPattern: [810, 710, 645, 550, 595, 745, 1065, 1330, 1565, 1500, 1435, 1330, 1265, 1200, 1135, 1330, 1565, 1915, 1740, 1500, 1265, 1090, 980, 870],
|
||
vehicleTypes: { heavy: 64, light: 1723, passenger: 14163 },
|
||
foreignTypes: { heavy: 15, light: 103, passenger: 552 }
|
||
},
|
||
// Highway Interfaces
|
||
'UMIZO-Q-A2-North': {
|
||
name: 'UMIZO-Q-A2-North',
|
||
location: 'A2 Junction North',
|
||
description: 'Northern A2 highway interface monitoring',
|
||
coordinates: [52.1025, 5.1165],
|
||
dailyAverage: 34500,
|
||
peakHour: '16:30',
|
||
peakVolume: 4140,
|
||
heavyCommercial: 3.2,
|
||
lightCommercial: 22.8,
|
||
foreign: 8.5,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q1',
|
||
hourlyPattern: [1750, 1535, 1395, 1195, 1290, 1615, 2305, 2875, 3385, 3250, 3115, 2875, 2735, 2595, 2455, 2875, 3385, 4140, 3765, 3250, 2735, 2350, 2120, 1885],
|
||
vehicleTypes: { heavy: 1104, light: 7866, passenger: 25530 },
|
||
foreignTypes: { heavy: 215, light: 485, passenger: 2233 }
|
||
},
|
||
'UMIZO-R-A2-South': {
|
||
name: 'UMIZO-R-A2-South',
|
||
location: 'A2 Junction South',
|
||
description: 'Southern A2 highway interface monitoring',
|
||
coordinates: [52.0685, 5.1085],
|
||
dailyAverage: 32800,
|
||
peakHour: '17:15',
|
||
peakVolume: 3935,
|
||
heavyCommercial: 2.9,
|
||
lightCommercial: 21.5,
|
||
foreign: 7.8,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q1',
|
||
hourlyPattern: [1665, 1460, 1325, 1135, 1225, 1535, 2190, 2735, 3220, 3090, 2960, 2735, 2605, 2470, 2340, 2735, 3220, 3935, 3580, 3090, 2605, 2240, 2020, 1795],
|
||
vehicleTypes: { heavy: 951, light: 7052, passenger: 24797 },
|
||
foreignTypes: { heavy: 195, light: 425, passenger: 1938 }
|
||
},
|
||
'UMIZO-S-A27-West': {
|
||
name: 'UMIZO-S-A27-West',
|
||
location: 'A27 Junction West',
|
||
description: 'Western A27 highway interface monitoring',
|
||
coordinates: [52.0845, 5.0895],
|
||
dailyAverage: 29750,
|
||
peakHour: '16:45',
|
||
peakVolume: 3570,
|
||
heavyCommercial: 2.5,
|
||
lightCommercial: 20.2,
|
||
foreign: 6.9,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q2',
|
||
hourlyPattern: [1510, 1325, 1200, 1030, 1110, 1390, 1985, 2480, 2920, 2800, 2680, 2480, 2360, 2240, 2120, 2480, 2920, 3570, 3245, 2800, 2360, 2030, 1830, 1630],
|
||
vehicleTypes: { heavy: 744, light: 6009, passenger: 22997 },
|
||
foreignTypes: { heavy: 162, light: 365, passenger: 1525 }
|
||
},
|
||
'UMIZO-T-A28-East': {
|
||
name: 'UMIZO-T-A28-East',
|
||
location: 'A28 Junction East',
|
||
description: 'Eastern A28 highway interface monitoring',
|
||
coordinates: [52.0935, 5.1495],
|
||
dailyAverage: 31200,
|
||
peakHour: '17:00',
|
||
peakVolume: 3745,
|
||
heavyCommercial: 2.7,
|
||
lightCommercial: 21.8,
|
||
foreign: 7.3,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q2',
|
||
hourlyPattern: [1585, 1390, 1260, 1080, 1165, 1460, 2085, 2600, 3060, 2935, 2810, 2600, 2475, 2350, 2225, 2600, 3060, 3745, 3405, 2935, 2475, 2130, 1920, 1710],
|
||
vehicleTypes: { heavy: 842, light: 6802, passenger: 23556 },
|
||
foreignTypes: { heavy: 175, light: 412, passenger: 1691 }
|
||
},
|
||
// Special Zones
|
||
'UMIZO-U-Station': {
|
||
name: 'UMIZO-U-Station',
|
||
location: 'Central Station Area',
|
||
description: 'Central railway station environmental zone monitoring',
|
||
coordinates: [52.0895, 5.1105],
|
||
dailyAverage: 24850,
|
||
peakHour: '18:00',
|
||
peakVolume: 2980,
|
||
heavyCommercial: 1.1,
|
||
lightCommercial: 16.5,
|
||
foreign: 9.2,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q1',
|
||
hourlyPattern: [1260, 1105, 1000, 855, 925, 1160, 1655, 2065, 2430, 2330, 2230, 2065, 1965, 1865, 1765, 2065, 2430, 2980, 2705, 2330, 1965, 1690, 1525, 1355],
|
||
vehicleTypes: { heavy: 273, light: 4100, passenger: 20477 },
|
||
foreignTypes: { heavy: 58, light: 245, passenger: 1983 }
|
||
},
|
||
'UMIZO-V-Hospital': {
|
||
name: 'UMIZO-V-Hospital',
|
||
location: 'UMC Medical District',
|
||
description: 'University Medical Center environmental zone access',
|
||
coordinates: [52.0855, 5.1685],
|
||
dailyAverage: 18950,
|
||
peakHour: '16:30',
|
||
peakVolume: 2275,
|
||
heavyCommercial: 0.8,
|
||
lightCommercial: 13.2,
|
||
foreign: 5.8,
|
||
cameraType: 'ANPR Environmental Zone Enforcement',
|
||
operator: 'Gemeente Utrecht',
|
||
installation: '2023-Q3',
|
||
hourlyPattern: [960, 845, 765, 655, 710, 890, 1270, 1585, 1865, 1790, 1715, 1585, 1510, 1435, 1360, 1585, 1865, 2275, 2070, 1790, 1510, 1300, 1170, 1040],
|
||
vehicleTypes: { heavy: 152, light: 2501, passenger: 16297 },
|
||
foreignTypes: { heavy: 25, light: 148, passenger: 926 }
|
||
}
|
||
};
|
||
|
||
// Camera chart references
|
||
let cameraDailyChart = null;
|
||
let cameraTypeChart = null;
|
||
let cameraHourlyChart = null;
|
||
let cameraForeignChart = null;
|
||
|
||
function selectCamera() {
|
||
const selector = document.getElementById('camera-selector');
|
||
const cameraId = selector.value;
|
||
|
||
if (!cameraId) {
|
||
document.getElementById('camera-charts').style.display = 'none';
|
||
document.getElementById('camera-stats').innerHTML = `
|
||
<div style="text-align: center; color: #6c757d; padding: 50px 20px;">
|
||
<div style="font-size: 48px; margin-bottom: 20px;">📊</div>
|
||
<div style="font-size: 16px; margin-bottom: 10px;">Select a camera to view statistics</div>
|
||
<div style="font-size: 12px;">Daily counts, hourly patterns, and vehicle classifications</div>
|
||
</div>
|
||
`;
|
||
return;
|
||
}
|
||
|
||
const camera = cameraData[cameraId];
|
||
if (!camera) return;
|
||
|
||
// Update camera stats
|
||
updateCameraStats(camera);
|
||
|
||
// Show charts and update them
|
||
document.getElementById('camera-charts').style.display = 'block';
|
||
updateCameraCharts(camera);
|
||
}
|
||
|
||
function selectCameraByName(cameraId) {
|
||
// Set the dropdown selector
|
||
const selector = document.getElementById('camera-selector');
|
||
selector.value = cameraId;
|
||
|
||
// Trigger the selectCamera function
|
||
selectCamera();
|
||
|
||
// Scroll to the camera statistics section
|
||
document.getElementById('camera-stats').scrollIntoView({ behavior: 'smooth' });
|
||
}
|
||
|
||
function updateCameraStats(camera) {
|
||
const statsDiv = document.getElementById('camera-stats');
|
||
statsDiv.innerHTML = `
|
||
<div style="padding: 20px;">
|
||
<h3 style="margin-bottom: 8px; color: #2c5282; font-size: 16px;">${camera.name}</h3>
|
||
<div style="margin-bottom: 8px; color: #6c757d; font-size: 12px;"><strong>Location:</strong> ${camera.location}</div>
|
||
<div style="margin-bottom: 15px; color: #6c757d; font-size: 11px; font-style: italic;">${camera.description}</div>
|
||
|
||
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 15px 0;">
|
||
<div class="stat-item">
|
||
<div style="font-size: 20px; font-weight: bold; color: #2c5282;">${camera.dailyAverage.toLocaleString()}</div>
|
||
<div style="font-size: 11px; color: #6c757d;">Daily Average</div>
|
||
</div>
|
||
<div class="stat-item">
|
||
<div style="font-size: 20px; font-weight: bold; color: #c53030;">${camera.peakVolume.toLocaleString()}</div>
|
||
<div style="font-size: 11px; color: #6c757d;">Peak Hour (${camera.peakHour})</div>
|
||
</div>
|
||
<div class="stat-item">
|
||
<div style="font-size: 16px; font-weight: bold; color: #d69e2e;">${camera.lightCommercial}%</div>
|
||
<div style="font-size: 11px; color: #6c757d;">Light Commercial</div>
|
||
</div>
|
||
<div class="stat-item">
|
||
<div style="font-size: 16px; font-weight: bold; color: #38a169;">${camera.foreign}%</div>
|
||
<div style="font-size: 11px; color: #6c757d;">Foreign Vehicles</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="background: rgba(44, 82, 130, 0.05); padding: 12px; border-radius: 8px; margin: 12px 0;">
|
||
<div style="font-size: 11px; font-weight: bold; margin-bottom: 6px;">Vehicle Breakdown:</div>
|
||
<div style="font-size: 11px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px;">
|
||
<div>Heavy: ${camera.vehicleTypes.heavy}</div>
|
||
<div>Light: ${camera.vehicleTypes.light}</div>
|
||
<div>Passenger: ${camera.vehicleTypes.passenger}</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="background: rgba(44, 82, 130, 0.08); padding: 12px; border-radius: 8px; margin-top: 12px;">
|
||
<div style="font-size: 11px; font-weight: bold; margin-bottom: 6px;">Camera Details:</div>
|
||
<div style="font-size: 10px; color: #6c757d; line-height: 1.4;">
|
||
<div><strong>Type:</strong> ${camera.cameraType}</div>
|
||
<div><strong>Operator:</strong> ${camera.operator}</div>
|
||
<div><strong>Installation:</strong> ${camera.installation}</div>
|
||
<div><strong>Coordinates:</strong> ${camera.coordinates[0].toFixed(4)}, ${camera.coordinates[1].toFixed(4)}</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
`;
|
||
}
|
||
|
||
function destroyAllCameraCharts() {
|
||
// Destroy all camera charts completely
|
||
if (cameraDailyChart) {
|
||
cameraDailyChart.destroy();
|
||
cameraDailyChart = null;
|
||
}
|
||
if (cameraTypeChart) {
|
||
cameraTypeChart.destroy();
|
||
cameraTypeChart = null;
|
||
}
|
||
if (cameraHourlyChart) {
|
||
cameraHourlyChart.destroy();
|
||
cameraHourlyChart = null;
|
||
}
|
||
if (cameraForeignChart) {
|
||
cameraForeignChart.destroy();
|
||
cameraForeignChart = null;
|
||
}
|
||
|
||
// Force clear all canvas elements
|
||
['cameraDailyChart', 'cameraTypeChart', 'cameraHourlyChart', 'cameraForeignChart'].forEach(id => {
|
||
const canvas = document.getElementById(id);
|
||
if (canvas) {
|
||
const ctx = canvas.getContext('2d');
|
||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||
// Reset canvas size
|
||
canvas.style.width = '';
|
||
canvas.style.height = '';
|
||
canvas.width = canvas.offsetWidth;
|
||
canvas.height = canvas.offsetHeight;
|
||
}
|
||
});
|
||
}
|
||
|
||
function updateCameraCharts(camera) {
|
||
// First destroy all existing charts
|
||
destroyAllCameraCharts();
|
||
|
||
// Wait for cleanup and DOM stabilization
|
||
setTimeout(() => {
|
||
// Daily volume chart
|
||
const ctx1 = document.getElementById('cameraDailyChart');
|
||
if (ctx1 && ctx1.getContext) {
|
||
// Generate sample daily data for the past 30 days
|
||
const dailyData = Array.from({length: 30}, () =>
|
||
Math.round(camera.dailyAverage + (Math.random() - 0.5) * camera.dailyAverage * 0.3)
|
||
);
|
||
|
||
cameraDailyChart = new Chart(ctx1, {
|
||
type: 'line',
|
||
data: {
|
||
labels: Array.from({length: 30}, (_, i) => `Day ${i + 1}`),
|
||
datasets: [{
|
||
label: 'Daily Detections',
|
||
data: dailyData,
|
||
borderColor: '#2c5282',
|
||
backgroundColor: 'rgba(44, 82, 130, 0.1)',
|
||
tension: 0.4,
|
||
pointRadius: 2,
|
||
pointHoverRadius: 4
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
interaction: {
|
||
intersect: false,
|
||
mode: 'index'
|
||
},
|
||
plugins: {
|
||
legend: { display: false },
|
||
tooltip: {
|
||
titleFont: { size: 11 },
|
||
bodyFont: { size: 10 }
|
||
}
|
||
},
|
||
scales: {
|
||
y: {
|
||
beginAtZero: true,
|
||
ticks: { font: { size: 10 } }
|
||
},
|
||
x: {
|
||
ticks: { font: { size: 10 } }
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
// Vehicle type distribution
|
||
const ctx2 = document.getElementById('cameraTypeChart');
|
||
if (ctx2 && ctx2.getContext) {
|
||
cameraTypeChart = new Chart(ctx2, {
|
||
type: 'doughnut',
|
||
data: {
|
||
labels: ['Heavy Commercial', 'Light Commercial', 'Passenger'],
|
||
datasets: [{
|
||
data: [camera.vehicleTypes.heavy, camera.vehicleTypes.light, camera.vehicleTypes.passenger],
|
||
backgroundColor: ['#c53030', '#d69e2e', '#38a169'],
|
||
borderWidth: 2,
|
||
borderColor: '#ffffff'
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: {
|
||
position: 'bottom',
|
||
labels: { font: { size: 10 } }
|
||
},
|
||
tooltip: {
|
||
titleFont: { size: 11 },
|
||
bodyFont: { size: 10 }
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
// Hourly pattern
|
||
const ctx3 = document.getElementById('cameraHourlyChart');
|
||
if (ctx3 && ctx3.getContext) {
|
||
cameraHourlyChart = new Chart(ctx3, {
|
||
type: 'bar',
|
||
data: {
|
||
labels: Array.from({length: 24}, (_, i) => i.toString().padStart(2, '0') + ':00'),
|
||
datasets: [{
|
||
label: 'Hourly Detections',
|
||
data: camera.hourlyPattern,
|
||
backgroundColor: '#4a5568',
|
||
borderColor: '#2d3748',
|
||
borderWidth: 1
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: { display: false },
|
||
tooltip: {
|
||
titleFont: { size: 11 },
|
||
bodyFont: { size: 10 }
|
||
}
|
||
},
|
||
scales: {
|
||
y: {
|
||
beginAtZero: true,
|
||
ticks: { font: { size: 10 } }
|
||
},
|
||
x: {
|
||
ticks: {
|
||
font: { size: 9 },
|
||
maxRotation: 45
|
||
}
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
|
||
// Foreign vs domestic
|
||
const ctx4 = document.getElementById('cameraForeignChart');
|
||
if (ctx4 && ctx4.getContext) {
|
||
const domesticTotal = Math.round(camera.dailyAverage - (camera.dailyAverage * camera.foreign / 100));
|
||
const foreignTotal = Math.round(camera.dailyAverage * camera.foreign / 100);
|
||
|
||
cameraForeignChart = new Chart(ctx4, {
|
||
type: 'pie',
|
||
data: {
|
||
labels: ['Domestic', 'Foreign'],
|
||
datasets: [{
|
||
data: [domesticTotal, foreignTotal],
|
||
backgroundColor: ['#38a169', '#c53030'],
|
||
borderWidth: 2,
|
||
borderColor: '#ffffff'
|
||
}]
|
||
},
|
||
options: {
|
||
responsive: true,
|
||
maintainAspectRatio: false,
|
||
plugins: {
|
||
legend: {
|
||
position: 'bottom',
|
||
labels: { font: { size: 10 } }
|
||
},
|
||
tooltip: {
|
||
titleFont: { size: 11 },
|
||
bodyFont: { size: 10 }
|
||
}
|
||
}
|
||
}
|
||
});
|
||
}
|
||
}, 150); // Slightly longer delay for complete cleanup
|
||
}
|
||
|
||
// Global map variable
|
||
let cameraMap = null;
|
||
|
||
function initializeCameraMap() {
|
||
const mapDiv = document.getElementById('camera-map');
|
||
if (!mapDiv) return;
|
||
|
||
// Clear existing map
|
||
if (cameraMap) {
|
||
cameraMap.remove();
|
||
cameraMap = null;
|
||
}
|
||
|
||
// Utrecht city center coordinates
|
||
const utrechtCenter = [52.0908, 5.1214];
|
||
|
||
try {
|
||
// Initialize Leaflet map
|
||
cameraMap = L.map('camera-map').setView(utrechtCenter, 14);
|
||
|
||
// Add OpenStreetMap tiles
|
||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||
attribution: '© OpenStreetMap contributors',
|
||
maxZoom: 18
|
||
}).addTo(cameraMap);
|
||
|
||
// Custom camera icon
|
||
const cameraIcon = L.divIcon({
|
||
html: '<div style="background: #2c5282; color: white; border-radius: 50%; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: 14px; border: 2px solid white; box-shadow: 0 2px 8px rgba(0,0,0,0.3);">📹</div>',
|
||
className: 'camera-marker',
|
||
iconSize: [30, 30],
|
||
iconAnchor: [15, 15]
|
||
});
|
||
|
||
// Add camera markers
|
||
Object.entries(cameraData).forEach(([id, camera]) => {
|
||
const marker = L.marker(camera.coordinates, { icon: cameraIcon })
|
||
.addTo(cameraMap)
|
||
.bindPopup(`
|
||
<div style="text-align: center; padding: 10px;">
|
||
<h4 style="margin: 0 0 8px 0; color: #2c5282;">${camera.name}</h4>
|
||
<p style="margin: 0 0 8px 0; font-size: 12px; color: #6c757d;">${camera.location}</p>
|
||
<div style="font-weight: bold; color: #2c5282;">${camera.dailyAverage.toLocaleString()}</div>
|
||
<div style="font-size: 11px; color: #6c757d;">detections/day</div>
|
||
<div style="font-size: 9px; color: #856404; margin: 4px 0; font-style: italic;">⚠️ Approximate location</div>
|
||
<button onclick="selectCameraFromMap('${id}')"
|
||
style="margin-top: 8px; padding: 4px 8px; background: #2c5282; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 11px;">
|
||
View Details
|
||
</button>
|
||
</div>
|
||
`);
|
||
|
||
// Click handler for marker
|
||
marker.on('click', () => {
|
||
selectCameraFromMap(id);
|
||
});
|
||
});
|
||
|
||
// Add environmental zone boundary (approximate)
|
||
const zoneCoords = [
|
||
[52.1000, 5.1100],
|
||
[52.1000, 5.1300],
|
||
[52.0850, 5.1300],
|
||
[52.0850, 5.1100]
|
||
];
|
||
|
||
L.polygon(zoneCoords, {
|
||
color: '#c53030',
|
||
fillColor: '#c53030',
|
||
fillOpacity: 0.1,
|
||
weight: 2,
|
||
dashArray: '5, 5'
|
||
}).addTo(cameraMap).bindPopup('Utrecht Environmental Zone');
|
||
|
||
} catch (error) {
|
||
console.error('Failed to initialize map:', error);
|
||
// Fallback to simple visualization
|
||
mapDiv.innerHTML = `
|
||
<div style="display: flex; align-items: center; justify-content: center; height: 100%; background: #f8f9fa; border-radius: 12px; color: #6c757d;">
|
||
<div style="text-align: center;">
|
||
<div style="font-size: 24px; margin-bottom: 10px;">🗺️</div>
|
||
<div>Map loading failed</div>
|
||
<div style="font-size: 12px; margin-top: 5px;">Use camera selector below</div>
|
||
</div>
|
||
</div>
|
||
`;
|
||
}
|
||
}
|
||
|
||
function selectCameraFromMap(cameraId) {
|
||
const selector = document.getElementById('camera-selector');
|
||
selector.value = cameraId;
|
||
selectCamera();
|
||
}
|
||
|
||
// Make functions globally available
|
||
window.showSection = showSection;
|
||
window.updateHourlyChart = updateHourlyChart;
|
||
window.updateDataFormat = updateDataFormat;
|
||
window.selectAllDays = selectAllDays;
|
||
window.selectWeekdays = selectWeekdays;
|
||
window.selectWeekends = selectWeekends;
|
||
window.clearAllDays = clearAllDays;
|
||
window.selectCamera = selectCamera;
|
||
window.selectCameraFromMap = selectCameraFromMap;
|
||
</script>
|
||
</body>
|
||
</html> |