Data analysis¶
This section describes the data analysis process for FinTrack. It covers how the cleaned bank data is analyzed to extract insights and generate reports.
Submodules¶
analysis.py module¶
analysis.py
This script performs comprehensive financial analysis and reporting for bank transactions. It loads transaction data from an SQLite database, applies AI-generated categorization rules, aggregates and visualizes financial data, and generates a detailed PDF report.
- Key features:
Loads AI-generated categories for transaction classification.
Categorizes transactions using fast, vectorized keyword matching.
Aggregates data by year, month, and category.
Exports uncategorized transactions for review.
Generates cumulative spending plots and summary tables.
Produces a multi-page PDF report with tables and figures.
Intended to be run as a standalone script after the categorization and data cleaning steps.
- 05_analysis.analysis.main()¶
Run the financial analysis pipeline and generate a PDF report.
Loads AI-generated categories, processes transaction data, performs categorization, creates summary tables and plots, and exports a comprehensive PDF report.
- 05_analysis.analysis.normalize_text(text)¶
Normalize text by lowercasing and removing non-alphanumeric characters except spaces.
- Parameters:
text (str) – Input string.
- Returns:
Normalized string.
- Return type:
str