{"action":"created","comment":{"url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/comments/182833135","pull_request_review_id":113713174,"id":182833135,"diff_hunk":"@@ -50,19 +50,29 @@ function drawCapacity(map, selectDate){\n       sublayers: [{\n         // Nested query to only return last record for each reservoir to show current levels in tooltip and speed up query.\n         // Converting numeric fields to characters to use formatting in tooltip\n-        sql: \"SELECT the_geom, the_geom_webmercator, cartodb_id, TO_CHAR(percent_full*100, '90D00') as percent_full, \\\n-        name, TO_CHAR(reservoir_storage, '9G999G990') as reservoir_storage, storage_capacity, \\\n-        TO_CHAR(storage_capacity, '9G999G990') as storage_capacity_text, dam_id, date \\\n-        FROM reservoir_reading_extract \\\n-        WHERE (dam_id, date) in ( \\\n-          select dam_id, max(date) \\\n-          from reservoir_reading_extract \\\n-          where date <= '\"+selectDate+\"' \\\n-          group by dam_id) \\\n+        sql: \"SELECT\\\n+          the_geom,\\\n+          the_geom_webmercator,\\\n+          cartodb_id,\\\n+          TO_CHAR(percent_full*100, '90D00') as percent_full,\\\n+          supply_name,\\\n+          TO_CHAR(supply_storage, '9G999G990') as supply_storage,\\\n+          storage_capacity,\\\n+          TO_CHAR(storage_capacity, '9G999G990') as storage_capacity_text,\\","path":"js/script.js","position":21,"original_position":21,"commit_id":"e2f6edfcffd404f9163a80e38d5037acb08f83cb","original_commit_id":"e2f6edfcffd404f9163a80e38d5037acb08f83cb","user":{"login":"mike-amodeo","id":21199337,"avatar_url":"https://avatars2.githubusercontent.com/u/21199337?v=4","gravatar_id":"","url":"https://api.github.com/users/mike-amodeo","html_url":"https://github.com/mike-amodeo","followers_url":"https://api.github.com/users/mike-amodeo/followers","following_url":"https://api.github.com/users/mike-amodeo/following{/other_user}","gists_url":"https://api.github.com/users/mike-amodeo/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-amodeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-amodeo/subscriptions","organizations_url":"https://api.github.com/users/mike-amodeo/orgs","repos_url":"https://api.github.com/users/mike-amodeo/repos","events_url":"https://api.github.com/users/mike-amodeo/events{/privacy}","received_events_url":"https://api.github.com/users/mike-amodeo/received_events","type":"User","site_admin":false},"body":"the `TO_CHAR`s are there in order to format the text in the tooltip with commas. So because the capacity layer does not need numbers, I just brought them in as text with the formatting already applied.","created_at":"2018-04-19T17:55:55Z","updated_at":"2018-04-19T17:55:55Z","html_url":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer/pull/25#discussion_r182833135","pull_request_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/25","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/comments/182833135"},"html":{"href":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer/pull/25#discussion_r182833135"},"pull_request":{"href":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/25"}},"in_reply_to_id":182593384},"pull_request":{"url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/25","id":182612387,"html_url":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer/pull/25","diff_url":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer/pull/25.diff","patch_url":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer/pull/25.patch","issue_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/issues/25","number":25,"state":"open","locked":false,"title":"pointed to new table","user":{"login":"dmarulli","id":9664173,"avatar_url":"https://avatars1.githubusercontent.com/u/9664173?v=4","gravatar_id":"","url":"https://api.github.com/users/dmarulli","html_url":"https://github.com/dmarulli","followers_url":"https://api.github.com/users/dmarulli/followers","following_url":"https://api.github.com/users/dmarulli/following{/other_user}","gists_url":"https://api.github.com/users/dmarulli/gists{/gist_id}","starred_url":"https://api.github.com/users/dmarulli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmarulli/subscriptions","organizations_url":"https://api.github.com/users/dmarulli/orgs","repos_url":"https://api.github.com/users/dmarulli/repos","events_url":"https://api.github.com/users/dmarulli/events{/privacy}","received_events_url":"https://api.github.com/users/dmarulli/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-18T21:48:53Z","updated_at":"2018-04-19T17:55:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1871c5af3784799c6476f9deef904eae82f4192c","assignee":null,"assignees":[],"requested_reviewers":[{"login":"mike-amodeo","id":21199337,"avatar_url":"https://avatars2.githubusercontent.com/u/21199337?v=4","gravatar_id":"","url":"https://api.github.com/users/mike-amodeo","html_url":"https://github.com/mike-amodeo","followers_url":"https://api.github.com/users/mike-amodeo/followers","following_url":"https://api.github.com/users/mike-amodeo/following{/other_user}","gists_url":"https://api.github.com/users/mike-amodeo/gists{/gist_id}","starred_url":"https://api.github.com/users/mike-amodeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mike-amodeo/subscriptions","organizations_url":"https://api.github.com/users/mike-amodeo/orgs","repos_url":"https://api.github.com/users/mike-amodeo/repos","events_url":"https://api.github.com/users/mike-amodeo/events{/privacy}","received_events_url":"https://api.github.com/users/mike-amodeo/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/25/commits","review_comments_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/25/comments","review_comment_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/issues/25/comments","statuses_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/statuses/e2f6edfcffd404f9163a80e38d5037acb08f83cb","head":{"label":"California-Data-Collaborative:supply-explorer-data-model-update","ref":"supply-explorer-data-model-update","sha":"e2f6edfcffd404f9163a80e38d5037acb08f83cb","user":{"login":"California-Data-Collaborative","id":20781578,"avatar_url":"https://avatars2.githubusercontent.com/u/20781578?v=4","gravatar_id":"","url":"https://api.github.com/users/California-Data-Collaborative","html_url":"https://github.com/California-Data-Collaborative","followers_url":"https://api.github.com/users/California-Data-Collaborative/followers","following_url":"https://api.github.com/users/California-Data-Collaborative/following{/other_user}","gists_url":"https://api.github.com/users/California-Data-Collaborative/gists{/gist_id}","starred_url":"https://api.github.com/users/California-Data-Collaborative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/California-Data-Collaborative/subscriptions","organizations_url":"https://api.github.com/users/California-Data-Collaborative/orgs","repos_url":"https://api.github.com/users/California-Data-Collaborative/repos","events_url":"https://api.github.com/users/California-Data-Collaborative/events{/privacy}","received_events_url":"https://api.github.com/users/California-Data-Collaborative/received_events","type":"Organization","site_admin":false},"repo":{"id":64707601,"name":"cadc_reservoir_explorer","full_name":"California-Data-Collaborative/cadc_reservoir_explorer","owner":{"login":"California-Data-Collaborative","id":20781578,"avatar_url":"https://avatars2.githubusercontent.com/u/20781578?v=4","gravatar_id":"","url":"https://api.github.com/users/California-Data-Collaborative","html_url":"https://github.com/California-Data-Collaborative","followers_url":"https://api.github.com/users/California-Data-Collaborative/followers","following_url":"https://api.github.com/users/California-Data-Collaborative/following{/other_user}","gists_url":"https://api.github.com/users/California-Data-Collaborative/gists{/gist_id}","starred_url":"https://api.github.com/users/California-Data-Collaborative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/California-Data-Collaborative/subscriptions","organizations_url":"https://api.github.com/users/California-Data-Collaborative/orgs","repos_url":"https://api.github.com/users/California-Data-Collaborative/repos","events_url":"https://api.github.com/users/California-Data-Collaborative/events{/privacy}","received_events_url":"https://api.github.com/users/California-Data-Collaborative/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer","description":"An agile approach to visualizing California's reservoir levels in real-time.","fork":false,"url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer","forks_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/forks","keys_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/teams","hooks_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/hooks","issue_events_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/issues/events{/number}","events_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/events","assignees_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/assignees{/user}","branches_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/branches{/branch}","tags_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/tags","blobs_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/git/refs{/sha}","trees_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/statuses/{sha}","languages_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/languages","stargazers_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/stargazers","contributors_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/contributors","subscribers_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/subscribers","subscription_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/subscription","commits_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/commits{/sha}","git_commits_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/git/commits{/sha}","comments_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/comments{/number}","issue_comment_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/issues/comments{/number}","contents_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/contents/{+path}","compare_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/merges","archive_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/downloads","issues_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/issues{/number}","pulls_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls{/number}","milestones_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/milestones{/number}","notifications_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/labels{/name}","releases_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/releases{/id}","deployments_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/deployments","created_at":"2016-08-01T23:08:02Z","updated_at":"2018-04-13T15:57:53Z","pushed_at":"2018-04-18T21:48:53Z","git_url":"git://github.com/California-Data-Collaborative/cadc_reservoir_explorer.git","ssh_url":"git@github.com:California-Data-Collaborative/cadc_reservoir_explorer.git","clone_url":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer.git","svn_url":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer","homepage":"","size":9352,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":14,"license":null,"forks":0,"open_issues":14,"watchers":3,"default_branch":"master"}},"base":{"label":"California-Data-Collaborative:master","ref":"master","sha":"e59666f2dd7ab4e6cd374e4a48a612831e77ec0f","user":{"login":"California-Data-Collaborative","id":20781578,"avatar_url":"https://avatars2.githubusercontent.com/u/20781578?v=4","gravatar_id":"","url":"https://api.github.com/users/California-Data-Collaborative","html_url":"https://github.com/California-Data-Collaborative","followers_url":"https://api.github.com/users/California-Data-Collaborative/followers","following_url":"https://api.github.com/users/California-Data-Collaborative/following{/other_user}","gists_url":"https://api.github.com/users/California-Data-Collaborative/gists{/gist_id}","starred_url":"https://api.github.com/users/California-Data-Collaborative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/California-Data-Collaborative/subscriptions","organizations_url":"https://api.github.com/users/California-Data-Collaborative/orgs","repos_url":"https://api.github.com/users/California-Data-Collaborative/repos","events_url":"https://api.github.com/users/California-Data-Collaborative/events{/privacy}","received_events_url":"https://api.github.com/users/California-Data-Collaborative/received_events","type":"Organization","site_admin":false},"repo":{"id":64707601,"name":"cadc_reservoir_explorer","full_name":"California-Data-Collaborative/cadc_reservoir_explorer","owner":{"login":"California-Data-Collaborative","id":20781578,"avatar_url":"https://avatars2.githubusercontent.com/u/20781578?v=4","gravatar_id":"","url":"https://api.github.com/users/California-Data-Collaborative","html_url":"https://github.com/California-Data-Collaborative","followers_url":"https://api.github.com/users/California-Data-Collaborative/followers","following_url":"https://api.github.com/users/California-Data-Collaborative/following{/other_user}","gists_url":"https://api.github.com/users/California-Data-Collaborative/gists{/gist_id}","starred_url":"https://api.github.com/users/California-Data-Collaborative/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/California-Data-Collaborative/subscriptions","organizations_url":"https://api.github.com/users/California-Data-Collaborative/orgs","repos_url":"https://api.github.com/users/California-Data-Collaborative/repos","events_url":"https://api.github.com/users/California-Data-Collaborative/events{/privacy}","received_events_url":"https://api.github.com/users/California-Data-Collaborative/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer","description":"An agile approach to visualizing California's reservoir levels in real-time.","fork":false,"url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer","forks_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/forks","keys_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/teams","hooks_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/hooks","issue_events_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/issues/events{/number}","events_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/events","assignees_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/assignees{/user}","branches_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/branches{/branch}","tags_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/tags","blobs_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/git/refs{/sha}","trees_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/statuses/{sha}","languages_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/languages","stargazers_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/stargazers","contributors_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/contributors","subscribers_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/subscribers","subscription_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/subscription","commits_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/commits{/sha}","git_commits_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/git/commits{/sha}","comments_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/comments{/number}","issue_comment_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/issues/comments{/number}","contents_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/contents/{+path}","compare_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/merges","archive_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/downloads","issues_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/issues{/number}","pulls_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls{/number}","milestones_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/milestones{/number}","notifications_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/labels{/name}","releases_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/releases{/id}","deployments_url":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/deployments","created_at":"2016-08-01T23:08:02Z","updated_at":"2018-04-13T15:57:53Z","pushed_at":"2018-04-18T21:48:53Z","git_url":"git://github.com/California-Data-Collaborative/cadc_reservoir_explorer.git","ssh_url":"git@github.com:California-Data-Collaborative/cadc_reservoir_explorer.git","clone_url":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer.git","svn_url":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer","homepage":"","size":9352,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":14,"license":null,"forks":0,"open_issues":14,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/25"},"html":{"href":"https://github.com/California-Data-Collaborative/cadc_reservoir_explorer/pull/25"},"issue":{"href":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/issues/25"},"comments":{"href":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/California-Data-Collaborative/cadc_reservoir_explorer/statuses/e2f6edfcffd404f9163a80e38d5037acb08f83cb"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"mike-amodeo"}}