{"action":"created","comment":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/comments/35764254","id":35764254,"diff_hunk":"@@ -1429,6 +1465,63 @@ def Taxer_i(inc_in, MARS, II_rt1, II_rt2, II_rt3, II_rt4, II_rt5, II_rt6,\n     return inc_out\n \n \n+def Dist_Corp_Inc_Tax(revenue_collected, percent_labor, percent_supernormal,\n+                      percent_normal, agg_comp, agg_dividends, agg_capgains,\n+                      agg_bonds, agg_self_employed_and_pt, share_corptax_burden,\n+                      dividends, e_and_p, netcapgains, bonds, compensation):\n+    \"\"\"\n+    This function calculates the burden of the corporate income tax borne\n+    by an individual in the economy. It also incorporates this burden into\n+    our measure of the individual's expanded income.\n+\n+    Parameters\n+    ----------\n+    revenue_collected : float\n+        value of yearly revenue estimated to be collected in aggregate from the\n+        corporate income tax assigned by the user\n+    percent_labor : float\n+        percent of the burden that will be borne by labor\n+    percent_normal : float\n+        percent of the burden that will be borne by normal returns\n+    percent_supernormal : float\n+        percent of the burden that will be borne by supernormal returns\n+\n+    Returns\n+    -------\n+    share_corptax_burden : float\n+        individual's share of the corporate income tax\n+    \"\"\"\n+\n+    # self-employment (e09400)\n+    # individual's share of total self-employment\n+    self_employed_and_pt =  e_and_p / agg_self_employed_and_pt\n+\n+    share_of_divs = dividends / agg_dividends\n+    share_of_capgains = netcapgains / agg_capgains\n+\n+    # adapted from the JCT\n+    share_from_labor = (percent_labor * revenue_collected *\n+                        compensation / agg_comp)\n+\n+    # adapted from the JCT and TPC\n+    share_from_normal = ((percent_normal * revenue_collected) *\n+                         (share_of_divs * .4 + share_of_capgains * .4 +\n+                         self_employed_and_pt * .4 + bonds / agg_bonds)\n+                         / 2.2)\n+\n+    share_from_supernormal = (percent_supernormal * revenue_collected\n+                              * (share_of_divs * .6 + share_of_capgains * .6)\n+                              / 1.2)","path":"taxcalc/functions.py","position":112,"original_position":112,"commit_id":"992b44ea9331b878cadd6cbf979bb5a4ea907826","original_commit_id":"992b44ea9331b878cadd6cbf979bb5a4ea907826","user":{"login":"Amy-Xu","id":10549597,"avatar_url":"https://avatars.githubusercontent.com/u/10549597?v=3","gravatar_id":"","url":"https://api.github.com/users/Amy-Xu","html_url":"https://github.com/Amy-Xu","followers_url":"https://api.github.com/users/Amy-Xu/followers","following_url":"https://api.github.com/users/Amy-Xu/following{/other_user}","gists_url":"https://api.github.com/users/Amy-Xu/gists{/gist_id}","starred_url":"https://api.github.com/users/Amy-Xu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Amy-Xu/subscriptions","organizations_url":"https://api.github.com/users/Amy-Xu/orgs","repos_url":"https://api.github.com/users/Amy-Xu/repos","events_url":"https://api.github.com/users/Amy-Xu/events{/privacy}","received_events_url":"https://api.github.com/users/Amy-Xu/received_events","type":"User","site_admin":false},"body":"Are the two .6 in this line for the supernormal return percentages of dividends and capital gain? If so, we should probably do the weighted sums of supernormal return and normal return first and then calculate the shares. Calculating the weighted sum of all the share does not give us the same results.","created_at":"2015-07-29T14:25:44Z","updated_at":"2015-07-29T14:25:44Z","html_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/286#discussion_r35764254","pull_request_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/286","_links":{"self":{"href":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/comments/35764254"},"html":{"href":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/286#discussion_r35764254"},"pull_request":{"href":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/286"}}},"pull_request":{"url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/286","id":37786001,"html_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/286","diff_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/286.diff","patch_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/286.patch","issue_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/286","number":286,"state":"open","locked":false,"title":"[WIP] Distributing the Corporate Income Tax","user":{"login":"mmessick","id":6775118,"avatar_url":"https://avatars.githubusercontent.com/u/6775118?v=3","gravatar_id":"","url":"https://api.github.com/users/mmessick","html_url":"https://github.com/mmessick","followers_url":"https://api.github.com/users/mmessick/followers","following_url":"https://api.github.com/users/mmessick/following{/other_user}","gists_url":"https://api.github.com/users/mmessick/gists{/gist_id}","starred_url":"https://api.github.com/users/mmessick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmessick/subscriptions","organizations_url":"https://api.github.com/users/mmessick/orgs","repos_url":"https://api.github.com/users/mmessick/repos","events_url":"https://api.github.com/users/mmessick/events{/privacy}","received_events_url":"https://api.github.com/users/mmessick/received_events","type":"User","site_admin":false},"body":"This PR adds a method to functions.py called Dist_Corp_Inc_Tax which distributes the corporate income tax to each Record object. The aggregate variables are calculated in calculate.py and use new attributes for Records objects that I have written in records.py.\r\n\r\nThis PR is relevant to issue #223.","created_at":"2015-06-16T11:45:19Z","updated_at":"2015-07-29T14:25:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e0f27ae6c6d68d359f08df5bdafef2691de5b0fe","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/286/commits","review_comments_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/286/comments","review_comment_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/286/comments","statuses_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/statuses/992b44ea9331b878cadd6cbf979bb5a4ea907826","head":{"label":"mmessick:corporateIncomeTax","ref":"corporateIncomeTax","sha":"992b44ea9331b878cadd6cbf979bb5a4ea907826","user":{"login":"mmessick","id":6775118,"avatar_url":"https://avatars.githubusercontent.com/u/6775118?v=3","gravatar_id":"","url":"https://api.github.com/users/mmessick","html_url":"https://github.com/mmessick","followers_url":"https://api.github.com/users/mmessick/followers","following_url":"https://api.github.com/users/mmessick/following{/other_user}","gists_url":"https://api.github.com/users/mmessick/gists{/gist_id}","starred_url":"https://api.github.com/users/mmessick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmessick/subscriptions","organizations_url":"https://api.github.com/users/mmessick/orgs","repos_url":"https://api.github.com/users/mmessick/repos","events_url":"https://api.github.com/users/mmessick/events{/privacy}","received_events_url":"https://api.github.com/users/mmessick/received_events","type":"User","site_admin":false},"repo":{"id":36310060,"name":"Tax-Calculator","full_name":"mmessick/Tax-Calculator","owner":{"login":"mmessick","id":6775118,"avatar_url":"https://avatars.githubusercontent.com/u/6775118?v=3","gravatar_id":"","url":"https://api.github.com/users/mmessick","html_url":"https://github.com/mmessick","followers_url":"https://api.github.com/users/mmessick/followers","following_url":"https://api.github.com/users/mmessick/following{/other_user}","gists_url":"https://api.github.com/users/mmessick/gists{/gist_id}","starred_url":"https://api.github.com/users/mmessick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmessick/subscriptions","organizations_url":"https://api.github.com/users/mmessick/orgs","repos_url":"https://api.github.com/users/mmessick/repos","events_url":"https://api.github.com/users/mmessick/events{/privacy}","received_events_url":"https://api.github.com/users/mmessick/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mmessick/Tax-Calculator","description":"Federal Individual Income Tax Microsimulation Model","fork":true,"url":"https://api.github.com/repos/mmessick/Tax-Calculator","forks_url":"https://api.github.com/repos/mmessick/Tax-Calculator/forks","keys_url":"https://api.github.com/repos/mmessick/Tax-Calculator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mmessick/Tax-Calculator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mmessick/Tax-Calculator/teams","hooks_url":"https://api.github.com/repos/mmessick/Tax-Calculator/hooks","issue_events_url":"https://api.github.com/repos/mmessick/Tax-Calculator/issues/events{/number}","events_url":"https://api.github.com/repos/mmessick/Tax-Calculator/events","assignees_url":"https://api.github.com/repos/mmessick/Tax-Calculator/assignees{/user}","branches_url":"https://api.github.com/repos/mmessick/Tax-Calculator/branches{/branch}","tags_url":"https://api.github.com/repos/mmessick/Tax-Calculator/tags","blobs_url":"https://api.github.com/repos/mmessick/Tax-Calculator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mmessick/Tax-Calculator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mmessick/Tax-Calculator/git/refs{/sha}","trees_url":"https://api.github.com/repos/mmessick/Tax-Calculator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mmessick/Tax-Calculator/statuses/{sha}","languages_url":"https://api.github.com/repos/mmessick/Tax-Calculator/languages","stargazers_url":"https://api.github.com/repos/mmessick/Tax-Calculator/stargazers","contributors_url":"https://api.github.com/repos/mmessick/Tax-Calculator/contributors","subscribers_url":"https://api.github.com/repos/mmessick/Tax-Calculator/subscribers","subscription_url":"https://api.github.com/repos/mmessick/Tax-Calculator/subscription","commits_url":"https://api.github.com/repos/mmessick/Tax-Calculator/commits{/sha}","git_commits_url":"https://api.github.com/repos/mmessick/Tax-Calculator/git/commits{/sha}","comments_url":"https://api.github.com/repos/mmessick/Tax-Calculator/comments{/number}","issue_comment_url":"https://api.github.com/repos/mmessick/Tax-Calculator/issues/comments{/number}","contents_url":"https://api.github.com/repos/mmessick/Tax-Calculator/contents/{+path}","compare_url":"https://api.github.com/repos/mmessick/Tax-Calculator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mmessick/Tax-Calculator/merges","archive_url":"https://api.github.com/repos/mmessick/Tax-Calculator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mmessick/Tax-Calculator/downloads","issues_url":"https://api.github.com/repos/mmessick/Tax-Calculator/issues{/number}","pulls_url":"https://api.github.com/repos/mmessick/Tax-Calculator/pulls{/number}","milestones_url":"https://api.github.com/repos/mmessick/Tax-Calculator/milestones{/number}","notifications_url":"https://api.github.com/repos/mmessick/Tax-Calculator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mmessick/Tax-Calculator/labels{/name}","releases_url":"https://api.github.com/repos/mmessick/Tax-Calculator/releases{/id}","created_at":"2015-05-26T16:49:29Z","updated_at":"2015-05-26T16:49:30Z","pushed_at":"2015-07-17T15:48:22Z","git_url":"git://github.com/mmessick/Tax-Calculator.git","ssh_url":"git@github.com:mmessick/Tax-Calculator.git","clone_url":"https://github.com/mmessick/Tax-Calculator.git","svn_url":"https://github.com/mmessick/Tax-Calculator","homepage":"","size":40909,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OpenSourcePolicyCenter:master","ref":"master","sha":"a5cfd4ee2c5c665b89566bb2c11972e0eb082f29","user":{"login":"OpenSourcePolicyCenter","id":8301070,"avatar_url":"https://avatars.githubusercontent.com/u/8301070?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenSourcePolicyCenter","html_url":"https://github.com/OpenSourcePolicyCenter","followers_url":"https://api.github.com/users/OpenSourcePolicyCenter/followers","following_url":"https://api.github.com/users/OpenSourcePolicyCenter/following{/other_user}","gists_url":"https://api.github.com/users/OpenSourcePolicyCenter/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSourcePolicyCenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSourcePolicyCenter/subscriptions","organizations_url":"https://api.github.com/users/OpenSourcePolicyCenter/orgs","repos_url":"https://api.github.com/users/OpenSourcePolicyCenter/repos","events_url":"https://api.github.com/users/OpenSourcePolicyCenter/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSourcePolicyCenter/received_events","type":"Organization","site_admin":false},"repo":{"id":22389485,"name":"Tax-Calculator","full_name":"OpenSourcePolicyCenter/Tax-Calculator","owner":{"login":"OpenSourcePolicyCenter","id":8301070,"avatar_url":"https://avatars.githubusercontent.com/u/8301070?v=3","gravatar_id":"","url":"https://api.github.com/users/OpenSourcePolicyCenter","html_url":"https://github.com/OpenSourcePolicyCenter","followers_url":"https://api.github.com/users/OpenSourcePolicyCenter/followers","following_url":"https://api.github.com/users/OpenSourcePolicyCenter/following{/other_user}","gists_url":"https://api.github.com/users/OpenSourcePolicyCenter/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenSourcePolicyCenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenSourcePolicyCenter/subscriptions","organizations_url":"https://api.github.com/users/OpenSourcePolicyCenter/orgs","repos_url":"https://api.github.com/users/OpenSourcePolicyCenter/repos","events_url":"https://api.github.com/users/OpenSourcePolicyCenter/events{/privacy}","received_events_url":"https://api.github.com/users/OpenSourcePolicyCenter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator","description":"Federal Individual Income Tax Microsimulation Model","fork":false,"url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator","forks_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/forks","keys_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/teams","hooks_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/hooks","issue_events_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/events{/number}","events_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/events","assignees_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/assignees{/user}","branches_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/branches{/branch}","tags_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/tags","blobs_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/languages","stargazers_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/stargazers","contributors_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/contributors","subscribers_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/subscribers","subscription_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/subscription","commits_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/contents/{+path}","compare_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/merges","archive_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/downloads","issues_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues{/number}","pulls_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/labels{/name}","releases_url":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/releases{/id}","created_at":"2014-07-29T17:49:09Z","updated_at":"2015-07-18T05:57:59Z","pushed_at":"2015-07-29T12:13:03Z","git_url":"git://github.com/OpenSourcePolicyCenter/Tax-Calculator.git","ssh_url":"git@github.com:OpenSourcePolicyCenter/Tax-Calculator.git","clone_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator.git","svn_url":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator","homepage":"","size":42207,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"open_issues_count":64,"forks":19,"open_issues":64,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/286"},"html":{"href":"https://github.com/OpenSourcePolicyCenter/Tax-Calculator/pull/286"},"issue":{"href":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/286"},"comments":{"href":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/issues/286/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/286/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/pulls/286/commits"},"statuses":{"href":"https://api.github.com/repos/OpenSourcePolicyCenter/Tax-Calculator/statuses/992b44ea9331b878cadd6cbf979bb5a4ea907826"}}}}