Posts for: #DuckDB

Expense Tracker Pt. 6

Reading Chase files into a new class

Time to continue the quest of managing bank data and reaching for the dream of good, private and fast budgeting. Following the pattern from earlier we’ll create a Checking class. This data is structured similarly to the previous ones except with a missing category and the amounts for money coming in is positive and money coming out is negative. We defined transactions going on credit cards as positive and payments as negative. This is the other way around and we’ll keep it that way for now as it conceptually makes sense(money is weird). We’ll also establish column mappings to keep it consistent and pave the the way for other banks.

Read more

Expense Tracker Pt. 5

Class everything

Continuing from the previous post, we will put the credit card code in it’s own class to follow the pattern for the database interface. I’m excited about this one as one can get creative when refactoring.

Let’s start the class definition. I’ll be taking the codename of the card for the database, the string of the filepath and the company that the credit card belongs to. I currently have chase and amex

Read more

Expense Tracker Pt. 4

Putting the database in a class

We’ve made some great progress in making an expense tracker. Now it’s time for some cleanup. Per the last post, I have removed the sub_category column from the database. I can run Group By queries to compile all the different categories and it makes it simpler without needing to regex all of that. For now, we’ll put the database in a class to clean up the file. We hacked a starting project and now need to organize it a bit now that we know it’s working.

Read more

Expense Tracker Pt. 3

Parsing Chase Files and generating fake data

We are back, recapping our previous post we had preprocessed an American Express CSV fjle and loaded it into DuckDB. Today we’ll do the same for Chase credit cards and I’ll share how to generate some fake data to properly demo this functionality.

Parsing Chase CSV’s

I’ll bring back all the snippets I used and I put them into a function for easier use.

Read more

Expense Tracker Pt. 2

Parsing AMEX CSV’s and loading them into DuckDB

In my previous post I laid out the design for an expense tracker in Python. It’s time to start hacking and I’ll preprocess the CSV’s that Amex so graciously provides.

After initializing the repo with Git we’ll install the necessary packages. Always use a virtual environment! I one time broke my python version with unmanaged packages and it took a hot minute to get it back going.

Read more