Skip to content

digantk31/fuel-tracker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⛽ Fuel Tracker

Fuel Tracker is a streamlined web application built with Streamlit that helps you monitor and manage your vehicle's fuel consumption, mileage, and expenses over time.

Repository: https://github.com/digantk31/fuel-tracker

🌟 Features

  • Flexible Data Input: Add new fuel entries manually through the UI or bulk-upload your existing data using a CSV file. A downloadable template is provided for convenience.
  • Smart Calculations: The app automatically computes:
    • Distance traveled between consecutive fill-ups.
    • Average fuel economy (km/l).
    • Cost per kilometer (₹/KM).
    • Overall historical average fuel economy.
  • Data Management: Easily view, filter by date range, edit, and delete specific entries directly within the interface.
  • Visualizations: Track your monthly fuel average trends through an interactive line chart.
  • Comprehensive Export Options: Save and share your fuel reports in multiple formats:
    • CSV for raw data access.
    • Excel (.xlsx) with automatically generated embedded charts.
    • PDF for a clean, formatted report.

🛠️ Technologies Used

  • Python: The core programming language.
  • Streamlit: Used for building the interactive web frontend.
  • Pandas: Used for robust data manipulation, calculation, and analysis.
  • Openpyxl: Used to generate customized Excel exports with embedded line charts.
  • ReportLab: Used to render tabular data into downloadable PDF reports.

🚀 Step-by-Step Setup Guide

Follow these instructions to get the Fuel Tracker running locally on your machine.

Prerequisites

Make sure you have Python installed (version 3.7 or higher). You can download it from python.org.

1. Clone the Repository

Open your terminal or command prompt and clone the project:

git clone https://github.com/digantk31/fuel-tracker.git
cd fuel-tracker

2. Create a Virtual Environment (Recommended)

It is highly recommended to use a virtual environment to isolate the project's dependencies.

  • Windows:
    python -m venv venv
    venv\Scripts\activate
  • macOS / Linux:
    python3 -m venv venv
    source venv/bin/activate

3. Install Dependencies

Install all the required Python packages using pip:

pip install -r requirements.txt

4. Run the Application

Start the Streamlit application server by running:

streamlit run app.py

5. Access the App

Once the server starts successfully, it will display a local URL in the terminal (usually http://localhost:8501). Open this link in your preferred web browser to start using Fuel Tracker!

⚠️ Important Usage Notes

  • Data Persistence: Data entered or uploaded in this app is currently stored in the session state. It is temporary. To save your records permanently, please ensure you use the Export features (CSV, Excel, or PDF) before closing the app.
  • Date Formats: When manually uploading a CSV, make sure the Date column follows DD-MM-YYYY (e.g., 01-03-2026) or YYYY-MM-DD (e.g., 2026-03-01) formats to ensure accurate processing.

About

A Streamlit web application to monitor vehicle fuel consumption, track mileage, and manage expenses over time. Features CSV uploads, dynamic visualizations, and PDF/Excel reports.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages