{"action":"opened","issue":{"url":"https://api.github.com/repos/pbs-assess/gfplot/issues/40","repository_url":"https://api.github.com/repos/pbs-assess/gfplot","labels_url":"https://api.github.com/repos/pbs-assess/gfplot/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/pbs-assess/gfplot/issues/40/comments","events_url":"https://api.github.com/repos/pbs-assess/gfplot/issues/40/events","html_url":"https://github.com/pbs-assess/gfplot/issues/40","id":366449935,"node_id":"MDU6SXNzdWUzNjY0NDk5MzU=","number":40,"title":"SQL query for number of observed hooks per skate from first 20 deployed hooks","user":{"login":"andrew-edwards","id":6977190,"node_id":"MDQ6VXNlcjY5NzcxOTA=","avatar_url":"https://avatars2.githubusercontent.com/u/6977190?v=4","gravatar_id":"","url":"https://api.github.com/users/andrew-edwards","html_url":"https://github.com/andrew-edwards","followers_url":"https://api.github.com/users/andrew-edwards/followers","following_url":"https://api.github.com/users/andrew-edwards/following{/other_user}","gists_url":"https://api.github.com/users/andrew-edwards/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-edwards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-edwards/subscriptions","organizations_url":"https://api.github.com/users/andrew-edwards/orgs","repos_url":"https://api.github.com/users/andrew-edwards/repos","events_url":"https://api.github.com/users/andrew-edwards/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-edwards/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"andrew-edwards","id":6977190,"node_id":"MDQ6VXNlcjY5NzcxOTA=","avatar_url":"https://avatars2.githubusercontent.com/u/6977190?v=4","gravatar_id":"","url":"https://api.github.com/users/andrew-edwards","html_url":"https://github.com/andrew-edwards","followers_url":"https://api.github.com/users/andrew-edwards/followers","following_url":"https://api.github.com/users/andrew-edwards/following{/other_user}","gists_url":"https://api.github.com/users/andrew-edwards/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-edwards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-edwards/subscriptions","organizations_url":"https://api.github.com/users/andrew-edwards/orgs","repos_url":"https://api.github.com/users/andrew-edwards/repos","events_url":"https://api.github.com/users/andrew-edwards/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-edwards/received_events","type":"User","site_admin":false},"assignees":[{"login":"andrew-edwards","id":6977190,"node_id":"MDQ6VXNlcjY5NzcxOTA=","avatar_url":"https://avatars2.githubusercontent.com/u/6977190?v=4","gravatar_id":"","url":"https://api.github.com/users/andrew-edwards","html_url":"https://github.com/andrew-edwards","followers_url":"https://api.github.com/users/andrew-edwards/followers","following_url":"https://api.github.com/users/andrew-edwards/following{/other_user}","gists_url":"https://api.github.com/users/andrew-edwards/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-edwards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-edwards/subscriptions","organizations_url":"https://api.github.com/users/andrew-edwards/orgs","repos_url":"https://api.github.com/users/andrew-edwards/repos","events_url":"https://api.github.com/users/andrew-edwards/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-edwards/received_events","type":"User","site_admin":false},{"login":"elisekeppel","id":29439505,"node_id":"MDQ6VXNlcjI5NDM5NTA1","avatar_url":"https://avatars1.githubusercontent.com/u/29439505?v=4","gravatar_id":"","url":"https://api.github.com/users/elisekeppel","html_url":"https://github.com/elisekeppel","followers_url":"https://api.github.com/users/elisekeppel/followers","following_url":"https://api.github.com/users/elisekeppel/following{/other_user}","gists_url":"https://api.github.com/users/elisekeppel/gists{/gist_id}","starred_url":"https://api.github.com/users/elisekeppel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elisekeppel/subscriptions","organizations_url":"https://api.github.com/users/elisekeppel/orgs","repos_url":"https://api.github.com/users/elisekeppel/repos","events_url":"https://api.github.com/users/elisekeppel/events{/privacy}","received_events_url":"https://api.github.com/users/elisekeppel/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-10-03T17:37:30Z","updated_at":"2018-10-03T17:37:30Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Original email to Elise (copying here because I want to make an issue I can refer to as I'll have to update some code):\r\n\r\nI also need the observed hooks per skate from the first 20 deployed hooks, in the get-iphc-skate-info.sql query.\r\n\r\nSo I'm guessing something extra based on line 19 of\r\n\r\nhttps://github.com/pbs-assess/gfplot/blob/master/inst/sql/get-iphc-skate-info.sql\r\n\r\nwith the extra condition that it's only from the first 20 deployed hooks (the result will be mostly 20 – all 20 deployed hooks get observed).\r\n\r\nHmm… but the hook numbering system changed in 2009 [actually 2007 now] so it might not be that easy. And you'd have to look at hook-level data anyway.\r\n\r\nThat may be easier – just a new hook-level query that sums the number of observed hooks from first 20 deployed hooks for each skate. Then we can just save that number, call it obsHooksPerSkate20, and each skateID.\r\n\r\n- [ ] Elise finish SQL\r\n- [ ] Andy create R function call\r\n- [ ] Andy use results to change the fixed 20 in    obsHooksPerSkate20 = 20  to the correct number.\r\n- [ ] Andy check with YYR results to see if that fixes the tiny differences I had (compare2003to20014data.rnw).\r\n \r\n"}}
{"actor":{"display_login":"andrew-edwards"}}