{"action":"created","comment":{"url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/comments/220376332","pull_request_review_id":158770859,"id":220376332,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDM3NjMzMg==","diff_hunk":"@@ -123,13 +155,53 @@ export class StatisticsComponent implements OnInit {\n         });\n   }\n \n+\n+//calls the https://staging-dot-hackpsu18.appspot.com/v1/admin/statistics\n   getStatData() {\n-    this.adminService.getStatistics().subscribe((data) => {\n-      console.log(data);\n-    },                                                    (error) => {\n-      this.errors = new Error('Error: Issue with getting the number of users');\n-      console.error(error);\n-    });\n+    this.adminService.getStatistics()\n+            .subscribe((data) => {\n+              console.log(data);\n+              this.displayedColumns = StatisticsComponent.tableCols;\n+\n+              data.map((value) => {\n+                switch (value.CATEGORY) {\n+                  case 'shirt_size': {\n+                    this.tshirt_size.push(value);\n+                    break;\n+                  }\n+                  case 'dietary_restriction': {\n+                    this.dietary_restriction.push(value);\n+                    console.log(this.dietary_restriction);\n+                    break;\n+                  }\n+                  default: {\n+                    break;\n+                  }\n+                }\n+                this.result = this.dietary_restriction\n+                    .filter(element => element.OPTION !== '' && element.OPTION !== null)\n+                    .map(element => ({ value: element.COUNT, name: element.OPTION }));\n+              });\n+              console.log('THIS IS tshirt' + JSON.stringify(this.tshirt_size));\n+\n+            },         (error) => {\n+              this.errors = new Error('Error: Issue with getting the number of users');\n+              console.error(error);\n+\n+            });\n+  }\n+\n+\n+    //filter only for shirt sizes, it specifies the category, technically it doesn't need it because of the filter in get data\n+  shirtsizefilter() {\n+    return this.StatData.data.filter((data) => data.CATEGORY === 'academic_year');\n   }\n \n+","path":"src/app/components/statistics/statistics.component.ts","position":253,"original_position":253,"commit_id":"46e78817d1d5795fcdb6fc6c1efd5eb7ad10fdf2","original_commit_id":"46e78817d1d5795fcdb6fc6c1efd5eb7ad10fdf2","user":{"login":"sushshring","id":15132308,"node_id":"MDQ6VXNlcjE1MTMyMzA4","avatar_url":"https://avatars3.githubusercontent.com/u/15132308?v=4","gravatar_id":"","url":"https://api.github.com/users/sushshring","html_url":"https://github.com/sushshring","followers_url":"https://api.github.com/users/sushshring/followers","following_url":"https://api.github.com/users/sushshring/following{/other_user}","gists_url":"https://api.github.com/users/sushshring/gists{/gist_id}","starred_url":"https://api.github.com/users/sushshring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sushshring/subscriptions","organizations_url":"https://api.github.com/users/sushshring/orgs","repos_url":"https://api.github.com/users/sushshring/repos","events_url":"https://api.github.com/users/sushshring/events{/privacy}","received_events_url":"https://api.github.com/users/sushshring/received_events","type":"User","site_admin":false},"body":"Lots of unnecessary blank lines at end.","created_at":"2018-09-25T22:30:31Z","updated_at":"2018-09-25T22:30:54Z","html_url":"https://github.com/Hack-PSU/hackPSUS2018-admin/pull/32#discussion_r220376332","pull_request_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/32","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/comments/220376332"},"html":{"href":"https://github.com/Hack-PSU/hackPSUS2018-admin/pull/32#discussion_r220376332"},"pull_request":{"href":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/32","id":218122131,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4MTIyMTMx","html_url":"https://github.com/Hack-PSU/hackPSUS2018-admin/pull/32","diff_url":"https://github.com/Hack-PSU/hackPSUS2018-admin/pull/32.diff","patch_url":"https://github.com/Hack-PSU/hackPSUS2018-admin/pull/32.patch","issue_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/issues/32","number":32,"state":"open","locked":false,"title":"Merge of Andrea Branch into Dev","user":{"login":"kramersd","id":22876922,"node_id":"MDQ6VXNlcjIyODc2OTIy","avatar_url":"https://avatars0.githubusercontent.com/u/22876922?v=4","gravatar_id":"","url":"https://api.github.com/users/kramersd","html_url":"https://github.com/kramersd","followers_url":"https://api.github.com/users/kramersd/followers","following_url":"https://api.github.com/users/kramersd/following{/other_user}","gists_url":"https://api.github.com/users/kramersd/gists{/gist_id}","starred_url":"https://api.github.com/users/kramersd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kramersd/subscriptions","organizations_url":"https://api.github.com/users/kramersd/orgs","repos_url":"https://api.github.com/users/kramersd/repos","events_url":"https://api.github.com/users/kramersd/events{/privacy}","received_events_url":"https://api.github.com/users/kramersd/received_events","type":"User","site_admin":false},"body":"Updated the statistics page with a table and pie chart.","created_at":"2018-09-25T21:16:57Z","updated_at":"2018-09-25T22:30:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c15485c389cab81f717b95a02fcf6679cc701a3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/32/commits","review_comments_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/32/comments","review_comment_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/issues/32/comments","statuses_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/statuses/46e78817d1d5795fcdb6fc6c1efd5eb7ad10fdf2","head":{"label":"Hack-PSU:andrea","ref":"andrea","sha":"46e78817d1d5795fcdb6fc6c1efd5eb7ad10fdf2","user":{"login":"Hack-PSU","id":20320741,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzIwNzQx","avatar_url":"https://avatars2.githubusercontent.com/u/20320741?v=4","gravatar_id":"","url":"https://api.github.com/users/Hack-PSU","html_url":"https://github.com/Hack-PSU","followers_url":"https://api.github.com/users/Hack-PSU/followers","following_url":"https://api.github.com/users/Hack-PSU/following{/other_user}","gists_url":"https://api.github.com/users/Hack-PSU/gists{/gist_id}","starred_url":"https://api.github.com/users/Hack-PSU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hack-PSU/subscriptions","organizations_url":"https://api.github.com/users/Hack-PSU/orgs","repos_url":"https://api.github.com/users/Hack-PSU/repos","events_url":"https://api.github.com/users/Hack-PSU/events{/privacy}","received_events_url":"https://api.github.com/users/Hack-PSU/received_events","type":"Organization","site_admin":false},"repo":{"id":119215432,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkyMTU0MzI=","name":"hackPSUS2018-admin","full_name":"Hack-PSU/hackPSUS2018-admin","private":false,"owner":{"login":"Hack-PSU","id":20320741,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzIwNzQx","avatar_url":"https://avatars2.githubusercontent.com/u/20320741?v=4","gravatar_id":"","url":"https://api.github.com/users/Hack-PSU","html_url":"https://github.com/Hack-PSU","followers_url":"https://api.github.com/users/Hack-PSU/followers","following_url":"https://api.github.com/users/Hack-PSU/following{/other_user}","gists_url":"https://api.github.com/users/Hack-PSU/gists{/gist_id}","starred_url":"https://api.github.com/users/Hack-PSU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hack-PSU/subscriptions","organizations_url":"https://api.github.com/users/Hack-PSU/orgs","repos_url":"https://api.github.com/users/Hack-PSU/repos","events_url":"https://api.github.com/users/Hack-PSU/events{/privacy}","received_events_url":"https://api.github.com/users/Hack-PSU/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Hack-PSU/hackPSUS2018-admin","description":null,"fork":false,"url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin","forks_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/forks","keys_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/teams","hooks_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/hooks","issue_events_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/issues/events{/number}","events_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/events","assignees_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/assignees{/user}","branches_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/branches{/branch}","tags_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/tags","blobs_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/languages","stargazers_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/stargazers","contributors_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/contributors","subscribers_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/subscribers","subscription_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/subscription","commits_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/contents/{+path}","compare_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/merges","archive_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/downloads","issues_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/issues{/number}","pulls_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/labels{/name}","releases_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/releases{/id}","deployments_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/deployments","created_at":"2018-01-28T00:47:22Z","updated_at":"2018-09-10T23:20:08Z","pushed_at":"2018-09-25T21:27:18Z","git_url":"git://github.com/Hack-PSU/hackPSUS2018-admin.git","ssh_url":"git@github.com:Hack-PSU/hackPSUS2018-admin.git","clone_url":"https://github.com/Hack-PSU/hackPSUS2018-admin.git","svn_url":"https://github.com/Hack-PSU/hackPSUS2018-admin","homepage":null,"size":4401,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"Hack-PSU:dev","ref":"dev","sha":"74b862bbe7dc9371a88179895171d093d24877c7","user":{"login":"Hack-PSU","id":20320741,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzIwNzQx","avatar_url":"https://avatars2.githubusercontent.com/u/20320741?v=4","gravatar_id":"","url":"https://api.github.com/users/Hack-PSU","html_url":"https://github.com/Hack-PSU","followers_url":"https://api.github.com/users/Hack-PSU/followers","following_url":"https://api.github.com/users/Hack-PSU/following{/other_user}","gists_url":"https://api.github.com/users/Hack-PSU/gists{/gist_id}","starred_url":"https://api.github.com/users/Hack-PSU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hack-PSU/subscriptions","organizations_url":"https://api.github.com/users/Hack-PSU/orgs","repos_url":"https://api.github.com/users/Hack-PSU/repos","events_url":"https://api.github.com/users/Hack-PSU/events{/privacy}","received_events_url":"https://api.github.com/users/Hack-PSU/received_events","type":"Organization","site_admin":false},"repo":{"id":119215432,"node_id":"MDEwOlJlcG9zaXRvcnkxMTkyMTU0MzI=","name":"hackPSUS2018-admin","full_name":"Hack-PSU/hackPSUS2018-admin","private":false,"owner":{"login":"Hack-PSU","id":20320741,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIwMzIwNzQx","avatar_url":"https://avatars2.githubusercontent.com/u/20320741?v=4","gravatar_id":"","url":"https://api.github.com/users/Hack-PSU","html_url":"https://github.com/Hack-PSU","followers_url":"https://api.github.com/users/Hack-PSU/followers","following_url":"https://api.github.com/users/Hack-PSU/following{/other_user}","gists_url":"https://api.github.com/users/Hack-PSU/gists{/gist_id}","starred_url":"https://api.github.com/users/Hack-PSU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hack-PSU/subscriptions","organizations_url":"https://api.github.com/users/Hack-PSU/orgs","repos_url":"https://api.github.com/users/Hack-PSU/repos","events_url":"https://api.github.com/users/Hack-PSU/events{/privacy}","received_events_url":"https://api.github.com/users/Hack-PSU/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/Hack-PSU/hackPSUS2018-admin","description":null,"fork":false,"url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin","forks_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/forks","keys_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/teams","hooks_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/hooks","issue_events_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/issues/events{/number}","events_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/events","assignees_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/assignees{/user}","branches_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/branches{/branch}","tags_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/tags","blobs_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/git/refs{/sha}","trees_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/statuses/{sha}","languages_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/languages","stargazers_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/stargazers","contributors_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/contributors","subscribers_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/subscribers","subscription_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/subscription","commits_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/commits{/sha}","git_commits_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/git/commits{/sha}","comments_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/comments{/number}","issue_comment_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/issues/comments{/number}","contents_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/contents/{+path}","compare_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/merges","archive_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/downloads","issues_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/issues{/number}","pulls_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls{/number}","milestones_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/milestones{/number}","notifications_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/labels{/name}","releases_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/releases{/id}","deployments_url":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/deployments","created_at":"2018-01-28T00:47:22Z","updated_at":"2018-09-10T23:20:08Z","pushed_at":"2018-09-25T21:27:18Z","git_url":"git://github.com/Hack-PSU/hackPSUS2018-admin.git","ssh_url":"git@github.com:Hack-PSU/hackPSUS2018-admin.git","clone_url":"https://github.com/Hack-PSU/hackPSUS2018-admin.git","svn_url":"https://github.com/Hack-PSU/hackPSUS2018-admin","homepage":null,"size":4401,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","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":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/32"},"html":{"href":"https://github.com/Hack-PSU/hackPSUS2018-admin/pull/32"},"issue":{"href":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/issues/32"},"comments":{"href":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/Hack-PSU/hackPSUS2018-admin/statuses/46e78817d1d5795fcdb6fc6c1efd5eb7ad10fdf2"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"sushshring"}}