- Roles
- Software Developer
- Skills
- Python
In 2024, I needed to manage my expenses. There were a few budgeting apps that would meet the need, but with so many data breaches these days, I wasn’t too comfortable giving them access to my financials.
I decided to create my own application to work with downloaded transaction CSVs from my institutions.
Extracting from the CSVs to load into an array and then a dataframe was just a matter of setting a few variables to handle the format of each CSV, such as which column was which, whether dates were ascending or descending, filtering account transfer transactions, and so on.
There were only a few reports I was interested in,
so that part would be easy to visualize with plotly.
And the pandas library in Python was more then sufficient
to manipulate the transactions in any way necessary for the visualization,
whether it be reindexing, filtering, sorting, and so on.
The tricky part, so I thought, would be to categorize the transactions
without much manual effort. Turned out to not be so tough.
As the script runs through each transaction, it
consults a cats-rule.tsv file containing a list of pattern-category
pairs and looks for an existing pattern that matches the transaction description.
If found, it applies the category and moves on.
If none found, it presents me with the description, I provide
a pattern and category, and it appends that pair to the file.
With that workflow, the initial categorizations might have taken a while, but after collecting enough pattern-category pairs, my current sessions fly by as I buy from the same locations. Each month the process takes about 30 minutes, most of which is spent downloading the CSVs from my six institutions and paying a few bills as I go.