File size: 73,257 Bytes
3caa6e5 062607d 3caa6e5 062607d 3caa6e5 062607d 3caa6e5 062607d 3caa6e5 062607d 3caa6e5 062607d 3caa6e5 |
1 2 3 4 5 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 87 88 89 90 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 136 137 138 139 140 141 142 143 144 145 146 147 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 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 310 311 312 313 314 315 316 317 318 319 320 321 322 323 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 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Hub - Environmental & Rodent Monitoring</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
.map-container {
height: 500px;
z-index: 10;
}
.cesium-container {
height: 500px;
z-index: 10;
}
.sidebar {
height: calc(100vh - 64px);
overflow-y: auto;
}
.animated-panel {
transition: all 0.3s ease;
}
.animated-panel:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.notification-dot {
position: absolute;
top: -5px;
right: -5px;
width: 15px;
height: 15px;
background-color: #ef4444;
border-radius: 50%;
}
.blink {
animation: blink-animation 1.5s steps(5, start) infinite;
}
@keyframes blink-animation {
to {
opacity: 0.3;
}
}
.radar-bg {
background: radial-gradient(circle, rgba(59,130,246,0.1) 0%, rgba(59,130,246,0) 70%);
}
.dark-radar-bg {
background: radial-gradient(circle, rgba(37,99,235,0.1) 0%, rgba(37,99,235,0) 70%);
}
</style>
</head>
<body class="bg-gray-50 dark:bg-gray-900 text-gray-900 dark:text-gray-100 transition-colors duration-200">
<header class="bg-white dark:bg-gray-800 shadow-md fixed top-0 left-0 right-0 z-50">
<div class="container mx-auto px-4 py-3 flex items-center justify-between">
<div class="flex items-center space-x-2">
<div class="w-10 h-10 rounded-full bg-indigo-600 flex items-center justify-center text-white">
<i class="fas fa-brain text-xl"></i>
</div>
<h1 class="text-xl font-bold">AI Hub <span class="text-sm text-indigo-600 dark:text-indigo-400">by MoStar Industries</span></h1>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<button id="notifications-btn" class="p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700 relative">
<i class="fas fa-bell text-xl"></i>
<div class="notification-dot blink"></div>
</button>
<div id="notifications-panel" class="hidden absolute right-0 mt-2 w-72 bg-white dark:bg-gray-800 rounded-md shadow-lg z-50 py-1 border border-gray-200 dark:border-gray-700">
<div class="px-4 py-2 border-b border-gray-200 dark:border-gray-700">
<h3 class="font-semibold">Notifications</h3>
</div>
<div class="max-h-64 overflow-y-auto">
<div class="px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer">
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-red-100 dark:bg-red-900 flex items-center justify-center">
<i class="fas fa-exclamation text-red-600 dark:text-red-300"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium">High risk cluster detected in Lagos State</p>
<p class="text-xs text-gray-500 dark:text-gray-400">5 min ago</p>
</div>
</div>
</div>
<div class="px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer">
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 dark:bg-blue-900 flex items-center justify-center">
<i class="fas fa-chart-line text-blue-600 dark:text-blue-300"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium">New temporal pattern identified</p>
<p class="text-xs text-gray-500 dark:text-gray-400">12 min ago</p>
</div>
</div>
</div>
<div class="px-4 py-3 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer">
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center">
<i class="fas fa-tasks text-green-600 dark:text-green-300"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium">Model retraining completed (F1: 0.94)</p>
<p class="text-xs text-gray-500 dark:text-gray-400">25 min ago</p>
</div>
</div>
</div>
</div>
<div class="px-4 py-2 border-t border-gray-200 dark:border-gray-700 text-center">
<a href="#" class="text-sm text-indigo-600 dark:text-indigo-400 font-medium">View all</a>
</div>
</div>
</div>
<button id="theme-toggle" class="p-2 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700">
<i id="theme-icon" class="fas fa-moon text-xl"></i>
</button>
<div class="relative">
<button id="user-menu-btn" class="flex items-center space-x-2 p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700">
<div class="w-8 h-8 rounded-full bg-indigo-600 flex items-center justify-center text-white text-sm font-semibold">AD</div>
</button>
<div id="user-menu" class="hidden absolute right-0 mt-2 w-48 bg-white dark:bg-gray-800 rounded-md shadow-lg z-50 py-1 border border-gray-200 dark:border-gray-700">
<a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700">Profile</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700">Settings</a>
<a href="#" class="block px-4 py-2 text-sm text-gray-700 dark:text-gray-200 hover:bg-gray-100 dark:hover:bg-gray-700">Log out</a>
</div>
</div>
</div>
</div>
</header>
<div class="flex pt-16">
<!-- Sidebar -->
<aside class="bg-white dark:bg-gray-800 shadow-md w-64 flex-shrink-0 sidebar hidden md:block">
<div class="px-4 py-6">
<div class="mb-6">
<h2 class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400 mb-4">Navigation</h2>
<nav>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md bg-indigo-50 dark:bg-gray-700 text-indigo-700 dark:text-indigo-300">
<i class="fas fa-tachometer-alt text-indigo-500 dark:text-indigo-400 mr-3"></i>
Dashboard
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-map-marked-alt text-blue-500 dark:text-blue-400 mr-3"></i>
Geospatial Analysis
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-chart-line text-green-500 dark:text-green-400 mr-3"></i>
Temporal Analysis
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-robot text-purple-500 dark:text-purple-400 mr-3"></i>
Predictive Models
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-camera text-yellow-500 dark:text-yellow-400 mr-3"></i>
Image Detection
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-database text-red-500 dark:text-red-400 mr-3"></i>
Data Management
</a>
</nav>
</div>
<div class="mb-6">
<h2 class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400 mb-4">Quick Access</h2>
<nav>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700">
<i class="fas fa-radar text-indigo-500 dark:text-indigo-400 mr-3"></i>
Habitat Radar
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-bolt text-yellow-500 dark:text-yellow-400 mr-3"></i>
Risk Alerts
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-question-circle text-blue-500 dark:text-blue-400 mr-3"></i>
RAG Assistant
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-chalkboard-teacher text-purple-500 dark:text-purple-400 mr-3"></i>
Model Training
</a>
</nav>
</div>
<div class="mb-6">
<h2 class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400 mb-4">Monitoring</h2>
<div class="space-y-1">
<div class="flex items-center justify-between px-3 py-2 text-sm rounded-md text-gray-600 dark:text-gray-300 bg-gray-50 dark:bg-gray-700">
<span>System Status</span>
<span class="text-green-500">Online</span>
</div>
<div class="flex items-center justify-between px-3 py-2 text-sm rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700">
<span>API Connections</span>
<span class="text-green-500">7/7</span>
</div>
<div class="flex items-center justify-between px-3 py-2 text-sm rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700">
<span>Data Latency</span>
<span class="text-green-500">98 ms</span>
</div>
<div class="flex items-center justify-between px-3 py-2 text-sm rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700">
<span>Model Accuracy</span>
<span class="text-green-500">92.7%</span>
</div>
</div>
</div>
<div class="p-4 bg-indigo-50 dark:bg-gray-700 rounded-lg">
<h3 class="text-sm font-medium mb-2">Data Collection</h3>
<div class="w-full bg-gray-200 dark:bg-gray-600 rounded-full h-2.5">
<div class="bg-indigo-600 h-2.5 rounded-full" style="width: 83%"></div>
</div>
<p class="text-xs mt-2 text-gray-500 dark:text-gray-300">83% of daily target collected</p>
<button class="mt-2 w-full bg-indigo-600 hover:bg-indigo-700 text-white py-1 px-3 rounded-md text-sm font-medium transition-colors">
<i class="fas fa-upload mr-1"></i> Submit Data
</button>
</div>
</div>
</aside>
<!-- Mobile sidebar button -->
<button id="mobile-sidebar-btn" class="md:hidden fixed bottom-4 right-4 z-40 bg-indigo-600 text-white p-3 rounded-full shadow-lg hover:bg-indigo-700 transition-colors">
<i class="fas fa-bars text-xl"></i>
</button>
<!-- Mobile sidebar -->
<aside id="mobile-sidebar" class="hidden fixed inset-0 bg-gray-900 bg-opacity-50 z-40">
<div class="fixed inset-y-0 left-0 w-64 bg-white dark:bg-gray-800 shadow-md overflow-y-auto sidebar">
<div class="px-4 py-6">
<div class="flex justify-between items-center mb-8">
<h1 class="text-xl font-bold">AI Hub</h1>
<button id="close-mobile-sidebar" class="p-1 rounded-full hover:bg-gray-100 dark:hover:bg-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="mb-6">
<h2 class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400 mb-4">Navigation</h2>
<nav>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md bg-indigo-50 dark:bg-gray-700 text-indigo-700 dark:text-indigo-300">
<i class="fas fa-tachometer-alt text-indigo-500 dark:text-indigo-400 mr-3"></i>
Dashboard
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-map-marked-alt text-blue-500 dark:text-blue-400 mr-3"></i>
Geospatial Analysis
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-chart-line text-green-500 dark:text-green-400 mr-3"></i>
Temporal Analysis
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-robot text-purple-500 dark:text-purple-400 mr-3"></i>
Predictive Models
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-camera text-yellow-500 dark:text-yellow-400 mr-3"></i>
Image Detection
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-database text-red-500 dark:text-red-400 mr-3"></i>
Data Management
</a>
</nav>
</div>
<div class="mb-6">
<h2 class="text-xs font-semibold uppercase tracking-wider text-gray-500 dark:text-gray-400 mb-4">Quick Access</h2>
<nav>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700">
<i class="fas fa-radar text-indigo-500 dark:text-indigo-400 mr-3"></i>
Habitat Radar
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-bolt text-yellow-500 dark:text-yellow-400 mr-3"></i>
Risk Alerts
</a>
<a href="#" class="flex items-center px-3 py-2 text-sm font-medium rounded-md text-gray-600 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-700 mt-1">
<i class="fas fa-question-circle text-blue-500 dark:text-blue-400 mr-3"></i>
RAG Assistant
</a>
</nav>
</div>
</div>
</div>
</aside>
<!-- Main Content -->
<main class="flex-1 overflow-auto">
<div class="container mx-auto px-4 py-6">
<!-- Dashboard Header -->
<div class="flex flex-col md:flex-row justify-between items-start md:items-end mb-6">
<div>
<h2 class="text-2xl font-bold mb-2">Environmental & Rodent Monitoring</h2>
<p class="text-gray-600 dark:text-gray-300">Real-time analysis of Mastomys Natalensis habitats and Lassa fever risk assessment</p>
</div>
<div class="mt-4 md:mt-0 flex space-x-3">
<div class="relative">
<select class="appearance-none bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 rounded-md pl-3 pr-8 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
<option>Nigeria</option>
<option>Ghana</option>
<option>Benin</option>
</select>
<div class="absolute inset-y-0 right-0 flex items-center pr-2 pointer-events-none">
<i class="fas fa-chevron-down text-gray-400"></i>
</div>
</div>
<button class="bg-indigo-600 hover:bg-indigo-700 text-white py-2 px-4 rounded-md text-sm font-medium transition-colors flex items-center">
<i class="fas fa-sync-alt mr-2"></i> Refresh Data
</button>
</div>
</div>
<!-- Stats Cards -->
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6">
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 animated-panel">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Detections Today</p>
<p class="text-2xl font-bold mt-1">142</p>
<p class="text-xs text-green-500 mt-1">
<i class="fas fa-arrow-up mr-1"></i> 12% from yesterday
</p>
</div>
<div class="h-12 w-12 rounded-full bg-indigo-100 dark:bg-indigo-900 flex items-center justify-center">
<i class="fas fa-search text-indigo-600 dark:text-indigo-300 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 animated-panel">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">High Risk Areas</p>
<p class="text-2xl font-bold mt-1">8</p>
<p class="text-xs text-red-500 mt-1">
<i class="fas fa-exclamation-circle mr-1"></i> 2 new hotspots
</p>
</div>
<div class="h-12 w-12 rounded-full bg-red-100 dark:bg-red-900 flex items-center justify-center">
<i class="fas fa-radiation text-red-600 dark:text-red-300 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 animated-panel">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Habitat Suitability</p>
<p class="text-2xl font-bold mt-1">6.8/10</p>
<p class="text-xs text-yellow-500 mt-1">
<svg class="inline mr-1 w-3 h-3" fill="currentColor" viewBox="0 0 20 20">
<path fill-rule="evenodd" d="M5.293 9.707a1 1 0 010-1.414l4-4a1 1 0 011.414 0l4 4a1 1 0 01-1.414 1.414L11 7.414V15a1 1 0 11-2 0V7.414L6.707 9.707a1 1 0 01-1.414 0z" clip-rule="evenodd"></path>
</svg>
Similar to last week
</p>
</div>
<div class="h-12 w-12 rounded-full bg-green-100 dark:bg-green-900 flex items-center justify-center">
<i class="fas fa-leaf text-green-600 dark:text-green-300 text-xl"></i>
</div>
</div>
</div>
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md p-6 animated-panel">
<div class="flex items-center justify-between">
<div>
<p class="text-sm font-medium text-gray-500 dark:text-gray-400">Model Accuracy</p>
<p class="text-2xl font-bold mt-1">92.7%</p>
<p class="text-xs text-green-500 mt-1">
<i class="fas fa-arrow-up mr-1"></i> 1.2% improvement
</p>
</div>
<div class="h-12 w-12 rounded-full bg-purple-100 dark:bg-purple-900 flex items-center justify-center">
<i class="fas fa-brain text-purple-600 dark:text-purple-300 text-xl"></i>
</div>
</div>
</div>
</div>
<!-- Map Visualization -->
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden mb-6">
<div class="p-4 border-b border-gray-200 dark:border-gray-700">
<h3 class="font-semibold flex items-center">
<i class="fas fa-map-marked-alt text-indigo-500 mr-2"></i>
Geospatial Habitat Analysis
</h3>
</div>
<div class="p-4">
<div id="map" class="map-container rounded-md"></div>
</div>
<div class="p-4 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center">
<div class="flex space-x-2">
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-red-500 mr-1"></div>
<span class="text-xs">High Risk</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-yellow-500 mr-1"></div>
<span class="text-xs">Medium Risk</span>
</div>
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-green-500 mr-1"></div>
<span class="text-xs">Low Risk</span>
</div>
</div>
<button class="text-sm text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300 flex items-center">
<i class="fas fa-layer-group mr-1"></i> Layers
</button>
</div>
</div>
<!-- Main Dashboard Content -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6">
<!-- Left Column -->
<div class="lg:col-span-2 space-y-6">
<!-- Temporal Analysis -->
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
<div class="p-4 border-b border-gray-200 dark:border-gray-700">
<h3 class="font-semibold flex items-center">
<i class="fas fa-chart-line text-green-500 mr-2"></i>
Detection Patterns Over Time
</h3>
</div>
<div class="p-4">
<canvas id="temporalChart" height="250"></canvas>
</div>
<div class="p-4 border-t border-gray-200 dark:border-gray-700 flex justify-between items-center">
<div class="flex space-x-4">
<button class="text-xs px-2 py-1 rounded bg-indigo-50 dark:bg-indigo-900 text-indigo-700 dark:text-indigo-200">Daily</button>
<button class="text-xs px-2 py-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700">Weekly</button>
<button class="text-xs px-2 py-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700">Monthly</button>
</div>
<button class="text-xs text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300">
<i class="fas fa-download mr-1"></i> Export
</button>
</div>
</div>
<!-- Ecosystem Analytics -->
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
<!-- Weather and Climate -->
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
<div class="p-4 border-b border-gray-200 dark:border-gray-700">
<h3 class="font-semibold flex items-center">
<i class="fas fa-cloud-sun text-blue-500 mr-2"></i>
Weather & Climate Impact
</h3>
</div>
<div class="p-4">
<div class="grid grid-cols-3 gap-4 text-center mb-4">
<div class="p-3 rounded-lg bg-blue-50 dark:bg-blue-900">
<div class="text-2xl font-bold">28°C</div>
<div class="text-xs text-gray-500 dark:text-gray-300 mt-1">Temperature</div>
</div>
<div class="p-3 rounded-lg bg-green-50 dark:bg-green-900">
<div class="text-2xl font-bold">76%</div>
<div class="text-xs text-gray-500 dark:text-gray-300 mt-1">Humidity</div>
</div>
<div class="p-3 rounded-lg bg-purple-50 dark:bg-purple-900">
<div class="text-2xl font-bold">12mm</div>
<div class="text-xs text-gray-500 dark:text-gray-300 mt-1">Rainfall</div>
</div>
</div>
<canvas id="weatherChart" height="180"></canvas>
</div>
<div class="p-4 border-t border-gray-200 dark:border-gray-700 text-sm text-gray-600 dark:text-gray-300">
<i class="fas fa-info-circle text-indigo-500 mr-1"></i> Next 3 days expected to increase suitability scores by 1-2 points
</div>
</div>
<!-- Model Performance -->
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
<div class="p-4 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center">
<h3 class="font-semibold flex items-center">
<i class="fas fa-brain text-purple-500 mr-2"></i>
Model Performance
</h3>
<div class="flex space-x-2">
<button class="text-xs px-2 py-1 rounded bg-indigo-50 dark:bg-indigo-900 text-indigo-700 dark:text-indigo-200">XGBoost</button>
<button class="text-xs px-2 py-1 rounded hover:bg-gray-100 dark:hover:bg-gray-700">LSTM</button>
</div>
</div>
<div class="p-4">
<canvas id="modelChart" height="180"></canvas>
</div>
<div class="p-4 border-t border-gray-200 dark:border-gray-700 grid grid-cols-3 gap-2 text-center">
<div>
<div class="text-lg font-bold text-green-500">94%</div>
<div class="text-xs text-gray-500 dark:text-gray-300">Accuracy</div>
</div>
<div>
<div class="text-lg font-bold text-blue-500">92%</div>
<div class="text-xs text-gray-500 dark:text-gray-300">Precision</div>
</div>
<div>
<div class="text-lg font-bold text-purple-500">89%</div>
<div class="text-xs text-gray-500 dark:text-gray-300">Recall</div>
</div>
</div>
</div>
</div>
<!-- Recent Detections -->
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
<div class="p-4 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center">
<h3 class="font-semibold flex items-center">
<i class="fas fa-search-location text-indigo-500 mr-2"></i>
Recent Detections
</h3>
<button class="text-sm text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300 flex items-center">
<i class="fas fa-filter mr-1"></i> Filter
</button>
</div>
<div class="overflow-x-auto">
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Timestamp</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Location</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Confidence</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Environmental Data</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700">
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300">10:23 AM</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium">Lagos (6.5244, 3.3792)</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200">
98%
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300">
<div>Temp: 28°C</div>
<div>Humidity: 76%</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3">View</a>
<a href="#" class="text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300">Flag</a>
</td>
</tr>
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700">
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300">09:47 AM</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium">Ogun (7.1557, 3.3456)</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200">
87%
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300">
<div>Temp: 26°C</div>
<div>Humidity: 82%</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3">View</a>
<a href="#" class="text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300">Flag</a>
</td>
</tr>
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700">
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300">08:12 AM</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium">Kano (12.0024, 8.5923)</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200">
96%
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300">
<div>Temp: 30°C</div>
<div>Humidity: 65%</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3">View</a>
<a href="#" class="text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300">Flag</a>
</td>
</tr>
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700">
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300">07:35 AM</td>
<td class="px-6 py-4 whitespace-nowrap">
<div class="text-sm font-medium">Rivers (4.8156, 7.0498)</div>
</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-yellow-100 dark:bg-yellow-900 text-yellow-800 dark:text-yellow-200">
82%
</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-300">
<div>Temp: 25°C</div>
<div>Humidity: 88%</div>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-900 dark:hover:text-indigo-300 mr-3">View</a>
<a href="#" class="text-red-600 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300">Flag</a>
</td>
</tr>
</tbody>
</table>
</div>
<div class="px-6 py-4 border-t border-gray-200 dark:border-gray-700 flex items-center justify-between">
<div class="flex-1 flex justify-between sm:hidden">
<a href="#" class="relative inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 text-sm font-medium rounded-md text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"> Previous </a>
<a href="#" class="ml-3 relative inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 text-sm font-medium rounded-md text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600"> Next </a>
</div>
<div class="hidden sm:flex-1 sm:flex sm:items-center sm:justify-between">
<div>
<p class="text-sm text-gray-700 dark:text-gray-300"> Showing <span class="font-medium">1</span> to <span class="font-medium">4</span> of <span class="font-medium">127</span> results </p>
</div>
<div>
<nav class="relative z-0 inline-flex rounded-md shadow-sm -space-x-px" aria-label="Pagination">
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-l-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-sm font-medium text-gray-500 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600"> <span class="sr-only">Previous</span> <i class="fas fa-chevron-left"></i> </a>
<a href="#" aria-current="page" class="z-10 bg-indigo-50 dark:bg-indigo-900 border-indigo-500 dark:border-indigo-700 text-indigo-600 dark:text-indigo-300 relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 1 </a>
<a href="#" class="bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 2 </a>
<a href="#" class="bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 3 </a>
<span class="relative inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-sm font-medium text-gray-700 dark:text-gray-300"> ... </span>
<a href="#" class="bg-white dark:bg-gray-700 border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600 relative inline-flex items-center px-4 py-2 border text-sm font-medium"> 8 </a>
<a href="#" class="relative inline-flex items-center px-2 py-2 rounded-r-md border border-gray-300 dark:border-gray-600 bg-white dark:bg-gray-700 text-sm font-medium text-gray-500 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-600"> <span class="sr-only">Next</span> <i class="fas fa-chevron-right"></i> </a>
</nav>
</div>
</div>
</div>
</div>
</div>
<!-- Right Sidebar - Alerts and Results -->
<div class="space-y-6">
<!-- Risk Alerts -->
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
<div class="p-4 border-b border-gray-200 dark:border-gray-700">
<h3 class="font-semibold flex items-center justify-between">
<span><i class="fas fa-exclamation-triangle text-red-500 mr-2"></i> Risk Alerts</span>
<span class="text-xs bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200 px-2 py-1 rounded-full">3 New</span>
</h3>
</div>
<div class="divide-y divide-gray-200 dark:divide-gray-700 max-h-96 overflow-y-auto">
<div class="p-4 hover:bg-red-50 dark:hover:bg-red-900 cursor-pointer">
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-red-100 dark:bg-red-800 flex items-center justify-center text-red-600 dark:text-red-300">
<i class="fas fa-radiation"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium">High risk cluster in Lagos</p>
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">New cluster detected with 87% outbreak probability</p>
<p class="text-xs text-gray-400 mt-1">15 min ago</p>
</div>
</div>
</div>
<div class="p-4 hover:bg-orange-50 dark:hover:bg-gray-700 cursor-pointer">
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-orange-100 dark:bg-orange-800 flex items-center justify-center text-orange-600 dark:text-orange-300">
<i class="fas fa-chart-line"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium">Unusual movement pattern</p>
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">Detected erratic movements in Ogun State</p>
<p class="text-xs text-gray-400 mt-1">42 min ago</p>
</div>
</div>
</div>
<div class="p-4 hover:bg-yellow-50 dark:hover:bg-gray-700 cursor-pointer">
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-yellow-100 dark:bg-yellow-800 flex items-center justify-center text-yellow-600 dark:text-yellow-300">
<i class="fas fa-tint"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium">Rainfall anomaly detected</p>
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">Increased rainfall in Kano may affect habitats</p>
<p class="text-xs text-gray-400 mt-1">2 hours ago</p>
</div>
</div>
</div>
<div class="p-4 hover:bg-gray-50 dark:hover:bg-gray-700 cursor-pointer">
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 dark:bg-blue-800 flex items-center justify-center text-blue-600 dark:text-blue-300">
<i class="fas fa-home"></i>
</div>
<div class="ml-3">
<p class="text-sm font-medium">New habitat identified</p>
<p class="text-xs text-gray-500 dark:text-gray-400 mt-1">Potential nesting area in Rivers State</p>
<p class="text-xs text-gray-400 mt-1">5 hours ago</p>
</div>
</div>
</div>
</div>
<div class="p-4 border-t border-gray-200 dark:border-gray-700 text-center">
<a href="#" class="text-sm text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300 font-medium">View all alerts (12)</a>
</div>
</div>
<!-- Habitat Suitability Analysis -->
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden">
<div class="p-4 border-b border-gray-200 dark:border-gray-700">
<h3 class="font-semibold flex items-center">
<i class="fas fa-leaf text-green-500 mr-2"></i>
Habitat Suitability
</h3>
</div>
<div class="p-4">
<div class="flex items-center justify-between mb-3">
<div class="text-sm font-medium">Lagos State</div>
<div class="text-sm font-bold text-blue-600 dark:text-blue-400">6.8/10</div>
</div>
<div class="w-full bg-gray-200 dark:bg-gray-600 rounded-full h-2.5">
<div class="bg-blue-600 h-2.5 rounded-full" style="width: 68%"></div>
</div>
<div class="flex items-center justify-between mt-4 mb-3">
<div class="text-sm font-medium">Ogun State</div>
<div class="text-sm font-bold text-green-600 dark:text-green-400">7.4/10</div>
</div>
<div class="w-full bg-gray-200 dark:bg-gray-600 rounded-full h-2.5">
<div class="bg-green-600 h-2.5 rounded-full" style="width: 74%"></div>
</div>
<div class="flex items-center justify-between mt-4 mb-3">
<div class="text-sm font-medium">Kano State</div>
<div class="text-sm font-bold text-yellow-600 dark:text-yellow-400">5.1/10</div>
</div>
<div class="w-full bg-gray-200 dark:bg-gray-600 rounded-full h-2.5">
<div class="bg-yellow-500 h-2.5 rounded-full" style="width: 51%"></div>
</div>
</div>
<div class="p-4 border-t border-gray-200 dark:border-gray-700">
<button class="w-full bg-indigo-600 hover:bg-indigo-700 text-white py-2 px-4 rounded-md text-sm font-medium transition-colors">
<i class="fas fa-chart-pie mr-2"></i> Full Analysis Report
</button>
</div>
</div>
</div>
</div>
<!-- AI Assistant Panel -->
<div class="bg-white dark:bg-gray-800 rounded-lg shadow-md overflow-hidden mb-6">
<div class="p-4 border-b border-gray-200 dark:border-gray-700">
<h3 class="font-semibold flex items-center">
<i class="fas fa-robot text-indigo-500 mr-2"></i>
AI Assistant - Generate Insights
</h3>
</div>
<div class="p-4">
<div class="rounded-lg border border-gray-200 dark:border-gray-700 p-4 mb-4">
<div class="flex items-start">
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-indigo-100 dark:bg-indigo-900 flex items-center justify-center text-indigo-600 dark:text-indigo-300">
<i class="fas fa-robot"></i>
</div>
<div class="ml-3">
<div class="text-sm font-medium mb-1">AI Assistant</div>
<div class="text-sm bg-gray-50 dark:bg-gray-700 rounded-lg p-3">
<p>Hello! I can help analyze trends, predict outbreaks, or explain any patterns in the data. What would you like to know?</p>
<div class="mt-2 flex flex-wrap gap-2">
<button class="text-xs px-2 py-1 rounded bg-indigo-50 dark:bg-indigo-900 text-indigo-700 dark:text-indigo-200">Trends in Lagos</button>
<button class="text-xs px-2 py-1 rounded bg-indigo-50 dark:bg-indigo-900 text-indigo-700 dark:text-indigo-200">Risk factors</button>
<button class="text-xs px-2 py-1 rounded bg-indigo-50 dark:bg-indigo-900 text-indigo-700 dark:text-indigo-200">Explain prediction</button>
</div>
</div>
</div>
</div>
</div>
<div class="relative">
<textarea id="ai-prompt" class="w-full border border-gray-300 dark:border-gray-600 rounded-md pl-4 pr-12 py-3 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 dark:bg-gray-700" rows="3" placeholder="Ask me anything about the data, habitats, or predictions..."></textarea>
<button id="send-prompt" class="absolute right-2 bottom-3 bg-indigo-600 hover:bg-indigo-700 text-white p-2 rounded-md">
<i class="fas fa-paper-plane"></i>
</button>
</div>
</div>
<div class="p-4 border-t border-gray-200 dark:border-gray-700 text-xs text-gray-500 dark:text-gray-400">
<i class="fas fa-info-circle text-indigo-500 mr-1"></i> Using DeepSeek-R1-Distill-Qwen-7B with LangChain integration
</div>
</div>
</div>
</main>
</div>
<script>
// Toggle dark/light mode
const themeToggle = document.getElementById('theme-toggle');
const themeIcon = document.getElementById('theme-icon');
const html = document.documentElement;
// Check for saved theme preference or use preferred color scheme
const currentTheme = localStorage.getItem('theme') ||
(window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
html.classList.toggle('dark', currentTheme === 'dark');
themeIcon.className = currentTheme === 'dark' ? 'fas fa-sun text-xl' : 'fas fa-moon text-xl';
themeToggle.addEventListener('click', () => {
const isDark = html.classList.toggle('dark');
themeIcon.className = isDark ? 'fas fa-sun text-xl' : 'fas fa-moon text-xl';
localStorage.setItem('theme', isDark ? 'dark' : 'light');
});
// Toggle mobile sidebar
const mobileSidebarBtn = document.getElementById('mobile-sidebar-btn');
const mobileSidebar = document.getElementById('mobile-sidebar');
const closeMobileSidebar = document.getElementById('close-mobile-sidebar');
mobileSidebarBtn.addEventListener('click', () => {
mobileSidebar.classList.remove('hidden');
});
closeMobileSidebar.addEventListener('click', () => {
mobileSidebar.classList.add('hidden');
});
// Notification dropdown
const notificationsBtn = document.getElementById('notifications-btn');
const notificationsPanel = document.getElementById('notifications-panel');
notificationsBtn.addEventListener('click', (e) => {
e.stopPropagation();
notificationsPanel.classList.toggle('hidden');
});
// Close notifications when clicking elsewhere
document.addEventListener('click', () => {
if (!notificationsPanel.classList.contains('hidden')) {
notificationsPanel.classList.add('hidden');
}
});
// User menu dropdown
const userMenuBtn = document.getElementById('user-menu-btn');
const userMenu = document.getElementById('user-menu');
userMenuBtn.addEventListener('click', (e) => {
e.stopPropagation();
userMenu.classList.toggle('hidden');
});
// Close user menu when clicking elsewhere
document.addEventListener('click', () => {
if (!userMenu.classList.contains('hidden')) {
userMenu.classList.add('hidden');
}
});
// Initialize Leaflet map
const map = L.map('map').setView([9.0820, 8.6753], 6);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
// Add some sample markers and clusters
const highRiskIcon = L.divIcon({
className: 'risk-icon-high',
html: '<div class="w-6 h-6 rounded-full bg-red-500 border-2 border-white flex items-center justify-center text-white text-xs font-bold shadow-lg">H</div>',
iconSize: [24, 24],
iconAnchor: [12, 12]
});
const mediumRiskIcon = L.divIcon({
className: 'risk-icon-medium',
html: '<div class="w-6 h-6 rounded-full bg-yellow-500 border-2 border-white flex items-center justify-center text-white text-xs font-bold shadow-lg">M</div>',
iconSize: [24, 24],
iconAnchor: [12, 12]
});
const lowRiskIcon = L.divIcon({
className: 'risk-icon-low',
html: '<div class="w-6 h-6 rounded-full bg-green-500 border-2 border-white flex items-center justify-center text-white text-xs font-bold shadow-lg">L</div>',
iconSize: [24, 24],
iconAnchor: [12, 12]
});
// Sample data - in a real app this would come from the API
const detectionData = [
{ lat: 6.5244, lng: 3.3792, risk: 'high', confidence: 98, popup: 'Lagos Cluster - 15 detections' },
{ lat: 7.1557, lng: 3.3456, risk: 'medium', confidence: 87, popup: 'Ogun Group - 8 detections' },
{ lat: 12.0024, lng: 8.5923, risk: 'low', confidence: 65, popup: 'Kano Sighting - 2 detections' },
{ lat: 4.8156, lng: 7.0498, risk: 'medium', confidence: 82, popup: 'Rivers Area - 5 detections' },
{ lat: 10.5172, lng: 7.4333, risk: 'low', confidence: 72, popup: 'Kaduna Zone - 3 detections' },
{ lat: 9.0579, lng: 7.4951, risk: 'high', confidence: 93, popup: 'Abuja Cluster - 12 detections' },
{ lat: 5.1477, lng: 7.3539, risk: 'medium', confidence: 81, popup: 'Imo Group - 6 detections' }
];
// Add markers to the map
detectionData.forEach(detection => {
let icon;
if (detection.risk === 'high') {
icon = highRiskIcon;
} else if (detection.risk === 'medium') {
icon = mediumRiskIcon;
} else {
icon = lowRiskIcon;
}
const marker = L.marker([detection.lat, detection.lng], { icon: icon })
.addTo(map)
.bindPopup(`<div class="p-1"><b>${detection.popup}</b><br>Risk: ${detection.risk}<br>Confidence: ${detection.confidence}%</div>`);
});
// Temporal Analysis Chart
const temporalCtx = document.getElementById('temporalChart').getContext('2d');
const temporalChart = new Chart(temporalCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
datasets: [
{
label: 'Detections 2023',
data: [45, 60, 75, 82, 90, 105, 95, 110, 98, 85, 70, 55],
borderColor: '#4f46e5',
backgroundColor: 'rgba(79, 70, 229, 0.1)',
tension: 0.3,
fill: true
},
{
label: 'Detections 2022',
data: [30, 45, 50, 65, 75, 85, 80, 90, 78, 65, 50, 40],
borderColor: '#10b981',
backgroundColor: 'rgba(16, 185, 129, 0.1)',
tension: 0.3,
fill: true,
borderDash: [5, 5]
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
},
tooltip: {
mode: 'index',
intersect: false,
}
},
scales: {
y: {
beginAtZero: true,
title: {
display: true,
text: 'Number of Detections'
}
},
x: {
title: {
display: true,
text: 'Month'
}
}
}
}
});
// Weather Chart
const weatherCtx = document.getElementById('weatherChart').getContext('2d');
const weatherChart = new Chart(weatherCtx, {
type: 'bar',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
datasets: [
{
label: 'Rainfall (mm)',
data: [20, 40, 65, 130, 170, 185, 160, 145, 175, 150, 45, 15],
backgroundColor: 'rgba(59, 130, 246, 0.7)',
borderColor: 'rgba(59, 130, 246, 1)',
borderWidth: 1,
yAxisID: 'y'
},
{
label: 'Temperature (°C)',
data: [30, 32, 33, 32, 30, 28, 27, 27, 28, 29, 31, 31],
borderColor: 'rgba(220, 38, 38, 1)',
backgroundColor: 'rgba(220, 38, 38, 0.1)',
borderWidth: 2,
type: 'line',
yAxisID: 'y1'
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
},
tooltip: {
mode: 'index',
intersect: false,
}
},
scales: {
y: {
type: 'linear',
display: true,
position: 'left',
title: {
display: true,
text: 'Rainfall (mm)'
}
},
y1: {
type: 'linear',
display: true,
position: 'right',
title: {
display: true,
text: 'Temperature (°C)'
},
grid: {
drawOnChartArea: false,
},
min: 25,
max: 35
}
}
}
});
// Model Performance Chart
const modelCtx = document.getElementById('modelChart').getContext('2d');
const modelChart = new Chart(modelCtx, {
type: 'radar',
data: {
labels: ['Accuracy', 'Precision', 'Recall', 'F1 Score', 'Specificity', 'ROC AUC'],
datasets: [
{
label: 'XGBoost',
data: [94, 92, 89, 90, 93, 95],
backgroundColor: 'rgba(124, 58, 237, 0.2)',
borderColor: 'rgba(124, 58, 237, 1)',
borderWidth: 2
},
{
label: 'Random Forest',
data: [89, 87, 84, 85, 88, 90],
backgroundColor: 'rgba(16, 185, 129, 0.2)',
borderColor: 'rgba(16, 185, 129, 1)',
borderWidth: 2
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
}
},
scales: {
r: {
angleLines: {
display: true
},
suggestedMin: 70,
suggestedMax: 100
}
}
}
});
// Simulate AI assistant response
const aiPrompt = document.getElementById('ai-prompt');
const sendPrompt = document.getElementById('send-prompt');
sendPrompt.addEventListener('click', () => {
const question = aiPrompt.value.trim();
if (question) {
// In a real app, this would call the LangChain API
console.log(`Sending to AI: ${question}`);
aiPrompt.value = '';
// Simulate response
setTimeout(() => {
const responsePanel = document.querySelector('.rounded-lg.border');
const responseDiv = document.createElement('div');
responseDiv.className = 'flex items-start mt-4';
responseDiv.innerHTML = `
<div class="flex-shrink-0 h-10 w-10 rounded-full bg-indigo-100 dark:bg-indigo-900 flex items-center justify-center text-indigo-600 dark:text-indigo-300">
<i class="fas fa-robot"></i>
</div>
<div class="ml-3">
<div class="text-sm font-medium mb-1">AI Assistant</div>
<div class="text-sm bg-gray-50 dark:bg-gray-700 rounded-lg p-3">
<p>Based on the recent data, I've detected an increasing trend in Lagos detections (+18% from last month).
The primary factors contributing to this increase appear to be higher rainfall and vegetation density,
which create ideal habitat conditions for Mastomys Natalensis.</p>
<div class="mt-2 text-xs text-gray-500 dark:text-gray-400">
<i class="fas fa-info-circle text-indigo-500 mr-1"></i> Confidence: 89% | Sources: MNTRK API, OpenWeather, Cesium
</div>
</div>
</div>
`;
responsePanel.appendChild(responseDiv);
}, 1000);
}
});
// Press Enter to send message
aiPrompt.addEventListener('keypress', (e) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
sendPrompt.click();
}
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=MoShow/mnt" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |