{"action":"created","comment":{"url":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/comments/105680565","pull_request_review_id":26570996,"id":105680565,"diff_hunk":"@@ -4,17 +4,117 @@\n -- code to be run on table that has\n -- been imported directly from US Census\n -- blkpophu file\n+-- :nb_output_srid psql var must be set before running this script,\n+--      e.g. psql -v nb_output_srid=2249 -f census_blocks.sql\n ----------------------------------------\n \n-ALTER TABLE neighborhood_census_blocks ADD COLUMN IF NOT EXISTS pop_low_stress INT;\n-ALTER TABLE neighborhood_census_blocks ADD COLUMN IF NOT EXISTS pop_high_stress INT;\n-ALTER TABLE neighborhood_census_blocks ADD COLUMN IF NOT EXISTS emp_low_stress INT;\n-ALTER TABLE neighborhood_census_blocks ADD COLUMN IF NOT EXISTS emp_high_stress INT;\n-ALTER TABLE neighborhood_census_blocks ADD COLUMN IF NOT EXISTS schools_low_stress INT;\n-ALTER TABLE neighborhood_census_blocks ADD COLUMN IF NOT EXISTS schools_high_stress INT;\n-ALTER TABLE neighborhood_census_blocks ADD COLUMN IF NOT EXISTS rec_low_stress INT;\n-ALTER TABLE neighborhood_census_blocks ADD COLUMN IF NOT EXISTS rec_high_stress INT;\n+ALTER TABLE neighborhood_census_blocks DROP COLUMN IF EXISTS road_ids;","path":"pfb-analysis/connectivity/census_blocks.sql","position":16,"original_position":16,"commit_id":"1c021db3beebd7f751f47a7153d52c06df4a8180","original_commit_id":"16983cea82475e9ef5b63838200e10207a66fb73","user":{"login":"spencerrecneps","id":4584258,"avatar_url":"https://avatars3.githubusercontent.com/u/4584258?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerrecneps","html_url":"https://github.com/spencerrecneps","followers_url":"https://api.github.com/users/spencerrecneps/followers","following_url":"https://api.github.com/users/spencerrecneps/following{/other_user}","gists_url":"https://api.github.com/users/spencerrecneps/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerrecneps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerrecneps/subscriptions","organizations_url":"https://api.github.com/users/spencerrecneps/orgs","repos_url":"https://api.github.com/users/spencerrecneps/repos","events_url":"https://api.github.com/users/spencerrecneps/events{/privacy}","received_events_url":"https://api.github.com/users/spencerrecneps/received_events","type":"User","site_admin":false},"body":"New issue added: https://github.com/azavea/pfb-network-connectivity/issues/157","created_at":"2017-03-13T14:57:31Z","updated_at":"2017-03-13T14:57:31Z","html_url":"https://github.com/azavea/pfb-network-connectivity/pull/153#discussion_r105680565","pull_request_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/153","_links":{"self":{"href":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/comments/105680565"},"html":{"href":"https://github.com/azavea/pfb-network-connectivity/pull/153#discussion_r105680565"},"pull_request":{"href":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/153"}}},"pull_request":{"url":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/153","id":110265614,"html_url":"https://github.com/azavea/pfb-network-connectivity/pull/153","diff_url":"https://github.com/azavea/pfb-network-connectivity/pull/153.diff","patch_url":"https://github.com/azavea/pfb-network-connectivity/pull/153.patch","issue_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/issues/153","number":153,"state":"open","locked":false,"title":"Feature/census block performance improvements","user":{"login":"spencerrecneps","id":4584258,"avatar_url":"https://avatars3.githubusercontent.com/u/4584258?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerrecneps","html_url":"https://github.com/spencerrecneps","followers_url":"https://api.github.com/users/spencerrecneps/followers","following_url":"https://api.github.com/users/spencerrecneps/following{/other_user}","gists_url":"https://api.github.com/users/spencerrecneps/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerrecneps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerrecneps/subscriptions","organizations_url":"https://api.github.com/users/spencerrecneps/orgs","repos_url":"https://api.github.com/users/spencerrecneps/repos","events_url":"https://api.github.com/users/spencerrecneps/events{/privacy}","received_events_url":"https://api.github.com/users/spencerrecneps/received_events","type":"User","site_admin":false},"body":"These changes result in orders-of-magnitude better performance on connected_census_blocks.sql. My testing went from over 8 minutes with the old code down to 30 seconds with the new code. This change also resolves the issue identified in https://github.com/azavea/pfb-network-connectivity/issues/149.","created_at":"2017-03-11T16:57:49Z","updated_at":"2017-03-13T14:57:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/153/commits","review_comments_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/153/comments","review_comment_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/issues/153/comments","statuses_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/statuses/1c021db3beebd7f751f47a7153d52c06df4a8180","head":{"label":"spencerrecneps:feature/census-block-performance-improvements","ref":"feature/census-block-performance-improvements","sha":"1c021db3beebd7f751f47a7153d52c06df4a8180","user":{"login":"spencerrecneps","id":4584258,"avatar_url":"https://avatars3.githubusercontent.com/u/4584258?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerrecneps","html_url":"https://github.com/spencerrecneps","followers_url":"https://api.github.com/users/spencerrecneps/followers","following_url":"https://api.github.com/users/spencerrecneps/following{/other_user}","gists_url":"https://api.github.com/users/spencerrecneps/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerrecneps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerrecneps/subscriptions","organizations_url":"https://api.github.com/users/spencerrecneps/orgs","repos_url":"https://api.github.com/users/spencerrecneps/repos","events_url":"https://api.github.com/users/spencerrecneps/events{/privacy}","received_events_url":"https://api.github.com/users/spencerrecneps/received_events","type":"User","site_admin":false},"repo":{"id":82104308,"name":"pfb-network-connectivity","full_name":"spencerrecneps/pfb-network-connectivity","owner":{"login":"spencerrecneps","id":4584258,"avatar_url":"https://avatars3.githubusercontent.com/u/4584258?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerrecneps","html_url":"https://github.com/spencerrecneps","followers_url":"https://api.github.com/users/spencerrecneps/followers","following_url":"https://api.github.com/users/spencerrecneps/following{/other_user}","gists_url":"https://api.github.com/users/spencerrecneps/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerrecneps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerrecneps/subscriptions","organizations_url":"https://api.github.com/users/spencerrecneps/orgs","repos_url":"https://api.github.com/users/spencerrecneps/repos","events_url":"https://api.github.com/users/spencerrecneps/events{/privacy}","received_events_url":"https://api.github.com/users/spencerrecneps/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spencerrecneps/pfb-network-connectivity","description":"PFB Bicycle Network Connectivity","fork":true,"url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity","forks_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/forks","keys_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/teams","hooks_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/hooks","issue_events_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/issues/events{/number}","events_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/events","assignees_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/assignees{/user}","branches_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/branches{/branch}","tags_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/tags","blobs_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/git/refs{/sha}","trees_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/statuses/{sha}","languages_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/languages","stargazers_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/stargazers","contributors_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/contributors","subscribers_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/subscribers","subscription_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/subscription","commits_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/commits{/sha}","git_commits_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/git/commits{/sha}","comments_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/comments{/number}","issue_comment_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/issues/comments{/number}","contents_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/contents/{+path}","compare_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/merges","archive_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/downloads","issues_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/issues{/number}","pulls_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/pulls{/number}","milestones_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/milestones{/number}","notifications_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/labels{/name}","releases_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/releases{/id}","deployments_url":"https://api.github.com/repos/spencerrecneps/pfb-network-connectivity/deployments","created_at":"2017-02-15T20:40:37Z","updated_at":"2017-02-28T16:33:16Z","pushed_at":"2017-03-13T14:48:19Z","git_url":"git://github.com/spencerrecneps/pfb-network-connectivity.git","ssh_url":"git@github.com:spencerrecneps/pfb-network-connectivity.git","clone_url":"https://github.com/spencerrecneps/pfb-network-connectivity.git","svn_url":"https://github.com/spencerrecneps/pfb-network-connectivity","homepage":null,"size":648,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"azavea:develop","ref":"develop","sha":"77a4934d07112d3f2ecf7ae79e8b90f7def043c0","user":{"login":"azavea","id":595231,"avatar_url":"https://avatars0.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"repo":{"id":70590476,"name":"pfb-network-connectivity","full_name":"azavea/pfb-network-connectivity","owner":{"login":"azavea","id":595231,"avatar_url":"https://avatars0.githubusercontent.com/u/595231?v=3","gravatar_id":"","url":"https://api.github.com/users/azavea","html_url":"https://github.com/azavea","followers_url":"https://api.github.com/users/azavea/followers","following_url":"https://api.github.com/users/azavea/following{/other_user}","gists_url":"https://api.github.com/users/azavea/gists{/gist_id}","starred_url":"https://api.github.com/users/azavea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/azavea/subscriptions","organizations_url":"https://api.github.com/users/azavea/orgs","repos_url":"https://api.github.com/users/azavea/repos","events_url":"https://api.github.com/users/azavea/events{/privacy}","received_events_url":"https://api.github.com/users/azavea/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/azavea/pfb-network-connectivity","description":"PFB Bicycle Network Connectivity","fork":false,"url":"https://api.github.com/repos/azavea/pfb-network-connectivity","forks_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/forks","keys_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/teams","hooks_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/hooks","issue_events_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/issues/events{/number}","events_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/events","assignees_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/assignees{/user}","branches_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/branches{/branch}","tags_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/tags","blobs_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/git/refs{/sha}","trees_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/statuses/{sha}","languages_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/languages","stargazers_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/stargazers","contributors_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/contributors","subscribers_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/subscribers","subscription_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/subscription","commits_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/commits{/sha}","git_commits_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/git/commits{/sha}","comments_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/comments{/number}","issue_comment_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/issues/comments{/number}","contents_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/contents/{+path}","compare_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/merges","archive_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/downloads","issues_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/issues{/number}","pulls_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls{/number}","milestones_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/milestones{/number}","notifications_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/labels{/name}","releases_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/releases{/id}","deployments_url":"https://api.github.com/repos/azavea/pfb-network-connectivity/deployments","created_at":"2016-10-11T12:22:05Z","updated_at":"2017-02-21T19:15:30Z","pushed_at":"2017-03-13T14:48:21Z","git_url":"git://github.com/azavea/pfb-network-connectivity.git","ssh_url":"git@github.com:azavea/pfb-network-connectivity.git","clone_url":"https://github.com/azavea/pfb-network-connectivity.git","svn_url":"https://github.com/azavea/pfb-network-connectivity","homepage":null,"size":630,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":42,"forks":3,"open_issues":42,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/153"},"html":{"href":"https://github.com/azavea/pfb-network-connectivity/pull/153"},"issue":{"href":"https://api.github.com/repos/azavea/pfb-network-connectivity/issues/153"},"comments":{"href":"https://api.github.com/repos/azavea/pfb-network-connectivity/issues/153/comments"},"review_comments":{"href":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/153/comments"},"review_comment":{"href":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/azavea/pfb-network-connectivity/pulls/153/commits"},"statuses":{"href":"https://api.github.com/repos/azavea/pfb-network-connectivity/statuses/1c021db3beebd7f751f47a7153d52c06df4a8180"}}}}
{"actor":{"display_login":"spencerrecneps"}}