Skip to content

rajveersinghcse/CO2-Emission-Prediction

Repository files navigation

Streamlit App MIT LICENSE MAINTAINED BADGE

CO2 Emissions Predictions by Cars

Banner

Hey Folks,👨🏻‍💻

During my internship, I created a project titled "CO2 Emission Prediction by Cars." The goal was to predict how much carbon dioxide (CO2) a car would emit based on its data. I gathered information about different cars and their CO2 emissions. Using this data, I used advanced techniques to build a model that could accurately estimate CO2 emissions. This project not only showcased my skills in data analysis and machine learning but also aimed to contribute to understanding and reducing vehicle-related environmental impacts.

Description of The Project:

Business Objective of the project

  • The primary objective of the project is to develop a model that can accurately predict CO2 emissions based on different engine features of cars.
  • The goal is to estimate the amount of CO2 a car will emit using the provided data.

Description of The Data:

  • The data used in the project was collected from the Canadian Government's Official Website.

About Data 📈

It includes the following attributes:

  • Make: Car brand under study.
  • Model: Specific model of the car.
  • Vehicle_class: Car body type.
  • Engine_size: Size of the car engine in liters.
  • Cylinders: Number of cylinders.
  • Transmission: Type of transmission (e.g., automatic, manual).
  • Fuel_type: Type of fuel used by the car.
  • Fuel_consumption_city: City fuel consumption ratings in liters per 100 kilometers.
  • Fuel_consumption_hwy: Highway fuel consumption ratings in liters per 100 kilometers.
  • Fuel_consumption_comb(l/100km): Combined fuel consumption rating (city and highway) in L/100 km.
  • Fuel_consumption_comb(mpg): Combined fuel consumption rating in miles per gallon (mpg).
  • Co2_emissions: Tailpipe emissions of carbon dioxide for combined city and highway driving, in grams per kilometer.

Tools and Technologies:

The project was developed using various tools and technologies, including:

  • Python programming language
  • Libraries such as NumPy, Matplotlib, SciPy, scikit-learn, and Streamlit
  • Linear Regression, Random Forest, K-Nearest Neighbors (KNN), and Support Vector Regression (SVR) models for prediction
  • Deployment on the cloud using Streamlit

How to install these libraries?

You can install these libraries by using the command.

  • You can install all the libraries in your system which I have used in my project by using only one command.
  • You will need Python in your system to use this command. You can use this given link to install Python in your system : Python
  • After installation of Python, you need to run this command in your command prompt.
pip install -r requirements.txt 

Model Building:

  • The project involved building and evaluating several machine learning models, including Linear Regression, Random Forest, KNN, and SVR.
  • The Random Forest model yielded the highest accuracy among these models and was selected for deployment.

ModelBuilding

Deployment:

  • The project was deployed using Streamlit, allowing users to interact with the model and make predictions on CO2 emissions based on car engine features.
  • The deployment version of the project can be accessed through a provided link :Project

Running the Project:

  • To run the project locally, one can install the required libraries using the provided command in the command prompt. Use the below Streamlit command to launch the application.
streamlit run app.py 

The project not only demonstrates technical skills but also contributes to environmental awareness and sustainable practices. It effectively combines data analysis, machine learning, and software development to address real-world challenges.


Enjoy Coding

About

🌏Forcast CO2 emissions using a Machine Learning models based on vehicle specifications like engine size, cylinders, and fuel consumption.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published