An application to automatically analyze bank statements to visualize income and spending compared to budgeting and saving goals.
- 👀 Analyzes bank statements in PDF format using Azure Document Intelligence;
- 📋 Parses the extracted data to create structured tables of debits and credits;
- 🗃️ Classifies transactions into categories using regex patterns;
- 📊 Visualizes income, spending and budget in a web app.
This currently only works with French bank statements from Société Générale. Other banks or countries may require adjustments to the parsing logic in src/parser.py.
This project requires an Azure Document Intelligence resource. You can create one on the Azure Portal.
-
Clone the repository
git clone https://github.com/AlexandreSajus/AutoBudget.git
-
Install the required packages
pip install -r requirements.txt
-
On Azure, create an Azure Document Intelligence resource and get the endpoint and key. Set them in a
.envfile in the root directory:AZURE_DOCUMENT_INTELLIGENCE_ENDPOINT="your_endpoint_here" AZURE_DOCUMENT_INTELLIGENCE_KEY="your_key_here"
-
Add your bank statements as PDF files in
data/bank_statements -
Run
main.pypython main.py
-
If the program runs successfully, the parsed and classified transactions will be saved in
data/transactions.csv
To customize the classification, edit the JSON files in data/classes, add keywords to each subcategory so that transactions can be matched correctly.
Unmatched descriptions will be printed in the console for you to add them to the classification files.
To visualize the results, set your starting balances in the .env file:
CHECKING_ACCOUNT_STARTING_BALANCE="your_checking_account_balance"
NET_WORTH_STARTING_BALANCE="your_net_worth_balance"
INCOME="average_monthly_net_take_home_income"Then run the Streamlit app:
streamlit run app.py