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



--
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.
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