A comprehensive data science and machine learning powered urban analytics platform for analyzing city-level datasets, generating visualizations, and running predictive models.
- Data Ingestion: Upload CSV files or connect to APIs (OpenWeather, Government Open Data)
- Interactive Visualizations: Heatmaps, graphs, and geospatial maps
- Natural Language Queries: Ask questions about your data in plain English
- Machine Learning: Forecasting, clustering, and anomaly detection
- Real-time Dashboards: Interactive web interface with filters and controls
-
Install Dependencies
pip install -r requirements.txt
-
Set up Environment Variables
cp .env.example .env # Edit .env with your API keys and database settings -
Initialize Database (Optional - for persistent storage)
python scripts/init_db.py
-
Run the Application
# Streamlit Interface streamlit run app/streamlit_app.py # Or Flask API python app/flask_app.py
citypulse/
├── app/ # Web applications
│ ├── streamlit_app.py # Main Streamlit interface
│ ├── flask_app.py # Flask API backend
│ └── components/ # Reusable UI components
├── src/ # Core application logic
│ ├── data/ # Data processing modules
│ ├── ml/ # Machine learning models
│ ├── visualization/ # Plotting and mapping
│ └── api/ # External API integrations
├── data/ # Data storage
│ ├── raw/ # Raw uploaded datasets
│ ├── processed/ # Cleaned datasets
│ └── models/ # Trained ML models
├── config/ # Configuration files
├── scripts/ # Utility scripts
├── tests/ # Unit tests
└── docs/ # Documentation
- Backend: Python, Flask, FastAPI
- Frontend: Streamlit, React (optional)
- Data Science: Pandas, NumPy, GeoPandas, Scikit-learn
- Visualization: Plotly, Folium, Matplotlib, Seaborn
- ML: Prophet, TensorFlow, Statsmodels
- Database: PostgreSQL with PostGIS extension
- APIs: OpenAI, OpenWeather, Government Open Data
- Traffic Analysis: Upload traffic data to generate congestion heatmaps
- Air Quality Forecasting: Predict AQI levels using time series models
- Crime Hotspot Detection: Use clustering to identify high-crime areas
- Real Estate Trends: Analyze property prices across different neighborhoods
Copy .env.example to .env and configure:
- Database connection settings
- API keys (OpenWeather, OpenAI, etc.)
- Application settings
-
Setup Development Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -r requirements.txt
-
Run Tests
python -m pytest tests/
-
Code Formatting
black src/ app/ flake8 src/ app/
- OpenWeatherMap API
- Government Open Data portals
- Google Maps API
- User-uploaded CSV files
- Real-time sensor data
MIT License - see LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
For questions and support, please open an issue on GitHub or contact the development team.