Thibaud’s blog

Notes, thoughts, and open-source software

Groceries expenses forecast

Here is a small D3 calendar/heatmap visualisation I tried to do to understand how many days’ worth of food would our groceries shopping cover.

Input data is each food-related expense, and daily food budget (budget per meal * number of meals). Expenses are then spread on the days they (should) cover, according to the daily food budget. If multiple expenses cover the same day, the day’s food expense increases above the daily food budget threshold.

Related: