Data Science & Analytics
Unit-Test Score Analytics and Parent Report System for a Grade 8-10 Coaching Centre (Python, MySQL)
Enter marks once, get chapter-level weakness heatmaps and one-page parent reports automatically
- Python 3
- Streamlit
- pandas
- +3
A Java + MySQL mini-project that turns daily fuel-price bulletins into trends, tax-gap analysis and honest short-term forecasts
Mapped to your syllabusUniversity of Madras CBCS 2023-24 · 320S61 Mini Project (Professional Competency Skill) · Semester 6Petrol and Diesel Price Analytics is a data-science-flavoured mini-project for the University of Madras BCA CBCS 2023-24 slot 320S61 — Mini Project (Professional Competency Skill). Since 16 June 2017, Indian Oil Corporation (IOCL) has revised petrol and diesel prices in metro cities every morning at 6 a.m., producing one of India's longest daily open data series. This project turns that bulletin stream into an analytics application built on the skills the Madras BCA syllabus teaches: Java (220C4A) for the application and analysis, MySQL (320C5B RDBMS) for storage and SQL aggregation, and HTML/CSS (320C5C Web Technology) for the generated dashboard report.
The application loads daily petrol and diesel prices for Delhi, Mumbai, Chennai and Kolkata, cleans them into a well-designed MySQL schema, and answers questions commuters actually ask: How fast did prices climb in each city? Which city pays the most, and how much of that gap is state tax? How long were the famous price-freeze spells? It computes monthly averages, day-over-day changes, longest rise streaks and city-vs-city spreads, then produces a 7-day forecast for each city using a moving-average and a simple linear-regression model, evaluated with MAE and MAPE on hold-out weeks.
JFreeChart — a free Java charting library layered on the syllabus stack as an industry-standard extra — renders trend and spread charts; the app exports a self-contained HTML/CSS analytics report. The project deliberately uses Java rather than Python: it proves data-handling and analytical ability inside the language the Madras syllabus examines, using nothing beyond JDBC, collections and SQL.
Syllabus alignment
Every morning Indian newspapers and apps publish metro fuel prices, but the published view is a snapshot: today's number, yesterday's number, a year-on-year comparison. The underlying daily series — thousands of observations per city since June 2017 — sits scattered across tracker sites and government PDFs in forms that cannot be queried. A student, a commuter or a small delivery business that wants to answer simple questions — how steep was this quarter's climb in Chennai, how long did the last price freeze last, how much costlier is Mumbai's diesel than Delhi's and why, what will a 50-litre tank cost next week — has no structured place to ask them.
There is a need for a small, reproducible analytics application that consolidates the daily prices into a proper relational database, validates and documents the data quality, computes the trends, streaks and city gaps with SQL and Java, and produces short-term forecasts with reported accuracy rather than guesswork — all built with the Java, RDBMS and web-technology skills of the BCA syllabus.
Fuel prices touch every household budget, and since mid-2017 India publishes a daily retail price revision for petrol and diesel in every metro. This mini-project builds a Java + MySQL analytics application that ingests that daily stream for Delhi, Mumbai, Chennai and Kolkata, stores it in a normalised schema, computes descriptive and comparative analytics, and generates short-term forecasts with two simple models whose accuracy is measured on hold-out data. The output is a Swing dashboard, chart images and a generated HTML analytics report.
A litre of petrol in Mumbai and in Delhi on the same day can differ by several rupees, and the gap is not the oil company's margin — it is mostly state-level VAT and local levies on a near-common base price. Because prices are revised daily, the data form a clean multivariate time series: four cities, two fuels, one observation per day, published by IOCL. That makes it an ideal real dataset for a BCA analytics project: no scraping of fragile pages, no missing primary keys, and a story every examiner understands.
city, fuel_type, daily_price (city, fuel, date, price, revised flag) and a precomputed monthly_summary; the composite primary key prevents duplicate dates; prices stored as DECIMAL(7,2), never FLOAT.In scope
Out of scope
The project follows a mini-waterfall with a working skeleton first: requirements and data acquisition in week 1, schema and module design in week 2, then build-test-build in weeks 3–5 and a report/demo in week 6. Waterfall suits a 2-credit mini-project with one developer and a fixed deadline; a skeleton that reads a week of CSV and prints it keeps risk visible from day 2.
| Phase | Week | Activities | Deliverable |
|---|---|---|---|
| Requirements & data | 1 | Fix analytics question list; download IOC daily prices and PPAC build-up tables; profile CSV quality | Requirement list + raw data folder |
| Design | 2 | ER diagram and MySQL DDL; class diagram (CsvLoader, PriceDao, Analytics, Forecaster, ReportWriter); wireframes | Design note |
| Build 1 | 3 | CSV loader with validation, schema creation, batched JDBC insert, duplicate/gap report | Populated database |
| Build 2 | 4 | SQL analytics queries + Java analytics service; JFreeChart trends, streaks, spreads | Dashboard v1 |
| Build 3 | 5 | Moving-average and OLS regression forecasters; back-testing harness with MAE/MAPE; HTML report writer | Dashboard v2 + report |
| Test & document | 6 | Unit tests for loaders/forecasters, black-box test-case table, screenshots, final report and demo | Submission pack |
Analysis method: descriptive statistics and time-series decomposition are done in SQL and Java (no external statistics library); the two forecasters are deliberately simple — a 28-day moving average and ordinary least-squares regression on the last 90 days — and the better one per series is chosen by back-testing on a hold-out month. MAE and MAPE are reported for every city-fuel pair, so the accuracy claim in the report is a measured number, not an impression.
Testing approach: JUnit tests for the CSV validator (duplicate date, negative price, 5-rupee jump), DAO queries and both forecasters against small synthetic series with known answers; a black-box test-case table for the UI and report.
The application is a three-layer Java desktop system with MySQL as the data tier and a generated HTML report as the presentation output.
city, fuel_type, daily_price, monthly_summary) with primary keys (city, fuel, date) that make duplicate loading impossible; DECIMAL(7,2) money types; indexes on date for range queries.CsvLoader validates and batch-inserts rows through JDBC prepared statements; PriceDao exposes typed queries; Analytics computes streaks, spreads and monthly roll-ups; Forecaster implements the moving-average and OLS models with a back-testing harness; ReportWriter writes the HTML/CSS analytics report.flowchart LR
CSV["CSV: daily IOC prices
(4 cities, 2 fuels)"] --> V["CsvLoader + validation
(duplicates, gaps, jumps)"]
V -->|JDBC prepared statements| DB[(MySQL:
city, fuel_type,
daily_price, monthly_summary)]
DB --> A["Analytics service
(SQL aggregation + Java)"]
A --> F["Forecaster: 28-day MA and
OLS regression, back-tested"]
F --> M{"MAE / MAPE"}
M -->|pick better per series| O["Forecast table"]
A --> C[JFreeChart trends / streaks / spreads]
C --> UI[Swing dashboard]
A --> R["ReportWriter: HTML/CSS
analytics report"]
O --> RerDiagram
CITY ||--o{ DAILY_PRICE : has
FUEL_TYPE ||--o{ DAILY_PRICE : prices
DAILY_PRICE ||--o{ MONTHLY_SUMMARY : "rolls up to"
CITY {
int city_id PK
string name UK
string state
}
FUEL_TYPE {
int fuel_id PK
string name UK
}
DAILY_PRICE {
int city_id PK_FK
int fuel_id PK_FK
date price_date PK
decimal price
boolean revised
}
MONTHLY_SUMMARY {
int city_id PK_FK
int fuel_id PK_FK
int year PK
int month PK
decimal avg_price
decimal min_price
decimal max_price
int change_days
}The composite primary key on daily_price is the single most important design decision: it encodes the business rule that a city-fuel-date combination exists at most once, which turns data-quality control into a database constraint rather than an afterthought.
Module 01
Downloads/collects the daily IOCL metro price series into CSVs, then a Java CsvLoader validates every row — date format, city-fuel membership, price range, day-over-day jumps beyond a threshold — and writes a cleaning log recording duplicates found, gaps detected and rows rejected.
Module 02
Creates the MySQL schema from a DDL script with composite primary keys, foreign keys and DECIMAL money columns; a PriceDao class wraps all access behind prepared statements, batches inserts in transactions, and exposes typed query methods so no SQL string is ever concatenated from user input.
Module 03
Implements the question list as parameterised SQL: monthly averages and ranges, month-on-month percentage change, longest consecutive-rise streaks per city-fuel, freeze detection (zero change for N days), city-vs-city and diesel-petrol spreads, each joined back to city and fuel dimension tables.
Module 04
Two forecasters — a 28-day moving average and an OLS linear regression fitted on the last 90 days — predict the next 7 days; a back-testing harness walks the final four hold-out weeks, computes MAE and MAPE per city-fuel, and the app selects and flags the better model per series with its measured error.
Module 05
JFreeChart renders price trend lines per city, streak charts and spread bars; a ReportWriter generates a static HTML/CSS analytics report embedding the chart PNGs, the summary tables, the forecast table with MAE/MAPE, and the data-cleaning log, ready for submission without any extra software.
Slide 1
Petrol and Diesel Price Analytics and Short-Term Forecasting
Slide 2
Problem Statement
Slide 3
Dataset
Slide 4
Objectives
Slide 5
Technology Stack and Justification
Slide 6
System Architecture
Slide 7
Database Design
Slide 8
Analytics Highlights
Slide 9
Forecasting and Evaluation
Slide 10
Screenshots / Demo
Slide 11
Testing
Slide 12
Conclusion and Future Scope
Bullets, speaker notes and the .pptx · ₹2,000
Read each answer, close it, and say it in your own words. Your viva will ask. Now you'll know.
Because the data arrive as daily bulletins that can be downloaded twice or extended by hand, the only reliable guard against duplicate rows is the database itself. With city, fuel and date as a composite primary key, a repeated ingest cannot create a second row for the same observation — the insert fails, my loader logs it, and the analytics layer can trust every aggregate it computes.
FLOAT and DOUBLE are binary floating-point types that cannot represent values like 104.85 exactly, so sums and averages accumulate rounding error at the paise level. DECIMAL(7,2) is an exact fixed-point type, which is the correct choice for money in any relational database, and it also matches how prices are published — exactly two decimal places.
JDBC is the Java database connectivity API that lets Java code open a connection to MySQL, send SQL through PreparedStatement objects and read results as ResultSet rows. In my project every database access goes through the PriceDao class, which uses parameterised statements so values are bound as data — that both prevents SQL injection and keeps SQL out of the analytics classes.
+13 more questions, with answers
Unlocks with the project · ₹2,000
Unlock for ₹2,000What to change before it goes anywhere near a submission. Skipping it is how the demo fails live.
Unlocks with the project · ₹2,000
Unlock for ₹2,000How to study it, adapt it and walk your examiner through it, step by step.
Unlocks with the project · ₹2,000
Unlock for ₹2,000OnlyProjects. (2026). Petrol and Diesel Price Analytics and Short-Term Forecasting for Indian Metro Cities from Daily IOCL Data (Java, MySQL): BCA Data Science & Analytics project bundle [Educational resource]. https://onlyprojects.online/projects/bca-ds-petrol-diesel-price-analytics-forecasting-iocl
Keep browsing
Same degree, same syllabus slot, different idea. Pick the one your guide will actually approve.
Data Science & Analytics
Enter marks once, get chapter-level weakness heatmaps and one-page parent reports automatically
Data Science & Analytics
Three years of APMC arrivals and prices for two crops — cleaned, charted in Power BI and forecast one week ahead
Web Development
Room allocation, complaints and mess billing without the register
AI & Machine Learning
Predict tomorrow's air quality band for every Bengaluru monitoring station, before the morning commute
AI & Machine Learning
Forecast daily OPD crowds department by department, and plan the doctor roster before the Monday rush arrives
AI & Machine Learning
Turn a Soil Health Card into an explained, district-specific crop recommendation a small farmer can act on