How devp19/hotspots-ai works
Project type and purpose
• This is a full-stack geospatial AI application (“HotSpots-AI”) for computing tree-vulnerability hotspots from satellite imagery (NDVI, LST) and visualizing them in a web UI.
• The frontend is built in Next.js/React (components under HotSpots-AI/src), while data-processing and modeling are done via Python and Node scripts.
File structure
• Top-level directories:
• HotSpots-AI/ — the Next.js application and data pipelines
• model/ — standalone Python ML model and vulnerability-index scripts
• node_modules/ (supporting the root package.json)
• Under HotSpots-AI/:
• data/ — raw geospatial assets (toronto_ndvi.tif, toronto_lst.tif) & ndvi_points.csv
• compute_tree_priority.py, generate_samples.py — Python data-prep scripts
• tuneWeightsGemini.js, tuneWeights.js — Node scripts to adjust model weights
• public/ — output GeoJSON (tree_priority.geojson, vulnerability_points.geojson) and fonts
• src/ — Next.js pages and components (UI, MagicUI animations, chart & card components)
• next.config.ts, tsconfig.json, package.json, postcss.config.mjs — configuration for the build/deploy
• model/:
• rf_model.py — Random Forest model
• vulnerability_index.py — computes vulnerability scores
• tuneWeights.js — JavaScript weight-tuning utilities
README for additional insights
• While the README contains screenshots, the lack of text means we rely on file names and directory patterns to infer the architecture and data flows.
Elements
• Clear labels: “Raw TIFF/CSV” → “Data-Prep Scripts” → “RF Model” → “Weight-Tuning” → “GeoJSON Outputs” → “Next.js Frontend” → “Browser”
• Blue rectangles for code modules (Python, Node, Next.js)
• Orange for the Browser/UI layer