PSLmodels / Tax-Brain

Tax-Brain is an integrator model for PSL tax models
http://taxbrain.pslmodels.org/
MIT License
9 stars 14 forks source link

Add Automated Report Creation Capabilities #69

Closed andersonfrailey closed 5 years ago

andersonfrailey commented 5 years ago

This PR adds the ability to create a report summarizing the effects of a given tax policy using Tax-Brain. It uses a combination of Markdown templates and some simple logic for filling them out. To convert the filled out templates to a PDF, I used Python-Markdown to convert the Markdown to HTML and a package called weasyprint to convert the HTML to a PDF. I thought about using Pandoc, but I was having trouble formatting the report and weasyprint made it easy to use CSS for styling.

The report covers some of the basic information you would want to know about a proposed tax policy such as aggregate change in tax liability and which income groups are the most affected. You can look at this sample report to see everything.

I'm still working on a few things like writing tests, making some of the wording a little less awkward, and adding this to COMP/ the CLI. I also want to increase the image quality of the graphs included in the reports. This might require switching from Bokeh to some other plotting library.

I'm more than open to feedback about the contents of the report, it's layout, etc.

andersonfrailey commented 5 years ago

Oh and I will also be adding some documentation to actually explain how to use this new feature.

andersonfrailey commented 5 years ago

If there are no objections, I'll merge this later today.