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
- 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.
- 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.
Follow these instructions to get the Fuel Tracker running locally on your machine.
Make sure you have Python installed (version 3.7 or higher). You can download it from python.org.
Open your terminal or command prompt and clone the project:
git clone https://github.com/digantk31/fuel-tracker.git
cd fuel-trackerIt 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
Install all the required Python packages using pip:
pip install -r requirements.txtStart the Streamlit application server by running:
streamlit run app.pyOnce 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!
- 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) orYYYY-MM-DD(e.g.,2026-03-01) formats to ensure accurate processing.