diff --git a/taxcalc/cps.csv.gz b/taxcalc/cps.csv.gz index 4b89e0540..b2a4b320c 100644 Binary files a/taxcalc/cps.csv.gz and b/taxcalc/cps.csv.gz differ diff --git a/taxcalc/cps_benefits.csv.gz b/taxcalc/cps_benefits.csv.gz index 088daed5b..e93c58acf 100644 Binary files a/taxcalc/cps_benefits.csv.gz and b/taxcalc/cps_benefits.csv.gz differ diff --git a/taxcalc/tests/cpscsv_agg_expect.txt b/taxcalc/tests/cpscsv_agg_expect.txt index 98c2d6171..cb20334ab 100644 --- a/taxcalc/tests/cpscsv_agg_expect.txt +++ b/taxcalc/tests/cpscsv_agg_expect.txt @@ -1,23 +1,23 @@ 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 -Returns (#m) 163.2 163.2 165.4 167.6 169.9 172.2 174.5 176.9 179.3 181.7 -AGI ($b) 8,961.3 9,276.9 9,568.2 10,050.2 10,590.9 11,093.7 11,598.0 12,140.1 12,716.9 13,316.7 -Itemizers (#m) 61.8 63.3 65.6 67.8 69.6 71.2 72.7 74.3 75.9 77.6 -Itemized Deduction ($b) 1,221.9 1,294.6 1,367.2 1,446.7 1,530.1 1,615.7 1,702.1 1,796.5 1,896.1 1,999.7 -Standard Deduction Filers (#m) 84.0 82.4 82.1 81.9 82.2 82.6 83.2 83.7 84.2 84.7 -Standard Deduction ($b) 738.3 735.6 731.9 733.8 752.2 771.9 794.1 816.9 840.9 865.6 -Personal Exemption ($b) 1,124.1 1,137.7 1,167.6 1,182.4 1,224.3 1,268.0 1,314.3 1,363.3 1,414.8 1,467.3 -Taxable Income ($b) 6,220.9 6,452.0 6,649.8 7,034.9 7,440.8 7,804.6 8,163.8 8,550.4 8,963.7 9,394.2 -Regular Tax ($b) 1,153.8 1,169.8 1,207.1 1,283.0 1,368.4 1,445.3 1,519.7 1,599.9 1,684.3 1,770.9 -AMT Income ($b) 8,267.8 8,542.7 8,792.6 9,229.0 9,720.6 10,173.5 10,627.5 11,114.4 11,632.9 12,171.9 -AMT Liability ($b) 10.3 12.7 13.9 15.5 16.0 16.4 17.0 17.8 18.7 19.8 +Returns (#m) 163.0 163.2 165.4 167.6 169.9 172.2 174.5 176.9 179.3 181.7 +AGI ($b) 8,930.1 9,276.8 9,568.1 10,050.1 10,590.8 11,093.6 11,597.9 12,139.9 12,716.7 13,316.5 +Itemizers (#m) 61.6 63.3 65.6 67.8 69.6 71.2 72.7 74.3 75.9 77.6 +Itemized Deduction ($b) 1,218.1 1,294.4 1,367.0 1,446.5 1,529.9 1,615.5 1,702.0 1,796.4 1,896.0 1,999.6 +Standard Deduction Filers (#m) 83.7 82.2 81.9 81.7 82.0 82.4 83.0 83.5 84.0 84.5 +Standard Deduction ($b) 736.2 734.2 730.5 732.3 750.7 770.3 792.4 815.1 839.1 863.7 +Personal Exemption ($b) 1,121.3 1,136.7 1,166.6 1,181.3 1,223.2 1,266.9 1,313.2 1,362.1 1,413.5 1,466.0 +Taxable Income ($b) 6,195.5 6,452.0 6,649.8 7,034.9 7,440.8 7,804.6 8,163.8 8,550.4 8,963.7 9,394.2 +Regular Tax ($b) 1,147.6 1,169.8 1,207.1 1,283.0 1,368.4 1,445.3 1,519.7 1,599.9 1,684.3 1,770.9 +AMT Income ($b) 8,238.5 8,542.7 8,792.6 9,228.9 9,720.6 10,173.5 10,627.4 11,114.3 11,632.8 12,171.9 +AMT Liability ($b) 10.2 12.6 13.9 15.5 16.0 16.4 17.0 17.8 18.7 19.8 AMT Filers (#m) 2.8 3.2 3.4 3.7 3.9 4.0 4.1 4.2 4.4 4.5 -Tax before Credits ($b) 1,164.1 1,182.4 1,221.0 1,298.6 1,384.4 1,461.7 1,536.7 1,617.7 1,703.0 1,790.7 -Refundable Credits ($b) 81.0 80.1 79.6 78.8 80.3 82.2 84.3 86.5 88.7 90.7 -Nonrefundable Credits ($b) 33.1 32.9 33.3 33.7 33.8 33.8 33.8 33.7 33.7 33.6 +Tax before Credits ($b) 1,157.8 1,182.4 1,221.0 1,298.6 1,384.4 1,461.7 1,536.7 1,617.7 1,703.0 1,790.7 +Refundable Credits ($b) 80.9 80.1 79.6 78.8 80.3 82.2 84.3 86.5 88.7 90.7 +Nonrefundable Credits ($b) 33.0 32.9 33.3 33.7 33.8 33.8 33.8 33.7 33.7 33.6 Reform Surtaxes ($b) 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Other Taxes ($b) 6.0 7.0 7.1 7.4 8.0 8.5 9.1 9.7 10.3 11.0 -Ind Income Tax ($b) 1,056.1 1,076.4 1,115.1 1,193.4 1,278.3 1,354.3 1,427.7 1,507.2 1,591.0 1,677.3 -Payroll Taxes ($b) 999.4 1,031.5 1,074.0 1,133.9 1,192.6 1,247.6 1,300.3 1,356.4 1,417.5 1,482.5 -Combined Liability ($b) 2,055.5 2,107.9 2,189.2 2,327.3 2,470.9 2,601.9 2,728.0 2,863.5 3,008.5 3,159.8 -With Income Tax <= 0 (#m) 67.6 66.6 66.8 66.7 67.0 67.4 67.9 68.4 69.0 69.4 +Ind Income Tax ($b) 1,049.8 1,076.4 1,115.1 1,193.4 1,278.3 1,354.3 1,427.7 1,507.2 1,591.0 1,677.3 +Payroll Taxes ($b) 997.0 1,031.5 1,074.0 1,133.9 1,192.6 1,247.6 1,300.2 1,356.3 1,417.5 1,482.5 +Combined Liability ($b) 2,046.8 2,107.9 2,189.2 2,327.3 2,470.9 2,601.9 2,728.0 2,863.5 3,008.5 3,159.8 +With Income Tax <= 0 (#m) 67.5 66.6 66.8 66.7 67.0 67.4 67.9 68.4 69.0 69.4 With Combined Tax <= 0 (#m) 43.9 43.4 43.6 43.7 43.9 44.3 44.7 45.0 45.4 45.7 diff --git a/taxcalc/tests/test_utils.py b/taxcalc/tests/test_utils.py index c81b32437..29b59f22b 100644 --- a/taxcalc/tests/test_utils.py +++ b/taxcalc/tests/test_utils.py @@ -91,11 +91,11 @@ def test_create_tables(cps_subsample): np.nan, -0.14, -0.58, - -0.70, -0.71, - -0.81, + -0.70, -0.83, - -0.74, + -0.81, + -0.73, -0.65, -0.18, -0.59] @@ -117,11 +117,11 @@ def test_create_tables(cps_subsample): np.nan, -0.14, -0.58, - -0.70, -0.71, - -0.81, + -0.70, -0.83, - -0.74, + -0.81, + -0.73, -0.65, -0.23, -0.09, @@ -145,14 +145,14 @@ def test_create_tables(cps_subsample): np.nan, -0.29, -0.07, - -0.22, - -0.80, - -0.65, + -0.23, + -0.78, + -0.66, -0.74, - -0.71, - -0.81, + -0.70, -0.83, - -0.74, + -0.81, + -0.73, -0.65, -0.23, -0.09, @@ -178,20 +178,20 @@ def test_create_tables(cps_subsample): assert isinstance(diff, pd.DataFrame) expected = [0, 0, - 855188, - 15425829, - 26212078, - 33369237, - 50208703, - 63312937, - 82312360, - 90711899, - 117518598, - 101779164, - 581705993, - 62142547, - 33919755, - 5716862] + 1037894, + 16199646, + 25518793, + 34455230, + 49661093, + 62344194, + 82290396, + 90006817, + 117415735, + 101818106, + 580747904, + 62408600, + 33771695, + 5637811] tabcol = 'tot_change' if not np.allclose(diff[tabcol].values, expected, atol=0.51, rtol=0.0): @@ -201,20 +201,20 @@ def test_create_tables(cps_subsample): print('{:.0f},'.format(val)) expected = [0.00, 0.00, - 0.15, - 2.65, - 4.51, - 5.74, - 8.63, - 10.88, - 14.15, - 15.59, - 20.20, - 17.50, + 0.18, + 2.79, + 4.39, + 5.93, + 8.55, + 10.74, + 14.17, + 15.50, + 20.22, + 17.53, 100.00, - 10.68, - 5.83, - 0.98] + 10.75, + 5.82, + 0.97] tabcol = 'share_of_change' if not np.allclose(diff[tabcol].values, expected, atol=0.005, rtol=0.0): @@ -224,14 +224,14 @@ def test_create_tables(cps_subsample): print('{:.2f},'.format(val)) expected = [np.nan, np.nan, - -0.11, - -0.62, + -0.13, + -0.65, + -0.68, -0.71, - -0.69, - -0.81, - -0.82, + -0.79, + -0.80, -0.82, - -0.72, + -0.71, -0.71, -0.30, -0.59, @@ -247,14 +247,14 @@ def test_create_tables(cps_subsample): print('{:.2f},'.format(val)) expected = [np.nan, np.nan, - -0.11, - -0.62, + -0.13, + -0.65, + -0.68, -0.71, - -0.69, - -0.81, - -0.82, + -0.79, + -0.80, -0.82, - -0.72, + -0.71, -0.71, -0.30, -0.59, @@ -278,20 +278,20 @@ def test_create_tables(cps_subsample): assert isinstance(dist, pd.DataFrame) expected = [0, 0, - -56140397, - -67237556, - -58897159, - 17222017, - 212673684, - 328116256, - 573255089, - 992965515, - 1730626734, - 7142993526, - 10815577709, - 1625179635, - 2241659962, - 3276153930] + -54678669, + -64005792, + -64426464, + 32739840, + 207396898, + 317535861, + 575238615, + 984782596, + 1731373913, + 7082515174, + 10748471972, + 1622921432, + 2217477146, + 3242116596] tabcol = 'iitax' if not np.allclose(dist[tabcol].values, expected, atol=0.5, rtol=0.0): @@ -301,20 +301,20 @@ def test_create_tables(cps_subsample): print('{:.0f},'.format(val)) expected = [0, 0, - 1202, - 13981, - 21932, - 27445, - 52318, - 62509, - 79749, - 91861, - 117068, - 129463, - 597527, - 63940, - 52137, - 13387] + 2561, + 13268, + 21368, + 28377, + 53186, + 60433, + 79779, + 91010, + 117445, + 128784, + 596211, + 63766, + 51681, + 13337] tabcol = 'num_returns_ItemDed' if not np.allclose(dist[tabcol].tolist(), expected, atol=0.5, rtol=0.0): @@ -324,20 +324,20 @@ def test_create_tables(cps_subsample): print('{:.0f},'.format(val)) expected = [0, 0, - 812766585, - 2639118220, - 3940557055, - 5243088362, - 6988752253, - 8827238879, - 11605062543, - 14729565181, - 19894042635, - 44374875397, - 119055067109, - 14255277238, - 17039539254, - 13080058905] + 836765692, + 2661991174, + 3978757611, + 5306258004, + 7022134388, + 8871843614, + 11530190180, + 14721635194, + 19860290487, + 44177752076, + 118967618420, + 14296456955, + 16895894429, + 12985400692] tabcol = 'expanded_income' if not np.allclose(dist[tabcol].tolist(), expected, atol=0.5, rtol=0.0): @@ -347,20 +347,20 @@ def test_create_tables(cps_subsample): print('{:.0f},'.format(val)) expected = [0, 0, - 801755209, - 2466382489, - 3674186760, - 4779876836, - 6150380331, - 7701226391, - 10000914935, - 12515316309, - 16352910962, - 34006973974, - 98449924197, - 11219604941, - 13525917494, - 9261451538] + 821526457, + 2483359936, + 3714540881, + 4821394144, + 6200512981, + 7763298300, + 9921184240, + 12527297334, + 16314596486, + 33886371300, + 98454082058, + 11265497052, + 13416447851, + 9204426396] tabcol = 'aftertax_income' if not np.allclose(dist[tabcol].tolist(), expected, atol=0.5, rtol=0.0): @@ -376,18 +376,18 @@ def test_create_tables(cps_subsample): assert isinstance(dist, pd.DataFrame) expected = [0, 0, - -44670465, - -79534586, - -61791623, - 34666275, - 216487136, - 742113595, - 1099657851, - 3270948526, - 2826393721, - 962881064, - 1848426216, - 10815577709] + -43150804, + -77526808, + -64845122, + 43303823, + 225370761, + 723847940, + 1098042284, + 3264499170, + 2808160213, + 950296405, + 1820474110, + 10748471972] tabcol = 'iitax' if not np.allclose(dist[tabcol], expected, atol=0.5, rtol=0.0): @@ -398,17 +398,17 @@ def test_create_tables(cps_subsample): expected = [0, 0, 1202, - 13625, - 27355, - 33694, - 50236, - 116751, - 104035, - 181572, - 60936, - 5196, - 2924, - 597527] + 13614, + 27319, + 33655, + 50186, + 116612, + 103896, + 181192, + 60527, + 5126, + 2882, + 596211] tabcol = 'num_returns_ItemDed' if not np.allclose(dist[tabcol].tolist(), expected, atol=0.5, rtol=0.0):