diff --git a/docs/notebooks/10_Minutes_to_Tax-Calculator.ipynb b/docs/notebooks/10_Minutes_to_Tax-Calculator.ipynb index 816e8b217..d3d1a5eef 100644 --- a/docs/notebooks/10_Minutes_to_Tax-Calculator.ipynb +++ b/docs/notebooks/10_Minutes_to_Tax-Calculator.ipynb @@ -4,14 +4,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "# How to use the Tax Calculator" + "# How to use Tax-Calculator" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ - "This guide teaches you how to use the Open Source Policy Center's Tax Calculator. To follow along you will need the following: \n", + "This guide teaches you how to use Tax-Calculator. To follow along you will need the following: \n", "\n", "1. A copy of the taxcalc package installed on your local machine.\n", "2. A copy of the puf.csv file output from the TaxData repository. " @@ -55,9 +55,9 @@ "# The baseline includes AMT repeal. \n", "p_xx = Policy()\n", "reform_xx = {\n", - " 2016: {\n", - " '_AMT_trt1': [0.0],\n", - " '_AMT_trt2': [0.0]\n", + " 2017: {\n", + " '_AMT_rt1': [0.0],\n", + " '_AMT_rt2': [0.0]\n", " }\n", "}\n", "p_xx.implement_reform(reform_xx)\n", @@ -67,10 +67,10 @@ "\n", "p_yy = Policy()\n", "reform_yy = {\n", - " 2016: {\n", + " 2017: {\n", " '_II_brk2': [[65005, 130010, 65005, 88180, 0, 0]],\n", - " '_AMT_trt1': [0.0],\n", - " '_AMT_trt2': [0.0]\n", + " '_AMT_rt1': [0.0],\n", + " '_AMT_rt2': [0.0]\n", " }\n", "}\n", "p_yy.implement_reform(reform_yy)" @@ -80,32 +80,60 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "### Create calculator objects with default tax data and advance the calculator to 2016" + "### Create calculator objects with default tax data\n", + "###### The data are automatically extrapolated to 2013 since that is the first tax year modeled by Tax-Calculator. " ] }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "../../taxcalc/behavior.py:190: VisibleDeprecationWarning: using a non-integer number instead of an integer will result in an error in the future\n", + " val = values[year]\n" + ] + }, { "name": "stdout", "output_type": "stream", "text": [ "You loaded data for 2009.\n", - "Your data have been extrapolated to 2016.\n", + "Instantiation of the calculator automatically extrapolated your data to 2013.\n", "You loaded data for 2009.\n", - "Your data have been extrapolated to 2013.\n" + "Instantiation of the calculator automatically extrapolated your data to 2013.\n" ] } ], "source": [ "c_xx = Calculator(policy=p_xx, records=Records(\"../../puf.csv\"))\n", - "c_xx.advance_to_year(2016)\n", - "c_yy = Calculator(policy=p_yy, records=Records(\"../../puf.csv\"))\n", - "c_yy.advance_to_year(2016)" + "c_yy = Calculator(policy=p_yy, records=Records(\"../../puf.csv\"))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Advance the calculator objects to 2017 for this analysis. " + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "collapsed": false + }, + "outputs": [], + "source": [ + "c_xx.advance_to_year(2017)\n", + "c_yy.advance_to_year(2017)\n", + "assert c_xx.current_year == 2017\n", + "assert c_yy.current_year == 2017\n" ] }, { @@ -117,7 +145,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": null, "metadata": { "collapsed": false }, @@ -138,22 +166,11 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": null, "metadata": { "collapsed": false }, - "outputs": [ - { - "data": { - "text/plain": [ - "-101735788190.66336" - ] - }, - "execution_count": 9, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ "((c_yy.records._combined - c_xx.records._combined)*c_xx.records.s006).sum()" ] @@ -184,7 +201,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", - "version": "2.7.11" + "version": "2.7.12" } }, "nbformat": 4, diff --git a/taxcalc/calculate.py b/taxcalc/calculate.py index 967d160d1..33ebb9460 100644 --- a/taxcalc/calculate.py +++ b/taxcalc/calculate.py @@ -142,7 +142,8 @@ def __init__(self, policy=None, records=None, verbose=True, self.growth.apply_change(self.records) self.records.increment_year() if verbose: - print('Your data have been extrapolated to ' + + print('Instantiation of the calculator automatically ' + + 'extrapolated your data to ' + str(self.records.current_year) + '.') assert self.policy.current_year == self.records.current_year