Fava: Unifying account and tree reports into a generalized report system

68 views
Skip to first unread message

Benjamin Debeerst

unread,
Mar 10, 2026, 6:55:28 PM (2 days ago) Mar 10
to bean...@googlegroups.com

Hi there,

I've been experimenting hacking on the Fava web interface in order to adapt it more to my needs. I think there is a possible path to unify the different existing reports into a single more powerful report that could fulfill existing needs while enabling additional use cases. Let me elaborate.

A non-existing view in Fava that I would like to have for my monthly personal income and expenses review would be a combination of Income Statement and Account Report: The former allows to nicely compare expenses against income. But that report unfortunately does not have a time dimension: It only shows the total change in the filtered time range, and it is cumbersome to put a given month into a historical perspective without jumping around with the time filter.

The Account Report can break down changes/balances on a monthly or weekly basis, allowing me to see how e.g. expenses for groceries and shopping of last month compare to how much I typically spend. The accompanying stacked bar chart is a great visual overview, but it only does so for a single account (tree) though. I've seen requests on the mailing list and in GH Issues to have an account report for multiple account (trees) at once, which is what I was looking for.

I've been going through the Fava code to see whether I could hack something together that either adds interval balances (or changes) to the Income Statement or allows Account Reports for multiple accounts. At which point I realized that all tree reports (Income Statement, Balance Sheet, Trial Balance) already _are_ tree reports for multiple accounts - they just calculate a total instead of interval numbers.

At this point I'm wondering whether it'd be worth working on a change where the classes TreeReport and AccountReportTree from src/fava/json_api.py are unified into a single new report class, reporting on a list of 1..n accounts, always reporting interval balances, optionally accumulated. The Income Statement would become an Account Report for Income and Expenses (not sure exactly how Net Profit could be modeled here yet), Balance Sheet an Account Report for Assets, Liabilities and Equity; Trial Balance an Account Report for Assets, Equity, Expenses, Income.

If I want a total for a year or a month, I can select "yearly" as the interval and filter for a year. Or the interval selector gets and additional option "total".

I think this could reduce some duplication in the backend and frontend code while enabling more custom reports and better graphs for the existing tree reports.

Before diving into an implementation and potentially opening a PR, I wanted to hear thoughts from the community and/or maintainers about this idea and possible obstacles that I may have missed. Curious to hear y'all thoughts.

Best,
Benjamin


Chary Ev2geny

unread,
Mar 11, 2026, 5:47:42 AM (21 hours ago) Mar 11
to Beancount
Hi,

I know this is not exactly what you are looking for, but I was also looking for ways to better visualize beancount data. I just decided to do this in jupyter notebook,  thus having access to all the modern data processing and visualization tools, available there

For instance I have so-called financial overview table (which may be similar to what you are looking for).

For the sample ledger, used in Fava for demo, it looks like this

Screenshot 2026-03-11 103700.png


This is the proof that this matches Fava content

Screenshot 2026-03-11 103837.png

Note, that this report not only shows Income Statement as well as balance sheet information per time period in one table, it also shows, that one explains other. To make sure, that it is possible to explain the difference in the net Worth Change I had to calculate unrealized gains (otherwise it does not come together)

You can then visualize this table like that

Note: that I have chosen to show Income as a positive value, which in my view makes i easier to compare it with expences

Screenshot 2026-03-11 104518.png

Brian Lalor

unread,
Mar 11, 2026, 6:06:28 AM (20 hours ago) Mar 11
to bean...@googlegroups.com
Would you mind sharing your notebook?  I’ve been doing some similar things with Marimo.
— 
Brian Lalor (he/him)

Chary Ev2geny

unread,
Mar 11, 2026, 6:23:47 AM (20 hours ago) Mar 11
to Beancount
Brian,

definately!

I am working now to bring the notebook as well as all the libraries it relies on to the state, where I will think they can be shared with the wider auditory

I am convinced, that using jupyter notebook to visualize beancount data is extremely powerful combination, I am really surprised how this is not a mainstream. 

Plus it is very hackable and easier to understand. So, it is easy to create your own Fava equivalent.  And it is my experience, that for reporting everybody has his own needs always (also in corporate world)

Regards.

Brian Lalor

unread,
Mar 11, 2026, 6:41:38 AM (20 hours ago) Mar 11
to bean...@googlegroups.com
> I am working now to bring the notebook as well as all the libraries it relies on to the state, where I will think they can be shared with the wider auditory
>
> I am convinced, that using jupyter notebook to visualize beancount data is extremely powerful combination, I am really surprised how this is not a mainstream.
>
> Plus it is very hackable and easier to understand. So, it is easy to create your own Fava equivalent. And it is my experience, that for reporting everybody has his own needs always (also in corporate world)

Agreed. If you haven’t checked out Marimo I’d recommend it. Jupyter never really clicked for me, but Marimo has (to the extent my little brain can wrap its head around data and visualization tools like that). They feel more native and portable (being actual Python files). It’d be great to get a library of these going.

Martin Blais

unread,
Mar 11, 2026, 6:44:40 AM (20 hours ago) Mar 11
to Beancount
+1 for Marimo
Marimo is the right model for a notebook, that is, reactive/spreadsheet-like cells.

--
You received this message because you are subscribed to the Google Groups "Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beancount+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/beancount/21D40603-5253-472D-80CC-E907E014EA9C%40bravo5.org.

Chary Ev2geny

unread,
Mar 11, 2026, 7:00:28 AM (20 hours ago) Mar 11
to Beancount
Just briefly looked at Marimo.

Looks very interesting indeed! thanks for bringing this up!

P.S.
Maaaan, there is so much things to learn. How to keep up with all of this (especially if this is just a hobby???)

Justus Pendleton

unread,
Mar 11, 2026, 7:40:55 PM (7 hours ago) Mar 11
to Beancount
On Wednesday, March 11, 2026 at 8:17:42 PM UTC+10:30 Chary Ev2geny wrote:
I know this is not exactly what you are looking for, but I was also looking for ways to better visualize beancount data. I just decided to do this in jupyter notebook,  thus having access to all the modern data processing and visualization tools, available there

I came across your evbeantools a while back -- your beanquery2df is the foundation of many of my investigations -- and tend to agree this kind of approach is better suited for many. It moves beancount even further away from "regular people can use it" and even further in the direction of "must know python to use it reasonably well" but I also kinda feel like that ship has largely sailed anyway. Notebooks are a little tricky to share publicly but still orders of magnitude less work than hacking fava -- and I'm sure Martin would be happy to link to contributed notebooks if people starting making that a thing.

Reply all
Reply to author
Forward
0 new messages