diff --git a/conda-requirements.txt b/conda-requirements.txt index f9682d47..0d423734 100644 --- a/conda-requirements.txt +++ b/conda-requirements.txt @@ -1,5 +1,5 @@ nomkl -taxcalc==0.15.2 +taxcalc==0.17.0 btax==0.2.2 ogusa==0.5.8 numba>=0.33.0 diff --git a/deploy/fab/dropq_environment.yml b/deploy/fab/dropq_environment.yml index fd234cd7..a5f42cf8 100644 --- a/deploy/fab/dropq_environment.yml +++ b/deploy/fab/dropq_environment.yml @@ -3,7 +3,7 @@ dependencies: - python<=2.7.14,>=2.7.12 - numpy >=1.12.1 - pandas >=0.22.0 -- taxcalc =0.15.2 +- taxcalc =0.17.0 - btax =0.2.2 - ogusa =0.5.8 - numba diff --git a/static/js/taxbrain-tablebuilder.js b/static/js/taxbrain-tablebuilder.js index 08bc8396..d0fa72a9 100644 --- a/static/js/taxbrain-tablebuilder.js +++ b/static/js/taxbrain-tablebuilder.js @@ -104,8 +104,11 @@ $(function() { rowLabels: function() { if (this.get('grouping') == 'bin') { + // TODO: retrieve labels from the context and display them instead of hardcode labels here return [ - '<$10K', + '<$0K', + '=$0K', + '$0-10K', '$10-20K', '$20-30K', '$30-40K', @@ -116,11 +119,13 @@ $(function() { '$200-500K', '$500-1000K', '>$1000K', - 'All' + 'ALL' ]; } else if (this.get('grouping') == 'dec') { return [ - '0-10', + '0-10: <$0', + '0-10: =$0', + '0-10: >$0', '10-20', '20-30', '30-40', @@ -130,8 +135,10 @@ $(function() { '70-80', '80-90', '90-100', - 'All' - ]; + 'ALL', + '90-95', + '95-99', + 'Top 1%' ]; } } }); diff --git a/webapp/apps/taxbrain/helpers.py b/webapp/apps/taxbrain/helpers.py index a739c959..16f5b8cf 100644 --- a/webapp/apps/taxbrain/helpers.py +++ b/webapp/apps/taxbrain/helpers.py @@ -245,22 +245,16 @@ def default_taxcalc_data(cls, start_year, metadata=False): [1000000000, 'Dollars', 1], # "Total Tax Difference", [ 1, '%', 1], # "Share of Overall Change" ] -TAXCALC_RESULTS_BIN_ROW_KEYS = taxcalc.WEBBIN_ROW_NAMES +#TODO: apply these labels to the rows displayed on the output page +TAXCALC_RESULTS_BIN_ROW_KEYS = taxcalc.STANDARD_ROW_NAMES TAXCALC_RESULTS_BIN_ROW_KEY_LABELS = { - '<$10K':'Less than 10', - '$10-20K':'10-20', - '$20-30K':'20-30', - '$30-40K':'30-40', - '$40-50K':'40-50', - '$50-75K':'50-75', - '$75-100K':'75-100', - '$100-200K':'100-200', - '$200-500K':'200-500', - '$500-1000K':'500-1000', - '>$1000K':'1000+', - 'all':'All' + k: k for k in taxcalc.STANDARD_ROW_NAMES } -TAXCALC_RESULTS_DEC_ROW_KEYS = taxcalc.DECILE_ROW_NAMES[:-3] +# TODO: +TAXCALC_RESULTS_DEC_ROW_KEYS = taxcalc.DECILE_ROW_NAMES +# use our own PolicyBrain names for the first three items +POLICYBRAIN_DEC_ROW_LABELS = taxcalc.DECILE_ROW_NAMES +TAXCALC_RESULTS_DEC_ROW_KEY_LABELS = {k: k for k in taxcalc.DECILE_ROW_NAMES} # -DEC_ROW_NAMES = ['perc0-10', 'perc10-20', 'perc20-30', 'perc30-40', # - 'perc40-50', 'perc50-60', 'perc60-70', 'perc70-80', # - 'perc80-90', 'perc90-100', 'all'] @@ -316,19 +310,6 @@ def default_taxcalc_data(cls, start_year, metadata=False): 'fiscal_tot_ref': 'aggr_2' } -TAXCALC_RESULTS_DEC_ROW_KEY_LABELS = { - '0-10':'0-10%', - '10-20':'10-20%', - '20-30':'20-30%', - '30-40':'30-40%', - '40-50':'40-50%', - '50-60':'50-60%', - '60-70':'60-70%', - '70-80':'70-80%', - '80-90':'80-90%', - '90-100':'90-100%', - 'all':'All' -} TAXCALC_RESULTS_TABLE_LABELS = { 'diff_comb_xbin': 'Combined Payroll and Individual Income Tax: Difference between Base and User plans by expanded income bin', 'diff_comb_xdec': 'Combined Payroll and Individual Income Tax: Difference between Base and User plans by expanded income decile', diff --git a/webapp/apps/taxbrain/views.py b/webapp/apps/taxbrain/views.py index 36e78457..b01725ab 100644 --- a/webapp/apps/taxbrain/views.py +++ b/webapp/apps/taxbrain/views.py @@ -717,7 +717,8 @@ def get_result_context(model, request, url): tables['cdf_bin'] = tables.pop('diff_comb_xbin') json_table = json.dumps(tables) - + # TODO: Add row labels for decile and income bin tables to the context here + # and display these instead of hardcode in the javascript context = { 'locals':locals(), 'unique_url':url,