How vidyutchakrabarti/solargis works
Project Type and Purpose
• From the README and file tree, this is a full‐stack data‐science web app (Streamlit) that predicts rooftop solar energy potential using:
• User inputs (rooftop area, irradiance, obstacle heights)
• A deep‐learning model
• External geospatial data (building footprints, irradiance)
• It’s deployed on Google Cloud App Engine (app.yaml) and Dockerized for local/CI use.
File Structure
• Top‐level entrypoint: solargis.py
• UI: Streamlit multipage under pages/
• main.py, app.py → session handling/navigation
• estimate.py, final.py → individual workflow steps
• East.py, West.py, North.py, South.py → orientation‐specific modules
• Business logic/helpers: helperfuncs.py, data.py
• Styles: CSS files (est_style.css, finalstyle.css, style.css, style2.css) and assets/ (gifs)
• Deployment: Dockerfile, app.yaml, requirements.txt
Key Components
a. Client Browser
• Users access the Streamlit UI.
b. Streamlit Web Server
• Hosted app (solargis.py + pages/*).
• Handles routing, session state, rendering.
c. Application Logic Layer
• helperfuncs.py: data transformations, shading calculations
• data.py: loading local datasets or invoking external APIs
d. ML Model
• Pre‐trained deep learning model for output prediction (assumed loaded in helperfuncs or solargis.py).
e. External Data Services
• Open Buildings API (building footprints)
• Solar irradiance data source (could be an external REST API or file)
f. Deployment Infrastructure
• Docker containerization (Dockerfile)
• Google Cloud App Engine (app.yaml)
• Streamlit Cloud (for staging/demo)
Relationships & Data Flows
• Browser → HTTP Request → Streamlit Server
• Streamlit Server → calls Application Logic →
• loads data (local or external)
• invokes ML Model
• Logic Layer → returns predictions → Streamlit UI → Browser
• Deployment Layer wraps the entire server and logic in a container and hosts it on GCP
Architectural Patterns & Design Principles
• Layered Architecture:
• Presentation (Streamlit UI pages)
• Business Logic (helperfuncs, data handling)
• Model Inference (deep learning)
• Data/External Services
• Modularization: Each page in /pages handles one concern—orientation, estimation, final display.
• Containerized Deployment: Ensures consistency across environments (Docker + GCP).
Must‐Include Elements
• Clear, concise labels on all components.
• Callouts for critical files or services.