Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +999 -862
templates/index.html
CHANGED
|
@@ -1,862 +1,999 @@
|
|
| 1 |
-
<!DOCTYPE html>
|
| 2 |
-
<html lang="en">
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
<meta
|
| 6 |
-
<
|
| 7 |
-
<
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
}
|
| 85 |
-
|
| 86 |
-
.tab-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
.tab
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
.
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
border:
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
| 147 |
-
|
| 148 |
-
|
| 149 |
-
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
|
| 154 |
-
|
| 155 |
-
color:
|
| 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 |
-
cursor: pointer;
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
}
|
| 198 |
-
|
| 199 |
-
|
| 200 |
-
|
| 201 |
-
padding:
|
| 202 |
-
background: #
|
| 203 |
-
|
| 204 |
-
|
| 205 |
-
|
| 206 |
-
|
| 207 |
-
|
| 208 |
-
|
| 209 |
-
|
| 210 |
-
|
| 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 |
-
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
|
| 288 |
-
|
| 289 |
-
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
|
| 303 |
-
|
| 304 |
-
|
| 305 |
-
|
| 306 |
-
|
| 307 |
-
}
|
| 308 |
-
|
| 309 |
-
.confidence-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
.confidence-
|
| 315 |
-
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
|
| 323 |
-
margin: 20px 0;
|
| 324 |
-
|
| 325 |
-
}
|
| 326 |
-
|
| 327 |
-
|
| 328 |
-
|
| 329 |
-
|
| 330 |
-
}
|
| 331 |
-
|
| 332 |
-
.
|
| 333 |
-
|
| 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 |
-
|
| 365 |
-
|
| 366 |
-
|
| 367 |
-
|
| 368 |
-
|
| 369 |
-
|
| 370 |
-
|
| 371 |
-
|
| 372 |
-
|
| 373 |
-
|
| 374 |
-
|
| 375 |
-
|
| 376 |
-
|
| 377 |
-
|
| 378 |
-
|
| 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 |
-
|
| 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 |
-
|
| 837 |
-
|
| 838 |
-
|
| 839 |
-
|
| 840 |
-
|
| 841 |
-
|
| 842 |
-
|
| 843 |
-
|
| 844 |
-
|
| 845 |
-
|
| 846 |
-
|
| 847 |
-
|
| 848 |
-
|
| 849 |
-
|
| 850 |
-
|
| 851 |
-
|
| 852 |
-
|
| 853 |
-
|
| 854 |
-
|
| 855 |
-
|
| 856 |
-
|
| 857 |
-
|
| 858 |
-
|
| 859 |
-
|
| 860 |
-
</
|
| 861 |
-
|
| 862 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
|
| 4 |
+
<head>
|
| 5 |
+
<meta charset="UTF-8">
|
| 6 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 7 |
+
<title>Flood Vulnerability Assessment</title>
|
| 8 |
+
<style>
|
| 9 |
+
html,
|
| 10 |
+
body {
|
| 11 |
+
height: 100%;
|
| 12 |
+
margin: 0;
|
| 13 |
+
padding: 0;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
body {
|
| 18 |
+
display: flex;
|
| 19 |
+
flex-direction: column;
|
| 20 |
+
min-height: 100vh;
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| 24 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 25 |
+
padding: 20px;
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
.container {
|
| 30 |
+
flex: 1 0 auto;
|
| 31 |
+
width: 100%;
|
| 32 |
+
max-width: 950px;
|
| 33 |
+
margin: 0 auto;
|
| 34 |
+
background: white;
|
| 35 |
+
border-radius: 15px;
|
| 36 |
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
| 37 |
+
overflow: hidden;
|
| 38 |
+
}
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
footer {
|
| 42 |
+
flex-shrink: 0;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
.header {
|
| 46 |
+
background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
|
| 47 |
+
color: white;
|
| 48 |
+
padding: 30px;
|
| 49 |
+
text-align: center;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
h1 {
|
| 53 |
+
font-size: 2em;
|
| 54 |
+
margin-bottom: 10px;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.subtitle {
|
| 58 |
+
opacity: 0.9;
|
| 59 |
+
font-size: 0.95em;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.tabs {
|
| 63 |
+
display: flex;
|
| 64 |
+
justify-content: space-between;
|
| 65 |
+
background: #e6e8ef;
|
| 66 |
+
border-radius: 10px;
|
| 67 |
+
border: 1px solid #d0d3da;
|
| 68 |
+
margin: 20px;
|
| 69 |
+
overflow: hidden;
|
| 70 |
+
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
.tab {
|
| 74 |
+
flex: 1;
|
| 75 |
+
padding: 14px 0;
|
| 76 |
+
text-align: center;
|
| 77 |
+
cursor: pointer;
|
| 78 |
+
background: #d9dbe3;
|
| 79 |
+
font-size: 1em;
|
| 80 |
+
font-weight: 500;
|
| 81 |
+
color: #2f2f2f;
|
| 82 |
+
border-right: 1px solid #c4c6ce;
|
| 83 |
+
transition: all 0.25s ease-in-out;
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
.tab:last-child {
|
| 87 |
+
border-right: none;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
+
.tab:hover {
|
| 91 |
+
background: #cfd1da;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
.tab.active {
|
| 95 |
+
background: linear-gradient(135deg, #667eea 0%, #5a67d8 100%);
|
| 96 |
+
color: white;
|
| 97 |
+
font-weight: 600;
|
| 98 |
+
box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.1);
|
| 99 |
+
z-index: 1;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
.tab-content {
|
| 103 |
+
display: none;
|
| 104 |
+
padding: 30px;
|
| 105 |
+
}
|
| 106 |
+
|
| 107 |
+
.tab-content.active {
|
| 108 |
+
display: block;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
.form-group {
|
| 112 |
+
margin-bottom: 20px;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
label {
|
| 116 |
+
display: block;
|
| 117 |
+
margin-bottom: 8px;
|
| 118 |
+
font-weight: 600;
|
| 119 |
+
color: #2c3e50;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
input,
|
| 123 |
+
select {
|
| 124 |
+
width: 100%;
|
| 125 |
+
padding: 12px;
|
| 126 |
+
border: 2px solid #e0e0e0;
|
| 127 |
+
border-radius: 8px;
|
| 128 |
+
font-size: 1em;
|
| 129 |
+
transition: border 0.3s;
|
| 130 |
+
}
|
| 131 |
+
|
| 132 |
+
input:focus,
|
| 133 |
+
select:focus {
|
| 134 |
+
outline: none;
|
| 135 |
+
border-color: #667eea;
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
.helper-text {
|
| 139 |
+
font-size: 0.85em;
|
| 140 |
+
color: #666;
|
| 141 |
+
margin-top: 5px;
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
.height-group {
|
| 145 |
+
display: flex;
|
| 146 |
+
align-items: center;
|
| 147 |
+
width: 100%;
|
| 148 |
+
border: 2px solid #d0d3da;
|
| 149 |
+
border-radius: 8px;
|
| 150 |
+
overflow: hidden;
|
| 151 |
+
background: #ffffff;
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
.height-group:focus-within {
|
| 155 |
+
border-color: #667eea;
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
.height-group input {
|
| 159 |
+
flex: 1;
|
| 160 |
+
padding: 14px 18px;
|
| 161 |
+
font-size: 1rem;
|
| 162 |
+
border: none !important;
|
| 163 |
+
outline: none !important;
|
| 164 |
+
border-radius: 0 !important;
|
| 165 |
+
background: transparent;
|
| 166 |
+
color: #333;
|
| 167 |
+
}
|
| 168 |
+
|
| 169 |
+
.height-group input::-webkit-inner-spin-button,
|
| 170 |
+
.height-group input::-webkit-outer-spin-button {
|
| 171 |
+
margin: 0;
|
| 172 |
+
}
|
| 173 |
+
|
| 174 |
+
.height-group button {
|
| 175 |
+
width: auto !important;
|
| 176 |
+
padding: 14px 24px;
|
| 177 |
+
font-size: 0.95rem;
|
| 178 |
+
font-weight: 600;
|
| 179 |
+
border: none;
|
| 180 |
+
border-left: 2px solid #d0d3da;
|
| 181 |
+
cursor: pointer;
|
| 182 |
+
color: white;
|
| 183 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 184 |
+
border-radius: 0 !important;
|
| 185 |
+
height: 100%;
|
| 186 |
+
white-space: nowrap;
|
| 187 |
+
transition: opacity 0.2s ease;
|
| 188 |
+
}
|
| 189 |
+
|
| 190 |
+
.height-group button:hover {
|
| 191 |
+
opacity: 0.9;
|
| 192 |
+
transform: none !important;
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
.height-group button:active {
|
| 196 |
+
transform: none !important;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
button {
|
| 200 |
+
width: 100%;
|
| 201 |
+
padding: 15px;
|
| 202 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 203 |
+
color: white;
|
| 204 |
+
border: none;
|
| 205 |
+
border-radius: 8px;
|
| 206 |
+
font-size: 1.1em;
|
| 207 |
+
font-weight: 600;
|
| 208 |
+
cursor: pointer;
|
| 209 |
+
transition: transform 0.2s;
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
button:hover {
|
| 213 |
+
transform: translateY(-2px);
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
button:active {
|
| 217 |
+
transform: translateY(0);
|
| 218 |
+
}
|
| 219 |
+
|
| 220 |
+
button:disabled {
|
| 221 |
+
background: #ccc;
|
| 222 |
+
cursor: not-allowed;
|
| 223 |
+
transform: none;
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
.loading {
|
| 227 |
+
display: none;
|
| 228 |
+
text-align: center;
|
| 229 |
+
padding: 20px;
|
| 230 |
+
color: #667eea;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
.results {
|
| 234 |
+
margin-top: 30px;
|
| 235 |
+
padding: 25px;
|
| 236 |
+
background: #f8f9fa;
|
| 237 |
+
border-radius: 10px;
|
| 238 |
+
display: none;
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
.risk-badge {
|
| 242 |
+
display: inline-block;
|
| 243 |
+
padding: 8px 16px;
|
| 244 |
+
border-radius: 20px;
|
| 245 |
+
font-weight: 600;
|
| 246 |
+
margin: 10px 0;
|
| 247 |
+
}
|
| 248 |
+
|
| 249 |
+
.risk-very-high {
|
| 250 |
+
background: #dc3545;
|
| 251 |
+
color: white;
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
.risk-high {
|
| 255 |
+
background: #fd7e14;
|
| 256 |
+
color: white;
|
| 257 |
+
}
|
| 258 |
+
|
| 259 |
+
.risk-moderate {
|
| 260 |
+
background: #ffc107;
|
| 261 |
+
color: #000;
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
.risk-low {
|
| 265 |
+
background: #28a745;
|
| 266 |
+
color: white;
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
.risk-very-low {
|
| 270 |
+
background: #17a2b8;
|
| 271 |
+
color: white;
|
| 272 |
+
}
|
| 273 |
+
|
| 274 |
+
.metric {
|
| 275 |
+
display: flex;
|
| 276 |
+
justify-content: space-between;
|
| 277 |
+
padding: 12px 0;
|
| 278 |
+
border-bottom: 1px solid #dee2e6;
|
| 279 |
+
}
|
| 280 |
+
|
| 281 |
+
.metric:last-child {
|
| 282 |
+
border-bottom: none;
|
| 283 |
+
}
|
| 284 |
+
|
| 285 |
+
.metric-label {
|
| 286 |
+
font-weight: 600;
|
| 287 |
+
color: #495057;
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
+
.metric-value {
|
| 291 |
+
color: #212529;
|
| 292 |
+
}
|
| 293 |
+
|
| 294 |
+
.confidence-badge {
|
| 295 |
+
display: inline-block;
|
| 296 |
+
padding: 6px 14px;
|
| 297 |
+
border-radius: 15px;
|
| 298 |
+
font-size: 0.85em;
|
| 299 |
+
font-weight: 600;
|
| 300 |
+
margin-left: 10px;
|
| 301 |
+
vertical-align: middle;
|
| 302 |
+
}
|
| 303 |
+
|
| 304 |
+
.confidence-good {
|
| 305 |
+
background: #10b981;
|
| 306 |
+
color: white;
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
.confidence-moderate {
|
| 310 |
+
background: #f59e0b;
|
| 311 |
+
color: white;
|
| 312 |
+
}
|
| 313 |
+
|
| 314 |
+
.confidence-low {
|
| 315 |
+
background: #ef4444;
|
| 316 |
+
color: white;
|
| 317 |
+
}
|
| 318 |
+
|
| 319 |
+
.quality-flags {
|
| 320 |
+
background: #fff3cd;
|
| 321 |
+
border-left: 4px solid #ffc107;
|
| 322 |
+
padding: 15px;
|
| 323 |
+
margin: 20px 0;
|
| 324 |
+
border-radius: 5px;
|
| 325 |
+
}
|
| 326 |
+
|
| 327 |
+
.quality-flags h4 {
|
| 328 |
+
margin-bottom: 10px;
|
| 329 |
+
color: #856404;
|
| 330 |
+
}
|
| 331 |
+
|
| 332 |
+
.quality-flags ul {
|
| 333 |
+
list-style: none;
|
| 334 |
+
padding: 0;
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
.quality-flags li {
|
| 338 |
+
padding: 5px 0;
|
| 339 |
+
color: #856404;
|
| 340 |
+
}
|
| 341 |
+
|
| 342 |
+
.explanation-card {
|
| 343 |
+
background: white;
|
| 344 |
+
padding: 15px;
|
| 345 |
+
margin: 10px 0;
|
| 346 |
+
border-radius: 8px;
|
| 347 |
+
border-left: 4px solid #667eea;
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
.factor-contribution {
|
| 351 |
+
display: flex;
|
| 352 |
+
align-items: center;
|
| 353 |
+
margin: 8px 0;
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
.contribution-bar {
|
| 357 |
+
flex: 1;
|
| 358 |
+
height: 20px;
|
| 359 |
+
background: #e9ecef;
|
| 360 |
+
border-radius: 4px;
|
| 361 |
+
overflow: hidden;
|
| 362 |
+
margin: 0 10px;
|
| 363 |
+
}
|
| 364 |
+
|
| 365 |
+
.contribution-fill {
|
| 366 |
+
height: 100%;
|
| 367 |
+
background: linear-gradient(90deg, #667eea, #764ba2);
|
| 368 |
+
transition: width 0.5s;
|
| 369 |
+
}
|
| 370 |
+
|
| 371 |
+
.hazard-breakdown {
|
| 372 |
+
display: grid;
|
| 373 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 374 |
+
gap: 15px;
|
| 375 |
+
margin: 20px 0;
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
.hazard-card {
|
| 379 |
+
background: white;
|
| 380 |
+
padding: 15px;
|
| 381 |
+
border-radius: 8px;
|
| 382 |
+
text-align: center;
|
| 383 |
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
|
| 384 |
+
}
|
| 385 |
+
|
| 386 |
+
.hazard-value {
|
| 387 |
+
font-size: 2em;
|
| 388 |
+
font-weight: 700;
|
| 389 |
+
color: #667eea;
|
| 390 |
+
margin: 10px 0;
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
.confidence-fill {
|
| 394 |
+
height: 100%;
|
| 395 |
+
border-radius: 5px;
|
| 396 |
+
transition: width 0.5s;
|
| 397 |
+
}
|
| 398 |
+
|
| 399 |
+
.confidence-high {
|
| 400 |
+
background: #28a745;
|
| 401 |
+
}
|
| 402 |
+
|
| 403 |
+
.confidence-moderate-fill {
|
| 404 |
+
background: #ffc107;
|
| 405 |
+
}
|
| 406 |
+
|
| 407 |
+
.confidence-low-fill {
|
| 408 |
+
background: #fd7e14;
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
.error {
|
| 412 |
+
background: #f8d7da;
|
| 413 |
+
color: #721c24;
|
| 414 |
+
padding: 15px;
|
| 415 |
+
border-radius: 8px;
|
| 416 |
+
margin: 20px 0;
|
| 417 |
+
display: none;
|
| 418 |
+
}
|
| 419 |
+
|
| 420 |
+
.checkbox-row {
|
| 421 |
+
display: flex;
|
| 422 |
+
align-items: center;
|
| 423 |
+
gap: 10px;
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
.checkbox-row input[type="checkbox"] {
|
| 427 |
+
width: auto;
|
| 428 |
+
height: auto;
|
| 429 |
+
margin: 0;
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
.checkbox-row label {
|
| 433 |
+
margin: 0;
|
| 434 |
+
font-weight: 600;
|
| 435 |
+
color: #2c3e50;
|
| 436 |
+
display: inline-block;
|
| 437 |
+
}
|
| 438 |
+
</style>
|
| 439 |
+
</head>
|
| 440 |
+
|
| 441 |
+
<body>
|
| 442 |
+
<div class="container">
|
| 443 |
+
<div class="header">
|
| 444 |
+
<h1>🌊 Flood Vulnerability Assessment</h1>
|
| 445 |
+
<p class="subtitle">Advanced multi-hazard flood risk analysis powered by GEE</p>
|
| 446 |
+
</div>
|
| 447 |
+
|
| 448 |
+
<div class="tabs">
|
| 449 |
+
<button class="tab active" onclick="switchTab('basic')">Basic Assessment</button>
|
| 450 |
+
<button class="tab" onclick="switchTab('explained')">With Explanation</button>
|
| 451 |
+
<button class="tab" onclick="switchTab('multihazard')">Multi-Hazard</button>
|
| 452 |
+
<button class="tab" onclick="switchTab('batch')">Batch Upload</button>
|
| 453 |
+
</div>
|
| 454 |
+
|
| 455 |
+
<!-- Basic Assessment Tab -->
|
| 456 |
+
<div id="basic-tab" class="tab-content active">
|
| 457 |
+
<form id="assessForm" onsubmit="assessLocation(event, '/assess', 'basic-results')">
|
| 458 |
+
<div class="form-group">
|
| 459 |
+
<label for="latitude">Latitude</label>
|
| 460 |
+
<input type="text" id="latitude" name="latitude" inputmode="text" pattern="-?[0-9]*[.,]?[0-9]*"
|
| 461 |
+
required placeholder="e.g., 40.7128">
|
| 462 |
+
<p class="helper-text">Range: -90 to 90</p>
|
| 463 |
+
</div>
|
| 464 |
+
|
| 465 |
+
<div class="form-group">
|
| 466 |
+
<label for="longitude">Longitude</label>
|
| 467 |
+
<input type="text" id="longitude" name="longitude" inputmode="text" pattern="-?[0-9]*[.,]?[0-9]*"
|
| 468 |
+
autocomplete="off" required placeholder="e.g., -74.0060">
|
| 469 |
+
<p class="helper-text">Range: -180 to 180</p>
|
| 470 |
+
</div>
|
| 471 |
+
|
| 472 |
+
<div class="form-group">
|
| 473 |
+
<label for="height">Building Height (meters above ground)</label>
|
| 474 |
+
<div class="height-group">
|
| 475 |
+
<input type="number" id="height" step="any" value="0" placeholder="e.g., 5.0">
|
| 476 |
+
<button type="button" id="predict-height-btn" class="predict-height-btn" data-lat-id="latitude"
|
| 477 |
+
data-lon-id="longitude" data-height-id="height" data-error-id="basic-error"> Predict
|
| 478 |
+
</button>
|
| 479 |
+
</div>
|
| 480 |
+
<p class="helper-text">0 = ground level, 5 = typical 2-story building</p>
|
| 481 |
+
</div>
|
| 482 |
+
|
| 483 |
+
<div class="form-group">
|
| 484 |
+
<label for="basement">Basement Depth (meters below ground)</label>
|
| 485 |
+
<input type="text" id="basement" name="basement" value="0" max="0" inputmode="text"
|
| 486 |
+
pattern="-?[0-9]*[.,]?[0-9]*" placeholder="e.g., -2.0">
|
| 487 |
+
<p class="helper-text">0 = no basement, -2 = 2 meters below ground (increases risk)</p>
|
| 488 |
+
</div>
|
| 489 |
+
|
| 490 |
+
<button type="submit">Assess Vulnerability</button>
|
| 491 |
+
</form>
|
| 492 |
+
|
| 493 |
+
<div class="loading" id="basic-loading">
|
| 494 |
+
<p>⏳ Analyzing terrain and water proximity...</p>
|
| 495 |
+
</div>
|
| 496 |
+
|
| 497 |
+
<div class="error" id="basic-error"></div>
|
| 498 |
+
<div class="results" id="basic-results"></div>
|
| 499 |
+
</div>
|
| 500 |
+
|
| 501 |
+
<!-- Explained Assessment Tab -->
|
| 502 |
+
<div id="explained-tab" class="tab-content">
|
| 503 |
+
<form onsubmit="assessLocation(event, '/explain', 'explained-results')">
|
| 504 |
+
<div class="form-group">
|
| 505 |
+
<label for="latitude2">Latitude</label>
|
| 506 |
+
<input type="text" id="latitude2" name="latitude2" pattern="-?[0-9]*[.,]?[0-9]*" autocomplete="off"
|
| 507 |
+
required placeholder="e.g., 40.7128">
|
| 508 |
+
</div>
|
| 509 |
+
|
| 510 |
+
<div class="form-group">
|
| 511 |
+
<label for="longitude2">Longitude</label>
|
| 512 |
+
<input type="text" id="longitude2" name="longitude2" pattern="-?[0-9]*[.,]?[0-9]*"
|
| 513 |
+
autocomplete="off" required placeholder="e.g., -74.0060">
|
| 514 |
+
</div>
|
| 515 |
+
|
| 516 |
+
<div class="form-group">
|
| 517 |
+
<label for="height2">Building Height (meters)</label>
|
| 518 |
+
<div class="height-group">
|
| 519 |
+
<input type="number" id="height2" step="any" value="0" placeholder="e.g., 5.0">
|
| 520 |
+
<button type="button" class="predict-height-btn" data-lat-id="latitude2"
|
| 521 |
+
data-lon-id="longitude2" data-height-id="height2" data-error-id="explained-error"> Predict
|
| 522 |
+
</button>
|
| 523 |
+
</div>
|
| 524 |
+
<p class="helper-text">0 = ground level, 5 = typical 2-story building</p>
|
| 525 |
+
</div>
|
| 526 |
+
|
| 527 |
+
<div class="form-group">
|
| 528 |
+
<label for="basement2">Basement Depth (meters, negative)</label>
|
| 529 |
+
<input type="text" id="basement2" name="basement2" inputmode="text" pattern="-?[0-9]*[.,]?[0-9]*"
|
| 530 |
+
step="0.1" value="0" max="0">
|
| 531 |
+
</div>
|
| 532 |
+
|
| 533 |
+
<button type="submit">Assess with Explanation</button>
|
| 534 |
+
</form>
|
| 535 |
+
|
| 536 |
+
<div class="loading" id="explained-loading">
|
| 537 |
+
<p>⏳ Analyzing and generating explanation...</p>
|
| 538 |
+
</div>
|
| 539 |
+
|
| 540 |
+
<div class="error" id="explained-error"></div>
|
| 541 |
+
<div class="results" id="explained-results"></div>
|
| 542 |
+
</div>
|
| 543 |
+
|
| 544 |
+
<!-- Multi-Hazard Tab -->
|
| 545 |
+
<div id="multihazard-tab" class="tab-content">
|
| 546 |
+
<form onsubmit="assessLocation(event, '/assess_multihazard', 'multihazard-results')">
|
| 547 |
+
<div class="form-group">
|
| 548 |
+
<label for="latitude3">Latitude</label>
|
| 549 |
+
<input type="text" id="latitude3" name="latitude3" pattern="-?[0-9]*[.,]?[0-9]*" autocomplete="off"
|
| 550 |
+
required placeholder="e.g., 40.7128">
|
| 551 |
+
</div>
|
| 552 |
+
|
| 553 |
+
<div class="form-group">
|
| 554 |
+
<label for="longitude3">Longitude</label>
|
| 555 |
+
<input type="text" id="longitude3" name="longitude3" pattern="-?[0-9]*[.,]?[0-9]*"
|
| 556 |
+
autocomplete="off" required placeholder="e.g., -74.0060">
|
| 557 |
+
</div>
|
| 558 |
+
|
| 559 |
+
<div class="form-group">
|
| 560 |
+
<label for="height3">Building Height (meters)</label>
|
| 561 |
+
<div class="height-group">
|
| 562 |
+
<input type="number" id="height3" step="any" value="0" placeholder="e.g., 5.0">
|
| 563 |
+
<button type="button" class="predict-height-btn" data-lat-id="latitude3"
|
| 564 |
+
data-lon-id="longitude3" data-height-id="height3" data-error-id="multihazard-error"> Predict
|
| 565 |
+
</button>
|
| 566 |
+
</div>
|
| 567 |
+
<p class="helper-text">0 = ground level, 5 = typical 2-story building</p>
|
| 568 |
+
</div>
|
| 569 |
+
|
| 570 |
+
<div class="form-group">
|
| 571 |
+
<label for="basement3">Basement Depth (meters, negative)</label>
|
| 572 |
+
<input type="text" id="basement3" name="basement3" inputmode="text" pattern="-?[0-9]*[.,]?[0-9]*"
|
| 573 |
+
step="0.1" value="0" max="0">
|
| 574 |
+
</div>
|
| 575 |
+
|
| 576 |
+
<button type="submit">Multi-Hazard Assessment</button>
|
| 577 |
+
</form>
|
| 578 |
+
|
| 579 |
+
<div class="loading" id="multihazard-loading">
|
| 580 |
+
<p>⏳ Analyzing multiple flood hazards...</p>
|
| 581 |
+
</div>
|
| 582 |
+
|
| 583 |
+
<div class="error" id="multihazard-error"></div>
|
| 584 |
+
<div class="results" id="multihazard-results"></div>
|
| 585 |
+
</div>
|
| 586 |
+
|
| 587 |
+
<div id="batch-tab" class="tab-content">
|
| 588 |
+
|
| 589 |
+
<div class="form-group">
|
| 590 |
+
<label for="batchMode">Batch Mode</label>
|
| 591 |
+
<select id="batchMode">
|
| 592 |
+
<option value="standard">Basic Assessment Model</option>
|
| 593 |
+
<option value="multihazard">Multi-Hazard (Fluvial / Coastal / Pluvial)</option>
|
| 594 |
+
</select>
|
| 595 |
+
</div>
|
| 596 |
+
|
| 597 |
+
<div class="form-group">
|
| 598 |
+
<label for="csvFile">Upload CSV File</label>
|
| 599 |
+
<input type="file" id="csvFile" accept=".csv">
|
| 600 |
+
<p class="helper-text"> CSV must contain: latitude, longitude in decimal degrees (WGS84), e.g. 29.1703,
|
| 601 |
+
-95.3128.<br>
|
| 602 |
+
Optional columns: height, basement.</p>
|
| 603 |
+
|
| 604 |
+
</div>
|
| 605 |
+
|
| 606 |
+
<div class="form-group">
|
| 607 |
+
<div class="checkbox-row">
|
| 608 |
+
<input type="checkbox" id="usePredictedHeight">
|
| 609 |
+
<label for="usePredictedHeight">Use satellite-predicted building height</label>
|
| 610 |
+
</div>
|
| 611 |
+
<p class="helper-text">
|
| 612 |
+
For each row, estimate height from coordinates and use it in the vulnerability assessment.
|
| 613 |
+
</p>
|
| 614 |
+
</div>
|
| 615 |
+
|
| 616 |
+
<button onclick="uploadBatch()">Process Batch</button>
|
| 617 |
+
|
| 618 |
+
<div class="loading" id="batch-loading">
|
| 619 |
+
<p>⏳ Processing batch assessments...</p>
|
| 620 |
+
</div>
|
| 621 |
+
|
| 622 |
+
<div class="error" id="batch-error"></div>
|
| 623 |
+
<div class="results" id="batch-results"></div>
|
| 624 |
+
|
| 625 |
+
</div>
|
| 626 |
+
|
| 627 |
+
|
| 628 |
+
</div>
|
| 629 |
+
|
| 630 |
+
<script>
|
| 631 |
+
|
| 632 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 633 |
+
const buttons = document.querySelectorAll('.predict-height-btn');
|
| 634 |
+
if (!buttons.length) {
|
| 635 |
+
return;
|
| 636 |
+
}
|
| 637 |
+
|
| 638 |
+
buttons.forEach(button => {
|
| 639 |
+
const latId = button.dataset.latId;
|
| 640 |
+
const lonId = button.dataset.lonId;
|
| 641 |
+
const heightId = button.dataset.heightId;
|
| 642 |
+
const errorId = button.dataset.errorId;
|
| 643 |
+
|
| 644 |
+
button.addEventListener('click', () => {
|
| 645 |
+
predictHeight(latId, lonId, heightId, errorId, button);
|
| 646 |
+
});
|
| 647 |
+
});
|
| 648 |
+
});
|
| 649 |
+
|
| 650 |
+
async function predictHeight(latId, lonId, heightId, errorId, button) {
|
| 651 |
+
const latInput = document.getElementById(latId);
|
| 652 |
+
const lonInput = document.getElementById(lonId);
|
| 653 |
+
const heightInput = document.getElementById(heightId);
|
| 654 |
+
const errorBox = document.getElementById(errorId);
|
| 655 |
+
|
| 656 |
+
if (!latInput || !lonInput || !heightInput || !errorBox) {
|
| 657 |
+
return;
|
| 658 |
+
}
|
| 659 |
+
|
| 660 |
+
errorBox.style.display = 'none';
|
| 661 |
+
errorBox.textContent = '';
|
| 662 |
+
|
| 663 |
+
const latitude = parseFloat(latInput.value);
|
| 664 |
+
const longitude = parseFloat(lonInput.value);
|
| 665 |
+
|
| 666 |
+
if (isNaN(latitude) || isNaN(longitude)) {
|
| 667 |
+
errorBox.textContent = 'Please enter latitude and longitude first.';
|
| 668 |
+
errorBox.style.display = 'block';
|
| 669 |
+
return;
|
| 670 |
+
}
|
| 671 |
+
|
| 672 |
+
const originalText = button.textContent;
|
| 673 |
+
button.disabled = true;
|
| 674 |
+
button.textContent = 'Predicting...';
|
| 675 |
+
|
| 676 |
+
try {
|
| 677 |
+
const response = await fetch('/predict_height', {
|
| 678 |
+
method: 'POST',
|
| 679 |
+
headers: { 'Content-Type': 'application/json' },
|
| 680 |
+
body: JSON.stringify({
|
| 681 |
+
latitude,
|
| 682 |
+
longitude,
|
| 683 |
+
height: 0,
|
| 684 |
+
basement: 0
|
| 685 |
+
})
|
| 686 |
+
});
|
| 687 |
+
|
| 688 |
+
const data = await response.json();
|
| 689 |
+
if (!response.ok || data.status !== 'success' || data.predicted_height == null) {
|
| 690 |
+
const message = data.detail || data.error || 'Height prediction failed.';
|
| 691 |
+
throw new Error(message);
|
| 692 |
+
}
|
| 693 |
+
|
| 694 |
+
const h = Number(data.predicted_height);
|
| 695 |
+
heightInput.value = h.toFixed(2);
|
| 696 |
+
heightInput.classList.add('height-pulse');
|
| 697 |
+
setTimeout(() => {
|
| 698 |
+
heightInput.classList.remove('height-pulse');
|
| 699 |
+
}, 800);
|
| 700 |
+
} catch (err) {
|
| 701 |
+
errorBox.textContent = err.message || 'Height prediction failed.';
|
| 702 |
+
errorBox.style.display = 'block';
|
| 703 |
+
} finally {
|
| 704 |
+
button.disabled = false;
|
| 705 |
+
button.textContent = originalText;
|
| 706 |
+
}
|
| 707 |
+
}
|
| 708 |
+
|
| 709 |
+
|
| 710 |
+
function switchTab(tabName) {
|
| 711 |
+
document.querySelectorAll('.tab-content').forEach(tab => {
|
| 712 |
+
tab.classList.remove('active');
|
| 713 |
+
});
|
| 714 |
+
document.querySelectorAll('.tab').forEach(tab => {
|
| 715 |
+
tab.classList.remove('active');
|
| 716 |
+
});
|
| 717 |
+
|
| 718 |
+
document.getElementById(tabName + '-tab').classList.add('active');
|
| 719 |
+
event.target.classList.add('active');
|
| 720 |
+
}
|
| 721 |
+
|
| 722 |
+
async function assessLocation(event, endpoint, resultsId) {
|
| 723 |
+
event.preventDefault();
|
| 724 |
+
|
| 725 |
+
const tabName = resultsId.split('-')[0];
|
| 726 |
+
const suffix = endpoint === '/assess' ? '' : (endpoint === '/explain' ? '2' : '3');
|
| 727 |
+
const latitude = parseFloat(document.getElementById('latitude' + suffix).value);
|
| 728 |
+
const longitude = parseFloat(document.getElementById('longitude' + suffix).value);
|
| 729 |
+
const height = parseFloat(document.getElementById('height' + suffix).value) || 0;
|
| 730 |
+
const basement = parseFloat(document.getElementById('basement' + suffix).value) || 0;
|
| 731 |
+
|
| 732 |
+
document.getElementById(tabName + '-loading').style.display = 'block';
|
| 733 |
+
document.getElementById(resultsId).style.display = 'none';
|
| 734 |
+
document.getElementById(tabName + '-error').style.display = 'none';
|
| 735 |
+
|
| 736 |
+
try {
|
| 737 |
+
const response = await fetch(endpoint, {
|
| 738 |
+
method: 'POST',
|
| 739 |
+
headers: { 'Content-Type': 'application/json' },
|
| 740 |
+
body: JSON.stringify({ latitude, longitude, height, basement })
|
| 741 |
+
});
|
| 742 |
+
|
| 743 |
+
const data = await response.json();
|
| 744 |
+
|
| 745 |
+
if (data.status === 'success') {
|
| 746 |
+
displayResults(data, resultsId, endpoint);
|
| 747 |
+
} else {
|
| 748 |
+
throw new Error(data.detail || 'Assessment failed');
|
| 749 |
+
}
|
| 750 |
+
} catch (error) {
|
| 751 |
+
document.getElementById(tabName + '-error').textContent = error.message;
|
| 752 |
+
document.getElementById(tabName + '-error').style.display = 'block';
|
| 753 |
+
} finally {
|
| 754 |
+
document.getElementById(tabName + '-loading').style.display = 'none';
|
| 755 |
+
}
|
| 756 |
+
}
|
| 757 |
+
|
| 758 |
+
function formatFlag(flag) {
|
| 759 |
+
const flagMessages = {
|
| 760 |
+
'missing_elevation': 'Elevation data unavailable',
|
| 761 |
+
'missing_tpi': 'Topographic position data incomplete',
|
| 762 |
+
'missing_slope': 'Slope data incomplete',
|
| 763 |
+
'water_distance_unknown': 'Water proximity uncertain',
|
| 764 |
+
'far_from_water_search_limited': 'Far from major water bodies (search radius limited)',
|
| 765 |
+
'steep_terrain_dem_error_high': ' Steep terrain increases measurement uncertainty',
|
| 766 |
+
'coastal_surge_risk_not_modeled': ' Coastal surge dynamics not fully captured'
|
| 767 |
+
};
|
| 768 |
+
return flagMessages[flag] || flag.replace(/_/g, ' ');
|
| 769 |
+
}
|
| 770 |
+
function displayResults(data, resultsId, endpoint) {
|
| 771 |
+
const resultsDiv = document.getElementById(resultsId);
|
| 772 |
+
const assessment = data.assessment;
|
| 773 |
+
|
| 774 |
+
let html = '<h2>Assessment Results</h2>';
|
| 775 |
+
|
| 776 |
+
// Risk badge
|
| 777 |
+
const riskClass = 'risk-' + assessment.risk_level.replace(/_/g, '-');
|
| 778 |
+
html += `<div style="margin: 15px 0;">`;
|
| 779 |
+
html += `<div class="risk-badge ${riskClass}">${assessment.risk_level.toUpperCase().replace(/_/g, ' ')}</div>`;
|
| 780 |
+
html += `</div>`;
|
| 781 |
+
|
| 782 |
+
|
| 783 |
+
|
| 784 |
+
// Vulnerability score
|
| 785 |
+
if (assessment.confidence_interval) {
|
| 786 |
+
const ci = assessment.confidence_interval;
|
| 787 |
+
html += `
|
| 788 |
+
<div class="metric">
|
| 789 |
+
<span class="metric-label">Vulnerability Index</span>
|
| 790 |
+
<span class="metric-value">
|
| 791 |
+
${ci.point_estimate} (95% CI: ${ci.lower_bound_95}–${ci.upper_bound_95})
|
| 792 |
+
</span>
|
| 793 |
+
</div>
|
| 794 |
+
`;
|
| 795 |
+
} else {
|
| 796 |
+
html += `
|
| 797 |
+
<div class="metric">
|
| 798 |
+
<span class="metric-label">Vulnerability Index</span>
|
| 799 |
+
<span class="metric-value">${assessment.vulnerability_index}</span>
|
| 800 |
+
</div>
|
| 801 |
+
`;
|
| 802 |
+
}
|
| 803 |
+
|
| 804 |
+
// Confidence visualization
|
| 805 |
+
if (assessment.uncertainty_analysis) {
|
| 806 |
+
const ua = assessment.uncertainty_analysis;
|
| 807 |
+
const confidenceValue = parseFloat(ua.confidence) || 0;
|
| 808 |
+
const barWidth = Math.round(confidenceValue * 100);
|
| 809 |
+
|
| 810 |
+
let confidenceClass = 'confidence-low-fill';
|
| 811 |
+
if (confidenceValue >= 0.75) confidenceClass = 'confidence-high';
|
| 812 |
+
else if (confidenceValue >= 0.55) confidenceClass = 'confidence-moderate-fill';
|
| 813 |
+
|
| 814 |
+
html += `
|
| 815 |
+
<div style="margin: 25px 0; padding: 20px; background: white; border-radius: 8px;">
|
| 816 |
+
<h3 style="margin-bottom: 10px; color: #333; font-size: 1.1em;">Assessment Confidence</h3>
|
| 817 |
+
<div style="display: flex; align-items: center; font-size: 0.85em; color: #555;">
|
| 818 |
+
<span style="min-width: 40px;">Low</span>
|
| 819 |
+
<div style="flex: 1; height: 24px; background: #e9ecef; border-radius: 12px; overflow: hidden; margin: 0 12px; position: relative; box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);">
|
| 820 |
+
<div class="confidence-fill ${confidenceClass}"
|
| 821 |
+
style="width: ${barWidth}%; height: 100%; transition: width 0.4s ease;"></div>
|
| 822 |
+
<span style="position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
|
| 823 |
+
font-weight: 700; color: #000; font-size: 0.9em; text-shadow: 0 0 4px rgba(255,255,255,0.9);">
|
| 824 |
+
${barWidth}%
|
| 825 |
+
</span>
|
| 826 |
+
</div>
|
| 827 |
+
<span style="min-width: 40px; text-align: right;">High</span>
|
| 828 |
+
</div>
|
| 829 |
+
<p style="margin: 12px 0 0; font-size: 0.9em; color: #555; font-style: italic;">
|
| 830 |
+
${ua.interpretation}
|
| 831 |
+
</p>
|
| 832 |
+
</div>
|
| 833 |
+
`;
|
| 834 |
+
|
| 835 |
+
// Quality flags
|
| 836 |
+
if (ua.data_quality_flags && ua.data_quality_flags.length > 0) {
|
| 837 |
+
const criticalFlags = ua.data_quality_flags.filter(flag =>
|
| 838 |
+
flag === 'steep_terrain_dem_error_high' ||
|
| 839 |
+
flag === 'coastal_surge_risk_not_modeled'
|
| 840 |
+
);
|
| 841 |
+
|
| 842 |
+
if (criticalFlags.length > 0) {
|
| 843 |
+
html += `
|
| 844 |
+
<div class="quality-flags">
|
| 845 |
+
<h4>Data Quality Notes</h4>
|
| 846 |
+
<ul>
|
| 847 |
+
`;
|
| 848 |
+
criticalFlags.forEach(flag => {
|
| 849 |
+
html += `<li>${formatFlag(flag)}</li>`;
|
| 850 |
+
});
|
| 851 |
+
html += `
|
| 852 |
+
</ul>
|
| 853 |
+
</div>
|
| 854 |
+
`;
|
| 855 |
+
}
|
| 856 |
+
}
|
| 857 |
+
}
|
| 858 |
+
|
| 859 |
+
// Terrain metrics
|
| 860 |
+
html += '<h3 style="margin-top: 25px;">Terrain Analysis</h3>';
|
| 861 |
+
html += `
|
| 862 |
+
<div class="metric">
|
| 863 |
+
<span class="metric-label">Elevation</span>
|
| 864 |
+
<span class="metric-value">${assessment.elevation_m} m</span>
|
| 865 |
+
</div>
|
| 866 |
+
<div class="metric">
|
| 867 |
+
<span class="metric-label">Relative Elevation (TPI)</span>
|
| 868 |
+
<span class="metric-value">${assessment.relative_elevation_m !== null ? assessment.relative_elevation_m + ' m' : 'N/A'}</span>
|
| 869 |
+
</div>
|
| 870 |
+
<div class="metric">
|
| 871 |
+
<span class="metric-label">Slope</span>
|
| 872 |
+
<span class="metric-value">${assessment.slope_degrees !== null ? assessment.slope_degrees + '°' : 'N/A'}</span>
|
| 873 |
+
</div>
|
| 874 |
+
<div class="metric">
|
| 875 |
+
<span class="metric-label">Distance to Water</span>
|
| 876 |
+
<span class="metric-value">
|
| 877 |
+
${assessment.distance_to_water_m !== null
|
| 878 |
+
? assessment.distance_to_water_m + ' m'
|
| 879 |
+
: 'N/A'}
|
| 880 |
+
</span>
|
| 881 |
+
</div>
|
| 882 |
+
`;
|
| 883 |
+
|
| 884 |
+
// Multi-hazard breakdown
|
| 885 |
+
if (assessment.hazard_breakdown) {
|
| 886 |
+
const hb = assessment.hazard_breakdown;
|
| 887 |
+
html += '<h3 style="margin-top: 25px;">Hazard Breakdown</h3>';
|
| 888 |
+
html += '<div class="hazard-breakdown">';
|
| 889 |
+
html += `
|
| 890 |
+
<div class="hazard-card">
|
| 891 |
+
<div>Fluvial/Riverine</div>
|
| 892 |
+
<div class="hazard-value">${hb.fluvial_riverine}</div>
|
| 893 |
+
</div>
|
| 894 |
+
<div class="hazard-card">
|
| 895 |
+
<div>Coastal Surge</div>
|
| 896 |
+
<div class="hazard-value">${hb.coastal_surge}</div>
|
| 897 |
+
</div>
|
| 898 |
+
<div class="hazard-card">
|
| 899 |
+
<div>Pluvial/Drainage</div>
|
| 900 |
+
<div class="hazard-value">${hb.pluvial_drainage}</div>
|
| 901 |
+
</div>
|
| 902 |
+
`;
|
| 903 |
+
html += '</div>';
|
| 904 |
+
html += `<p><strong>Dominant Hazard:</strong> ${assessment.dominant_hazard.replace(/_/g, ' ').toUpperCase()}</p>`;
|
| 905 |
+
}
|
| 906 |
+
|
| 907 |
+
// SHAP explanation
|
| 908 |
+
if (data.explanation) {
|
| 909 |
+
const exp = data.explanation;
|
| 910 |
+
html += '<h3 style="margin-top: 25px;">Risk Factor Explanation</h3>';
|
| 911 |
+
html += `<p><strong>Top Risk Driver:</strong> ${exp.top_risk_driver}</p>`;
|
| 912 |
+
html += '<div class="explanation-card">';
|
| 913 |
+
|
| 914 |
+
exp.explanations.forEach(factor => {
|
| 915 |
+
html += `
|
| 916 |
+
<div class="factor-contribution">
|
| 917 |
+
<span style="min-width: 150px;">${factor.factor}</span>
|
| 918 |
+
<div class="contribution-bar">
|
| 919 |
+
<div class="contribution-fill" style="width: ${factor.contribution_pct}%"></div>
|
| 920 |
+
</div>
|
| 921 |
+
<span style="min-width: 60px; text-align: right;">${factor.contribution_pct}%</span>
|
| 922 |
+
</div>
|
| 923 |
+
`;
|
| 924 |
+
});
|
| 925 |
+
|
| 926 |
+
html += '</div>';
|
| 927 |
+
}
|
| 928 |
+
|
| 929 |
+
resultsDiv.innerHTML = html;
|
| 930 |
+
resultsDiv.style.display = 'block';
|
| 931 |
+
}
|
| 932 |
+
|
| 933 |
+
async function uploadBatch() {
|
| 934 |
+
const fileInput = document.getElementById('csvFile');
|
| 935 |
+
const file = fileInput.files[0];
|
| 936 |
+
|
| 937 |
+
if (!file) {
|
| 938 |
+
alert('Please select a CSV file');
|
| 939 |
+
return;
|
| 940 |
+
}
|
| 941 |
+
|
| 942 |
+
document.getElementById('batch-loading').style.display = 'block';
|
| 943 |
+
document.getElementById('batch-results').style.display = 'none';
|
| 944 |
+
document.getElementById('batch-error').style.display = 'none';
|
| 945 |
+
|
| 946 |
+
const formData = new FormData();
|
| 947 |
+
formData.append('file', file);
|
| 948 |
+
|
| 949 |
+
try {
|
| 950 |
+
const mode = document.getElementById('batchMode').value;
|
| 951 |
+
const usePredicted = document.getElementById('usePredictedHeight').checked;
|
| 952 |
+
let endpoint = mode === 'multihazard' ? '/assess_batch_multihazard' : '/assess_batch';
|
| 953 |
+
|
| 954 |
+
if (usePredicted) {
|
| 955 |
+
const sep = endpoint.includes('?') ? '&' : '?';
|
| 956 |
+
endpoint = endpoint + sep + 'use_predicted_height=true';
|
| 957 |
+
}
|
| 958 |
+
|
| 959 |
+
const response = await fetch(endpoint, {
|
| 960 |
+
method: 'POST',
|
| 961 |
+
body: formData
|
| 962 |
+
});
|
| 963 |
+
|
| 964 |
+
if (response.ok) {
|
| 965 |
+
const blob = await response.blob();
|
| 966 |
+
const url = window.URL.createObjectURL(blob);
|
| 967 |
+
const a = document.createElement('a');
|
| 968 |
+
a.href = url;
|
| 969 |
+
const selectedMode = document.getElementById('batchMode').value;
|
| 970 |
+
const filename = selectedMode === 'multihazard'
|
| 971 |
+
? 'multihazard_results.csv'
|
| 972 |
+
: 'vulnerability_results.csv';
|
| 973 |
+
|
| 974 |
+
a.download = filename;
|
| 975 |
+
document.body.appendChild(a);
|
| 976 |
+
a.click();
|
| 977 |
+
window.URL.revokeObjectURL(url);
|
| 978 |
+
|
| 979 |
+
document.getElementById('batch-results').innerHTML = '<p>✅ Batch processing complete! Results downloaded.</p>';
|
| 980 |
+
document.getElementById('batch-results').style.display = 'block';
|
| 981 |
+
} else {
|
| 982 |
+
throw new Error('Batch processing failed');
|
| 983 |
+
}
|
| 984 |
+
} catch (error) {
|
| 985 |
+
document.getElementById('batch-error').textContent = error.message;
|
| 986 |
+
document.getElementById('batch-error').style.display = 'block';
|
| 987 |
+
} finally {
|
| 988 |
+
document.getElementById('batch-loading').style.display = 'none';
|
| 989 |
+
}
|
| 990 |
+
}
|
| 991 |
+
</script>
|
| 992 |
+
|
| 993 |
+
<footer
|
| 994 |
+
style="text-align: center; padding: 15px; margin-top: 20px; background: #2c3e50; color: white; border-top: 2px solid #667eea; font-size: 0.9em;">
|
| 995 |
+
© 2025 Flood Vulnerability Assessment | Made by ...
|
| 996 |
+
</footer>
|
| 997 |
+
</body>
|
| 998 |
+
|
| 999 |
+
</html>
|