Building a budgeting app in Notebooks 15 September 2022 work, pinned Read on GitHub Table of Contents About the project Features Generate fake data to test Concatenate files from multiple accounts Checks to see if new csvs have been added to save time loading Define your bank's csv profile, so that any bank should work Identify and automatically remove duplicate expenses Use regex patterns to match vendors and assign a tag to each vendor Create budget with yaml files and use tags to group vendors in categories Checks are automatically run against budgets Premade graphs for understanding your spending Add vendors, and update them to match if they rebrand Split transactions to handle situations like buying from Amazon but wanting the expense to go to multiple tags Why make this? Setting up Using it Some Notes About the project # I built a budgeting app designed for tracking and management of monthly or quarterly budgets. Features include vendor identification, tagging and categorization, budget creation, and the auto-generation of charts for visual representation. This is a good medium between using something a spreadsheet tool like google sheets and GNUCash, this budgeting tool focuses primarily on assisting users in achieving their financial goals within specific spending categories. For optimal results, I recommend only using this tool with only one or two primary expense accounts. Features # Generate fake data to test # Your browser does not support the video tag. Concatenate files from multiple accounts # Checks to see if new csvs have been added to save time loading # Define your bank's csv profile, so that any bank should work # Identify and automatically remove duplicate expenses # Use regex patterns to match vendors and assign a tag to each vendor # create budget with yaml files and use tags to group vendors in categories # Each budget has a name, with categories that make it up. In each category You define the percentage of your salary that goes to this category If the category is a "required" category (meaning instead of being a limit, is it a category that you need to meet the percentage you set for it. Like a savings category, for example) The type of category, which is mostly a UX thing for how information about the category is printed. Two categories might be required, but you want a savings category to say things "Good job for hitting your goal!" vs a category where you shouldn't be going over saying something like "It looks like you might be spending too much and need to cut down!". Then the tags under that category. You might have a category that you put track all your non-required expenses and put things like eating out and related non-essential things. Checks are automatically run against budgets # Premade graphs for understanding your spending # Plug in your salary (after taxes) to get basic information out about how much spending you have left in a given category for your budget Add vendors, and update them to match if they rebrand # Split transactions to handle situations like buying from Amazon but wanting the expense to go to multiple tags # Why make this? # I did this mostly because I wanted a very simple budgeting app and couldn't find one. I mostly just wanted to tag and group my transactions then compare that to an ideal. Doing it in LibreOffice (I actually used Google Sheets, the horror!) was a pain, while it seemed like if I was going to learn GNUCash I may as well just make my own thing. So I made my own thing! Setting up # Clone the repo Create virtenv and activate Download requirements Drop however many csvs from your bank in that folder Start jupyter lab On the AnalyticsAndCRUD, run the init cells to get the CSVs loaded into the database On the AnalyticsAndCRUD, run workflow cells to go through different defined processes for figuring out and budgeting expenses Using it # Generally the workflows are what you'd be using. There are three workflows at the time of writing. While they are written in order at the current time of writing, the titles are what will stay consistent for matching the workflow described below to the notebook. There is a workflow to just try this app out, called "Generating and playing with fake data". There's a function where you can generate fake data and see how it looks in the folder, how the graphs work, how you could add vendors to match data that isn't already caught, etc. The next one is "Figuring out what's normal" and is done by having you filter out transactions that haven't happened with X year and month, then the graph will help show you how many transactions you don't have vendors for, or have a vendor but doesn't have a useful default tag, like Amazon or Venmo. There's a pivot table to show you the actual vendors that are costing the most for a given month, and you can filter by things like which vendors don't have tags. You can see all unique tags, and add new vendors. Then there is "Periodic Check-in" that works when once you've set up a budget in the "budget_plans.yml" file. This gives a lot of good information based on the salary you set in the init cell. Some Notes # I have the most essential and useful functions broken out into a section in the notebook called "Meaningful Function Definitions", each in their own cell with a ?, so if you need to look at what it does, just run the cell. You can run it with two ?? to get the source function if you need. This app will be most comfortable for extending if you're familiar with Regex, SQLAlchemy, Pandas, Jupyterlab, dictionaries, and Plotly. Otherwise, doing the basics should still work, but trying to do more than that might hit a wall pretty quickly. I do intend to use this as my budgeting application so hopefully this will continue to be developed! This does not work well for tracking across multiple accounts. Again, the idea is to track a budget over the course of a month or quarter, not how that saved across multiple accounts and how those accounts are growing. If this is too simple, consider checking out GNUCash! I used the black formatter