Upload index.html
Browse files- index.html +896 -836
index.html
CHANGED
|
@@ -1,836 +1,896 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
<head>
|
| 4 |
-
<meta charset="UTF-8">
|
| 5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>🏙️ Urban Spatial Accessibility Predictor</title>
|
| 7 |
-
<!-- Bootstrap CSS -->
|
| 8 |
-
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
| 9 |
-
<!-- Plotly.js -->
|
| 10 |
-
<script src="https://cdn.plot.ly/plotly-2.20.0.min.js"></script>
|
| 11 |
-
<!-- Font Awesome -->
|
| 12 |
-
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
|
| 13 |
-
<style>
|
| 14 |
-
:root {
|
| 15 |
-
--primary-color: #2E86AB;
|
| 16 |
-
--secondary-color: #A23B72;
|
| 17 |
-
--success-color: #4CAF50;
|
| 18 |
-
--warning-color: #FF9800;
|
| 19 |
-
--danger-color: #F44336;
|
| 20 |
-
--info-color: #17a2b8;
|
| 21 |
-
--card-bg: rgba(255, 255, 255, 0.95);
|
| 22 |
-
}
|
| 23 |
-
|
| 24 |
-
body {
|
| 25 |
-
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 26 |
-
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 27 |
-
min-height: 100vh;
|
| 28 |
-
padding: 20px;
|
| 29 |
-
}
|
| 30 |
-
|
| 31 |
-
.main-container {
|
| 32 |
-
background: var(--card-bg);
|
| 33 |
-
border-radius: 20px;
|
| 34 |
-
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
|
| 35 |
-
overflow: hidden;
|
| 36 |
-
backdrop-filter: blur(10px);
|
| 37 |
-
}
|
| 38 |
-
|
| 39 |
-
.header-section {
|
| 40 |
-
background: linear-gradient(135deg, var(--primary-color), #1a5f7a);
|
| 41 |
-
color: white;
|
| 42 |
-
padding: 2rem;
|
| 43 |
-
border-radius: 0 0 30px 30px;
|
| 44 |
-
margin-bottom: 2rem;
|
| 45 |
-
}
|
| 46 |
-
|
| 47 |
-
.metric-card {
|
| 48 |
-
background: white;
|
| 49 |
-
border-radius: 15px;
|
| 50 |
-
padding: 1.5rem;
|
| 51 |
-
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
| 52 |
-
border-left: 5px solid var(--primary-color);
|
| 53 |
-
margin-bottom: 1rem;
|
| 54 |
-
}
|
| 55 |
-
|
| 56 |
-
.slider-container {
|
| 57 |
-
background: #f8f9fa;
|
| 58 |
-
border-radius: 10px;
|
| 59 |
-
padding: 1.5rem;
|
| 60 |
-
margin: 1rem 0;
|
| 61 |
-
}
|
| 62 |
-
|
| 63 |
-
.feature-value {
|
| 64 |
-
font-size: 1.2rem;
|
| 65 |
-
font-weight: 600;
|
| 66 |
-
color: var(--primary-color);
|
| 67 |
-
float: right;
|
| 68 |
-
}
|
| 69 |
-
|
| 70 |
-
.accessibility-score {
|
| 71 |
-
font-size: 4rem;
|
| 72 |
-
font-weight: 800;
|
| 73 |
-
text-align: center;
|
| 74 |
-
color: var(--primary-color);
|
| 75 |
-
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
|
| 76 |
-
}
|
| 77 |
-
|
| 78 |
-
.classification-badge {
|
| 79 |
-
display: inline-block;
|
| 80 |
-
padding: 0.5rem 1.5rem;
|
| 81 |
-
border-radius: 25px;
|
| 82 |
-
font-weight: 700;
|
| 83 |
-
font-size: 1.2rem;
|
| 84 |
-
margin: 0.5rem;
|
| 85 |
-
}
|
| 86 |
-
|
| 87 |
-
.excellent { background: linear-gradient(135deg, #4CAF50, #2E7D32); color: white; }
|
| 88 |
-
.good { background: linear-gradient(135deg, #8BC34A, #558B2F); color: white; }
|
| 89 |
-
.moderate { background: linear-gradient(135deg, #FF9800, #EF6C00); color: white; }
|
| 90 |
-
.poor { background: linear-gradient(135deg, #F44336, #C62828); color: white; }
|
| 91 |
-
|
| 92 |
-
.feature-slider {
|
| 93 |
-
width: 100%;
|
| 94 |
-
margin: 1rem 0;
|
| 95 |
-
}
|
| 96 |
-
|
| 97 |
-
.feature-icon {
|
| 98 |
-
font-size: 1.5rem;
|
| 99 |
-
margin-right: 10px;
|
| 100 |
-
}
|
| 101 |
-
|
| 102 |
-
.chart-container {
|
| 103 |
-
background: white;
|
| 104 |
-
border-radius: 15px;
|
| 105 |
-
padding: 1.5rem;
|
| 106 |
-
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
| 107 |
-
margin: 1rem 0;
|
| 108 |
-
}
|
| 109 |
-
|
| 110 |
-
.info-box {
|
| 111 |
-
background: #E3F2FD;
|
| 112 |
-
border-left: 4px solid #2196F3;
|
| 113 |
-
padding: 1rem;
|
| 114 |
-
border-radius: 8px;
|
| 115 |
-
margin: 1rem 0;
|
| 116 |
-
}
|
| 117 |
-
|
| 118 |
-
.remedial-box {
|
| 119 |
-
border-left: 5px solid;
|
| 120 |
-
padding: 1rem;
|
| 121 |
-
border-radius: 8px;
|
| 122 |
-
margin: 0.5rem 0;
|
| 123 |
-
background: #f8f9fa;
|
| 124 |
-
}
|
| 125 |
-
|
| 126 |
-
.remedial-excellent { border-left-color: #4CAF50; }
|
| 127 |
-
.remedial-good { border-left-color: #8BC34A; }
|
| 128 |
-
.remedial-moderate { border-left-color: #FF9800; }
|
| 129 |
-
.remedial-poor { border-left-color: #F44336; }
|
| 130 |
-
|
| 131 |
-
.city-highlight {
|
| 132 |
-
background: linear-gradient(135deg, #4a6572, #5d8aa8);
|
| 133 |
-
color: white;
|
| 134 |
-
padding: 0.5rem 1rem;
|
| 135 |
-
border-radius: 8px;
|
| 136 |
-
font-weight: 600;
|
| 137 |
-
margin-bottom: 1rem;
|
| 138 |
-
display: inline-block;
|
| 139 |
-
}
|
| 140 |
-
|
| 141 |
-
.measure-item {
|
| 142 |
-
padding: 0.5rem 0;
|
| 143 |
-
border-bottom: 1px dashed #dee2e6;
|
| 144 |
-
}
|
| 145 |
-
|
| 146 |
-
.measure-item:last-child {
|
| 147 |
-
border-bottom: none;
|
| 148 |
-
}
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
</
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
|
| 202 |
-
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
<div
|
| 211 |
-
|
| 212 |
-
|
| 213 |
-
|
| 214 |
-
|
| 215 |
-
<
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
| 221 |
-
|
| 222 |
-
|
| 223 |
-
|
| 224 |
-
|
| 225 |
-
|
| 226 |
-
|
| 227 |
-
|
| 228 |
-
</
|
| 229 |
-
|
| 230 |
-
|
| 231 |
-
|
| 232 |
-
|
| 233 |
-
|
| 234 |
-
|
| 235 |
-
<
|
| 236 |
-
|
| 237 |
-
|
| 238 |
-
|
| 239 |
-
|
| 240 |
-
|
| 241 |
-
</
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
|
| 245 |
-
|
| 246 |
-
|
| 247 |
-
<
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
<
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
<
|
| 262 |
-
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
-
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
<
|
| 281 |
-
</div>
|
| 282 |
-
</div>
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
<
|
| 300 |
-
|
| 301 |
-
<
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
<div
|
| 306 |
-
|
| 307 |
-
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
<
|
| 314 |
-
|
| 315 |
-
<
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
<div class="
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
|
| 324 |
-
<
|
| 325 |
-
|
| 326 |
-
<div
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
|
| 331 |
-
</
|
| 332 |
-
<p class="text-muted mb-3">
|
| 333 |
-
<div
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
|
| 337 |
-
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
<
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
<
|
| 348 |
-
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
<
|
| 353 |
-
|
| 354 |
-
|
| 355 |
-
|
| 356 |
-
|
| 357 |
-
|
| 358 |
-
|
| 359 |
-
|
| 360 |
-
|
| 361 |
-
|
| 362 |
-
|
| 363 |
-
|
| 364 |
-
<div
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
<div class="
|
| 379 |
-
<
|
| 380 |
-
<
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
<
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
<
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
| 397 |
-
<
|
| 398 |
-
|
| 399 |
-
|
| 400 |
-
|
| 401 |
-
|
| 402 |
-
|
| 403 |
-
|
| 404 |
-
|
| 405 |
-
|
| 406 |
-
|
| 407 |
-
|
| 408 |
-
|
| 409 |
-
|
| 410 |
-
|
| 411 |
-
|
| 412 |
-
|
| 413 |
-
|
| 414 |
-
|
| 415 |
-
|
| 416 |
-
|
| 417 |
-
|
| 418 |
-
|
| 419 |
-
|
| 420 |
-
|
| 421 |
-
|
| 422 |
-
|
| 423 |
-
|
| 424 |
-
|
| 425 |
-
|
| 426 |
-
|
| 427 |
-
|
| 428 |
-
|
| 429 |
-
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
|
| 435 |
-
|
| 436 |
-
|
| 437 |
-
|
| 438 |
-
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
|
| 456 |
-
|
| 457 |
-
|
| 458 |
-
|
| 459 |
-
|
| 460 |
-
|
| 461 |
-
|
| 462 |
-
|
| 463 |
-
|
| 464 |
-
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
|
| 478 |
-
|
| 479 |
-
|
| 480 |
-
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
| 488 |
-
|
| 489 |
-
|
| 490 |
-
|
| 491 |
-
|
| 492 |
-
|
| 493 |
-
|
| 494 |
-
|
| 495 |
-
|
| 496 |
-
|
| 497 |
-
|
| 498 |
-
|
| 499 |
-
|
| 500 |
-
|
| 501 |
-
|
| 502 |
-
|
| 503 |
-
|
| 504 |
-
|
| 505 |
-
|
| 506 |
-
|
| 507 |
-
|
| 508 |
-
|
| 509 |
-
|
| 510 |
-
|
| 511 |
-
|
| 512 |
-
|
| 513 |
-
|
| 514 |
-
|
| 515 |
-
|
| 516 |
-
|
| 517 |
-
|
| 518 |
-
|
| 519 |
-
|
| 520 |
-
|
| 521 |
-
|
| 522 |
-
|
| 523 |
-
|
| 524 |
-
|
| 525 |
-
|
| 526 |
-
|
| 527 |
-
|
| 528 |
-
|
| 529 |
-
|
| 530 |
-
|
| 531 |
-
|
| 532 |
-
|
| 533 |
-
|
| 534 |
-
|
| 535 |
-
|
| 536 |
-
|
| 537 |
-
|
| 538 |
-
|
| 539 |
-
|
| 540 |
-
|
| 541 |
-
|
| 542 |
-
|
| 543 |
-
"
|
| 544 |
-
|
| 545 |
-
|
| 546 |
-
|
| 547 |
-
|
| 548 |
-
|
| 549 |
-
|
| 550 |
-
|
| 551 |
-
|
| 552 |
-
|
| 553 |
-
|
| 554 |
-
|
| 555 |
-
|
| 556 |
-
|
| 557 |
-
|
| 558 |
-
|
| 559 |
-
|
| 560 |
-
|
| 561 |
-
|
| 562 |
-
|
| 563 |
-
|
| 564 |
-
|
| 565 |
-
|
| 566 |
-
|
| 567 |
-
|
| 568 |
-
|
| 569 |
-
|
| 570 |
-
|
| 571 |
-
|
| 572 |
-
|
| 573 |
-
|
| 574 |
-
|
| 575 |
-
|
| 576 |
-
|
| 577 |
-
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
| 586 |
-
|
| 587 |
-
|
| 588 |
-
|
| 589 |
-
|
| 590 |
-
|
| 591 |
-
|
| 592 |
-
|
| 593 |
-
}
|
| 594 |
-
|
| 595 |
-
|
| 596 |
-
|
| 597 |
-
|
| 598 |
-
|
| 599 |
-
|
| 600 |
-
|
| 601 |
-
|
| 602 |
-
|
| 603 |
-
`${
|
| 604 |
-
|
| 605 |
-
|
| 606 |
-
|
| 607 |
-
|
| 608 |
-
|
| 609 |
-
|
| 610 |
-
|
| 611 |
-
|
| 612 |
-
|
| 613 |
-
|
| 614 |
-
|
| 615 |
-
|
| 616 |
-
|
| 617 |
-
|
| 618 |
-
|
| 619 |
-
|
| 620 |
-
|
| 621 |
-
|
| 622 |
-
|
| 623 |
-
|
| 624 |
-
|
| 625 |
-
|
| 626 |
-
|
| 627 |
-
|
| 628 |
-
|
| 629 |
-
|
| 630 |
-
|
| 631 |
-
|
| 632 |
-
|
| 633 |
-
|
| 634 |
-
|
| 635 |
-
|
| 636 |
-
|
| 637 |
-
|
| 638 |
-
|
| 639 |
-
|
| 640 |
-
|
| 641 |
-
|
| 642 |
-
|
| 643 |
-
"
|
| 644 |
-
"
|
| 645 |
-
"
|
| 646 |
-
"
|
| 647 |
-
"
|
| 648 |
-
|
| 649 |
-
|
| 650 |
-
|
| 651 |
-
|
| 652 |
-
|
| 653 |
-
|
| 654 |
-
|
| 655 |
-
|
| 656 |
-
|
| 657 |
-
|
| 658 |
-
|
| 659 |
-
|
| 660 |
-
|
| 661 |
-
|
| 662 |
-
|
| 663 |
-
|
| 664 |
-
|
| 665 |
-
|
| 666 |
-
|
| 667 |
-
|
| 668 |
-
|
| 669 |
-
|
| 670 |
-
|
| 671 |
-
|
| 672 |
-
|
| 673 |
-
|
| 674 |
-
|
| 675 |
-
|
| 676 |
-
|
| 677 |
-
const
|
| 678 |
-
|
| 679 |
-
|
| 680 |
-
|
| 681 |
-
|
| 682 |
-
|
| 683 |
-
|
| 684 |
-
|
| 685 |
-
|
| 686 |
-
|
| 687 |
-
|
| 688 |
-
|
| 689 |
-
|
| 690 |
-
|
| 691 |
-
|
| 692 |
-
|
| 693 |
-
|
| 694 |
-
|
| 695 |
-
|
| 696 |
-
|
| 697 |
-
|
| 698 |
-
|
| 699 |
-
|
| 700 |
-
|
| 701 |
-
|
| 702 |
-
|
| 703 |
-
|
| 704 |
-
|
| 705 |
-
|
| 706 |
-
|
| 707 |
-
|
| 708 |
-
|
| 709 |
-
|
| 710 |
-
|
| 711 |
-
|
| 712 |
-
|
| 713 |
-
|
| 714 |
-
|
| 715 |
-
|
| 716 |
-
|
| 717 |
-
|
| 718 |
-
|
| 719 |
-
|
| 720 |
-
|
| 721 |
-
|
| 722 |
-
|
| 723 |
-
|
| 724 |
-
|
| 725 |
-
|
| 726 |
-
|
| 727 |
-
|
| 728 |
-
|
| 729 |
-
|
| 730 |
-
|
| 731 |
-
|
| 732 |
-
|
| 733 |
-
|
| 734 |
-
|
| 735 |
-
|
| 736 |
-
|
| 737 |
-
|
| 738 |
-
|
| 739 |
-
|
| 740 |
-
|
| 741 |
-
|
| 742 |
-
|
| 743 |
-
|
| 744 |
-
|
| 745 |
-
|
| 746 |
-
|
| 747 |
-
|
| 748 |
-
|
| 749 |
-
|
| 750 |
-
|
| 751 |
-
|
| 752 |
-
|
| 753 |
-
|
| 754 |
-
|
| 755 |
-
|
| 756 |
-
|
| 757 |
-
|
| 758 |
-
|
| 759 |
-
|
| 760 |
-
|
| 761 |
-
|
| 762 |
-
|
| 763 |
-
|
| 764 |
-
|
| 765 |
-
|
| 766 |
-
|
| 767 |
-
|
| 768 |
-
|
| 769 |
-
|
| 770 |
-
|
| 771 |
-
|
| 772 |
-
|
| 773 |
-
|
| 774 |
-
|
| 775 |
-
|
| 776 |
-
|
| 777 |
-
|
| 778 |
-
|
| 779 |
-
|
| 780 |
-
|
| 781 |
-
|
| 782 |
-
|
| 783 |
-
|
| 784 |
-
|
| 785 |
-
|
| 786 |
-
|
| 787 |
-
|
| 788 |
-
|
| 789 |
-
|
| 790 |
-
|
| 791 |
-
|
| 792 |
-
|
| 793 |
-
|
| 794 |
-
|
| 795 |
-
|
| 796 |
-
|
| 797 |
-
|
| 798 |
-
|
| 799 |
-
|
| 800 |
-
|
| 801 |
-
|
| 802 |
-
|
| 803 |
-
|
| 804 |
-
|
| 805 |
-
|
| 806 |
-
|
| 807 |
-
|
| 808 |
-
|
| 809 |
-
|
| 810 |
-
|
| 811 |
-
|
| 812 |
-
|
| 813 |
-
|
| 814 |
-
|
| 815 |
-
|
| 816 |
-
|
| 817 |
-
|
| 818 |
-
|
| 819 |
-
|
| 820 |
-
|
| 821 |
-
|
| 822 |
-
|
| 823 |
-
|
| 824 |
-
|
| 825 |
-
|
| 826 |
-
|
| 827 |
-
|
| 828 |
-
|
| 829 |
-
|
| 830 |
-
|
| 831 |
-
|
| 832 |
-
|
| 833 |
-
|
| 834 |
-
|
| 835 |
-
|
| 836 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>🏙️ Urban Spatial Accessibility Predictor</title>
|
| 7 |
+
<!-- Bootstrap CSS -->
|
| 8 |
+
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet">
|
| 9 |
+
<!-- Plotly.js -->
|
| 10 |
+
<script src="https://cdn.plot.ly/plotly-2.20.0.min.js"></script>
|
| 11 |
+
<!-- Font Awesome -->
|
| 12 |
+
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script>
|
| 13 |
+
<style>
|
| 14 |
+
:root {
|
| 15 |
+
--primary-color: #2E86AB;
|
| 16 |
+
--secondary-color: #A23B72;
|
| 17 |
+
--success-color: #4CAF50;
|
| 18 |
+
--warning-color: #FF9800;
|
| 19 |
+
--danger-color: #F44336;
|
| 20 |
+
--info-color: #17a2b8;
|
| 21 |
+
--card-bg: rgba(255, 255, 255, 0.95);
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
body {
|
| 25 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 26 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 27 |
+
min-height: 100vh;
|
| 28 |
+
padding: 20px;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.main-container {
|
| 32 |
+
background: var(--card-bg);
|
| 33 |
+
border-radius: 20px;
|
| 34 |
+
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
|
| 35 |
+
overflow: hidden;
|
| 36 |
+
backdrop-filter: blur(10px);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.header-section {
|
| 40 |
+
background: linear-gradient(135deg, var(--primary-color), #1a5f7a);
|
| 41 |
+
color: white;
|
| 42 |
+
padding: 2rem;
|
| 43 |
+
border-radius: 0 0 30px 30px;
|
| 44 |
+
margin-bottom: 2rem;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.metric-card {
|
| 48 |
+
background: white;
|
| 49 |
+
border-radius: 15px;
|
| 50 |
+
padding: 1.5rem;
|
| 51 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
| 52 |
+
border-left: 5px solid var(--primary-color);
|
| 53 |
+
margin-bottom: 1rem;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
.slider-container {
|
| 57 |
+
background: #f8f9fa;
|
| 58 |
+
border-radius: 10px;
|
| 59 |
+
padding: 1.5rem;
|
| 60 |
+
margin: 1rem 0;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
.feature-value {
|
| 64 |
+
font-size: 1.2rem;
|
| 65 |
+
font-weight: 600;
|
| 66 |
+
color: var(--primary-color);
|
| 67 |
+
float: right;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
.accessibility-score {
|
| 71 |
+
font-size: 4rem;
|
| 72 |
+
font-weight: 800;
|
| 73 |
+
text-align: center;
|
| 74 |
+
color: var(--primary-color);
|
| 75 |
+
text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
|
| 76 |
+
}
|
| 77 |
+
|
| 78 |
+
.classification-badge {
|
| 79 |
+
display: inline-block;
|
| 80 |
+
padding: 0.5rem 1.5rem;
|
| 81 |
+
border-radius: 25px;
|
| 82 |
+
font-weight: 700;
|
| 83 |
+
font-size: 1.2rem;
|
| 84 |
+
margin: 0.5rem;
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
+
.excellent { background: linear-gradient(135deg, #4CAF50, #2E7D32); color: white; }
|
| 88 |
+
.good { background: linear-gradient(135deg, #8BC34A, #558B2F); color: white; }
|
| 89 |
+
.moderate { background: linear-gradient(135deg, #FF9800, #EF6C00); color: white; }
|
| 90 |
+
.poor { background: linear-gradient(135deg, #F44336, #C62828); color: white; }
|
| 91 |
+
|
| 92 |
+
.feature-slider {
|
| 93 |
+
width: 100%;
|
| 94 |
+
margin: 1rem 0;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.feature-icon {
|
| 98 |
+
font-size: 1.5rem;
|
| 99 |
+
margin-right: 10px;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
.chart-container {
|
| 103 |
+
background: white;
|
| 104 |
+
border-radius: 15px;
|
| 105 |
+
padding: 1.5rem;
|
| 106 |
+
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
|
| 107 |
+
margin: 1rem 0;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
.info-box {
|
| 111 |
+
background: #E3F2FD;
|
| 112 |
+
border-left: 4px solid #2196F3;
|
| 113 |
+
padding: 1rem;
|
| 114 |
+
border-radius: 8px;
|
| 115 |
+
margin: 1rem 0;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
.remedial-box {
|
| 119 |
+
border-left: 5px solid;
|
| 120 |
+
padding: 1rem;
|
| 121 |
+
border-radius: 8px;
|
| 122 |
+
margin: 0.5rem 0;
|
| 123 |
+
background: #f8f9fa;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
.remedial-excellent { border-left-color: #4CAF50; }
|
| 127 |
+
.remedial-good { border-left-color: #8BC34A; }
|
| 128 |
+
.remedial-moderate { border-left-color: #FF9800; }
|
| 129 |
+
.remedial-poor { border-left-color: #F44336; }
|
| 130 |
+
|
| 131 |
+
.city-highlight {
|
| 132 |
+
background: linear-gradient(135deg, #4a6572, #5d8aa8);
|
| 133 |
+
color: white;
|
| 134 |
+
padding: 0.5rem 1rem;
|
| 135 |
+
border-radius: 8px;
|
| 136 |
+
font-weight: 600;
|
| 137 |
+
margin-bottom: 1rem;
|
| 138 |
+
display: inline-block;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.measure-item {
|
| 142 |
+
padding: 0.5rem 0;
|
| 143 |
+
border-bottom: 1px dashed #dee2e6;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
.measure-item:last-child {
|
| 147 |
+
border-bottom: none;
|
| 148 |
+
}
|
| 149 |
+
|
| 150 |
+
@media (max-width: 768px) {
|
| 151 |
+
.accessibility-score {
|
| 152 |
+
font-size: 3rem;
|
| 153 |
+
}
|
| 154 |
+
}
|
| 155 |
+
</style>
|
| 156 |
+
</head>
|
| 157 |
+
<body>
|
| 158 |
+
<div class="container main-container">
|
| 159 |
+
<!-- Header -->
|
| 160 |
+
<div class="header-section">
|
| 161 |
+
<div class="d-flex align-items-center justify-content-center gap-3 mb-3">
|
| 162 |
+
<div style="font-size: 2.5rem; color: white;">🏙️</div>
|
| 163 |
+
<div>
|
| 164 |
+
<h1 class="display-5 mb-2">Urban Spatial Accessibility Predictor</h1>
|
| 165 |
+
<p class="lead mb-0">AI-powered tool for predicting urban accessibility across Tier-II Indian cities with tailored remedial measures</p>
|
| 166 |
+
</div>
|
| 167 |
+
</div>
|
| 168 |
+
</div>
|
| 169 |
+
|
| 170 |
+
<div class="container-fluid">
|
| 171 |
+
<div class="row">
|
| 172 |
+
<!-- Left Column - Inputs -->
|
| 173 |
+
<div class="col-lg-6 col-md-12 mb-4">
|
| 174 |
+
<div class="card shadow">
|
| 175 |
+
<div class="card-header bg-primary text-white">
|
| 176 |
+
<h3 class="mb-0">📊 Input Urban Indicators</h3>
|
| 177 |
+
<p class="mb-0 opacity-75">Select a city and adjust indicators for prediction</p>
|
| 178 |
+
</div>
|
| 179 |
+
<div class="card-body">
|
| 180 |
+
<!-- City Selection -->
|
| 181 |
+
<div class="slider-container">
|
| 182 |
+
<div class="d-flex justify-content-between mb-2">
|
| 183 |
+
<label class="form-label h5">
|
| 184 |
+
<span class="feature-icon">🏙️</span>
|
| 185 |
+
Select Tier-II City
|
| 186 |
+
</label>
|
| 187 |
+
</div>
|
| 188 |
+
<p class="text-muted mb-3">Choose an Indian Tier-II city for context-specific analysis</p>
|
| 189 |
+
<select class="form-select form-select-lg mb-3" id="citySelector" onchange="updateCityInfo()">
|
| 190 |
+
<option value="0">-- Select a City --</option>
|
| 191 |
+
</select>
|
| 192 |
+
</div>
|
| 193 |
+
|
| 194 |
+
<!-- Euclidean ASF Slider -->
|
| 195 |
+
<div class="slider-container">
|
| 196 |
+
<div class="d-flex justify-content-between mb-2">
|
| 197 |
+
<label class="form-label h5">
|
| 198 |
+
<span class="feature-icon">📐</span>
|
| 199 |
+
Euclidean ASF
|
| 200 |
+
</label>
|
| 201 |
+
<span id="euclideanValue" class="feature-value">0.70</span>
|
| 202 |
+
</div>
|
| 203 |
+
<p class="text-muted mb-3">Percentage of Accessible Street Frontage (Euclidean Distance)</p>
|
| 204 |
+
<input type="range" class="form-range feature-slider" id="euclideanSlider"
|
| 205 |
+
min="0" max="100" value="70" step="1"
|
| 206 |
+
oninput="updateValue('euclidean', this.value); updatePrediction();">
|
| 207 |
+
<div class="d-flex justify-content-between">
|
| 208 |
+
<small class="text-muted">0.0 (Low)</small>
|
| 209 |
+
<small class="text-muted">1.0 (High)</small>
|
| 210 |
+
</div>
|
| 211 |
+
</div>
|
| 212 |
+
|
| 213 |
+
<!-- Built-Up Area Slider -->
|
| 214 |
+
<div class="slider-container">
|
| 215 |
+
<div class="d-flex justify-content-between mb-2">
|
| 216 |
+
<label class="form-label h5">
|
| 217 |
+
<span class="feature-icon">🏗️</span>
|
| 218 |
+
Built-Up Area
|
| 219 |
+
</label>
|
| 220 |
+
<span id="builtupValue" class="feature-value">0.60</span>
|
| 221 |
+
</div>
|
| 222 |
+
<p class="text-muted mb-3">Percentage of Built-Up Area in the selected region</p>
|
| 223 |
+
<input type="range" class="form-range feature-slider" id="builtupSlider"
|
| 224 |
+
min="0" max="100" value="60" step="1"
|
| 225 |
+
oninput="updateValue('builtup', this.value); updatePrediction();">
|
| 226 |
+
<div class="d-flex justify-content-between">
|
| 227 |
+
<small class="text-muted">0.0 (Low)</small>
|
| 228 |
+
<small class="text-muted">1.0 (High)</small>
|
| 229 |
+
</div>
|
| 230 |
+
</div>
|
| 231 |
+
|
| 232 |
+
<!-- Network ASF Slider -->
|
| 233 |
+
<div class="slider-container">
|
| 234 |
+
<div class="d-flex justify-content-between mb-2">
|
| 235 |
+
<label class="form-label h5">
|
| 236 |
+
<span class="feature-icon">🛣️</span>
|
| 237 |
+
Network ASF
|
| 238 |
+
</label>
|
| 239 |
+
<span id="networkValue" class="feature-value">0.75</span>
|
| 240 |
+
</div>
|
| 241 |
+
<p class="text-muted mb-3">Percentage of Accessible Street Frontage (Network Distance)</p>
|
| 242 |
+
<input type="range" class="form-range feature-slider" id="networkSlider"
|
| 243 |
+
min="0" max="100" value="75" step="1"
|
| 244 |
+
oninput="updateValue('network', this.value); updatePrediction();">
|
| 245 |
+
<div class="d-flex justify-content-between">
|
| 246 |
+
<small class="text-muted">0.0 (Low)</small>
|
| 247 |
+
<small class="text-muted">1.0 (High)</small>
|
| 248 |
+
</div>
|
| 249 |
+
</div>
|
| 250 |
+
|
| 251 |
+
<!-- Bus Stop ASF Slider -->
|
| 252 |
+
<div class="slider-container">
|
| 253 |
+
<div class="d-flex justify-content-between mb-2">
|
| 254 |
+
<label class="form-label h5">
|
| 255 |
+
<span class="feature-icon">🚌</span>
|
| 256 |
+
Bus Stop ASF
|
| 257 |
+
</label>
|
| 258 |
+
<span id="busstopValue" class="feature-value">0.80</span>
|
| 259 |
+
</div>
|
| 260 |
+
<p class="text-muted mb-3">Percentage of Street Frontage accessible from Bus Stops</p>
|
| 261 |
+
<input type="range" class="form-range feature-slider" id="busstopSlider"
|
| 262 |
+
min="0" max="100" value="80" step="1"
|
| 263 |
+
oninput="updateValue('busstop', this.value); updatePrediction();">
|
| 264 |
+
<div class="d-flex justify-content-between">
|
| 265 |
+
<small class="text-muted">0.0 (Low)</small>
|
| 266 |
+
<small class="text-muted">1.0 (High)</small>
|
| 267 |
+
</div>
|
| 268 |
+
</div>
|
| 269 |
+
|
| 270 |
+
<!-- Action Buttons -->
|
| 271 |
+
<div class="row mt-4">
|
| 272 |
+
<div class="col-md-6">
|
| 273 |
+
<button class="btn btn-outline-primary btn-lg w-100" onclick="resetSliders()">
|
| 274 |
+
🔄 Reset Values
|
| 275 |
+
</button>
|
| 276 |
+
</div>
|
| 277 |
+
<div class="col-md-6">
|
| 278 |
+
<button class="btn btn-success btn-lg w-100" onclick="exportResults()">
|
| 279 |
+
💾 Export Results
|
| 280 |
+
</button>
|
| 281 |
+
</div>
|
| 282 |
+
</div>
|
| 283 |
+
</div>
|
| 284 |
+
</div>
|
| 285 |
+
</div>
|
| 286 |
+
|
| 287 |
+
<!-- Right Column - Results -->
|
| 288 |
+
<div class="col-lg-6 col-md-12 mb-4">
|
| 289 |
+
<div class="card shadow">
|
| 290 |
+
<div class="card-header bg-success text-white">
|
| 291 |
+
<h3 class="mb-0">📈 Prediction Results</h3>
|
| 292 |
+
<p class="mb-0 opacity-75">Real-time prediction based on ML model</p>
|
| 293 |
+
</div>
|
| 294 |
+
<div class="card-body">
|
| 295 |
+
<!-- Selected City Info -->
|
| 296 |
+
<div id="cityInfoPanel" class="mb-4" style="display: none;">
|
| 297 |
+
<div class="d-flex justify-content-between align-items-center mb-3">
|
| 298 |
+
<h5 class="mb-0">📍 Selected City Analysis</h5>
|
| 299 |
+
<span id="cityBadge" class="badge bg-info fs-6"></span>
|
| 300 |
+
</div>
|
| 301 |
+
<div class="city-highlight" id="cityDisplay">
|
| 302 |
+
<i class="fas fa-city me-2"></i>
|
| 303 |
+
<span id="currentCityName">No city selected</span>
|
| 304 |
+
</div>
|
| 305 |
+
</div>
|
| 306 |
+
|
| 307 |
+
<!-- Prediction Score -->
|
| 308 |
+
<div class="text-center mb-4">
|
| 309 |
+
<h4 class="mb-3">Predicted Accessibility Score</h4>
|
| 310 |
+
<div class="accessibility-score" id="predictionScore">0.685</div>
|
| 311 |
+
|
| 312 |
+
<!-- Classification Badge -->
|
| 313 |
+
<div id="classificationBadge" class="mt-3">
|
| 314 |
+
<div class="classification-badge moderate" id="badge">Moderate</div>
|
| 315 |
+
</div>
|
| 316 |
+
|
| 317 |
+
<!-- Status Message -->
|
| 318 |
+
<div class="alert alert-info mt-3" id="statusMessage">
|
| 319 |
+
The predicted accessibility is Moderate. Improvement opportunities exist.
|
| 320 |
+
</div>
|
| 321 |
+
</div>
|
| 322 |
+
|
| 323 |
+
<!-- Feature Visualization -->
|
| 324 |
+
<div class="chart-container">
|
| 325 |
+
<h5 class="mb-3">📊 Input Feature Visualization</h5>
|
| 326 |
+
<div id="featureChart" style="height: 300px;"></div>
|
| 327 |
+
</div>
|
| 328 |
+
|
| 329 |
+
<!-- Remedial Measures -->
|
| 330 |
+
<div class="chart-container" id="remedialPanel" style="display: none;">
|
| 331 |
+
<h5 class="mb-3">🛠️ Context-Specific Remedial Measures</h5>
|
| 332 |
+
<p class="text-muted mb-3">Tailored recommendations for <span id="cityNameForMeasures">selected city</span> based on accessibility classification</p>
|
| 333 |
+
<div id="remedialMeasuresContent">
|
| 334 |
+
<!-- Measures will be dynamically inserted here -->
|
| 335 |
+
</div>
|
| 336 |
+
</div>
|
| 337 |
+
|
| 338 |
+
<!-- Accessibility Scale -->
|
| 339 |
+
<div class="chart-container">
|
| 340 |
+
<h5 class="mb-3">📏 Accessibility Classification Scale</h5>
|
| 341 |
+
<div class="row text-center">
|
| 342 |
+
<div class="col-3 mb-2">
|
| 343 |
+
<div class="p-2 excellent rounded">
|
| 344 |
+
<strong>Excellent</strong><br>≥ 0.8
|
| 345 |
+
</div>
|
| 346 |
+
</div>
|
| 347 |
+
<div class="col-3 mb-2">
|
| 348 |
+
<div class="p-2 good rounded">
|
| 349 |
+
<strong>Good</strong><br>0.6 - 0.8
|
| 350 |
+
</div>
|
| 351 |
+
</div>
|
| 352 |
+
<div class="col-3 mb-2">
|
| 353 |
+
<div class="p-2 moderate rounded">
|
| 354 |
+
<strong>Moderate</strong><br>0.4 - 0.6
|
| 355 |
+
</div>
|
| 356 |
+
</div>
|
| 357 |
+
<div class="col-3 mb-2">
|
| 358 |
+
<div class="p-2 poor rounded">
|
| 359 |
+
<strong>Poor</strong><br>< 0.4
|
| 360 |
+
</div>
|
| 361 |
+
</div>
|
| 362 |
+
</div>
|
| 363 |
+
</div>
|
| 364 |
+
</div>
|
| 365 |
+
</div>
|
| 366 |
+
</div>
|
| 367 |
+
</div>
|
| 368 |
+
|
| 369 |
+
<!-- Additional Information -->
|
| 370 |
+
<div class="row mt-4">
|
| 371 |
+
<div class="col-12">
|
| 372 |
+
<div class="card shadow">
|
| 373 |
+
<div class="card-header bg-secondary text-white">
|
| 374 |
+
<h4 class="mb-0">ℹ️ How to Interpret Results & Deployment Information</h4>
|
| 375 |
+
</div>
|
| 376 |
+
<div class="card-body">
|
| 377 |
+
<div class="row">
|
| 378 |
+
<div class="col-md-6">
|
| 379 |
+
<h5>📋 Understanding the Metrics</h5>
|
| 380 |
+
<ul>
|
| 381 |
+
<li><strong>Euclidean ASF:</strong> Measures straight-line accessibility to street frontage</li>
|
| 382 |
+
<li><strong>Built-Up Area:</strong> Percentage of developed land in the region</li>
|
| 383 |
+
<li><strong>Network ASF:</strong> Accessibility considering actual road networks</li>
|
| 384 |
+
<li><strong>Bus Stop ASF:</strong> Proximity to public transport infrastructure</li>
|
| 385 |
+
</ul>
|
| 386 |
+
<p>Higher values in these metrics typically lead to better overall accessibility scores.</p>
|
| 387 |
+
</div>
|
| 388 |
+
<div class="col-md-6">
|
| 389 |
+
<h5>🏙️ About Tier-II Cities</h5>
|
| 390 |
+
<p>Tier-II Indian cities are urban centers with populations between 50,000 and 100,000, experiencing rapid urbanization and facing unique accessibility challenges. This tool provides data-driven insights for evidence-based urban planning.</p>
|
| 391 |
+
<h6 class="mt-3">🚀 Deployment Instructions</h6>
|
| 392 |
+
<p>To deploy this app:</p>
|
| 393 |
+
<ol class="small">
|
| 394 |
+
<li>Create a new Space on Hugging Face: <code>hf.co/new/space</code></li>
|
| 395 |
+
<li>Choose "Streamlit" or "Static" as the SDK</li>
|
| 396 |
+
<li>Clone repository and upload files</li>
|
| 397 |
+
<li>Commit and push to deploy</li>
|
| 398 |
+
</ol>
|
| 399 |
+
</div>
|
| 400 |
+
</div>
|
| 401 |
+
</div>
|
| 402 |
+
</div>
|
| 403 |
+
</div>
|
| 404 |
+
</div>
|
| 405 |
+
|
| 406 |
+
<!-- Footer -->
|
| 407 |
+
<footer class="text-center mt-4 mb-3 text-muted">
|
| 408 |
+
<p>© 2024 Urban Accessibility Predictor | Powered by ML Models | Tier-II India Focus</p>
|
| 409 |
+
<p class="small">This tool supports evidence-based urban planning for sustainable development</p>
|
| 410 |
+
</footer>
|
| 411 |
+
</div>
|
| 412 |
+
</div>
|
| 413 |
+
|
| 414 |
+
<!-- JavaScript -->
|
| 415 |
+
<script>
|
| 416 |
+
// ===== DATABASE: Indian Tier-II Cities =====
|
| 417 |
+
const indianTier2Cities = [
|
| 418 |
+
// Maharashtra
|
| 419 |
+
{ id: 1, name: "Nashik", state: "Maharashtra", region: "Western" },
|
| 420 |
+
{ id: 2, name: "Nagpur", state: "Maharashtra", region: "Central" },
|
| 421 |
+
{ id: 3, name: "Aurangabad", state: "Maharashtra", region: "Western" },
|
| 422 |
+
{ id: 4, name: "Solapur", state: "Maharashtra", region: "Southern" },
|
| 423 |
+
{ id: 5, name: "Pune", state: "Maharashtra", region: "Western" },
|
| 424 |
+
|
| 425 |
+
// Madhya Pradesh
|
| 426 |
+
{ id: 6, name: "Indore", state: "Madhya Pradesh", region: "Central" },
|
| 427 |
+
{ id: 7, name: "Bhopal", state: "Madhya Pradesh", region: "Central" },
|
| 428 |
+
{ id: 8, name: "Jabalpur", state: "Madhya Pradesh", region: "Central" },
|
| 429 |
+
{ id: 9, name: "Gwalior", state: "Madhya Pradesh", region: "Northern" },
|
| 430 |
+
|
| 431 |
+
// Uttar Pradesh
|
| 432 |
+
{ id: 10, name: "Lucknow", state: "Uttar Pradesh", region: "Northern" },
|
| 433 |
+
{ id: 11, name: "Kanpur", state: "Uttar Pradesh", region: "Northern" },
|
| 434 |
+
{ id: 12, name: "Varanasi", state: "Uttar Pradesh", region: "Eastern" },
|
| 435 |
+
{ id: 13, name: "Agra", state: "Uttar Pradesh", region: "Northern" },
|
| 436 |
+
{ id: 14, name: "Allahabad", state: "Uttar Pradesh", region: "Northern" },
|
| 437 |
+
|
| 438 |
+
// Gujarat
|
| 439 |
+
{ id: 15, name: "Surat", state: "Gujarat", region: "Western" },
|
| 440 |
+
{ id: 16, name: "Vadodara", state: "Gujarat", region: "Western" },
|
| 441 |
+
{ id: 17, name: "Rajkot", state: "Gujarat", region: "Western" },
|
| 442 |
+
|
| 443 |
+
// Tamil Nadu
|
| 444 |
+
{ id: 18, name: "Coimbatore", state: "Tamil Nadu", region: "Southern" },
|
| 445 |
+
{ id: 19, name: "Madurai", state: "Tamil Nadu", region: "Southern" },
|
| 446 |
+
{ id: 20, name: "Tiruchirappalli", state: "Tamil Nadu", region: "Southern" },
|
| 447 |
+
|
| 448 |
+
// Karnataka
|
| 449 |
+
{ id: 21, name: "Mysore", state: "Karnataka", region: "Southern" },
|
| 450 |
+
{ id: 22, name: "Mangalore", state: "Karnataka", region: "Southern" },
|
| 451 |
+
{ id: 23, name: "Hubli-Dharwad", state: "Karnataka", region: "Southern" },
|
| 452 |
+
|
| 453 |
+
// Andhra Pradesh & Telangana
|
| 454 |
+
{ id: 24, name: "Vijayawada", state: "Andhra Pradesh", region: "Southern" },
|
| 455 |
+
{ id: 25, name: "Visakhapatnam", state: "Andhra Pradesh", region: "Southern" },
|
| 456 |
+
{ id: 26, name: "Warangal", state: "Telangana", region: "Southern" },
|
| 457 |
+
|
| 458 |
+
// Rajasthan
|
| 459 |
+
{ id: 27, name: "Jaipur", state: "Rajasthan", region: "Northern" },
|
| 460 |
+
{ id: 28, name: "Jodhpur", state: "Rajasthan", region: "Northern" },
|
| 461 |
+
{ id: 29, name: "Kota", state: "Rajasthan", region: "Northern" },
|
| 462 |
+
{ id: 30, name: "Bikaner", state: "Rajasthan", region: "Northern" },
|
| 463 |
+
|
| 464 |
+
// Punjab
|
| 465 |
+
{ id: 31, name: "Amritsar", state: "Punjab", region: "Northern" },
|
| 466 |
+
{ id: 32, name: "Ludhiana", state: "Punjab", region: "Northern" },
|
| 467 |
+
{ id: 33, name: "Jalandhar", state: "Punjab", region: "Northern" },
|
| 468 |
+
|
| 469 |
+
// Kerala
|
| 470 |
+
{ id: 34, name: "Kochi", state: "Kerala", region: "Southern" },
|
| 471 |
+
{ id: 35, name: "Kozhikode", state: "Kerala", region: "Southern" },
|
| 472 |
+
{ id: 36, name: "Thrissur", state: "Kerala", region: "Southern" },
|
| 473 |
+
|
| 474 |
+
// West Bengal
|
| 475 |
+
{ id: 37, name: "Howrah", state: "West Bengal", region: "Eastern" },
|
| 476 |
+
{ id: 38, name: "Durgapur", state: "West Bengal", region: "Eastern" },
|
| 477 |
+
{ id: 39, name: "Siliguri", state: "West Bengal", region: "Eastern" },
|
| 478 |
+
|
| 479 |
+
// Bihar & Jharkhand
|
| 480 |
+
{ id: 40, name: "Patna", state: "Bihar", region: "Eastern" },
|
| 481 |
+
{ id: 41, name: "Ranchi", state: "Jharkhand", region: "Eastern" },
|
| 482 |
+
{ id: 42, name: "Jamshedpur", state: "Jharkhand", region: "Eastern" },
|
| 483 |
+
|
| 484 |
+
// Odisha
|
| 485 |
+
{ id: 43, name: "Bhubaneswar", state: "Odisha", region: "Eastern" },
|
| 486 |
+
{ id: 44, name: "Cuttack", state: "Odisha", region: "Eastern" },
|
| 487 |
+
{ id: 45, name: "Rourkela", state: "Odisha", region: "Eastern" },
|
| 488 |
+
|
| 489 |
+
// Assam & Northeast
|
| 490 |
+
{ id: 46, name: "Guwahati", state: "Assam", region: "Northeastern" },
|
| 491 |
+
{ id: 47, name: "Imphal", state: "Manipur", region: "Northeastern" },
|
| 492 |
+
{ id: 48, name: "Shillong", state: "Meghalaya", region: "Northeastern" },
|
| 493 |
+
|
| 494 |
+
// Union Territories
|
| 495 |
+
{ id: 49, name: "Chandigarh", state: "Chandigarh", region: "Northern" },
|
| 496 |
+
{ id: 50, name: "Puducherry", state: "Puducherry", region: "Southern" }
|
| 497 |
+
];
|
| 498 |
+
|
| 499 |
+
// ===== DATABASE: Remedial Measures by Classification =====
|
| 500 |
+
const remedialMeasures = {
|
| 501 |
+
"Excellent": {
|
| 502 |
+
"color": "success",
|
| 503 |
+
"icon": "✅",
|
| 504 |
+
"title": "Maintenance & Sustainability Plan",
|
| 505 |
+
"description": "The city shows excellent accessibility. Focus should be on maintaining this standard and implementing sustainable practices.",
|
| 506 |
+
"short_term": [
|
| 507 |
+
"Conduct regular audits of pedestrian infrastructure every 6 months",
|
| 508 |
+
"Implement predictive maintenance for public transport systems",
|
| 509 |
+
"Launch public awareness campaigns about sustainable mobility options"
|
| 510 |
+
],
|
| 511 |
+
"medium_term": [
|
| 512 |
+
"Develop digital twin for real-time urban mobility monitoring",
|
| 513 |
+
"Create green corridors connecting parks and public spaces",
|
| 514 |
+
"Implement smart parking management systems"
|
| 515 |
+
],
|
| 516 |
+
"long_term": [
|
| 517 |
+
"Establish urban mobility innovation lab for future planning",
|
| 518 |
+
"Develop comprehensive 20-year sustainable mobility master plan",
|
| 519 |
+
"Create city-wide IoT sensor network for data collection"
|
| 520 |
+
]
|
| 521 |
+
},
|
| 522 |
+
"Good": {
|
| 523 |
+
"color": "info",
|
| 524 |
+
"icon": "👍",
|
| 525 |
+
"title": "Enhancement & Integration Actions",
|
| 526 |
+
"description": "Good accessibility with room for improvement. Focus on integration and minor enhancements.",
|
| 527 |
+
"short_term": [
|
| 528 |
+
"Improve last-mile connectivity with bike/scooter sharing",
|
| 529 |
+
"Optimize traffic signal timings at 10 busiest intersections",
|
| 530 |
+
"Install real-time passenger information systems at bus stops"
|
| 531 |
+
],
|
| 532 |
+
"medium_term": [
|
| 533 |
+
"Develop integrated multi-modal transport app",
|
| 534 |
+
"Create dedicated pedestrian zones in commercial areas",
|
| 535 |
+
"Implement bus priority lanes on major corridors"
|
| 536 |
+
],
|
| 537 |
+
"long_term": [
|
| 538 |
+
"Plan for metro/BRT system integration",
|
| 539 |
+
"Develop comprehensive wayfinding system",
|
| 540 |
+
"Create unified transport authority for coordinated planning"
|
| 541 |
+
]
|
| 542 |
+
},
|
| 543 |
+
"Moderate": {
|
| 544 |
+
"color": "warning",
|
| 545 |
+
"icon": "⚠️",
|
| 546 |
+
"title": "Priority Infrastructure & Policy Interventions",
|
| 547 |
+
"description": "Moderate accessibility requiring significant interventions. Priority infrastructure projects needed.",
|
| 548 |
+
"short_term": [
|
| 549 |
+
"Complete missing network links within 6 months",
|
| 550 |
+
"Relocate poorly placed bus stops to maximize coverage",
|
| 551 |
+
"Introduce congestion pricing in city center"
|
| 552 |
+
],
|
| 553 |
+
"medium_term": [
|
| 554 |
+
"Develop 3-5 year transit-oriented development plan",
|
| 555 |
+
"Construct pedestrian overpasses at dangerous crossings",
|
| 556 |
+
"Implement smart traffic management system"
|
| 557 |
+
],
|
| 558 |
+
"long_term": [
|
| 559 |
+
"Plan and design BRT or light rail system",
|
| 560 |
+
"Develop comprehensive non-motorized transport network",
|
| 561 |
+
"Create urban regeneration plan for low-accessibility areas"
|
| 562 |
+
]
|
| 563 |
+
},
|
| 564 |
+
"Poor": {
|
| 565 |
+
"color": "danger",
|
| 566 |
+
"icon": "🚨",
|
| 567 |
+
"title": "Immediate & Comprehensive Revitalization",
|
| 568 |
+
"description": "Poor accessibility requiring emergency interventions. Comprehensive revitalization plan needed.",
|
| 569 |
+
"short_term": [
|
| 570 |
+
"Declare emergency mobility plan for worst-performing zones",
|
| 571 |
+
"Fast-track construction of critical missing road links",
|
| 572 |
+
"Implement emergency bus services in underserved areas"
|
| 573 |
+
],
|
| 574 |
+
"medium_term": [
|
| 575 |
+
"Allocate 15% of city budget to accessibility projects",
|
| 576 |
+
"Develop comprehensive pedestrian infrastructure plan",
|
| 577 |
+
"Create special purpose vehicle for transport projects"
|
| 578 |
+
],
|
| 579 |
+
"long_term": [
|
| 580 |
+
"Master plan for complete street redesign",
|
| 581 |
+
"Develop regional transport integration plan",
|
| 582 |
+
"Establish urban mobility research center"
|
| 583 |
+
]
|
| 584 |
+
}
|
| 585 |
+
};
|
| 586 |
+
|
| 587 |
+
// ===== APPLICATION STATE =====
|
| 588 |
+
let features = {
|
| 589 |
+
euclidean: 0.7,
|
| 590 |
+
builtup: 0.6,
|
| 591 |
+
network: 0.75,
|
| 592 |
+
busstop: 0.8
|
| 593 |
+
};
|
| 594 |
+
|
| 595 |
+
let currentCity = null;
|
| 596 |
+
|
| 597 |
+
// ===== INITIALIZATION FUNCTIONS =====
|
| 598 |
+
function initializeCitySelector() {
|
| 599 |
+
const selector = document.getElementById('citySelector');
|
| 600 |
+
indianTier2Cities.forEach((city, index) => {
|
| 601 |
+
const option = document.createElement('option');
|
| 602 |
+
option.value = city.id;
|
| 603 |
+
option.textContent = `${city.name}, ${city.state} (${city.region})`;
|
| 604 |
+
selector.appendChild(option);
|
| 605 |
+
});
|
| 606 |
+
}
|
| 607 |
+
|
| 608 |
+
function updateCityInfo() {
|
| 609 |
+
const selector = document.getElementById('citySelector');
|
| 610 |
+
const cityId = parseInt(selector.value);
|
| 611 |
+
const cityInfoPanel = document.getElementById('cityInfoPanel');
|
| 612 |
+
const cityBadge = document.getElementById('cityBadge');
|
| 613 |
+
const cityDisplay = document.getElementById('currentCityName');
|
| 614 |
+
|
| 615 |
+
if (cityId > 0) {
|
| 616 |
+
currentCity = indianTier2Cities.find(city => city.id === cityId);
|
| 617 |
+
cityDisplay.textContent = `${currentCity.name}, ${currentCity.state}`;
|
| 618 |
+
cityBadge.textContent = currentCity.region;
|
| 619 |
+
cityInfoPanel.style.display = 'block';
|
| 620 |
+
|
| 621 |
+
// Update remedial measures panel
|
| 622 |
+
updateRemedialMeasures();
|
| 623 |
+
} else {
|
| 624 |
+
currentCity = null;
|
| 625 |
+
cityInfoPanel.style.display = 'none';
|
| 626 |
+
document.getElementById('remedialPanel').style.display = 'none';
|
| 627 |
+
}
|
| 628 |
+
}
|
| 629 |
+
|
| 630 |
+
// ===== PREDICTION FUNCTIONS =====
|
| 631 |
+
function predictAccessibility(euclidean, builtup, network, busstop) {
|
| 632 |
+
// Enhanced prediction with city-specific adjustments
|
| 633 |
+
const baseWeights = {
|
| 634 |
+
euclidean: 0.25,
|
| 635 |
+
builtup: 0.15,
|
| 636 |
+
network: 0.35,
|
| 637 |
+
busstop: 0.25
|
| 638 |
+
};
|
| 639 |
+
|
| 640 |
+
// Region-specific adjustments
|
| 641 |
+
const regionFactors = {
|
| 642 |
+
"Northern": { network: 1.1, builtup: 0.9 },
|
| 643 |
+
"Southern": { euclidean: 1.05, busstop: 1.1 },
|
| 644 |
+
"Eastern": { builtup: 1.1, network: 0.95 },
|
| 645 |
+
"Western": { euclidean: 0.95, busstop: 1.05 },
|
| 646 |
+
"Central": { network: 1.05, builtup: 1.05 },
|
| 647 |
+
"Northeastern": { euclidean: 1.1, network: 0.9 }
|
| 648 |
+
};
|
| 649 |
+
|
| 650 |
+
// Apply region factor if city is selected
|
| 651 |
+
let adjustedWeights = { ...baseWeights };
|
| 652 |
+
if (currentCity && regionFactors[currentCity.region]) {
|
| 653 |
+
const factors = regionFactors[currentCity.region];
|
| 654 |
+
Object.keys(factors).forEach(key => {
|
| 655 |
+
adjustedWeights[key] *= factors[key];
|
| 656 |
+
});
|
| 657 |
+
}
|
| 658 |
+
|
| 659 |
+
// Calculate weighted score with non-linearity
|
| 660 |
+
let score =
|
| 661 |
+
adjustedWeights.euclidean * Math.pow(euclidean, 1.2) +
|
| 662 |
+
adjustedWeights.builtup * Math.pow(builtup, 0.9) +
|
| 663 |
+
adjustedWeights.network * Math.pow(network, 1.5) +
|
| 664 |
+
adjustedWeights.busstop * Math.pow(busstop, 1.1);
|
| 665 |
+
|
| 666 |
+
// Normalize to 0-1 range
|
| 667 |
+
score = Math.max(0, Math.min(1, score));
|
| 668 |
+
|
| 669 |
+
// Add realistic noise
|
| 670 |
+
score += (Math.random() - 0.5) * 0.02;
|
| 671 |
+
|
| 672 |
+
return Math.max(0, Math.min(1, score));
|
| 673 |
+
}
|
| 674 |
+
|
| 675 |
+
// ===== UI UPDATE FUNCTIONS =====
|
| 676 |
+
function updateValue(feature, value) {
|
| 677 |
+
const normalizedValue = (value / 100).toFixed(2);
|
| 678 |
+
features[feature] = parseFloat(normalizedValue);
|
| 679 |
+
document.getElementById(feature + 'Value').textContent = normalizedValue;
|
| 680 |
+
}
|
| 681 |
+
|
| 682 |
+
function updatePrediction() {
|
| 683 |
+
// Get prediction
|
| 684 |
+
const prediction = predictAccessibility(
|
| 685 |
+
features.euclidean,
|
| 686 |
+
features.builtup,
|
| 687 |
+
features.network,
|
| 688 |
+
features.busstop
|
| 689 |
+
);
|
| 690 |
+
|
| 691 |
+
// Update prediction display
|
| 692 |
+
document.getElementById('predictionScore').textContent = prediction.toFixed(3);
|
| 693 |
+
|
| 694 |
+
// Determine classification
|
| 695 |
+
let classification = '';
|
| 696 |
+
let badgeClass = '';
|
| 697 |
+
let message = '';
|
| 698 |
+
|
| 699 |
+
if (prediction >= 0.8) {
|
| 700 |
+
classification = 'Excellent';
|
| 701 |
+
badgeClass = 'excellent';
|
| 702 |
+
message = 'The predicted accessibility is Excellent! The city demonstrates superior urban mobility.';
|
| 703 |
+
} else if (prediction >= 0.6) {
|
| 704 |
+
classification = 'Good';
|
| 705 |
+
badgeClass = 'good';
|
| 706 |
+
message = 'The predicted accessibility is Good. Minor improvements can enhance urban mobility further.';
|
| 707 |
+
} else if (prediction >= 0.4) {
|
| 708 |
+
classification = 'Moderate';
|
| 709 |
+
badgeClass = 'moderate';
|
| 710 |
+
message = 'The predicted accessibility is Moderate. Strategic interventions are needed for improvement.';
|
| 711 |
+
} else {
|
| 712 |
+
classification = 'Poor';
|
| 713 |
+
badgeClass = 'poor';
|
| 714 |
+
message = 'The predicted accessibility is Poor. Comprehensive planning and investments are urgently required.';
|
| 715 |
+
}
|
| 716 |
+
|
| 717 |
+
// Update UI elements
|
| 718 |
+
document.getElementById('badge').className = `classification-badge ${badgeClass}`;
|
| 719 |
+
document.getElementById('badge').textContent = classification;
|
| 720 |
+
document.getElementById('statusMessage').innerHTML = message;
|
| 721 |
+
|
| 722 |
+
// Update chart
|
| 723 |
+
updateChart();
|
| 724 |
+
|
| 725 |
+
// Update remedial measures if city is selected
|
| 726 |
+
if (currentCity) {
|
| 727 |
+
updateRemedialMeasures();
|
| 728 |
+
}
|
| 729 |
+
}
|
| 730 |
+
|
| 731 |
+
function updateRemedialMeasures() {
|
| 732 |
+
const classification = document.getElementById('badge').textContent;
|
| 733 |
+
const measures = remedialMeasures[classification];
|
| 734 |
+
const contentDiv = document.getElementById('remedialMeasuresContent');
|
| 735 |
+
const panel = document.getElementById('remedialPanel');
|
| 736 |
+
const cityNameSpan = document.getElementById('cityNameForMeasures');
|
| 737 |
+
|
| 738 |
+
if (measures && currentCity) {
|
| 739 |
+
cityNameSpan.textContent = currentCity.name;
|
| 740 |
+
|
| 741 |
+
let measuresHtml = `
|
| 742 |
+
<div class="remedial-box remedial-${classification.toLowerCase()}">
|
| 743 |
+
<div class="d-flex align-items-center mb-3">
|
| 744 |
+
<div class="fs-4 me-3">${measures.icon}</div>
|
| 745 |
+
<div>
|
| 746 |
+
<h6 class="mb-1">${measures.title}</h6>
|
| 747 |
+
<p class="mb-0 text-muted small">${measures.description}</p>
|
| 748 |
+
</div>
|
| 749 |
+
</div>
|
| 750 |
+
|
| 751 |
+
<div class="row">
|
| 752 |
+
<div class="col-md-4">
|
| 753 |
+
<h6><i class="fas fa-bolt me-2"></i>Short-term (0-1 year)</h6>
|
| 754 |
+
<div class="measure-list">`;
|
| 755 |
+
|
| 756 |
+
measures.short_term.forEach(item => {
|
| 757 |
+
measuresHtml += `<div class="measure-item">${item}</div>`;
|
| 758 |
+
});
|
| 759 |
+
|
| 760 |
+
measuresHtml += `</div></div><div class="col-md-4">
|
| 761 |
+
<h6><i class="fas fa-chart-line me-2"></i>Medium-term (1-3 years)</h6>
|
| 762 |
+
<div class="measure-list">`;
|
| 763 |
+
|
| 764 |
+
measures.medium_term.forEach(item => {
|
| 765 |
+
measuresHtml += `<div class="measure-item">${item}</div>`;
|
| 766 |
+
});
|
| 767 |
+
|
| 768 |
+
measuresHtml += `</div></div><div class="col-md-4">
|
| 769 |
+
<h6><i class="fas fa-flag-checkered me-2"></i>Long-term (3+ years)</h6>
|
| 770 |
+
<div class="measure-list">`;
|
| 771 |
+
|
| 772 |
+
measures.long_term.forEach(item => {
|
| 773 |
+
measuresHtml += `<div class="measure-item">${item}</div>`;
|
| 774 |
+
});
|
| 775 |
+
|
| 776 |
+
measuresHtml += `</div></div></div></div>`;
|
| 777 |
+
|
| 778 |
+
contentDiv.innerHTML = measuresHtml;
|
| 779 |
+
panel.style.display = 'block';
|
| 780 |
+
}
|
| 781 |
+
}
|
| 782 |
+
|
| 783 |
+
function updateChart() {
|
| 784 |
+
const featureNames = ['Euclidean ASF', 'Built-Up Area', 'Network ASF', 'Bus Stop ASF'];
|
| 785 |
+
const featureValues = [
|
| 786 |
+
features.euclidean,
|
| 787 |
+
features.builtup,
|
| 788 |
+
features.network,
|
| 789 |
+
features.busstop
|
| 790 |
+
];
|
| 791 |
+
|
| 792 |
+
const colors = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728'];
|
| 793 |
+
|
| 794 |
+
const data = [{
|
| 795 |
+
x: featureNames,
|
| 796 |
+
y: featureValues,
|
| 797 |
+
type: 'bar',
|
| 798 |
+
marker: {
|
| 799 |
+
color: colors,
|
| 800 |
+
opacity: 0.8
|
| 801 |
+
},
|
| 802 |
+
text: featureValues.map(v => v.toFixed(2)),
|
| 803 |
+
textposition: 'auto'
|
| 804 |
+
}];
|
| 805 |
+
|
| 806 |
+
const layout = {
|
| 807 |
+
title: 'Current Input Feature Values',
|
| 808 |
+
yaxis: {
|
| 809 |
+
range: [0, 1],
|
| 810 |
+
title: 'Normalized Value'
|
| 811 |
+
},
|
| 812 |
+
xaxis: {
|
| 813 |
+
title: 'Features'
|
| 814 |
+
},
|
| 815 |
+
margin: {t: 40, b: 80, l: 60, r: 40},
|
| 816 |
+
height: 300,
|
| 817 |
+
showlegend: false
|
| 818 |
+
};
|
| 819 |
+
|
| 820 |
+
Plotly.newPlot('featureChart', data, layout);
|
| 821 |
+
}
|
| 822 |
+
|
| 823 |
+
// ===== UTILITY FUNCTIONS =====
|
| 824 |
+
function resetSliders() {
|
| 825 |
+
document.getElementById('euclideanSlider').value = 70;
|
| 826 |
+
document.getElementById('builtupSlider').value = 60;
|
| 827 |
+
document.getElementById('networkSlider').value = 75;
|
| 828 |
+
document.getElementById('busstopSlider').value = 80;
|
| 829 |
+
|
| 830 |
+
features = {
|
| 831 |
+
euclidean: 0.7,
|
| 832 |
+
builtup: 0.6,
|
| 833 |
+
network: 0.75,
|
| 834 |
+
busstop: 0.8
|
| 835 |
+
};
|
| 836 |
+
|
| 837 |
+
updateValue('euclidean', 70);
|
| 838 |
+
updateValue('builtup', 60);
|
| 839 |
+
updateValue('network', 75);
|
| 840 |
+
updateValue('busstop', 80);
|
| 841 |
+
|
| 842 |
+
updatePrediction();
|
| 843 |
+
}
|
| 844 |
+
|
| 845 |
+
function exportResults() {
|
| 846 |
+
const predictionScore = document.getElementById('predictionScore').textContent;
|
| 847 |
+
const classification = document.getElementById('badge').textContent;
|
| 848 |
+
const cityName = currentCity ? `${currentCity.name}, ${currentCity.state}` : 'Not selected';
|
| 849 |
+
|
| 850 |
+
const results = {
|
| 851 |
+
timestamp: new Date().toISOString(),
|
| 852 |
+
city: cityName,
|
| 853 |
+
features: {
|
| 854 |
+
euclidean_asf: features.euclidean,
|
| 855 |
+
built_up_area: features.builtup,
|
| 856 |
+
network_asf: features.network,
|
| 857 |
+
bus_stop_asf: features.busstop
|
| 858 |
+
},
|
| 859 |
+
prediction: parseFloat(predictionScore),
|
| 860 |
+
classification: classification,
|
| 861 |
+
remedial_measures: remedialMeasures[classification] ? remedialMeasures[classification].title : 'N/A'
|
| 862 |
+
};
|
| 863 |
+
|
| 864 |
+
const dataStr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(results, null, 2));
|
| 865 |
+
const downloadAnchor = document.createElement('a');
|
| 866 |
+
downloadAnchor.setAttribute("href", dataStr);
|
| 867 |
+
downloadAnchor.setAttribute("download", `accessibility_${cityName.replace(/[^a-z0-9]/gi, '_')}_${Date.now()}.json`);
|
| 868 |
+
document.body.appendChild(downloadAnchor);
|
| 869 |
+
downloadAnchor.click();
|
| 870 |
+
document.body.removeChild(downloadAnchor);
|
| 871 |
+
|
| 872 |
+
// Show success message
|
| 873 |
+
const originalText = document.querySelector('.btn-success').innerHTML;
|
| 874 |
+
document.querySelector('.btn-success').innerHTML = '✅ Exported!';
|
| 875 |
+
setTimeout(() => {
|
| 876 |
+
document.querySelector('.btn-success').innerHTML = originalText;
|
| 877 |
+
}, 2000);
|
| 878 |
+
}
|
| 879 |
+
|
| 880 |
+
// ===== INITIALIZATION =====
|
| 881 |
+
window.onload = function() {
|
| 882 |
+
// Initialize city selector
|
| 883 |
+
initializeCitySelector();
|
| 884 |
+
|
| 885 |
+
// Set initial values
|
| 886 |
+
updateValue('euclidean', 70);
|
| 887 |
+
updateValue('builtup', 60);
|
| 888 |
+
updateValue('network', 75);
|
| 889 |
+
updateValue('busstop', 80);
|
| 890 |
+
|
| 891 |
+
// Initial prediction and chart
|
| 892 |
+
updatePrediction();
|
| 893 |
+
};
|
| 894 |
+
</script>
|
| 895 |
+
</body>
|
| 896 |
+
</html>
|