Skip to content

Commit

Permalink
Merge pull request #1919 from Kpinkelman/basic_income
Browse files Browse the repository at this point in the history
Universal Basic Income Addition - Updated
  • Loading branch information
martinholmer authored Mar 14, 2018
2 parents 1c6ffae + 37c8ea0 commit d44a7d5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions taxcalc/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
DIST_VARIABLES = ['expanded_income', 'c00100', 'aftertax_income', 'standard',
'c04470', 'c04600', 'c04800', 'taxbc', 'c62100', 'c09600',
'c05800', 'othertaxes', 'refund', 'c07100', 'surtax',
'iitax', 'payrolltax', 'combined', 's006']
'iitax', 'payrolltax', 'combined', 's006', 'ubi']

DIST_TABLE_COLUMNS = ['s006',
'c00100',
Expand All @@ -56,6 +56,7 @@
'iitax',
'payrolltax',
'combined',
'ubi',
'expanded_income',
'aftertax_income']

Expand All @@ -78,6 +79,7 @@
'Individual Income Tax Liabilities',
'Payroll Tax Liablities',
'Combined Payroll and Individual Income Tax Liabilities',
'Universal Basic Income',
'Expanded Income',
'After-Tax Expanded Income']

Expand All @@ -86,7 +88,7 @@
# labels list to map a label to the correct column in a difference table.

DIFF_VARIABLES = ['expanded_income', 'c00100', 'aftertax_income',
'iitax', 'payrolltax', 'combined', 's006']
'iitax', 'payrolltax', 'combined', 's006', 'ubi']

DIFF_TABLE_COLUMNS = ['count',
'tax_cut',
Expand All @@ -96,6 +98,7 @@
'mean',
'tot_change',
'share_of_change',
'ubi',
'pc_aftertaxinc']

DIFF_TABLE_LABELS = ['All Tax Units',
Expand All @@ -106,6 +109,7 @@
'Average Tax Change',
'Total Tax Difference',
'Share of Overall Change',
'Universal Basic Income',
'% Change in After-Tax Income']

DECILE_ROW_NAMES = ['0-10zn', '0-10p', '10-20', '20-30', '30-40', '40-50',
Expand Down Expand Up @@ -469,6 +473,7 @@ def weighted_share_of_total(gpdf, colname, total):
res2['afinc2'] = res2['aftertax_income']
sdf['atinc1'] = gpdf.apply(weighted_sum, 'atinc1')
sdf['atinc2'] = gpdf.apply(weighted_sum, 'atinc2')
sdf['ubi'] = gpdf.apply(weighted_sum, 'ubi')
return sdf

# main logic of diff_table_stats function
Expand Down

0 comments on commit d44a7d5

Please sign in to comment.