Skip to content

VihaanMotwani/EcoDrive-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OBD Data Analysis Project

Overview

This project aims to analyze On-Board Diagnostics (OBD) data to calculate vehicle fuel efficiency, CO2 emissions, and provide actionable suggestions to improve these metrics. The project includes generating a sample dataset, analyzing the data using the Groq language model, and demonstrating how to read data from an OBD adapter.

Files

  1. sample_input.py: This script generates a sample dataset for OBD data, including metrics like speed, RPM, throttle position, fuel level, and more.

  2. groq_llama3_analysis.py: This script processes the sample dataset, calculates metrics such as fuel consumed, fuel efficiency, CO2 emissions, and deviation, and sends this data to the Groq language model for analysis and suggestions.

  3. obd.py: This script demonstrates how we would read data from an OBD adapter. Note that this is just a demonstration script and cannot be run without access to an actual OBD adapter.

How to Run

  1. Generate Sample Dataset:

    • Run sample_input.py to generate a sample OBD dataset. This will create a CSV file with synthetic OBD data.
    python sample_input.py
  2. Analyze Data:

    • Run groq_llama3_analysis.py to process the sample dataset and generate analysis output.
    python groq_llama3_analysis.py
  3. OBD Data Reading:

    • obd.py is provided as a demonstration of how to read data from an OBD adapter. This script cannot be executed without an OBD adapter connected to the vehicle.
    python obd.py

Requirements

  • Python 3.x
  • pandas
  • json
  • time
  • groq
  • dotenv

Installation

  1. Clone the Repository:

    git clone <repository_url>
    cd <repository_directory>
  2. Install Required Packages:

    pip install pandas jsonlib-python3 python-dotenv groq
  3. Set Up Environment Variables:

    • Create a .env file in the project directory and add your Groq API key:
    GROQ_API_KEY=your_groq_api_key
    

Example Output

Sample output generated by the analysis script will be saved in the output directory. The output includes detailed analysis of fuel efficiency, CO2 emissions, and actionable suggestions for improving vehicle performance.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages