Skip to content

wj2/expense_plotter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

This code is written in python (3.x) and requires numpy, matplotlib and pandas.

Example call: 
python expense_plotter.py ../expense-reports/ costco hpp bulk \
--names "Costco" "Hyde Park Produce" "Bulk" --budget 900 850 900 \
--output_filetype .png 

where the folder ../expense-reports/ contains:
../expense-reports/bulk_FY16-17.xlsx
../expense-reports/bulk_FY17-18.xlsx
../expense-reports/costco_FY16-17.xlsx
../expense-reports/costco_FY17-18.xlsx
../expense-reports/hpp_FY16-17.xlsx
../expense-reports/hpp_FY17-18.xlsx

which are lists of transactions generated by Quickbooks.

usage: expense_plotter.py [-h] [-o OUTPUT] [-t OUTPUT_FILETYPE]
                          [-y [YEARS [YEARS ...]]] [-n [NAMES [NAMES ...]]]
                          [-e EXTENSION] [-c COLUMN_TITLE] [-b BINSIZE]
                          [-s SMOOTH_WINDOW] [-m MAIN_PLOT]
                          [-p PLOT_SIZE PLOT_SIZE] [-x] [-a]
                          [--budgets [BUDGETS [BUDGETS ...]]]
                          folder [to_plot [to_plot ...]]

script for plotting expense reports from Quickbooks

positional arguments:
  folder                folder containing expense reports generated by
                        Quickbooks
  to_plot

optional arguments:
  -h, --help            show this help message and exit
  -o OUTPUT, --output OUTPUT
                        filename to save output plot in
  -t OUTPUT_FILETYPE, --output_filetype OUTPUT_FILETYPE
                        filetype to save output as
  -y [YEARS [YEARS ...]], --years [YEARS [YEARS ...]]
                        years to plot
  -n [NAMES [NAMES ...]], --names [NAMES [NAMES ...]]
                        long names of everything to plot, given in the same
                        order
  -e EXTENSION, --extension EXTENSION
                        data filetype extension
  -c COLUMN_TITLE, --column_title COLUMN_TITLE
                        the title of the column containing spending amounts
  -b BINSIZE, --binsize BINSIZE
                        the size of the bins (in days) to use when plotting
                        (default 30)
  -s SMOOTH_WINDOW, --smooth_window SMOOTH_WINDOW
                        the width of the smoothing window to use, if smoothing
                        is set to true (default 60)
  -m MAIN_PLOT, --main_plot MAIN_PLOT
                        the string corresponding to the file names that will
                        be plotted in a bigger plot in a top row
  -p PLOT_SIZE PLOT_SIZE, --plot_size PLOT_SIZE PLOT_SIZE
                        the size (in inches, width height) of the plot to
                        generate
  -x, --smooth          whether to apply smoothing (default True)
  -a, --average         whether to plot average amounts on the righthand side
                        of the plot
  --budgets [BUDGETS [BUDGETS ...]]
                        the amounts budgeted for each category, listed in the
                        same order as the categories -- or only one value if
                        the budgets were all the same

About

Code for plotting expense reports generated by Quickbooks

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages