A Python CLI tool that cleans messy 5-year retail sales data, analyzes trends, and forecasts future sales — generating a complete professional PDF report with charts, tables, and predictions.
The Sales Data Analyzer is a command-line Python application built for retail sales analysis. It takes a raw, messy sales CSV (with missing values, duplicate rows, and outliers) and runs it through a full data pipeline: cleaning and validating the data, exploring monthly and quarterly sales trends, identifying the top-selling products, breaking down performance by category and region, and calculating year-over-year growth. It also trains a simple linear regression model to forecast sales for upcoming months, complete with standard evaluation metrics (R², MAE, RMSE) so the prediction's reliability is transparent rather than just a bare number.
Every stage of the analysis is interactive through a menu-driven CLI, including the ability to filter the dataset by a custom date range before running any analysis. The final output is a polished, multi-page PDF report — combining an executive summary, a data-cleaning audit log, embedded charts (line, bar, heatmap, pie), and the sales forecast — generated automatically at the click of a menu option. The project also ships with a built-in sample dataset generator that produces a realistic 5-year sales history with intentional data-quality issues, so the entire tool can be tested and demonstrated immediately without needing external data.