Advanced AI-Powered Electric Vehicle Adoption Forecasting for Washington State Counties
🚀 Live Demo | 📊 Features | 🔧 Installation | 📈 Usage | 🤝 Contributing
- 🌟 Overview
- ✨ Features
- 🛠️ Technology Stack
- 🔧 Installation
- 📈 Usage
- 📊 Data Information
- 🤖 Machine Learning Model
- 🎨 UI/UX Features
- 📱 Screenshots
- 🚀 Deployment
- 🤝 Contributing
- 📄 License
- 👥 Authors
- 🙏 Acknowledgments
The EV Adoption Forecasting System is a cutting-edge web application that leverages machine learning to predict Electric Vehicle (EV) adoption trends across Washington State counties. Built with modern web technologies and advanced AI algorithms, this system provides accurate 3-year forecasting with interactive visualizations and comprehensive analytics.
- Predictive Analytics: Forecast EV adoption trends for the next 36 months
- Data-Driven Insights: Provide actionable insights for policy makers and researchers
- User-Friendly Interface: Deliver complex analytics through an intuitive web interface
- Comparative Analysis: Enable multi-county comparison and trend analysis
- Accessibility: Ensure mobile-responsive design with dark/light theme support
- 3-Year Predictions: Generate accurate 36-month forecasts using advanced machine learning
- Real-time Processing: Dynamic forecast generation based on selected counties
- Confidence Scoring: Model accuracy indicators for each prediction
- Trend Analysis: Identify growth patterns and seasonal variations
- Plotly Charts: Interactive time-series visualizations with zoom and pan
- Historical vs Forecast: Clear distinction between actual and predicted data
- Trend Lines: Optional trend analysis with polynomial fitting
- Customizable Display: Adjustable chart height and toggle options
- Side-by-side Analysis: Compare up to 3 counties simultaneously
- Growth Rate Comparison: Percentage growth comparisons across counties
- Export Functionality: Download comparison data as CSV files
- Color-coded Visualization: Distinct colors for easy county identification
- Responsive Design: Mobile-first approach with adaptive layouts
- Theme Support: Dark and light theme options
- Animated Elements: Smooth transitions and hover effects
- Accessibility: WCAG compliant with screen reader support
- Progressive Loading: Skeleton screens and progress indicators
- Growth Metrics: Detailed percentage and absolute growth calculations
- Statistical Insights: Monthly averages, trends, and projections
- Data Validation: Error handling and data quality checks
- Performance Optimization: Caching and memory management
- Streamlit 1.41.1: Modern Python web framework
- Plotly 5.18.0: Interactive visualization library
- Custom CSS: Advanced styling with animations and responsive design
- JavaScript: Enhanced user interactions and animations
- Python 3.8+: Core programming language
- Pandas 2.2.3: Data manipulation and analysis
- NumPy 2.1.3: Numerical computing and array operations
- Scikit-learn 1.7.1: Machine learning algorithms
- Joblib 1.5.1: Model serialization and caching
- Time Series Analysis: Advanced temporal data processing
- Feature Engineering: Lag features, rolling means, and growth indicators
- Data Validation: Comprehensive error handling and quality checks
- Python 3.8 or higher
- pip package manager
- Git (for cloning the repository)
-
Clone the Repository
git clone https://github.com/RajdeepKushwaha5/EV-Adoption-Forecasting.git cd EV-Adoption-Forecasting -
Create Virtual Environment (Recommended)
# Windows python -m venv venv venv\Scripts\activate # macOS/Linux python3 -m venv venv source venv/bin/activate
-
Install Dependencies
pip install -r requirements.txt
-
Run the Application
streamlit run app.py
-
Access the Application
- Open your browser and navigate to
http://localhost:8501 - The application will automatically load with the default configuration
- Open your browser and navigate to
# Build Docker image
docker build -t ev-forecasting .
# Run container
docker run -p 8501:8501 ev-forecasting-
County Selection
- Use the dropdown menu to select any Washington State county
- The system will automatically load historical data for the selected county
-
View Forecasting Results
- Interactive chart displays historical data (solid line) and forecasts (dashed line)
- Hover over data points for detailed information
- Use chart controls to toggle display options
-
Analyze Growth Metrics
- View key metrics: 3-year growth percentage, new EVs, monthly averages
- Check model confidence scores for prediction reliability
-
Multi-County Comparison
- Select up to 3 counties using the multi-select dropdown
- Compare growth trends side-by-side
- Export comparison data for further analysis
- Theme Switching: Toggle between dark and light modes using sidebar controls
- Chart Customization: Adjust chart height and toggle trend lines
- Data Export: Download forecast data and comparison results
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Source: Washington State Department of Transportation (WSDOT)
- Time Period: 2017-2024 (Historical data)
- Coverage: All 39 Washington State counties
- Update Frequency: Monthly registration data
- Data Points: 2,000+ records with comprehensive county-level information
- Cleaning: Removed duplicates, handled missing values
- Normalization: Standardized county names and date formats
- Feature Engineering: Created lag features, rolling averages, and growth indicators
- Validation: Implemented comprehensive data quality checks
- Electric Vehicle (EV) Total: Monthly cumulative EV registrations
- County Encoding: Numerical representation for machine learning
- Time Features: Months since start, seasonal indicators
- Growth Features: Percentage changes, rolling means, trend slopes
- Algorithm: Random Forest Regressor with ensemble methods
- Training Data: Historical EV registration patterns (2017-2023)
- Validation: Time-series cross-validation with rolling windows
- Performance: ~85-95% accuracy on validation datasets
Features Used:
- months_since_start: Temporal progression
- county_encoded: Geographic identifier
- ev_total_lag1, lag2, lag3: Historical values
- ev_total_roll_mean_3: 3-month rolling average
- ev_total_pct_change_1, _3: Growth rates
- ev_growth_slope: Trend analysis- Data Preparation: Time-series splitting and feature scaling
- Hyperparameter Tuning: Grid search with cross-validation
- Model Selection: Ensemble methods with voting regressor
- Validation: Rolling window validation for temporal data
- Serialization: Model persistence using joblib
- Real-time Inference: Dynamic feature generation for new predictions
- Uncertainty Quantification: Confidence intervals and prediction bounds
- Error Handling: Robust prediction with fallback mechanisms
- Modern Interface: Clean, professional design with intuitive navigation
- Mobile-First: Responsive design optimized for all device sizes
- Accessibility: WCAG 2.1 AA compliant with screen reader support
- Performance: Optimized loading times and smooth interactions
- Color Scheme: Carefully selected palette with high contrast ratios
- Typography: Inter font family for optimal readability
- Icons: Comprehensive emoji and icon system for visual clarity
- Animations: Subtle transitions and hover effects for enhanced UX
- Sticky Navigation: Persistent header with quick access to key features
- Tooltips: Contextual help and information throughout the interface
- Progress Indicators: Real-time feedback during data processing
- Toast Notifications: User feedback for actions and state changes
- Fork the Repository on GitHub
- Connect to Streamlit Cloud:
- Visit share.streamlit.io
- Connect your GitHub account
- Select the forked repository
- Configure Deployment:
- Set main file as
app.py - Ensure
requirements.txtis in the root directory
- Set main file as
- Deploy: Streamlit Cloud will automatically build and deploy
# Install Heroku CLI and login
heroku login
# Create new Heroku app
heroku create your-ev-forecasting-app
# Add buildpack
heroku buildpacks:set heroku/python
# Create Procfile
echo "web: streamlit run app.py --server.port=$PORT --server.address=0.0.0.0" > Procfile
# Deploy
git add .
git commit -m "Deploy to Heroku"
git push heroku mainFROM python:3.9-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
EXPOSE 8501
CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]We welcome contributions from the community! Here's how you can help:
- Bug Reports: Submit detailed bug reports with reproducible steps
- Feature Requests: Suggest new features or improvements
- Code Contributions: Submit pull requests with enhancements
- Documentation: Improve documentation and examples
- Testing: Help test the application across different environments
-
Fork and Clone
git clone https://github.com/YourUsername/EV-Adoption-Forecasting.git cd EV-Adoption-Forecasting -
Create Feature Branch
git checkout -b feature/your-feature-name
-
Install Development Dependencies
pip install -r requirements-dev.txt
-
Run Tests
pytest tests/
-
Submit Pull Request
- Ensure all tests pass
- Include comprehensive documentation
- Follow existing code style and conventions
- Python: Follow PEP 8 guidelines
- Documentation: Use Google-style docstrings
- Commits: Use conventional commit messages
- Testing: Maintain 80%+ code coverage
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2025 Rajdeep Kushwaha
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Rajdeep Kushwaha - Full Stack Development & ML Engineering
- 🌐 GitHub: @RajdeepKushwaha5
- 📧 Email: rajdeepsingh10789@gmail.com
- 💼 LinkedIn: Rajdeep Singh
AICTE Internship Cycle 2 by S4F - Academic Guidance and Support
- AICTE (All India Council for Technical Education) for the internship opportunity
- S4F (Skills for Future) for mentorship and guidance
- Washington State DOT for providing comprehensive EV registration data
- Streamlit Community for the excellent web application framework
- Open Source Contributors who made this project possible
- Data Sources: Washington State Department of Transportation
- Inspiration: The growing need for sustainable transportation analytics
- Community: Open source contributors and the Python data science community
- Mentors: Academic advisors and industry professionals
- 📖 Documentation: Check this README and inline documentation
- 🐛 Bug Reports: Submit an issue
- 💡 Feature Requests: Create a feature request
- 💬 Discussions: Join our GitHub Discussions
⭐ Star this repository if you find it helpful!
Made with ❤️ for sustainable transportation and data science
© 2025 EV Forecasting System | Version 2.0 | Built with Python & Streamlit


