An interactive environmental simulation platform that uses machine learning and natural language processing to model and visualize ecosystem changes in California.
- Natural Language Interface: Interpret environmental change requests using LLM
- Real-time Simulation: Model environmental impacts across multiple factors
- Interactive Visualization: Dynamic charts and metrics for impact analysis
- Geographical Integration: County-level environmental data analysis
- Confidence Scoring: Reliability metrics for predictions
- Python 3.8+
- Node.js 14+
- MongoDB Atlas account
- Google Cloud (Vertex AI) account
- Create and activate virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
cp .env.example .env
# Edit .env with your credentials:
# - MONGO_URI
# - AZURE_STORAGE_CONNECTION_STRING
# - GOOGLE_CLOUD_PROJECT- Run the backend:
cd backend
python app.py- Install dependencies:
cd frontend
npm install- Run the development server:
npm run devbackend/
├── ml/
│ ├── models/ # ML models and inference
│ ├── analyze_merged_data.py
│ └── convertpis.py # Data preprocessing
├── api/
│ └── environment_routes.py
└── app.py # Main Flask application
frontend/
├── src/
│ ├── pages/ # React components
│ └── components/
└── app/
└── layout.tsx # Root layout
- Bayesian Network for environmental modeling
- LLM for natural language understanding
- Geographical data integration
- Confidence scoring system
- Environmental changes tracking
- Impact analysis
- Confidence metrics
- Distribution analysis
/api/simulate: Run environmental simulations/api/messages: Process natural language inputs/api/variables: Get available environmental variables
The simulator uses various California environmental datasets:
- CalEnviroScreen 3.0
- Species Biodiversity Data
- Geographical/County-level Data
- Climate Vulnerability Metrics
Run the test suite:
cd backend/ml/models
python test_llm_pipeline.pyView test results and visualizations in:
llm_pipeline_results.pngllm_pipeline_results.pdfllm_pipeline_test_results.json
Key environmental factors modeled:
- Air Quality (PM2.5, Ozone)
- Traffic Patterns
- Biodiversity Metrics
- Species Vulnerability
- Pollution Burden
- Habitat Quality
- Fork the repository
- Create a feature branch
- Commit changes
- Push to the branch
- Open a Pull Request
- Visualizations are saved in the
backend/ml/modelsdirectory - Geographical data integration requires proper GeoJSON files
- Some features require specific API access (Vertex AI, MongoDB)
- Frontend 3D models need separate installation
- Some biodiversity metrics need fine-tuning
- Geographical data sources need to be configured
MIT License - see LICENSE file for details