diff --git a/cps_stage1/stage_2_targets.csv b/cps_stage1/stage_2_targets.csv index 6ede41e..224df9f 100644 --- a/cps_stage1/stage_2_targets.csv +++ b/cps_stage1/stage_2_targets.csv @@ -14,11 +14,11 @@ SCHEI,846331543,891134646,882933054,973306129,1140431754,1129937243,1245546132,1 SCHEL,166947674,177896945,176446339,206369393,169401805,168032834,196514107,208467561,209168741,189301968,213960139,217432651,232508026,249987447,265930950,276398569,285213406,293560790,301123520,308753028,317000243 SS,575126918,605152093,619856114,644989570,709246515,726500323,755946821,795975655,847794590,899095911,952065100,1010555508,1073244342,1140131602,1210354599,1284603484,1362935770,1448169580,1536106485,1629392071,1728256389 UCOMP,33288898,27225383,25420264,23946035,9810238,9161105,8628482,7962704,7490002,7746327,66767543,11068559,10216363,9960038,9417429,9151118,9347523,9880145,10459372,11185070,12559901 -wage1,114320683,112017897,111270085,107376379,132211870,134189618,140763057,147793779,154687316,155144599,162735492,170189201,177414268,185268099,193430596,201364451,208760999,216306164,223908490,231579408,239753336 -wage2,261995646,261659142,253415638,247511878,302997965,307530489,322595239,338707971,354506309,355554291,372950802,390032918,406591043,424590144,443296633,461479131,478430249,495721962,513144672,530724580,549457269 -wage3,381259619,383184602,382875414,382789227,440926749,447522541,469444969,492892435,515882390,517407429,542723068,567581195,591676803,617869339,645091275,671550693,696218190,721381325,746735090,772317610,799577673 -wage4,418567676,428313928,436140082,441282302,484073517,491314738,515382379,541124292,566363922,568038193,595831087,623121699,649575176,678330776,708216508,737265105,764346433,791971900,819806650,847892541,877820130 -wage5,418379915,424369612,426147995,437485582,483856372,491094344,515151189,540881554,566109863,567783383,595563809,622842179,649283790,678026490,707898816,736934382,764003563,791616637,819438902,847512194,877426358 -wage6,916618937,952347137,962308451,1000500360,1060069801,1075927308,1128632897,1185004962,1240277084,1243943559,1304807057,1364570612,1422500928,1485472649,1550919241,1614532596,1673837841,1734334691,1795289850,1856794981,1922333235 -wage7,840581301,835434509,852517230,870406373,972132275,986674331,1035007756,1086703506,1137390558,1140752884,1196567482,1251373383,1304498121,1362246056,1422263561,1480599904,1534985514,1590463880,1646362536,1702765541,1762867104 -wage8,3433224075,3714896131,3792750634,4090211841,3970523643,4029918419,4227328804,4438472084,4645495496,4659228392,4887194471,5111040680,5328020442,5563882936,5809015135,6047280886,6269410483,6496003272,6724312673,6954682009,7200157530 +wage1,114320683,112017897,111270085,107376379,134269642,136258822,143060903,150194513,157202371,157671086,165387732,172955761,180295149,188286165,196585846,204645455,212156324,219827241,227555320,235351990,243651672 +wage2,261995646,261659142,253415638,247511878,307713886,312272610,327861351,344209880,360270213,361344395,379029101,396373213,413193333,431506829,450527713,468998406,486211520,503791428,521502333,539370436,558391320 +wage3,381259619,383184602,382875414,382789227,447789423,454423340,477108287,500898887,524270102,525833267,551568291,576807678,601284545,627934592,655614041,682492844,707541601,733124121,758897272,784899178,812578626 +wage4,418567676,428313928,436140082,441282302,491607735,498890813,523795590,549914213,575572411,577288539,605541857,633251037,660123082,689380962,719768976,749277997,776777893,804863784,833158959,861705275,892093288 +wage5,418379915,424369612,426147995,437485582,491387210,498667021,523560626,549667532,575314221,577029579,605270223,632966973,659826964,689071720,719446102,748941886,776429446,804502739,832785221,861318731,891693113 +wage6,916618937,952347137,962308451,1000500360,1076568942,1092518111,1147056938,1204253959,1260442700,1264200838,1326072616,1386752790,1445599726,1509671389,1576217924,1640839559,1701061423,1762566554,1824529994,1887043406,1953589940 +wage7,840581301,835434509,852517230,870406373,987262738,1001888853,1051903440,1104355713,1155883347,1159329730,1216068968,1271715450,1325680770,1384437403,1445463605,1504724587,1559950778,1616353784,1673177080,1730504724,1791530927 +wage8,3433224075,3714896131,3792750634,4090211841,4032321676,4092059775,4296336607,4510569790,4721026426,4735102644,4966845269,5194124703,5414537689,5654520052,5903772119,6145814417,6371377238,6601746574,6833832521,7067978403,7317230471 diff --git a/cps_stage2/cps_weights.csv.gz b/cps_stage2/cps_weights.csv.gz index 835b76c..a774360 100644 Binary files a/cps_stage2/cps_weights.csv.gz and b/cps_stage2/cps_weights.csv.gz differ diff --git a/history/report.py b/history/report.py index 1a8c830..930e89a 100644 --- a/history/report.py +++ b/history/report.py @@ -1,6 +1,10 @@ """ Script used to automatically generate PDF report comparing TaxData outputs -after updates +after updates. + +Example usage: + +python report.py "400, 401" --desc text_description.txt --basepuf ../puf.csv """ # flake8: noqa: E501 import argparse diff --git a/puf_stage1/SOI_estimates.csv b/puf_stage1/SOI_estimates.csv index 2cf17e9..4c776b6 100644 --- a/puf_stage1/SOI_estimates.csv +++ b/puf_stage1/SOI_estimates.csv @@ -26,4 +26,4 @@ WAGE_8,794320811,779929943,784109315,791646425,798324358,822009437,840581301,835 WAGE_9,1431970077,1420675682,1446167263,1521442934,1599743841,1665691829,1759304940,1876094165,1922367424,2015029480 WAGE_10,666055096,633228399,678302347,750627685,806518068,872227137,955295796,1055689937,1106449651,1206754121 WAGE_11,209788740,186865034,206877573,230634407,259165177,272996984,310372311,337666673,343994542,379375686 -WAGE_12,330162467,238984223,285625448,305543960,387803684,346432571,408251028,336316005,310089733,367731740 +WAGE_12,330162467,238984223,285625448,305543960,387803684,346432571,408251028,445445356,419939017,489052554 diff --git a/puf_stage1/Stage_II_targets.csv b/puf_stage1/Stage_II_targets.csv index fa57988..fa4cba1 100644 --- a/puf_stage1/Stage_II_targets.csv +++ b/puf_stage1/Stage_II_targets.csv @@ -28,4 +28,4 @@ Wages and Salaries: Zero or Less,21437416,20445434,20280688,19421543,20111022,20 "Wages and Salaries: $100,000 Less Than $200,000",1521442934,1599743841,1665691829,1759304940,1876094165,1922367424,2015029480,2115572827,2214332225,2220825798,2329480164,2436136508,2539581745,2652113227,2768949971,2882432892,2988375657,3096292658,3205208670,3315004764,3431889080 "Wages and Salaries: $200,000 Less Than $500,000",750627685,806518068,872227137,955295796,1055689937,1106449651,1206754121,1266967184,1326111883,1330000732,1395071296,1458945291,1520896228,1588288706,1658259505,1726221778,1789668426,1854297399,1919524657,1985278975,2055278263 "Wages and Salaries: $500,000 Less Than $1 Million",230634407,259165177,272996984,310372311,337666673,343994542,379375686,398305286,416899016,418121580,438578266,458658778,478134725,499321367,521318574,542684346,562630510,582948370,603454317,624125959,646132122 -Wages and Salaries: $1 Million and Over,305543960,387803684,346432571,408251028,336316005,310089733,367731740,386080345,404103389,405288430,425117251,444581445,463459628,483996002,505318062,526028067,545362036,565056292,584932862,604970042,626300784 +Wages and Salaries: $1 Million and Over,305543960,387803684,346432571,408251028,445445356,419939017,489052554,513454669,537423815,538999821,565370500,591256254,616362664,643674328,672030890,699573471,725286038,751477756,777911937,804559716,832927824 diff --git a/puf_stage1/Stage_I_factors.csv b/puf_stage1/Stage_I_factors.csv index e7937b2..7795361 100644 --- a/puf_stage1/Stage_I_factors.csv +++ b/puf_stage1/Stage_I_factors.csv @@ -3,20 +3,20 @@ YEAR,APOPN,APOPDEP,APOPSNR,AGDPN,ATXPY,ASCHF,ABOOK,ACPIU,ACPIM,ARETS,AWAGE,ASCHC 2012,1.0077,0.9959,1.0435,1.0416,1.0519,0.9576,1.1135,1.0209,1.0365,0.9970,1.0406,1.0571,0.9635,1.1749,0.9341,0.9307,1.3380,1.6019,1.0730,0.7711,0.9231,1.0000 2013,1.0153,0.9934,1.0811,1.0826,1.0731,1.1020,1.1598,1.0360,1.0620,1.0136,1.0694,1.0598,1.0194,1.1805,0.9535,0.8380,1.1046,1.2528,1.1281,0.5620,0.8273,1.0000 2014,1.0229,0.9915,1.1179,1.1179,1.1130,1.0344,1.1411,1.0525,1.0874,1.0097,1.1205,1.1111,1.0582,1.2797,0.9523,0.7817,1.3088,1.7513,1.1721,0.3603,0.8029,1.0000 -2015,1.0309,0.9912,1.1563,1.1623,1.1709,0.5298,1.1495,1.0538,1.1162,1.0352,1.1565,1.1624,1.1092,1.3475,1.0147,0.7983,1.3373,1.7726,1.2332,0.2947,0.7938,1.0621 -2016,1.0394,0.9920,1.1947,1.2002,1.2065,0.5722,1.1414,1.0671,1.1584,1.0337,1.1738,1.1538,1.1246,1.3351,1.0065,0.8046,1.3055,1.5757,1.2632,0.2752,0.7952,1.1748 -2017,1.0478,0.9933,1.2342,1.2594,1.2838,0.5497,1.1640,1.0898,1.1874,1.0518,1.2313,1.2337,1.2839,1.4717,1.1771,0.8830,1.4508,2.1360,1.3144,0.2592,0.8185,1.1984 -2018,1.0563,0.9948,1.2756,1.3283,1.3522,0.5695,1.2347,1.1165,1.2108,1.0683,1.2928,1.2971,1.3498,1.5612,1.2487,0.9187,1.6310,2.3143,1.3840,0.2392,0.8621,1.3326 -2019,1.0647,0.9965,1.3189,1.3812,1.4052,0.6583,1.2389,1.1365,1.2451,1.0827,1.3531,1.3518,1.4068,1.5665,1.2529,0.9388,1.6126,2.5609,1.4741,0.2250,0.8959,1.4158 -2020,1.0731,0.9974,1.3644,1.3490,1.4903,0.8795,1.1212,1.1507,1.2963,1.0955,1.3571,1.3545,1.4096,1.4177,1.1339,0.9169,1.5761,2.3584,1.5633,0.2327,0.9502,1.4223 -2021,1.0814,0.9992,1.4092,1.4340,1.5155,0.8212,1.2673,1.1730,1.3070,1.1084,1.4235,1.4953,1.5561,1.6023,1.2816,0.8719,1.6817,2.9215,1.6554,2.0057,0.9662,1.4764 -2022,1.0897,1.0022,1.4558,1.5037,1.5420,0.7245,1.2878,1.1974,1.1886,1.1208,1.4887,1.5012,1.5622,1.6283,1.3024,0.8466,1.8056,2.9605,1.7571,0.3325,0.9831,1.5326 -2023,1.0980,1.0051,1.5019,1.5674,1.6007,0.7682,1.3771,1.2245,1.2038,1.1334,1.5519,1.5558,1.6191,1.7412,1.3927,0.8540,1.8873,2.7364,1.8661,0.3069,1.0205,1.5909 -2024,1.1062,1.0075,1.5468,1.6370,1.6680,0.7934,1.4807,1.2530,1.2198,1.1461,1.6206,1.6276,1.6938,1.8722,1.4974,0.8674,1.9577,2.6254,1.9824,0.2992,1.0634,1.6514 -2025,1.1142,1.0101,1.5935,1.7096,1.7426,0.8172,1.5751,1.2823,1.2363,1.1589,1.6920,1.7008,1.7699,1.9916,1.5929,0.9131,2.0228,2.5869,2.1045,0.2829,1.1110,1.7143 -2026,1.1222,1.0124,1.6377,1.7805,1.8220,0.8384,1.6371,1.3135,1.2538,1.1719,1.7614,1.7715,1.8436,2.0700,1.6556,0.9974,2.0821,2.5817,2.2336,0.2749,1.1616,1.7795 -2027,1.1301,1.0143,1.6790,1.8488,1.9012,0.8636,1.6894,1.3455,1.2718,1.1850,1.8261,1.8400,1.9148,2.1360,1.7084,1.0962,2.1467,2.6062,2.3698,0.2808,1.2121,1.8472 -2028,1.1379,1.0163,1.7188,1.9193,1.9878,0.8901,1.7387,1.3784,1.2903,1.1983,1.8921,1.9108,1.9885,2.1985,1.7584,1.2095,2.2232,2.6562,2.5180,0.2968,1.2673,1.9175 -2029,1.1455,1.0198,1.7569,1.9914,2.0762,0.9219,1.7836,1.4122,1.3093,1.2117,1.9586,1.9800,2.0606,2.2551,1.8037,1.3220,2.3131,2.7234,2.6709,0.3142,1.3237,1.9904 -2030,1.1530,1.0233,1.7915,2.0647,2.1687,0.9563,1.8287,1.4460,1.3283,1.2252,2.0257,2.0506,2.1341,2.3123,1.8494,1.4473,2.4169,2.8021,2.8331,0.3360,1.3827,2.0662 -2031,1.1603,1.0266,1.8190,2.1419,2.2711,0.9907,1.8776,1.4798,1.3472,1.2390,2.0972,2.1271,2.2137,2.3741,1.8988,1.5727,2.5306,2.8926,3.0050,0.3773,1.4480,2.1448 +2015,1.0309,0.9912,1.1563,1.1623,1.1709,0.5298,1.1495,1.0538,1.1162,1.0352,1.1745,1.1624,1.1092,1.3475,1.0147,0.7983,1.3373,1.7726,1.2332,0.2947,0.7938,1.0621 +2016,1.0394,0.9920,1.1947,1.2002,1.2065,0.5722,1.1414,1.0671,1.1584,1.0337,1.1919,1.1538,1.1246,1.3351,1.0065,0.8046,1.3055,1.5757,1.2632,0.2752,0.7952,1.1748 +2017,1.0478,0.9933,1.2342,1.2594,1.2838,0.5497,1.1640,1.0898,1.1874,1.0518,1.2514,1.2337,1.2839,1.4717,1.1771,0.8830,1.4508,2.1360,1.3144,0.2592,0.8185,1.1984 +2018,1.0563,0.9948,1.2756,1.3283,1.3522,0.5695,1.2347,1.1165,1.2108,1.0683,1.3138,1.2971,1.3498,1.5612,1.2487,0.9187,1.6310,2.3143,1.3840,0.2392,0.8621,1.3326 +2019,1.0647,0.9965,1.3189,1.3812,1.4052,0.6583,1.2389,1.1365,1.2451,1.0827,1.3751,1.3518,1.4068,1.5665,1.2529,0.9388,1.6126,2.5609,1.4741,0.2250,0.8959,1.4158 +2020,1.0731,0.9974,1.3644,1.3490,1.4903,0.8795,1.1212,1.1507,1.2963,1.0955,1.3792,1.3545,1.4096,1.4177,1.1339,0.9169,1.5761,2.3584,1.5633,0.2327,0.9502,1.4223 +2021,1.0814,0.9992,1.4092,1.4340,1.5155,0.8212,1.2673,1.1730,1.3070,1.1084,1.4467,1.4953,1.5561,1.6023,1.2816,0.8719,1.6817,2.9215,1.6554,2.0057,0.9662,1.4764 +2022,1.0897,1.0022,1.4558,1.5037,1.5420,0.7245,1.2878,1.1974,1.1886,1.1208,1.5129,1.5012,1.5622,1.6283,1.3024,0.8466,1.8056,2.9605,1.7571,0.3325,0.9831,1.5326 +2023,1.0980,1.0051,1.5019,1.5674,1.6007,0.7682,1.3771,1.2245,1.2038,1.1334,1.5771,1.5558,1.6191,1.7412,1.3927,0.8540,1.8873,2.7364,1.8661,0.3069,1.0205,1.5909 +2024,1.1062,1.0075,1.5468,1.6370,1.6680,0.7934,1.4807,1.2530,1.2198,1.1461,1.6470,1.6276,1.6938,1.8722,1.4974,0.8674,1.9577,2.6254,1.9824,0.2992,1.0634,1.6514 +2025,1.1142,1.0101,1.5935,1.7096,1.7426,0.8172,1.5751,1.2823,1.2363,1.1589,1.7196,1.7008,1.7699,1.9916,1.5929,0.9131,2.0228,2.5869,2.1045,0.2829,1.1110,1.7143 +2026,1.1222,1.0124,1.6377,1.7805,1.8220,0.8384,1.6371,1.3135,1.2538,1.1719,1.7901,1.7715,1.8436,2.0700,1.6556,0.9974,2.0821,2.5817,2.2336,0.2749,1.1616,1.7795 +2027,1.1301,1.0143,1.6790,1.8488,1.9012,0.8636,1.6894,1.3455,1.2718,1.1850,1.8558,1.8400,1.9148,2.1360,1.7084,1.0962,2.1467,2.6062,2.3698,0.2808,1.2121,1.8472 +2028,1.1379,1.0163,1.7188,1.9193,1.9878,0.8901,1.7387,1.3784,1.2903,1.1983,1.9229,1.9108,1.9885,2.1985,1.7584,1.2095,2.2232,2.6562,2.5180,0.2968,1.2673,1.9175 +2029,1.1455,1.0198,1.7569,1.9914,2.0762,0.9219,1.7836,1.4122,1.3093,1.2117,1.9905,1.9800,2.0606,2.2551,1.8037,1.3220,2.3131,2.7234,2.6709,0.3142,1.3237,1.9904 +2030,1.1530,1.0233,1.7915,2.0647,2.1687,0.9563,1.8287,1.4460,1.3283,1.2252,2.0587,2.0506,2.1341,2.3123,1.8494,1.4473,2.4169,2.8021,2.8331,0.3360,1.3827,2.0662 +2031,1.1603,1.0266,1.8190,2.1419,2.2711,0.9907,1.8776,1.4798,1.3472,1.2390,2.1313,2.1271,2.2137,2.3741,1.8988,1.5727,2.5306,2.8926,3.0050,0.3773,1.4480,2.1448 diff --git a/puf_stage1/growfactors.csv b/puf_stage1/growfactors.csv index 9f5f8b1..c720c04 100644 --- a/puf_stage1/growfactors.csv +++ b/puf_stage1/growfactors.csv @@ -3,20 +3,20 @@ YEAR,ATXPY,ASCHF,ABOOK,ACPIU,ACPIM,AWAGE,ASCHCI,ASCHCL,ASCHEI,ASCHEL,AINTS,ADIVS 2012,1.043862,0.950283,1.104992,1.0209,1.0365,1.032649,1.049023,0.956138,1.165922,0.926962,0.923588,1.327776,1.58966,1.02827,0.7711,0.9231,0.992359,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 2013,1.012518,1.142179,1.033784,1.014791,1.024602,1.019984,0.99505,1.050098,0.997245,1.013128,0.893658,0.819381,0.776217,1.014786,0.728829,0.896219,0.992515,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 2014,1.029476,0.931683,0.976566,1.015927,1.023917,1.039999,1.040616,1.030349,1.075978,0.991321,0.925886,1.17606,1.387522,1.004801,0.641103,0.970506,0.99257,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -2015,1.043858,0.508206,0.999544,1.001235,1.026485,1.024119,1.038052,1.040061,1.04481,1.057257,1.013311,1.013846,1.004308,1.017188,0.81793,0.988666,1.053858,1.023325,1.041528,1.019361,1.102667,1.007792,1.026748,1.132657,1.04693 -2016,1.021978,1.071198,0.984833,1.012621,1.037807,1.006659,0.984484,1.005593,0.982695,0.983807,0.999649,0.968237,0.881651,0.991403,0.933831,1.001764,1.097065,1.011695,1.010367,0.993375,0.989722,1.002577,1.01625,0.828168,1.105413 -2017,1.055539,0.952977,1.011625,1.021273,1.025035,1.040577,1.060677,1.132498,1.093477,1.160123,1.088642,1.102389,1.344721,1.00723,0.94186,1.029301,1.011911,1.030968,1.014601,0.981621,1.0,0.998715,1.063959,1.0,1.0 -2018,1.044804,1.027683,1.052203,1.0245,1.019707,1.041498,1.04293,1.042868,1.052278,1.052291,1.032058,1.115161,1.074755,1.018778,0.92284,1.053268,1.103035,1.045097,1.045897,1.005738,1.0,1.002574,1.034828,1.0,1.0 -2019,1.030997,1.146807,0.995485,1.017913,1.028328,1.038385,1.033949,1.034006,0.995478,0.995447,1.013817,0.980918,1.097825,1.030133,0.940635,1.039207,1.054052,1.052158,1.045866,1.000751,1.0,1.002567,1.034809,1.0,1.0 -2020,1.052259,1.325559,0.897912,1.012495,1.041121,0.995105,0.994154,0.994147,0.897927,0.897936,0.969027,0.969715,0.913717,1.025146,1.034222,1.060609,0.996727,1.050763,1.046106,1.00255,1.0,1.003841,1.034974,1.0,1.0 -2021,1.009104,0.926546,1.121631,1.01938,1.008254,1.040877,1.095477,1.095457,1.121536,1.121583,0.943623,1.058811,1.229256,1.02525,8.619252,1.016839,1.03007,1.047248,1.047927,1.001796,1.0,1.002551,1.034869,1.0,1.0 -2022,1.009736,0.875526,1.008436,1.020801,0.909411,1.037837,0.996299,0.996273,1.008486,1.008489,0.963587,1.065498,1.005631,1.027459,0.165778,1.017491,1.030159,1.048769,1.047573,0.999851,1.0,1.002545,1.034942,1.0,1.0 -2023,1.03022,1.052302,1.06126,1.022632,1.012788,1.034573,1.028537,1.028588,1.061253,1.06125,1.001116,1.037347,0.917316,1.029435,0.923008,1.038043,1.030193,1.050822,1.048715,1.000448,1.0,1.003807,1.034968,1.0,1.0 -2024,1.03432,1.025148,1.06726,1.023275,1.013291,1.036527,1.038395,1.038382,1.067265,1.067208,1.008162,1.029613,0.952324,1.031486,0.97491,1.042038,1.030334,1.048426,1.051767,0.99776,1.0,1.002528,1.034951,1.0,1.0 -2025,1.037223,1.022602,1.056116,1.023384,1.013527,1.036561,1.037471,1.037426,1.056137,1.056139,1.045128,1.025835,0.978261,1.03048,0.945521,1.044762,1.030635,1.046248,1.052213,1.002245,1.0,1.003783,1.034897,1.0,1.0 -2026,1.03811,1.018628,1.031953,1.024331,1.014155,1.033595,1.034143,1.034215,1.031956,1.031953,1.084536,1.021978,0.990875,1.0327,0.971721,1.045545,1.030633,1.072236,1.0,0.999552,1.0,1.002513,1.034808,1.0,1.0 -2027,1.036174,1.022857,1.024733,1.024362,1.014356,1.029485,1.031407,1.03136,1.024671,1.024678,1.091375,1.023819,1.002433,1.03488,1.021462,1.043475,1.030788,1.0,1.0,1.0,1.0,1.002506,1.034863,1.0,1.0 -2028,1.038383,1.02362,1.022127,1.024452,1.014546,1.02904,1.03136,1.031371,1.022205,1.022212,1.095794,1.028537,1.012199,1.037933,1.05698,1.045541,1.030942,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -2029,1.037542,1.028855,1.019018,1.024521,1.014725,1.028278,1.02934,1.029383,1.018939,1.018956,1.085762,1.033534,1.018497,1.03772,1.058625,1.044504,1.031131,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -2030,1.037758,1.030567,1.018617,1.023934,1.014512,1.027532,1.02892,1.028932,1.018695,1.018667,1.087659,1.038078,1.022205,1.040242,1.069383,1.044572,1.03133,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 -2031,1.040629,1.029454,1.020281,1.023375,1.014229,1.028783,1.03078,1.030773,1.020267,1.020252,1.079808,1.040456,1.025803,1.04464,1.122917,1.047226,1.03151,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2015,1.043858,0.508206,0.999544,1.001235,1.026485,1.040059,1.038052,1.040061,1.04481,1.057257,1.013311,1.013846,1.004308,1.017188,0.81793,0.988666,1.053858,1.023325,1.041528,1.019361,1.102667,1.007792,1.026748,1.132657,1.04693 +2016,1.021978,1.071198,0.984833,1.012621,1.037807,1.006516,0.984484,1.005593,0.982695,0.983807,0.999649,0.968237,0.881651,0.991403,0.933831,1.001764,1.097065,1.011695,1.010367,0.993375,0.989722,1.002577,1.01625,0.828168,1.105413 +2017,1.055539,0.952977,1.011625,1.021273,1.025035,1.041503,1.060677,1.132498,1.093477,1.160123,1.088642,1.102389,1.344721,1.00723,0.94186,1.029301,1.011911,1.030968,1.014601,0.981621,1.0,0.998715,1.063959,1.0,1.0 +2018,1.044804,1.027683,1.052203,1.0245,1.019707,1.041416,1.04293,1.042868,1.052278,1.052291,1.032058,1.115161,1.074755,1.018778,0.92284,1.053268,1.103035,1.045097,1.045897,1.005738,1.0,1.002574,1.034828,1.0,1.0 +2019,1.030997,1.146807,0.995485,1.017913,1.028328,1.038401,1.033949,1.034006,0.995478,0.995447,1.013817,0.980918,1.097825,1.030133,0.940635,1.039207,1.054052,1.052158,1.045866,1.000751,1.0,1.002567,1.034809,1.0,1.0 +2020,1.052259,1.325559,0.897912,1.012495,1.041121,0.99513,0.994154,0.994147,0.897927,0.897936,0.969027,0.969715,0.913717,1.025146,1.034222,1.060609,0.996727,1.050763,1.046106,1.00255,1.0,1.003841,1.034974,1.0,1.0 +2021,1.009104,0.926546,1.121631,1.01938,1.008254,1.040891,1.095477,1.095457,1.121536,1.121583,0.943623,1.058811,1.229256,1.02525,8.619252,1.016839,1.03007,1.047248,1.047927,1.001796,1.0,1.002551,1.034869,1.0,1.0 +2022,1.009736,0.875526,1.008436,1.020801,0.909411,1.037794,0.996299,0.996273,1.008486,1.008489,0.963587,1.065498,1.005631,1.027459,0.165778,1.017491,1.030159,1.048769,1.047573,0.999851,1.0,1.002545,1.034942,1.0,1.0 +2023,1.03022,1.052302,1.06126,1.022632,1.012788,1.034555,1.028537,1.028588,1.061253,1.06125,1.001116,1.037347,0.917316,1.029435,0.923008,1.038043,1.030193,1.050822,1.048715,1.000448,1.0,1.003807,1.034968,1.0,1.0 +2024,1.03432,1.025148,1.06726,1.023275,1.013291,1.036581,1.038395,1.038382,1.067265,1.067208,1.008162,1.029613,0.952324,1.031486,0.97491,1.042038,1.030334,1.048426,1.051767,0.99776,1.0,1.002528,1.034951,1.0,1.0 +2025,1.037223,1.022602,1.056116,1.023384,1.013527,1.036584,1.037471,1.037426,1.056137,1.056139,1.045128,1.025835,0.978261,1.03048,0.945521,1.044762,1.030635,1.046248,1.052213,1.002245,1.0,1.003783,1.034897,1.0,1.0 +2026,1.03811,1.018628,1.031953,1.024331,1.014155,1.033577,1.034143,1.034215,1.031956,1.031953,1.084536,1.021978,0.990875,1.0327,0.971721,1.045545,1.030633,1.072236,1.0,0.999552,1.0,1.002513,1.034808,1.0,1.0 +2027,1.036174,1.022857,1.024733,1.024362,1.014356,1.029455,1.031407,1.03136,1.024671,1.024678,1.091375,1.023819,1.002433,1.03488,1.021462,1.043475,1.030788,1.0,1.0,1.0,1.0,1.002506,1.034863,1.0,1.0 +2028,1.038383,1.02362,1.022127,1.024452,1.014546,1.029054,1.03136,1.031371,1.022205,1.022212,1.095794,1.028537,1.012199,1.037933,1.05698,1.045541,1.030942,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2029,1.037542,1.028855,1.019018,1.024521,1.014725,1.028287,1.02934,1.029383,1.018939,1.018956,1.085762,1.033534,1.018497,1.03772,1.058625,1.044504,1.031131,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2030,1.037758,1.030567,1.018617,1.023934,1.014512,1.027535,1.02892,1.028932,1.018695,1.018667,1.087659,1.038078,1.022205,1.040242,1.069383,1.044572,1.03133,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 +2031,1.040629,1.029454,1.020281,1.023375,1.014229,1.028752,1.03078,1.030773,1.020267,1.020252,1.079808,1.040456,1.025803,1.04464,1.122917,1.047226,1.03151,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0 diff --git a/puf_stage1/updatesoi.py b/puf_stage1/updatesoi.py index f42eb79..8700f53 100644 --- a/puf_stage1/updatesoi.py +++ b/puf_stage1/updatesoi.py @@ -86,7 +86,7 @@ (13, 13), (14, 14), (15, 15), - (17, 20), + (16, 20), ] CPSWAGES = [(2, 4), (5, 6), (7, 8), (9, 9), (10, 10), (11, 11), (12, 12), (13, 20)] @@ -213,6 +213,10 @@ def table14_wages(data, indicies): for i, j in indicies: val = data.iloc[i : j + 1].sum()[0].astype(int) was.append(val) + # ensure all wages are accounted for. Total is at index 21 in the data + # the totals might not be exactly the same due to rounding in the IRS data, + # but they should still be very close + assert abs(sum(was) - data.iloc[1].values[0]) < 2 return was diff --git a/puf_stage2/puf_weights.csv.gz b/puf_stage2/puf_weights.csv.gz index 0809b8a..4eb8792 100644 Binary files a/puf_stage2/puf_weights.csv.gz and b/puf_stage2/puf_weights.csv.gz differ diff --git a/puf_stage3/puf_ratios.csv b/puf_stage3/puf_ratios.csv index ee8eb81..43fbf1a 100644 --- a/puf_stage3/puf_ratios.csv +++ b/puf_stage3/puf_ratios.csv @@ -3,20 +3,20 @@ INT2011,1.0259,0.5597,0.9448,0.9681,0.9728,0.9464,0.8390,0.8997,0.9713,0.9239,0. INT2012,0.7778,0.9454,0.8433,0.8157,0.7153,0.8101,0.7961,0.7940,0.8481,0.9063,0.9130,0.9182,1.0343,1.0435,1.0129,1.1436,1.0975,1.2339,1.3445 INT2013,1.1325,0.7670,0.7821,0.7778,0.8935,0.8699,0.9558,0.9045,0.8342,0.8596,0.9746,1.0271,1.0498,1.0505,1.0891,0.9632,1.0448,0.9690,1.1441 INT2014,0.9106,0.8669,0.8492,0.7737,0.8431,0.8802,0.9729,0.8840,0.8368,1.0108,0.8443,1.0534,1.0274,0.9291,1.0609,1.1524,1.0626,1.0728,1.0862 -INT2015,0.9813,0.9511,0.9323,0.9470,0.9543,0.9246,0.9367,0.9315,0.9463,0.9699,0.9891,1.0163,0.9966,0.9906,1.0241,0.9827,1.0221,1.1437,1.1672 -INT2016,0.9843,1.0086,1.0453,1.0314,1.0447,1.0342,1.0116,1.0025,1.0025,1.0175,0.9484,0.9531,0.9752,1.0131,1.0723,1.0130,1.0804,1.0810,0.9935 -INT2017,0.9902,0.9159,0.8944,0.8905,0.8914,0.9132,0.9153,0.9405,0.9609,0.9758,1.0199,1.0690,1.0327,0.9884,0.9403,0.9756,0.9565,1.0534,1.1945 -INT2018,0.9997,0.9757,0.9708,0.9653,0.9791,0.9715,0.9796,0.9768,0.9766,1.0001,0.9899,1.0051,1.0121,1.0064,1.0184,0.9898,1.0194,1.0874,0.9982 -INT2019,1.0001,0.9767,0.9756,0.9931,0.9771,0.9816,0.9782,0.9847,0.9803,0.9945,0.9890,1.0094,1.0044,1.0078,0.9978,1.0025,1.0260,1.0297,1.0198 -INT2020,1.0022,0.9773,0.9770,0.9762,0.9868,0.9857,0.9862,0.9866,0.9918,0.9976,0.9973,1.0084,1.0047,1.0048,1.0078,0.9979,1.0141,1.0096,1.0108 -INT2021,0.9974,0.9816,0.9749,0.9772,0.9776,0.9876,0.9858,0.9862,0.9979,0.9966,1.0013,1.0008,1.0058,1.0118,1.0051,1.0041,1.0299,1.0092,1.0024 -INT2022,0.9966,0.9819,0.9788,0.9787,0.9778,0.9821,0.9837,0.9894,0.9900,1.0072,1.0045,1.0043,1.0036,1.0076,1.0058,1.0055,1.0133,0.9977,1.0111 -INT2023,1.0094,0.9821,0.9797,0.9789,0.9814,0.9858,0.9865,1.0104,0.9984,0.9934,1.0035,0.9999,1.0034,1.0052,1.0004,1.0089,1.0220,1.0034,0.9943 -INT2024,0.9960,0.9845,0.9810,0.9768,0.9760,0.9803,0.9888,1.0139,0.9888,0.9978,0.9995,0.9983,1.0046,1.0064,1.0117,1.0086,1.0240,1.0139,1.0077 -INT2025,1.0107,0.9924,0.9761,0.9770,0.9868,0.9850,0.9887,0.9906,0.9921,1.0014,0.9996,0.9956,1.0068,1.0092,1.0148,1.0196,1.0250,0.9948,0.9916 -INT2026,1.0110,0.9838,0.9778,0.9810,0.9828,0.9863,1.0079,0.9978,0.9935,0.9969,0.9880,0.9944,1.0043,1.0151,1.0366,1.0221,1.0202,0.9979,0.9936 -INT2027,1.0091,0.9907,0.9844,0.9778,0.9897,0.9954,0.9843,0.9907,0.9929,0.9909,1.0018,0.9929,1.0072,1.0188,1.0181,1.0274,1.0248,0.9936,0.9945 -INT2028,1.0079,0.9970,0.9744,0.9839,0.9853,0.9853,1.0230,0.9950,0.9898,0.9948,0.9898,0.9918,1.0076,1.0175,1.0251,1.0282,1.0242,0.9953,0.9918 -INT2029,1.0113,0.9942,0.9815,0.9826,0.9851,0.9863,0.9932,0.9843,0.9939,0.9902,0.9911,0.9920,1.0065,1.0311,1.0321,1.0462,1.0225,1.0024,0.9923 -INT2030,1.0344,1.0017,0.9833,0.9863,0.9805,0.9878,0.9826,0.9802,0.9817,0.9925,0.9851,0.9918,1.0029,1.0350,1.0391,1.0440,1.0297,0.9941,0.9922 -INT2031,1.0248,1.0238,0.9865,0.9887,0.9857,0.9938,0.9843,0.9870,0.9871,0.9889,0.9781,0.9875,0.9936,1.0485,1.0491,1.0768,1.0302,1.0057,0.9933 +INT2015,0.9783,0.9303,0.9180,0.9116,0.9384,0.9166,0.9214,0.9197,0.9424,0.9730,0.9804,1.0265,1.0268,1.0210,1.0052,0.9834,1.0270,1.1239,1.1123 +INT2016,0.9783,1.0981,1.0514,1.0463,1.0332,1.0253,1.0009,0.9936,0.9849,1.0022,0.9171,0.9206,0.9150,1.0633,1.1482,1.2013,1.2100,1.1404,1.0127 +INT2017,1.0001,0.8479,0.8845,0.8887,0.9034,0.9117,0.9258,0.9437,0.9609,0.9979,1.0526,1.0903,1.1040,0.9537,0.8850,0.8316,0.8764,1.0346,1.1175 +INT2018,1.0050,0.9793,0.9683,0.9670,0.9748,0.9838,0.9804,0.9829,0.9843,0.9979,0.9774,0.9951,1.0026,1.0228,1.0066,1.0122,1.0537,1.0290,1.0223 +INT2019,1.0027,0.9803,0.9720,0.9730,0.9790,0.9746,0.9841,0.9766,0.9861,0.9918,0.9850,1.0104,1.0009,1.0156,1.0092,1.0147,1.0446,1.0084,1.0167 +INT2020,0.9983,0.9805,0.9728,0.9853,0.9843,0.9779,0.9823,0.9889,0.9951,0.9888,1.0025,1.0080,1.0096,1.0048,1.0107,1.0191,1.0152,1.0009,1.0048 +INT2021,1.0051,0.9796,0.9785,0.9796,0.9758,0.9823,0.9798,0.9852,0.9880,0.9969,0.9993,1.0024,1.0030,1.0137,1.0127,1.0177,1.0251,1.0132,1.0063 +INT2022,1.0005,0.9841,0.9776,0.9783,0.9805,0.9827,0.9872,0.9866,0.9933,0.9945,0.9991,1.0061,1.0095,1.0074,1.0154,1.0082,1.0141,1.0026,1.0066 +INT2023,1.0058,0.9838,0.9797,0.9800,0.9822,0.9856,0.9878,0.9933,0.9879,1.0005,0.9897,0.9996,1.0102,1.0102,1.0117,1.0124,1.0107,1.0001,1.0195 +INT2024,1.0066,0.9892,0.9809,0.9767,0.9835,0.9859,0.9833,0.9996,0.9836,0.9964,0.9994,1.0026,0.9998,1.0189,1.0304,1.0118,1.0152,1.0029,0.9961 +INT2025,1.0035,0.9874,0.9799,0.9827,0.9866,0.9975,0.9905,1.0036,0.9858,0.9949,0.9975,0.9911,1.0076,1.0153,1.0298,1.0307,1.0211,0.9996,0.9958 +INT2026,1.0143,0.9935,0.9798,0.9892,0.9834,0.9903,0.9813,0.9905,0.9859,0.9996,0.9905,0.9899,1.0044,1.0268,1.0246,1.0435,1.0220,1.0036,0.9987 +INT2027,1.0118,0.9992,0.9813,0.9821,0.9790,0.9828,1.0214,0.9911,0.9893,0.9912,0.9876,0.9926,0.9959,1.0306,1.0397,1.0501,1.0267,1.0024,0.9996 +INT2028,1.0250,1.0090,0.9812,0.9803,0.9820,0.9862,0.9967,0.9795,0.9922,0.9898,0.9838,0.9904,0.9975,1.0369,1.0386,1.0557,1.0285,1.0035,1.0089 +INT2029,1.0298,1.0738,0.9795,0.9708,0.9770,0.9800,1.0023,0.9827,0.9857,0.9861,0.9794,0.9816,0.9914,1.0559,1.0718,1.0728,1.0266,1.0116,1.0105 +INT2030,1.0905,1.2682,1.5223,1.4945,1.3894,1.3652,1.3529,1.2705,1.2139,1.0245,1.0879,0.9601,0.9243,0.8063,0.8083,0.7780,0.7535,0.7502,0.7159 +INT2031,1.0003,0.9996,0.9994,0.9991,0.9992,0.9994,0.9997,0.9995,0.9995,0.9994,0.9995,0.9998,1.0002,1.0005,1.0006,1.0005,1.0007,1.0006,1.0011 diff --git a/tests/test_weights.py b/tests/test_weights.py index da18a3b..481d70c 100644 --- a/tests/test_weights.py +++ b/tests/test_weights.py @@ -55,7 +55,7 @@ def test_weights( raise ValueError(msg.format(kind, col, weights[col].max(), MAX_WEIGHT)) # test sum of weights (in millions) for each year MIN_WEIGHT_SUM = 144 - MAX_WEIGHT_SUM = 233 + MAX_WEIGHT_SUM = 252 for col in sorted_weights_columns: weight_sum = weights[col].sum() * 1e-2 * 1e-6 # in millions if DUMP_WEIGHTS: