A comprehensive framework for electric vehicle charging demand prediction and analysis across multiple global cities. This project provides harmonized datasets, advanced prediction models, and federated learning capabilities for city-scale EV charging behavior analysis and infrastructure planning.
If this project is helpful to your research, please cite our papers:
Guo, Z., You, L., Zhu, R. et al. A City-scale and Harmonized Dataset for Global Electric Vehicle Charging Demand Analysis. Sci Data 12, 1254 (2025). https://doi.org/10.1038/s41597-025-05584-7
@article{guo2025a,
author={Guo, Zihan and You, Linlin and Zhu, Rui and Zhang, Yan and Yuen, Chau},
title={A City-scale and Harmonized Dataset for Global Electric Vehicle Charging Demand Analysis},
journal={Scientific Data},
volume={12},
pages={1254},
year={2025},
doi={10.1038/s41597-025-05584-7},
}
Li, H., Qu, H., Tan, X. et al. UrbanEV: An Open Benchmark Dataset for Urban Electric Vehicle Charging Demand Prediction. Sci Data 12, 523 (2025). https://doi.org/10.1038/s41597-025-04874-4
@article{li2025urbanev,
author={Li, Han and Qu, Haohao and Tan, Xiaojun and You, Linlin and Zhu, Rui and Fan, Wenqi},
title={UrbanEV: An open benchmark dataset for urban electric vehicle charging demand prediction},
journal={Scientific Data},
volume={12},
pages={523},
year={2025},
doi={10.1038/s41597-025-04874-4},
}
You, L., Guo, Z., Yuen, C. et al. A framework reforming personalized Internet of Things by federated meta-learning. Nat Commun 16, 3739 (2025). https://doi.org/10.1038/s41467-025-59217-z
@article{you2025framework,
author={You, Linlin and Guo, Zihan and Yuen, Chau and Chen, Calvin Yu-Chian and Zhang, Yan and Poor, H Vincent},
title={A framework reforming personalized Internet of Things by federated meta-learning},
journal={Nature communications},
volume={16},
pages={3739},
year={2025},
doi={10.1038/s41467-025-59217-z},
}
- Multi-City Dataset: Harmonized charging data from 6 major cities worldwide
- Advanced Prediction Models: Support for state-of-the-art time series forecasting models
- Federated Learning: Privacy-preserving distributed training across cities
- Comprehensive Preprocessing: Data cleaning, anomaly detection, and feature engineering
- Knowledge Transfer: Cross-city model adaptation and transfer learning
City | Country | Code |
---|---|---|
Amsterdam | Netherlands | AMS |
Johannesburg | South Africa | JHB |
Los Angeles | United States | LOA |
Melbourne | Australia | MEL |
SΓ£o Paulo | Brazil | SPO |
Shenzhen | China | SZH |
CHARGED/
βββ api/ # Core API modules
β βββ dataset/ # Data loading and processing
β β βββ common.py # Single-city dataset handling
β β βββ distributed.py # Federated dataset management
β βββ federated/ # Federated learning components
β β βββ client.py # Client-side training logic
β β βββ server.py # Server-side aggregation
β βββ model/ # Prediction models
β β βββ config.py # Model configuration
β β βββ layers.py # Neural network layers
β β βββ modules.py # Model architectures
β βββ parsing/ # Command-line argument parsing
β β βββ common.py # Standard prediction arguments
β β βββ federated.py # Federated learning arguments
β βββ trainer/ # Training utilities
β β βββ common.py # Standard training loop
β β βββ federated.py # Federated training logic
β βββ utils.py # Utility functions
βββ data/ # Dataset storage
β βββ [CITY]/ # City-specific data directories
β βββ [CITY]_remove_zero/ # Preprocessed data (zero clusters removed)
βββ example/ # Usage examples and scripts
β βββ knowledge_transfer.py # Federated learning example
β βββ univariate_prediction.py # Single-city prediction
β βββ multivariate_prediction.py # Multi-feature prediction
β βββ test_*.py # Model evaluation scripts
βββ script/ # Data processing and utility scripts
β βββ aggregate/ # Data aggregation tools
β βββ auxiliary/ # Auxiliary data collection
β βββ optimize/ # Data optimization and cleaning
β βββ visualization/ # Data visualization tools
βββ README.md # This file
# Install required packages
pip install torch pandas numpy scikit-learn matplotlib seaborn
pip install geopandas osmnx tqdm pyproj shapely
pip install chronos momentfm gluonts uni2ts
# Run univariate prediction for a specific city
python example/univariate_prediction.py \
--city SZH \
--model transformer \
--feature volume \
--seq_l 24 \
--pre_len 12 \
--epoch 100 \
--is_train True
# Run federated learning across multiple cities
python example/knowledge_transfer.py \
--city AMS JHB LOA MEL SPO SZH \
--model transformer \
--feature volume \
--pred_type site
--global_epoch 50 \
--local_epoch 10
# Evaluate pretrained models (Chronos, Moirai, MOMENT)
python example/test_chronos_all.py
python example/test_moirai_all.py
python example/test_moment_all.py
- Linear Regression (LR): Baseline linear prediction
- Auto-Regressive (AR): Time series autoregression
- ARIMA: Integrated autoregressive moving average
- Transformer: Attention-based sequence modeling
- LSTM: Long short-term memory networks
- GRU: Gated recurrent units
- TCN: Temporal convolutional networks
- Informer: Efficient transformer variant
- Autoformer: Auto-correlation transformer
- FEDformer: Frequency enhanced transformer
- Pyraformer: Pyramid attention transformer
- LogTrans: Log-sparse transformer
- Reformer: Efficient transformer with reversible layers
- Performer: Linear attention transformer
- ConvTimeNet: Convolutional time series network
- ModernTCN: Modern temporal convolutional network
- Chronos: Large language model for time series
- Moirai: Unified time series foundation model
- MOMENT: Multi-modal time series foundation model
- Anomaly Detection: Identify and fix outliers using IQR method
- Zero Sequence Handling: Detect and interpolate continuous zero sequences
- Site Clustering: Geographic clustering using DBSCAN algorithm
- Feature Engineering: Temporal and spatial feature extraction
- Temporal Aggregation: Hourly to daily aggregation
- Spatial Aggregation: Charger-level to sitevel aggregation
- Cross-Validation: Time-based data splitting for evaluation
- Volume: Number of charging sessions per time period
- Duration: Average charging session duration
- Fee: Charging cost information
- Weather: Temperature, humidity, precipitation, wind speed
- Temporal: Hour of day, day of week, month
- Spatial: Site coordinates, cluster centroids, distance matrices
- POI: Nearby amenities, commercial areas, transportation hubs
- Capacity Planning: Predict future charging demand
- Location Optimization: Identify optimal siteacement
- Grid Integration: Plan electrical infrastructure upgrades
- Load Balancing: Distribute charging load across site
- Pricing Strategy: Dynamic pricing based on demand patterns
- Maintenance Scheduling: Predictive maintenance planning
- Incentive Programs: Design effective EV adoption incentives
- Regulatory Framework: Develop charging infrastructure regulations
- Urban Planning: Integrate EV charging into city development
- Short-term Prediction: Hourly/daily demand forecasting
- Long-term Planning: Monthly/quarterly trend analysis
- Anomaly Detection: Identify unusual charging patterns
- Privacy Preservation: Train models without sharing raw data
- Cross-City Learning: Transfer knowledge between cities
- Scalable Training: Distributed training across multiple locations
- Domain Adaptation: Adapt models to new cities
- Knowledge Transfer: Leverage data from similar cities
- Cold Start: Handle cities with limited historical data
We welcome contributions!
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Data Sources: OpenStreetMap, Weather APIs, City Open Data Portals
- Model Implementations: PyTorch, HuggingFace
- Research Community: Time series forecasting and federated learning researchers
- Email: guozh29@mail2.sysu.edu.cn
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Note: This is a research project. Please ensure compliance with local data privacy regulations when using this dataset.