34935-vm/index.php
2025-10-14 12:26:56 +00:00

128 lines
6.6 KiB
PHP

<?php require_once 'config.php'; ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Worldsphere.ai - 3D Weather Map</title>
<link href="assets/cesium/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
<link rel="stylesheet" href="assets/css/custom.css?v=<?php echo time(); ?>">
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
</head>
<body>
<div id="cesiumContainer"></div>
<div id="controls">
<div class="control-group">
<h3>Layers</h3>
<label>
<input type="checkbox" id="weatherLayerCheckbox" checked> Weather
</label>
<label>
<input type="checkbox" id="wildfireLayerCheckbox" checked> Wildfires
</label>
<label>
<input type="checkbox" id="spcLayerCheckbox" checked> SPC Outlook
</label>
<label>
<input type="checkbox" id="weatherAlertsLayerCheckbox" checked> Weather Alerts
</label>
<label>
<input type="checkbox" id="windLayerCheckbox" checked> Wind
</label>
</div>
<div class="control-group">
<h3>Display Mode</h3>
<select id="displayModeSelect">
<option value="wind">Global Wind</option>
<option value="cat">CAT Simulation</option>
</select>
</div>
<div id="wind-controls">
<div class="control-group">
<h3>Wind Altitude</h3>
<input type="range" id="windAltitudeSlider" min="0" max="15000" step="500" value="10000">
<span id="windAltitudeLabel">10000 m</span>
</div>
<div class="control-group">
<h3>Wind Animation</h3>
<button id="playPauseWind">Pause</button>
<label>
Particle Density:
<input type="range" id="particleDensitySlider" min="0.1" max="1.0" step="0.1" value="0.5">
</label>
</div>
</div>
<div id="cat-controls" style="display: none;">
<div class="control-group">
<h3>CAT Simulation</h3>
<label for="hurricane-select">Select Hurricane:</label>
<select id="hurricane-select" name="hurricane-select">
<option value="">Loading storms...</option>
</select>
<label for="portfolio-select">Sample Portfolio:</label>
<select id="portfolio-select" name="portfolio-select">
<option value="">Select a portfolio</option>
<option value="assets/portfolios/fl_coastal.csv">Florida Coastal</option>
<option value="assets/portfolios/fl_inland.csv">Florida Inland</option>
<option value="assets/portfolios/la_coastal.csv">Louisiana Coastal</option>
</select>
<label for="portfolio-upload">Custom Portfolio (CSV):</label>
<small>CSV must contain 'lat', 'lon', 'tiv', and optionally 'deductible' and 'limit' headers.</small>
<input type="file" id="portfolio-upload" accept=".csv" />
<div id="portfolio-status"></div>
<button id="runCatSimulation">Run Simulation</button>
<div id="cat-simulation-results" style="display: none;">
<h4>Simulation Results</h4>
<p>Total Loss: <span id="total-loss-value">$0</span></p>
</div>
</div>
<div class="control-group">
<h3>Probabilistic Analysis</h3>
<button id="runProbabilisticAnalysis">Run Analysis</button>
<div id="probabilistic-results" style="display: none;">
<h4>Analysis Results</h4>
<p>Average Annual Loss (AAL): <span id="aal-value">$0</span></p>
<canvas id="epCurveChart"></canvas>
</div>
<hr>
<h4>Portfolio Comparison</h4>
<label for="portfolio-upload-2">Portfolio 2 (CSV):</label>
<input type="file" id="portfolio-upload-2" accept=".csv" />
<div id="portfolio-status-2"></div>
<button id="runComparison">Compare Portfolios</button>
<div id="comparison-results" style="display: none;">
<h4>Comparison Results</h4>
<p>Portfolio 1 AAL: <span id="aal-value-1">$0</span></p>
<p>Portfolio 2 AAL: <span id="aal-value-2">$0</span></p>
</div>
</div>
<div class="control-group">
<h3>Weather Overlays</h3>
<div id="spc-controls">
<h4>SPC Outlook</h4>
<label><input type="checkbox" class="spc-checkbox" value="TSTM" checked> Thunderstorm</label>
<label><input type="checkbox" class="spc-checkbox" value="MRGL" checked> Marginal</label>
<label><input type="checkbox" class="spc-checkbox" value="SLGT" checked> Slight</label>
<label><input type="checkbox" class="spc-checkbox" value="ENH" checked> Enhanced</label>
<label><input type="checkbox" class="spc-checkbox" value="MDT" checked> Moderate</label>
<label><input type="checkbox" class="spc-checkbox" value="HIGH" checked> High</label>
</div>
<div id="alert-controls">
<h4>Weather Alerts</h4>
<label><input type="checkbox" class="alert-checkbox" value="tornado" checked> Tornado</label>
<label><input type="checkbox" class="alert-checkbox" value="thunderstorm" checked> Thunderstorm</label>
<label><input type="checkbox" class="alert-checkbox" value="flood" checked> Flood</label>
<label><input type="checkbox" class="alert-checkbox" value="wind" checked> Wind</label>
<label><input type="checkbox" class="alert-checkbox" value="snow_ice" checked> Snow/Ice</label>
<label><input type="checkbox" class="alert-checkbox" value="fog" checked> Fog</label>
<label><input type="checkbox" class="alert-checkbox" value="extreme_high_temperature" checked> Extreme Temp</label>
</div>
</div>
</div>
<script src="assets/cesium/Build/Cesium/Cesium.js"></script>
<script src="assets/js/wind.js?v=<?php echo time(); ?>"></script>
<script src="assets/js/main.js?v=<?php echo time(); ?>"></script>
</body>
</html>