{"id":28637814,"url":"https://github.com/rb-thompson/smart-finance-analyzer","last_synced_at":"2025-06-12T18:35:11.972Z","repository":{"id":294269890,"uuid":"986393309","full_name":"rb-thompson/smart-finance-analyzer","owner":"rb-thompson","description":"Module End Project for CY","archived":false,"fork":false,"pushed_at":"2025-05-26T22:30:37.000Z","size":18092,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-26T23:34:09.804Z","etag":null,"topics":["data-analysis","data-visualization","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rb-thompson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-19T14:39:34.000Z","updated_at":"2025-05-26T22:30:41.000Z","dependencies_parsed_at":"2025-05-19T17:46:22.018Z","dependency_job_id":null,"html_url":"https://github.com/rb-thompson/smart-finance-analyzer","commit_stats":null,"previous_names":["rb-thompson/smart-finance-analyzer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rb-thompson/smart-finance-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb-thompson%2Fsmart-finance-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb-thompson%2Fsmart-finance-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb-thompson%2Fsmart-finance-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb-thompson%2Fsmart-finance-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rb-thompson","download_url":"https://codeload.github.com/rb-thompson/smart-finance-analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rb-thompson%2Fsmart-finance-analyzer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259519281,"owners_count":22870331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-analysis","data-visualization","python"],"created_at":"2025-06-12T18:35:11.844Z","updated_at":"2025-06-12T18:35:11.946Z","avatar_url":"https://github.com/rb-thompson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Capstone Project: Smart Finance Analyzer\n\nA command-line tool that manages financial transactions, generates reports, and provides insights into spending patterns.\n\n## Setup\n1. Ensure Python 3 is installed.\n2. Install the `tabulate` library: `pip install tabulate`.\n4. Run the program with `python main.py`.\n\n## Features\n\n- Load transactions from `financial_transactions.csv`, validating uniqueness of transaction IDs.\n- Add transactions with input validation and customer ID suggestions.\n- View transactions in a paginated table (10 per page), with filters for type (credit/debit/transfer) and year.\n- Update transactions by ID, editing date, customer ID, amount, type, or description.\n- Delete transactions by ID with confirmation.\n- Analyze financial summaries (credits, debits, transfers, net balance).\n- Save transactions to CSV and generate a text report.\n- Generate detailed financial reports saved to text files (`report_YYYYMMDD.txt`) including:\n  - Date range and total transactions.\n  - Financial summary (credits, debits, transfers, net balance).\n  - Breakdown by transaction type (count and percentage).\n  - Yearly and quarterly breakdowns (credits, debits, transfers, net balance, counts).\n  - Top 5 customers by transaction volume.\n  - Year-over-year growth for credits, debits, and net balance.\n  - Anomaly detection for unusual transaction amounts (\u003e3 standard deviations from mean).\n- Logs errors to `errors.txt` and successful operations (load, save, add, update, delete, report) plus empty transaction attempts to `activity.txt`.\n- Comprehensive input validation, error handling (e.g., file I/O, invalid data), and support for large datasets (e.g., 100,001 transactions).\n\n## Bonus Features\n\n- Creates timestamped backups of the input CSV in `snapshots/` on load.\n- Supports year-based filtering for transaction views.\n- Generates detailed reports with statistics.\n- Uses [Tabulate](https://pypi.org/project/tabulate/) for formatted table output.\n- Includes unit tests and a data-generator.\n\n## Dependencies\n- `tabulate` (`pip install tabulate`): For formatted table output in the CLI.\n- (Optional) `faker` (`pip install faker`): For generating test data in `csv_faker.py`.\n- (Optional) `colorama` (`pip install colorama`): For colorized console output (cyan menu, green success, yellow headers, red errors). Falls back to plain text if not installed.\n\n## Files\n\n- `utils.py`: Contains `FinanceUtils` class with core logic for transaction management.\n- `main.py`: Provides a menu-driven user interface.\n- `financial_transactions.csv`: Stores transaction data.\n- `errors.txt`: Logs errors during execution.\n- `activity.txt`: Logs info messages and program operations.\n- `report_YYYYMMDD.txt`: Outputs financial summary reports.\n- `snapshots/`: Stores timestamped CSV backups.\n- `csv_faker.py`: Generates test data using the Faker library (`pip install faker`).\n- `test_finance_utils.py`: Runs unit tests for file handling and validation [TBD].\n\n## Usage\n\n1. Ensure `financial_transactions.csv` is in the project directory.\n2. Install required dependencies:\n    ```bash\n    pip install tabulate\n    ```\n\n    Install optional dependencies:\n    ```bash\n    pip install faker colorama\n    ```\n\n3. Run `python main.py` and select options 1–9 from the menu to manage transactions.\n\n## Testing\n\n- **Generate Test Data**: Run `python csv_faker.py` to create sample financial data tailored to a rural household spending.\n- **Run Unit Tests**: Execute `python test_finance_utils.py` to verify functionality, with descriptive console output for each test.\n\n## Author\n\nCode by [R. Brandon Thompson](https://www.linkedin.com/in/appaltech/) \nLicensed under the MIT License.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frb-thompson%2Fsmart-finance-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frb-thompson%2Fsmart-finance-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frb-thompson%2Fsmart-finance-analyzer/lists"}