{"action":"created","comment":{"url":"https://api.github.com/repos/BrightSpots/rcv/pulls/comments/227244311","pull_request_review_id":167238387,"id":227244311,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNzI0NDMxMQ==","diff_hunk":"@@ -0,0 +1,37 @@\n+package com.rcv;\n+\n+import java.math.BigDecimal;\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+// TallyTransfers class stores summary info on vote transfers\n+// used primary as visualizer input to help build Sankey plots\n+class TallyTransfers {\n+\n+  // Map of round number to vote transfers which occurred in that round\n+  // transfers for a round are a map of SOURCE candidate(s) to one or more TARGET candidates.\n+  // For each target candidate the map value is total vote values received from that source.\n+  // For round 1 source candidate is always null since the votes had no prior recipient.\n+  // Exhausted votes have null as the target.\n+  private final Map<Integer, Map<String, Map<String, BigDecimal>>> mTransfers = new HashMap<>();\n+\n+  // add vote transfer value for given round\n+  void addTransfer(Integer round,\n+      String sourceCandidate,\n+      String targetCandidate,\n+      BigDecimal value) {\n+\n+    // lookup or create transfer entries for specified round\n+    Map<String, Map<String, BigDecimal>> roundEntries = mTransfers\n+        .computeIfAbsent(round, k -> new HashMap<>());","path":"src/main/java/com/rcv/TallyTransfers.java","position":38,"original_position":26,"commit_id":"15a7205fc569a933a347a01ad4ee246ba2fe78e1","original_commit_id":"edee12f0352540b3293dd8520ff61df45aac10c6","user":{"login":"moldover","id":838732,"node_id":"MDQ6VXNlcjgzODczMg==","avatar_url":"https://avatars3.githubusercontent.com/u/838732?v=4","gravatar_id":"","url":"https://api.github.com/users/moldover","html_url":"https://github.com/moldover","followers_url":"https://api.github.com/users/moldover/followers","following_url":"https://api.github.com/users/moldover/following{/other_user}","gists_url":"https://api.github.com/users/moldover/gists{/gist_id}","starred_url":"https://api.github.com/users/moldover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moldover/subscriptions","organizations_url":"https://api.github.com/users/moldover/orgs","repos_url":"https://api.github.com/users/moldover/repos","events_url":"https://api.github.com/users/moldover/events{/privacy}","received_events_url":"https://api.github.com/users/moldover/received_events","type":"User","site_admin":false},"body":"![image](https://user-images.githubusercontent.com/838732/47340838-4bac9a80-d654-11e8-9280-20831a9c5f5a.png)\r\n","created_at":"2018-10-23T06:43:47Z","updated_at":"2018-10-23T06:43:47Z","html_url":"https://github.com/BrightSpots/rcv/pull/182#discussion_r227244311","pull_request_url":"https://api.github.com/repos/BrightSpots/rcv/pulls/182","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/BrightSpots/rcv/pulls/comments/227244311"},"html":{"href":"https://github.com/BrightSpots/rcv/pull/182#discussion_r227244311"},"pull_request":{"href":"https://api.github.com/repos/BrightSpots/rcv/pulls/182"}},"in_reply_to_id":226902518},"pull_request":{"url":"https://api.github.com/repos/BrightSpots/rcv/pulls/182","id":224483124,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NDgzMTI0","html_url":"https://github.com/BrightSpots/rcv/pull/182","diff_url":"https://github.com/BrightSpots/rcv/pull/182.diff","patch_url":"https://github.com/BrightSpots/rcv/pull/182.patch","issue_url":"https://api.github.com/repos/BrightSpots/rcv/issues/182","number":182,"state":"open","locked":false,"title":"Summary updates","user":{"login":"moldover","id":838732,"node_id":"MDQ6VXNlcjgzODczMg==","avatar_url":"https://avatars3.githubusercontent.com/u/838732?v=4","gravatar_id":"","url":"https://api.github.com/users/moldover","html_url":"https://github.com/moldover","followers_url":"https://api.github.com/users/moldover/followers","following_url":"https://api.github.com/users/moldover/following{/other_user}","gists_url":"https://api.github.com/users/moldover/gists{/gist_id}","starred_url":"https://api.github.com/users/moldover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moldover/subscriptions","organizations_url":"https://api.github.com/users/moldover/orgs","repos_url":"https://api.github.com/users/moldover/repos","events_url":"https://api.github.com/users/moldover/events{/privacy}","received_events_url":"https://api.github.com/users/moldover/received_events","type":"User","site_admin":false},"body":"We've got a few changes here:\r\n\r\n- Removed a lot of extraneous output fields from summary spreadsheet outputs.\r\n- ResultsWriter generates csv spreadsheets instead of xlsx.\r\n- Added a TallyTransfers class which tracks vote transfer totals for each round by source and target candidate.  This provides data needed for sankey plots.  \r\n- During tabulation the TallyTransfers object is updated.  To support this I made some minor changes to getTallyForRound which I hope make the logic a bit easier to follow.\r\n- ResultsWriter generats json summary output\r\n- summary files show actions (elimination / election) over the round which triggered them\r\n\r\n\r\n\r\n","created_at":"2018-10-20T15:58:15Z","updated_at":"2018-10-23T06:43:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f14543e7dcd7023a75d316709adff1fe5f84cc30","assignee":null,"assignees":[],"requested_reviewers":[{"login":"HEdingfield","id":8259446,"node_id":"MDQ6VXNlcjgyNTk0NDY=","avatar_url":"https://avatars2.githubusercontent.com/u/8259446?v=4","gravatar_id":"","url":"https://api.github.com/users/HEdingfield","html_url":"https://github.com/HEdingfield","followers_url":"https://api.github.com/users/HEdingfield/followers","following_url":"https://api.github.com/users/HEdingfield/following{/other_user}","gists_url":"https://api.github.com/users/HEdingfield/gists{/gist_id}","starred_url":"https://api.github.com/users/HEdingfield/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HEdingfield/subscriptions","organizations_url":"https://api.github.com/users/HEdingfield/orgs","repos_url":"https://api.github.com/users/HEdingfield/repos","events_url":"https://api.github.com/users/HEdingfield/events{/privacy}","received_events_url":"https://api.github.com/users/HEdingfield/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/BrightSpots/rcv/pulls/182/commits","review_comments_url":"https://api.github.com/repos/BrightSpots/rcv/pulls/182/comments","review_comment_url":"https://api.github.com/repos/BrightSpots/rcv/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BrightSpots/rcv/issues/182/comments","statuses_url":"https://api.github.com/repos/BrightSpots/rcv/statuses/15a7205fc569a933a347a01ad4ee246ba2fe78e1","head":{"label":"BrightSpots:summary_updates","ref":"summary_updates","sha":"15a7205fc569a933a347a01ad4ee246ba2fe78e1","user":{"login":"BrightSpots","id":28843626,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4ODQzNjI2","avatar_url":"https://avatars0.githubusercontent.com/u/28843626?v=4","gravatar_id":"","url":"https://api.github.com/users/BrightSpots","html_url":"https://github.com/BrightSpots","followers_url":"https://api.github.com/users/BrightSpots/followers","following_url":"https://api.github.com/users/BrightSpots/following{/other_user}","gists_url":"https://api.github.com/users/BrightSpots/gists{/gist_id}","starred_url":"https://api.github.com/users/BrightSpots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrightSpots/subscriptions","organizations_url":"https://api.github.com/users/BrightSpots/orgs","repos_url":"https://api.github.com/users/BrightSpots/repos","events_url":"https://api.github.com/users/BrightSpots/events{/privacy}","received_events_url":"https://api.github.com/users/BrightSpots/received_events","type":"Organization","site_admin":false},"repo":{"id":91972800,"node_id":"MDEwOlJlcG9zaXRvcnk5MTk3MjgwMA==","name":"rcv","full_name":"BrightSpots/rcv","private":false,"owner":{"login":"BrightSpots","id":28843626,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4ODQzNjI2","avatar_url":"https://avatars0.githubusercontent.com/u/28843626?v=4","gravatar_id":"","url":"https://api.github.com/users/BrightSpots","html_url":"https://github.com/BrightSpots","followers_url":"https://api.github.com/users/BrightSpots/followers","following_url":"https://api.github.com/users/BrightSpots/following{/other_user}","gists_url":"https://api.github.com/users/BrightSpots/gists{/gist_id}","starred_url":"https://api.github.com/users/BrightSpots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrightSpots/subscriptions","organizations_url":"https://api.github.com/users/BrightSpots/orgs","repos_url":"https://api.github.com/users/BrightSpots/repos","events_url":"https://api.github.com/users/BrightSpots/events{/privacy}","received_events_url":"https://api.github.com/users/BrightSpots/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/BrightSpots/rcv","description":"Ranked Choice Voting Universal Tabulator","fork":false,"url":"https://api.github.com/repos/BrightSpots/rcv","forks_url":"https://api.github.com/repos/BrightSpots/rcv/forks","keys_url":"https://api.github.com/repos/BrightSpots/rcv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BrightSpots/rcv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BrightSpots/rcv/teams","hooks_url":"https://api.github.com/repos/BrightSpots/rcv/hooks","issue_events_url":"https://api.github.com/repos/BrightSpots/rcv/issues/events{/number}","events_url":"https://api.github.com/repos/BrightSpots/rcv/events","assignees_url":"https://api.github.com/repos/BrightSpots/rcv/assignees{/user}","branches_url":"https://api.github.com/repos/BrightSpots/rcv/branches{/branch}","tags_url":"https://api.github.com/repos/BrightSpots/rcv/tags","blobs_url":"https://api.github.com/repos/BrightSpots/rcv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BrightSpots/rcv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BrightSpots/rcv/git/refs{/sha}","trees_url":"https://api.github.com/repos/BrightSpots/rcv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BrightSpots/rcv/statuses/{sha}","languages_url":"https://api.github.com/repos/BrightSpots/rcv/languages","stargazers_url":"https://api.github.com/repos/BrightSpots/rcv/stargazers","contributors_url":"https://api.github.com/repos/BrightSpots/rcv/contributors","subscribers_url":"https://api.github.com/repos/BrightSpots/rcv/subscribers","subscription_url":"https://api.github.com/repos/BrightSpots/rcv/subscription","commits_url":"https://api.github.com/repos/BrightSpots/rcv/commits{/sha}","git_commits_url":"https://api.github.com/repos/BrightSpots/rcv/git/commits{/sha}","comments_url":"https://api.github.com/repos/BrightSpots/rcv/comments{/number}","issue_comment_url":"https://api.github.com/repos/BrightSpots/rcv/issues/comments{/number}","contents_url":"https://api.github.com/repos/BrightSpots/rcv/contents/{+path}","compare_url":"https://api.github.com/repos/BrightSpots/rcv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BrightSpots/rcv/merges","archive_url":"https://api.github.com/repos/BrightSpots/rcv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BrightSpots/rcv/downloads","issues_url":"https://api.github.com/repos/BrightSpots/rcv/issues{/number}","pulls_url":"https://api.github.com/repos/BrightSpots/rcv/pulls{/number}","milestones_url":"https://api.github.com/repos/BrightSpots/rcv/milestones{/number}","notifications_url":"https://api.github.com/repos/BrightSpots/rcv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BrightSpots/rcv/labels{/name}","releases_url":"https://api.github.com/repos/BrightSpots/rcv/releases{/id}","deployments_url":"https://api.github.com/repos/BrightSpots/rcv/deployments","created_at":"2017-05-21T16:49:44Z","updated_at":"2018-09-28T05:25:05Z","pushed_at":"2018-10-23T06:38:28Z","git_url":"git://github.com/BrightSpots/rcv.git","ssh_url":"git@github.com:BrightSpots/rcv.git","clone_url":"https://github.com/BrightSpots/rcv.git","svn_url":"https://github.com/BrightSpots/rcv","homepage":"","size":38442,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":48,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":48,"watchers":3,"default_branch":"master"}},"base":{"label":"BrightSpots:master","ref":"master","sha":"42d9e38c1be9157c5b5b1660cc1f3af904e7f9c4","user":{"login":"BrightSpots","id":28843626,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4ODQzNjI2","avatar_url":"https://avatars0.githubusercontent.com/u/28843626?v=4","gravatar_id":"","url":"https://api.github.com/users/BrightSpots","html_url":"https://github.com/BrightSpots","followers_url":"https://api.github.com/users/BrightSpots/followers","following_url":"https://api.github.com/users/BrightSpots/following{/other_user}","gists_url":"https://api.github.com/users/BrightSpots/gists{/gist_id}","starred_url":"https://api.github.com/users/BrightSpots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrightSpots/subscriptions","organizations_url":"https://api.github.com/users/BrightSpots/orgs","repos_url":"https://api.github.com/users/BrightSpots/repos","events_url":"https://api.github.com/users/BrightSpots/events{/privacy}","received_events_url":"https://api.github.com/users/BrightSpots/received_events","type":"Organization","site_admin":false},"repo":{"id":91972800,"node_id":"MDEwOlJlcG9zaXRvcnk5MTk3MjgwMA==","name":"rcv","full_name":"BrightSpots/rcv","private":false,"owner":{"login":"BrightSpots","id":28843626,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4ODQzNjI2","avatar_url":"https://avatars0.githubusercontent.com/u/28843626?v=4","gravatar_id":"","url":"https://api.github.com/users/BrightSpots","html_url":"https://github.com/BrightSpots","followers_url":"https://api.github.com/users/BrightSpots/followers","following_url":"https://api.github.com/users/BrightSpots/following{/other_user}","gists_url":"https://api.github.com/users/BrightSpots/gists{/gist_id}","starred_url":"https://api.github.com/users/BrightSpots/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BrightSpots/subscriptions","organizations_url":"https://api.github.com/users/BrightSpots/orgs","repos_url":"https://api.github.com/users/BrightSpots/repos","events_url":"https://api.github.com/users/BrightSpots/events{/privacy}","received_events_url":"https://api.github.com/users/BrightSpots/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/BrightSpots/rcv","description":"Ranked Choice Voting Universal Tabulator","fork":false,"url":"https://api.github.com/repos/BrightSpots/rcv","forks_url":"https://api.github.com/repos/BrightSpots/rcv/forks","keys_url":"https://api.github.com/repos/BrightSpots/rcv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BrightSpots/rcv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BrightSpots/rcv/teams","hooks_url":"https://api.github.com/repos/BrightSpots/rcv/hooks","issue_events_url":"https://api.github.com/repos/BrightSpots/rcv/issues/events{/number}","events_url":"https://api.github.com/repos/BrightSpots/rcv/events","assignees_url":"https://api.github.com/repos/BrightSpots/rcv/assignees{/user}","branches_url":"https://api.github.com/repos/BrightSpots/rcv/branches{/branch}","tags_url":"https://api.github.com/repos/BrightSpots/rcv/tags","blobs_url":"https://api.github.com/repos/BrightSpots/rcv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BrightSpots/rcv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BrightSpots/rcv/git/refs{/sha}","trees_url":"https://api.github.com/repos/BrightSpots/rcv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BrightSpots/rcv/statuses/{sha}","languages_url":"https://api.github.com/repos/BrightSpots/rcv/languages","stargazers_url":"https://api.github.com/repos/BrightSpots/rcv/stargazers","contributors_url":"https://api.github.com/repos/BrightSpots/rcv/contributors","subscribers_url":"https://api.github.com/repos/BrightSpots/rcv/subscribers","subscription_url":"https://api.github.com/repos/BrightSpots/rcv/subscription","commits_url":"https://api.github.com/repos/BrightSpots/rcv/commits{/sha}","git_commits_url":"https://api.github.com/repos/BrightSpots/rcv/git/commits{/sha}","comments_url":"https://api.github.com/repos/BrightSpots/rcv/comments{/number}","issue_comment_url":"https://api.github.com/repos/BrightSpots/rcv/issues/comments{/number}","contents_url":"https://api.github.com/repos/BrightSpots/rcv/contents/{+path}","compare_url":"https://api.github.com/repos/BrightSpots/rcv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BrightSpots/rcv/merges","archive_url":"https://api.github.com/repos/BrightSpots/rcv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BrightSpots/rcv/downloads","issues_url":"https://api.github.com/repos/BrightSpots/rcv/issues{/number}","pulls_url":"https://api.github.com/repos/BrightSpots/rcv/pulls{/number}","milestones_url":"https://api.github.com/repos/BrightSpots/rcv/milestones{/number}","notifications_url":"https://api.github.com/repos/BrightSpots/rcv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BrightSpots/rcv/labels{/name}","releases_url":"https://api.github.com/repos/BrightSpots/rcv/releases{/id}","deployments_url":"https://api.github.com/repos/BrightSpots/rcv/deployments","created_at":"2017-05-21T16:49:44Z","updated_at":"2018-09-28T05:25:05Z","pushed_at":"2018-10-23T06:38:28Z","git_url":"git://github.com/BrightSpots/rcv.git","ssh_url":"git@github.com:BrightSpots/rcv.git","clone_url":"https://github.com/BrightSpots/rcv.git","svn_url":"https://github.com/BrightSpots/rcv","homepage":"","size":38442,"stargazers_count":3,"watchers_count":3,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":48,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0","node_id":"MDc6TGljZW5zZTE="},"forks":0,"open_issues":48,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BrightSpots/rcv/pulls/182"},"html":{"href":"https://github.com/BrightSpots/rcv/pull/182"},"issue":{"href":"https://api.github.com/repos/BrightSpots/rcv/issues/182"},"comments":{"href":"https://api.github.com/repos/BrightSpots/rcv/issues/182/comments"},"review_comments":{"href":"https://api.github.com/repos/BrightSpots/rcv/pulls/182/comments"},"review_comment":{"href":"https://api.github.com/repos/BrightSpots/rcv/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BrightSpots/rcv/pulls/182/commits"},"statuses":{"href":"https://api.github.com/repos/BrightSpots/rcv/statuses/15a7205fc569a933a347a01ad4ee246ba2fe78e1"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"moldover"}}