252 lines
6.9 KiB
HTML
252 lines
6.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Global Temperature Anomaly Heatmap - Mapbox Globe</title>
|
|
<script src='https://api.mapbox.com/mapbox-gl-js/v3.0.1/mapbox-gl.js'></script>
|
|
<link href='https://api.mapbox.com/mapbox-gl-js/v3.0.1/mapbox-gl.css' rel='stylesheet' />
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
|
background: #0a0e1a;
|
|
color: #e0e0e0;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#map {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
.info-panel {
|
|
position: absolute;
|
|
top: 20px;
|
|
left: 20px;
|
|
background: rgba(15, 23, 42, 0.95);
|
|
padding: 20px;
|
|
border-radius: 12px;
|
|
max-width: 350px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
backdrop-filter: blur(10px);
|
|
z-index: 1;
|
|
}
|
|
|
|
.info-panel h1 {
|
|
font-size: 20px;
|
|
margin-bottom: 8px;
|
|
color: #f0f0f0;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.info-panel h2 {
|
|
font-size: 14px;
|
|
margin-top: 16px;
|
|
margin-bottom: 8px;
|
|
color: #94a3b8;
|
|
font-weight: 500;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.info-panel p {
|
|
font-size: 13px;
|
|
line-height: 1.6;
|
|
color: #cbd5e1;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.legend {
|
|
position: absolute;
|
|
bottom: 40px;
|
|
left: 20px;
|
|
background: rgba(15, 23, 42, 0.95);
|
|
padding: 16px;
|
|
border-radius: 12px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
backdrop-filter: blur(10px);
|
|
z-index: 1;
|
|
}
|
|
|
|
.legend h3 {
|
|
font-size: 14px;
|
|
margin-bottom: 12px;
|
|
color: #f0f0f0;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.legend-gradient {
|
|
width: 200px;
|
|
height: 20px;
|
|
background: linear-gradient(to right,
|
|
#0066ff,
|
|
#00ccff,
|
|
#00ff88,
|
|
#ffff00,
|
|
#ff8800,
|
|
#ff0000,
|
|
#cc0000
|
|
);
|
|
border-radius: 4px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.legend-labels {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 11px;
|
|
color: #cbd5e1;
|
|
}
|
|
|
|
.controls {
|
|
position: absolute;
|
|
top: 20px;
|
|
right: 20px;
|
|
background: rgba(15, 23, 42, 0.95);
|
|
padding: 12px;
|
|
border-radius: 12px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
backdrop-filter: blur(10px);
|
|
z-index: 1;
|
|
}
|
|
|
|
.controls button {
|
|
display: block;
|
|
width: 100%;
|
|
padding: 10px 16px;
|
|
margin-bottom: 8px;
|
|
background: rgba(59, 130, 246, 0.2);
|
|
border: 1px solid rgba(59, 130, 246, 0.4);
|
|
color: #60a5fa;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.controls button:hover {
|
|
background: rgba(59, 130, 246, 0.3);
|
|
border-color: rgba(59, 130, 246, 0.6);
|
|
}
|
|
|
|
.controls button:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.controls button.active {
|
|
background: rgba(34, 197, 94, 0.2);
|
|
border-color: rgba(34, 197, 94, 0.4);
|
|
color: #4ade80;
|
|
}
|
|
|
|
.stats {
|
|
position: absolute;
|
|
bottom: 40px;
|
|
right: 20px;
|
|
background: rgba(15, 23, 42, 0.95);
|
|
padding: 16px;
|
|
border-radius: 12px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
backdrop-filter: blur(10px);
|
|
z-index: 1;
|
|
min-width: 200px;
|
|
}
|
|
|
|
.stats h3 {
|
|
font-size: 14px;
|
|
margin-bottom: 10px;
|
|
color: #f0f0f0;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.stat-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 6px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.stat-label {
|
|
color: #94a3b8;
|
|
}
|
|
|
|
.stat-value {
|
|
color: #cbd5e1;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.mapboxgl-ctrl-attrib {
|
|
background: rgba(15, 23, 42, 0.8) !important;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="map"></div>
|
|
|
|
<div class="info-panel">
|
|
<h1>Global Temperature Anomaly Heatmap</h1>
|
|
<p>Visualizing temperature deviations from historical averages (1951-1980 baseline) across 280 monitoring stations worldwide.</p>
|
|
|
|
<h2>Heatmap Technique</h2>
|
|
<p>Density-based visualization using Mapbox heatmap layers with data-driven weight, intensity, and color gradients to reveal global warming patterns.</p>
|
|
|
|
<h2>Data Period</h2>
|
|
<p>2023 Annual Temperature Anomalies</p>
|
|
</div>
|
|
|
|
<div class="legend">
|
|
<h3>Temperature Anomaly (°C)</h3>
|
|
<div class="legend-gradient"></div>
|
|
<div class="legend-labels">
|
|
<span>-2.0</span>
|
|
<span>-1.0</span>
|
|
<span>0.0</span>
|
|
<span>+1.0</span>
|
|
<span>+2.0</span>
|
|
<span>+3.0</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="controls">
|
|
<button id="toggle-rotation" class="active">Auto-Rotate: ON</button>
|
|
<button id="toggle-layer">Show Detail View</button>
|
|
<button id="reset-view">Reset View</button>
|
|
</div>
|
|
|
|
<div class="stats">
|
|
<h3>Global Statistics</h3>
|
|
<div class="stat-item">
|
|
<span class="stat-label">Stations:</span>
|
|
<span class="stat-value">280</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-label">Avg Anomaly:</span>
|
|
<span class="stat-value">+1.2°C</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-label">Max Anomaly:</span>
|
|
<span class="stat-value">+3.1°C</span>
|
|
</div>
|
|
<div class="stat-item">
|
|
<span class="stat-label">Min Anomaly:</span>
|
|
<span class="stat-value">-0.8°C</span>
|
|
</div>
|
|
</div>
|
|
|
|
<script type="module" src="src/index.js"></script>
|
|
</body>
|
|
</html>
|