How isatyamks/uhi-detector works
Project Type and Purpose
Project Type:
GeoSmartPredict is a full-stack, AI-powered platform designed for detecting and forecasting Urban Heat Islands (UHIs). It integrates data collection, machine learning modeling, visualization, and user interaction through a web-based dashboard.
Purpose:
• Detection: Identify existing UHIs using satellite imagery and environmental data.
• Prediction: Forecast future temperature trends and UHI expansion.
• Actionable Insights: Provide recommendations to urban planners and policymakers for UHI mitigation.
File Structure
Top-Level Directories and Files:
• data/: Contains geospatial data (geojson), machine learning models (.hdf5), and raster files in JSON format.
• notebooks/: Houses Jupyter notebooks for data analysis, model building/testing, and related checkpoints.
• src/: Includes source code, specifically weather_data.py for handling weather-related data.
• testing/: Contains scripts for testing maps, regions of interest (ROI), and various versions.
• readme.md: Project documentation.
• requirements.txt: Lists project dependencies.
Architectural Indicators:
• Presence of data, src, and notebooks suggests a strong emphasis on data processing and machine learning.
• Testing/ indicates a focus on validating different components.
• Use of .hdf5 files points to trained machine learning models.
• Raster_files and geojson data suggest geospatial data handling.
README for Additional Insights
Technologies and Tools:
• Data Sources: Google Earth Engine (GEE), OpenWeatherMap API, OpenStreetMap.
• Programming Languages & Frameworks: Python with libraries like Numpy, Pandas, Scikit-learn, TensorFlow/PyTorch, GeoPandas.
• Visualization: Streamlit/Dash, Leaflet.js.
• Database: MongoDB.
• Deployment: Heroku, AWS, GCP.
Workflow Highlights:
1. Data Collection & Preprocessing: Handling large geospatial datasets, feature engineering.
2. UHI Detection & Predictive Modeling: Utilizing ML models for classification and time-series forecasting.
3. Visualization & Dashboard Development: Interactive maps and user-facing web applications.
Deployment: Hosting the dashboard and managing data storage.
a. Identify the Main Components:
Data Ingestion Layer
• Sources: Google Earth Engine, OpenWeatherMap API, OpenStreetMap.
• Components: Data collectors/scripts (weather_data.py), data storage (MongoDB).
Data Processing & Preprocessing
• Tools: Python scripts, Jupyter Notebooks (e.g., model_building.ipynb).
• Processes: Geospatial alignment, data cleaning, feature engineering.
Machine Learning Layer
• Models:
• UHI Detection: Classification models.
• Predictive Modeling: LSTM networks for time-series forecasting.
• Storage: Trained models (.hdf5 files in data/models/).
Backend Services
• API Layer: Interfaces between frontend and backend, handling requests.
• Business Logic: Processes data, runs models, manages workflows.
Database
• MongoDB: Stores user data, analysis results, UHI metrics.
Frontend/User Interface
• Dashboard: Built with Streamlit or Dash.
• Interactive Maps: Utilizes Leaflet.js for geospatial visualization.
Testing & Validation
• Testing Scripts: Located in testing/ directory.
• Continuous Integration: Ensures reliability of components.
Deployment Infrastructure
• Hosting Platforms: Heroku, AWS, GCP.
• CI/CD Pipelines: Automated deployment processes.
b. Determine Relationships and Interactions:
• Data Flow: Data is collected from external sources → stored in MongoDB → processed and preprocessed via backend services → fed into machine learning models → results stored back in MongoDB → accessed by frontend dashboard for visualization.
• User Interaction: Users interact with the frontend dashboard → frontend communicates with backend APIs → backend retrieves/manipulates data and models → responses sent back to frontend for display.
• Testing Feedback Loop: Testing scripts validate backend and frontend components → feedback used to refine models and services.
c. Highlight Architectural Patterns and Design Principles:
• Modular Architecture: Separation of concerns with distinct layers (Data Ingestion, Processing, ML, Backend, Frontend).
• Microservices (if applicable): Potential for scaling individual services like data processing or model serving.
• MVC Pattern: Likely separation between data models, business logic, and user interface in the dashboard.
• Scalability and Maintainability: Use of cloud services and modular codebase supports scalability and ease of maintenance.
d. Include Relevant Technologies, Frameworks, or Libraries:
• Data Handling: Python, GeoPandas, Numpy, Pandas.
• Machine Learning: Scikit-learn, TensorFlow/PyTorch.
• Visualization: Matplotlib, Seaborn, Leaflet.js.
• Web Frameworks: Streamlit or Dash.
• Database: MongoDB.
• Deployment: Heroku, AWS, GCP.
Emphasizing Detail and Essential Architectural Elements
• Granular Components: Break down each main component into sub-components where necessary (e.g., within Data Processing: Geospatial Alignment, Feature Engineering).
• Interactions and Dependencies: Clearly show how each component interacts with others, ensuring that all data flows and service calls are represented.
• Scalability Considerations: If applicable, indicate how components can scale (e.g., multiple instances of backend services).
• Security Layers: Represent any authentication or security measures if present.
• Deployment Architecture: Show how the application is deployed across platforms like Heroku or AWS, including any CDN or load balancers if used.