{"action":"created","comment":{"url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/comments/41279173","id":41279173,"diff_hunk":"@@ -1,12 +1,37 @@\n (function() {\n   'use strict';\n   // Controller naming conventions should start with an uppercase letter\n-  function ExamplePage1Controller($scope) {\n-    $scope.exampleContents1 = 'We are up and running using a required module!';\n-    $scope.paragraphText = ' Example Page 1 explicitly references required files';\n+  function ExamplePage1Controller($scope, $http) {\n+    // Sum the non-itemized data over the summary pages, its in the row labled A,2.\n+    var notItemized;\n+    $http.get('https://data.oaklandnet.com/resource/rsxe-vvuw.json?$select=sum(amount_a)&$where=elect_date=\\'2012-11-06T00:00:00\\' and form_type=\\'A\\' and line_item=\\'2\\'').\n+      success(function(sum) {\n+        notItemized = sum[0]['sum_amount_a'];\n+      });\n+    // Sum by the entity code from schedule A\n+    $http.get('https://data.oaklandnet.com/resource/3xq4-ermg.json?$select=sum(tran_amt1), entity_cd&$group=entity_cd&$where=elect_date=\\'2012-11-06T00:00:00\\'')\n+      .success(function(data) {\n+          // Calculate the grand total.\n+          data = data.concat({ entity_cd: 'NIT', sum_tran_amt1: notItemized });\n+          $scope.total = 0;\n+          for (var i = 0; i < data.length; i++) {\n+            $scope.total += Number(data[i]['sum_tran_amt1']);","path":"app/components/examplePage1/ExamplePage1Controller.js","position":21,"original_position":21,"commit_id":"efb54d077c1f7830e8fe4f9bda830dbf153d7dea","original_commit_id":"efb54d077c1f7830e8fe4f9bda830dbf153d7dea","user":{"login":"adborden","id":509703,"avatar_url":"https://avatars.githubusercontent.com/u/509703?v=3","gravatar_id":"","url":"https://api.github.com/users/adborden","html_url":"https://github.com/adborden","followers_url":"https://api.github.com/users/adborden/followers","following_url":"https://api.github.com/users/adborden/following{/other_user}","gists_url":"https://api.github.com/users/adborden/gists{/gist_id}","starred_url":"https://api.github.com/users/adborden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adborden/subscriptions","organizations_url":"https://api.github.com/users/adborden/orgs","repos_url":"https://api.github.com/users/adborden/repos","events_url":"https://api.github.com/users/adborden/events{/privacy}","received_events_url":"https://api.github.com/users/adborden/received_events","type":"User","site_admin":false},"body":"Rather than having to cast as a `Number` every time you use the property, you should just transform the data at after fetching it.\r\n\r\n```javascript\r\ndata = data.map(function(item) {\r\n  item.sum_tran_amt1 = Number(item.sum_tran_amt1);\r\n  return item;\r\n});\r\n```","created_at":"2015-10-06T15:26:33Z","updated_at":"2015-10-06T15:26:33Z","html_url":"https://github.com/caciviclab/disclosure-frontend-alpha/pull/3#discussion_r41279173","pull_request_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/comments/41279173"},"html":{"href":"https://github.com/caciviclab/disclosure-frontend-alpha/pull/3#discussion_r41279173"},"pull_request":{"href":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/3","id":46311679,"html_url":"https://github.com/caciviclab/disclosure-frontend-alpha/pull/3","diff_url":"https://github.com/caciviclab/disclosure-frontend-alpha/pull/3.diff","patch_url":"https://github.com/caciviclab/disclosure-frontend-alpha/pull/3.patch","issue_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/issues/3","number":3,"state":"open","locked":false,"title":"Testing of running queries.","user":{"login":"mikeubell","id":6759416,"avatar_url":"https://avatars.githubusercontent.com/u/6759416?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeubell","html_url":"https://github.com/mikeubell","followers_url":"https://api.github.com/users/mikeubell/followers","following_url":"https://api.github.com/users/mikeubell/following{/other_user}","gists_url":"https://api.github.com/users/mikeubell/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeubell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeubell/subscriptions","organizations_url":"https://api.github.com/users/mikeubell/orgs","repos_url":"https://api.github.com/users/mikeubell/repos","events_url":"https://api.github.com/users/mikeubell/events{/privacy}","received_events_url":"https://api.github.com/users/mikeubell/received_events","type":"User","site_admin":false},"body":"This is mostly an exercise for me to get up to speed on Angular and Socrota.  I have taken one of the pages from the mock up and extracted data from Oakland and displayed it.  Any comments are welcome.","created_at":"2015-09-29T18:10:53Z","updated_at":"2015-10-06T15:26:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cbebef23ca334e95a3eaf007e1e95149e3dac5df","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/3/commits","review_comments_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/3/comments","review_comment_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/issues/3/comments","statuses_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/statuses/efb54d077c1f7830e8fe4f9bda830dbf153d7dea","head":{"label":"mikeubell:queryTest","ref":"queryTest","sha":"efb54d077c1f7830e8fe4f9bda830dbf153d7dea","user":{"login":"mikeubell","id":6759416,"avatar_url":"https://avatars.githubusercontent.com/u/6759416?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeubell","html_url":"https://github.com/mikeubell","followers_url":"https://api.github.com/users/mikeubell/followers","following_url":"https://api.github.com/users/mikeubell/following{/other_user}","gists_url":"https://api.github.com/users/mikeubell/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeubell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeubell/subscriptions","organizations_url":"https://api.github.com/users/mikeubell/orgs","repos_url":"https://api.github.com/users/mikeubell/repos","events_url":"https://api.github.com/users/mikeubell/events{/privacy}","received_events_url":"https://api.github.com/users/mikeubell/received_events","type":"User","site_admin":false},"repo":{"id":43264123,"name":"disclosure-frontend-alpha","full_name":"mikeubell/disclosure-frontend-alpha","owner":{"login":"mikeubell","id":6759416,"avatar_url":"https://avatars.githubusercontent.com/u/6759416?v=3","gravatar_id":"","url":"https://api.github.com/users/mikeubell","html_url":"https://github.com/mikeubell","followers_url":"https://api.github.com/users/mikeubell/followers","following_url":"https://api.github.com/users/mikeubell/following{/other_user}","gists_url":"https://api.github.com/users/mikeubell/gists{/gist_id}","starred_url":"https://api.github.com/users/mikeubell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikeubell/subscriptions","organizations_url":"https://api.github.com/users/mikeubell/orgs","repos_url":"https://api.github.com/users/mikeubell/repos","events_url":"https://api.github.com/users/mikeubell/events{/privacy}","received_events_url":"https://api.github.com/users/mikeubell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikeubell/disclosure-frontend-alpha","description":"open disclosure frontend app","fork":true,"url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha","forks_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/forks","keys_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/teams","hooks_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/hooks","issue_events_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/issues/events{/number}","events_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/events","assignees_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/assignees{/user}","branches_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/branches{/branch}","tags_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/tags","blobs_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/statuses/{sha}","languages_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/languages","stargazers_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/stargazers","contributors_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/contributors","subscribers_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/subscribers","subscription_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/subscription","commits_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/contents/{+path}","compare_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/merges","archive_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/downloads","issues_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/issues{/number}","pulls_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/pulls{/number}","milestones_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/milestones{/number}","notifications_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/labels{/name}","releases_url":"https://api.github.com/repos/mikeubell/disclosure-frontend-alpha/releases{/id}","created_at":"2015-09-27T20:41:10Z","updated_at":"2015-09-27T20:41:11Z","pushed_at":"2015-09-29T18:08:01Z","git_url":"git://github.com/mikeubell/disclosure-frontend-alpha.git","ssh_url":"git@github.com:mikeubell/disclosure-frontend-alpha.git","clone_url":"https://github.com/mikeubell/disclosure-frontend-alpha.git","svn_url":"https://github.com/mikeubell/disclosure-frontend-alpha","homepage":"http://opencalifornia.github.io/disclosure-frontend-alpha/","size":2325,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"caciviclab:master","ref":"master","sha":"5f96f970a1cdaef6b0a2291a774ec2da7ab31e35","user":{"login":"caciviclab","id":9602455,"avatar_url":"https://avatars.githubusercontent.com/u/9602455?v=3","gravatar_id":"","url":"https://api.github.com/users/caciviclab","html_url":"https://github.com/caciviclab","followers_url":"https://api.github.com/users/caciviclab/followers","following_url":"https://api.github.com/users/caciviclab/following{/other_user}","gists_url":"https://api.github.com/users/caciviclab/gists{/gist_id}","starred_url":"https://api.github.com/users/caciviclab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caciviclab/subscriptions","organizations_url":"https://api.github.com/users/caciviclab/orgs","repos_url":"https://api.github.com/users/caciviclab/repos","events_url":"https://api.github.com/users/caciviclab/events{/privacy}","received_events_url":"https://api.github.com/users/caciviclab/received_events","type":"Organization","site_admin":false},"repo":{"id":42682839,"name":"disclosure-frontend-alpha","full_name":"caciviclab/disclosure-frontend-alpha","owner":{"login":"caciviclab","id":9602455,"avatar_url":"https://avatars.githubusercontent.com/u/9602455?v=3","gravatar_id":"","url":"https://api.github.com/users/caciviclab","html_url":"https://github.com/caciviclab","followers_url":"https://api.github.com/users/caciviclab/followers","following_url":"https://api.github.com/users/caciviclab/following{/other_user}","gists_url":"https://api.github.com/users/caciviclab/gists{/gist_id}","starred_url":"https://api.github.com/users/caciviclab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caciviclab/subscriptions","organizations_url":"https://api.github.com/users/caciviclab/orgs","repos_url":"https://api.github.com/users/caciviclab/repos","events_url":"https://api.github.com/users/caciviclab/events{/privacy}","received_events_url":"https://api.github.com/users/caciviclab/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caciviclab/disclosure-frontend-alpha","description":"open disclosure frontend app","fork":false,"url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha","forks_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/forks","keys_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/teams","hooks_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/hooks","issue_events_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/issues/events{/number}","events_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/events","assignees_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/assignees{/user}","branches_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/branches{/branch}","tags_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/tags","blobs_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/git/refs{/sha}","trees_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/statuses/{sha}","languages_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/languages","stargazers_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/stargazers","contributors_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/contributors","subscribers_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/subscribers","subscription_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/subscription","commits_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/commits{/sha}","git_commits_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/git/commits{/sha}","comments_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/comments{/number}","issue_comment_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/issues/comments{/number}","contents_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/contents/{+path}","compare_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/merges","archive_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/downloads","issues_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/issues{/number}","pulls_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls{/number}","milestones_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/milestones{/number}","notifications_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/labels{/name}","releases_url":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/releases{/id}","created_at":"2015-09-17T21:26:55Z","updated_at":"2015-09-30T15:58:41Z","pushed_at":"2015-10-01T17:43:48Z","git_url":"git://github.com/caciviclab/disclosure-frontend-alpha.git","ssh_url":"git@github.com:caciviclab/disclosure-frontend-alpha.git","clone_url":"https://github.com/caciviclab/disclosure-frontend-alpha.git","svn_url":"https://github.com/caciviclab/disclosure-frontend-alpha","homepage":"http://caciviclab.org/disclosure-frontend-alpha/","size":2551,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":13,"forks":2,"open_issues":13,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/3"},"html":{"href":"https://github.com/caciviclab/disclosure-frontend-alpha/pull/3"},"issue":{"href":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/issues/3"},"comments":{"href":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/caciviclab/disclosure-frontend-alpha/statuses/efb54d077c1f7830e8fe4f9bda830dbf153d7dea"}}}}