CO2 Leaderboard is a full-stack application that tracks and visualizes carbon emissions across different states. It provides insights into historical trends, future predictions, and regional comparisons to monitor progress toward environmental goals.
- Backend: Flask, Pandas
- Frontend: React, TypeScript, Material-UI
- Machine Learning: PyTorch for neural network-based predictions
- Install dependencies:
pip install flask flask-cors pandas torch torchvision torchmetrics
- Run the Flask API:
python app.py
- Navigate to the frontend directory (if applicable) and install dependencies:
npm install
- Start the frontend:
npm run dev
app.py
- Flask API to serve emissions data.co2pred.py
- PyTorch model for CO2 emission predictions.test_viz.py
- Visualization script to test and compare model results.
App.tsx
- Main React application file.main.tsx
- Renders the React app.Dashboard.tsx
- Displays US map of emissions.USMap.tsx
- Interactive map for emissions data.ChartPage.tsx
- Displays emissions trends for selected states.EmissionChart.tsx
- Chart component for emissions visualization.
5 Year Predictions.csv
- Predicted CO2 emissions for future years.table1_train.xlsx
- Training dataset for ML model.table1_test.xlsx
- Test dataset for ML model.table1_copy.xlsx
- Additional dataset for predictions.
- View emissions data by running the Flask API (
app.py
). - Interact with the dashboard by starting the React frontend.
- Analyze predictions using
co2pred.py
to generate forecasts. - Explore visualizations via the
ChartPage.tsx
andEmissionChart.tsx
components.
This project is licensed under the MIT License. See LICENSE
for more details.