{"action":"created","comment":{"url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/comments/51905894","id":51905894,"diff_hunk":"@@ -0,0 +1,374 @@\n+#!/usr/bin/env python\n+\n+\"\"\"Loads records and roads shapefile, outputs data needed for generating black spots\"\"\"\n+import argparse\n+import csv\n+from dateutil import parser\n+from dateutil.relativedelta import relativedelta\n+import fiona","path":"scripts/generate_black_spots_input.py","position":8,"original_position":8,"commit_id":"52ee4e9351d63b99124c4d5ab7d7ea509b4c79a1","original_commit_id":"52ee4e9351d63b99124c4d5ab7d7ea509b4c79a1","user":{"login":"kshepard","id":6386,"avatar_url":"https://avatars.githubusercontent.com/u/6386?v=3","gravatar_id":"","url":"https://api.github.com/users/kshepard","html_url":"https://github.com/kshepard","followers_url":"https://api.github.com/users/kshepard/followers","following_url":"https://api.github.com/users/kshepard/following{/other_user}","gists_url":"https://api.github.com/users/kshepard/gists{/gist_id}","starred_url":"https://api.github.com/users/kshepard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshepard/subscriptions","organizations_url":"https://api.github.com/users/kshepard/orgs","repos_url":"https://api.github.com/users/kshepard/repos","events_url":"https://api.github.com/users/kshepard/events{/privacy}","received_events_url":"https://api.github.com/users/kshepard/received_events","type":"User","site_admin":false},"body":"It sure does. I'll do that.","created_at":"2016-02-04T17:24:11Z","updated_at":"2016-02-04T17:24:11Z","html_url":"https://github.com/WorldBank-Transport/DRIVER/pull/393#discussion_r51905894","pull_request_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/393","_links":{"self":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/comments/51905894"},"html":{"href":"https://github.com/WorldBank-Transport/DRIVER/pull/393#discussion_r51905894"},"pull_request":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/393"}}},"pull_request":{"url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/393","id":58219574,"html_url":"https://github.com/WorldBank-Transport/DRIVER/pull/393","diff_url":"https://github.com/WorldBank-Transport/DRIVER/pull/393.diff","patch_url":"https://github.com/WorldBank-Transport/DRIVER/pull/393.patch","issue_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/393","number":393,"state":"open","locked":false,"title":"Add generate black spots input script","user":{"login":"kshepard","id":6386,"avatar_url":"https://avatars.githubusercontent.com/u/6386?v=3","gravatar_id":"","url":"https://api.github.com/users/kshepard","html_url":"https://github.com/kshepard","followers_url":"https://api.github.com/users/kshepard/followers","following_url":"https://api.github.com/users/kshepard/following{/other_user}","gists_url":"https://api.github.com/users/kshepard/gists{/gist_id}","starred_url":"https://api.github.com/users/kshepard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshepard/subscriptions","organizations_url":"https://api.github.com/users/kshepard/orgs","repos_url":"https://api.github.com/users/kshepard/repos","events_url":"https://api.github.com/users/kshepard/events{/privacy}","received_events_url":"https://api.github.com/users/kshepard/received_events","type":"User","site_admin":false},"body":"This script reads in a shapefile of roads and a csv of records,\r\nseparates out intersections and divides up segements, matches\r\nup records to nearest segments, aggregates counts by year, and\r\nwrites the data to a shapefile and a csv file. The output is\r\nintended to be used in a machine learning algorithm to generate\r\nblack spots.","created_at":"2016-02-03T23:38:01Z","updated_at":"2016-02-04T17:24:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2cc56d3e0e8ee16610a76c65fee6a37c3b56345e","assignee":{"login":"ddohler","id":447977,"avatar_url":"https://avatars.githubusercontent.com/u/447977?v=3","gravatar_id":"","url":"https://api.github.com/users/ddohler","html_url":"https://github.com/ddohler","followers_url":"https://api.github.com/users/ddohler/followers","following_url":"https://api.github.com/users/ddohler/following{/other_user}","gists_url":"https://api.github.com/users/ddohler/gists{/gist_id}","starred_url":"https://api.github.com/users/ddohler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ddohler/subscriptions","organizations_url":"https://api.github.com/users/ddohler/orgs","repos_url":"https://api.github.com/users/ddohler/repos","events_url":"https://api.github.com/users/ddohler/events{/privacy}","received_events_url":"https://api.github.com/users/ddohler/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/393/commits","review_comments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/393/comments","review_comment_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/393/comments","statuses_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/statuses/52ee4e9351d63b99124c4d5ab7d7ea509b4c79a1","head":{"label":"WorldBank-Transport:feature/generate-black-spots-input-script","ref":"feature/generate-black-spots-input-script","sha":"52ee4e9351d63b99124c4d5ab7d7ea509b4c79a1","user":{"login":"WorldBank-Transport","id":5641611,"avatar_url":"https://avatars.githubusercontent.com/u/5641611?v=3","gravatar_id":"","url":"https://api.github.com/users/WorldBank-Transport","html_url":"https://github.com/WorldBank-Transport","followers_url":"https://api.github.com/users/WorldBank-Transport/followers","following_url":"https://api.github.com/users/WorldBank-Transport/following{/other_user}","gists_url":"https://api.github.com/users/WorldBank-Transport/gists{/gist_id}","starred_url":"https://api.github.com/users/WorldBank-Transport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WorldBank-Transport/subscriptions","organizations_url":"https://api.github.com/users/WorldBank-Transport/orgs","repos_url":"https://api.github.com/users/WorldBank-Transport/repos","events_url":"https://api.github.com/users/WorldBank-Transport/events{/privacy}","received_events_url":"https://api.github.com/users/WorldBank-Transport/received_events","type":"Organization","site_admin":false},"repo":{"id":35051490,"name":"DRIVER","full_name":"WorldBank-Transport/DRIVER","owner":{"login":"WorldBank-Transport","id":5641611,"avatar_url":"https://avatars.githubusercontent.com/u/5641611?v=3","gravatar_id":"","url":"https://api.github.com/users/WorldBank-Transport","html_url":"https://github.com/WorldBank-Transport","followers_url":"https://api.github.com/users/WorldBank-Transport/followers","following_url":"https://api.github.com/users/WorldBank-Transport/following{/other_user}","gists_url":"https://api.github.com/users/WorldBank-Transport/gists{/gist_id}","starred_url":"https://api.github.com/users/WorldBank-Transport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WorldBank-Transport/subscriptions","organizations_url":"https://api.github.com/users/WorldBank-Transport/orgs","repos_url":"https://api.github.com/users/WorldBank-Transport/repos","events_url":"https://api.github.com/users/WorldBank-Transport/events{/privacy}","received_events_url":"https://api.github.com/users/WorldBank-Transport/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WorldBank-Transport/DRIVER","description":"DRIVER - Data for Road Incident Visualization, Evaluation, and Reporting ","fork":false,"url":"https://api.github.com/repos/WorldBank-Transport/DRIVER","forks_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/forks","keys_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/teams","hooks_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/hooks","issue_events_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/events{/number}","events_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/events","assignees_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/assignees{/user}","branches_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/branches{/branch}","tags_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/tags","blobs_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/refs{/sha}","trees_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/statuses/{sha}","languages_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/languages","stargazers_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/stargazers","contributors_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/contributors","subscribers_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/subscribers","subscription_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/subscription","commits_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/commits{/sha}","git_commits_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/commits{/sha}","comments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/comments{/number}","issue_comment_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/comments{/number}","contents_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/contents/{+path}","compare_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/merges","archive_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/downloads","issues_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues{/number}","pulls_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls{/number}","milestones_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/milestones{/number}","notifications_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/labels{/name}","releases_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/releases{/id}","deployments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/deployments","created_at":"2015-05-04T18:20:38Z","updated_at":"2016-01-11T15:34:37Z","pushed_at":"2016-02-04T16:26:00Z","git_url":"git://github.com/WorldBank-Transport/DRIVER.git","ssh_url":"git@github.com:WorldBank-Transport/DRIVER.git","clone_url":"https://github.com/WorldBank-Transport/DRIVER.git","svn_url":"https://github.com/WorldBank-Transport/DRIVER","homepage":null,"size":19811,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":29,"forks":3,"open_issues":29,"watchers":1,"default_branch":"develop"}},"base":{"label":"WorldBank-Transport:develop","ref":"develop","sha":"fe09c73f11f10f3e881e51e7fb3adb5c2f7fd879","user":{"login":"WorldBank-Transport","id":5641611,"avatar_url":"https://avatars.githubusercontent.com/u/5641611?v=3","gravatar_id":"","url":"https://api.github.com/users/WorldBank-Transport","html_url":"https://github.com/WorldBank-Transport","followers_url":"https://api.github.com/users/WorldBank-Transport/followers","following_url":"https://api.github.com/users/WorldBank-Transport/following{/other_user}","gists_url":"https://api.github.com/users/WorldBank-Transport/gists{/gist_id}","starred_url":"https://api.github.com/users/WorldBank-Transport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WorldBank-Transport/subscriptions","organizations_url":"https://api.github.com/users/WorldBank-Transport/orgs","repos_url":"https://api.github.com/users/WorldBank-Transport/repos","events_url":"https://api.github.com/users/WorldBank-Transport/events{/privacy}","received_events_url":"https://api.github.com/users/WorldBank-Transport/received_events","type":"Organization","site_admin":false},"repo":{"id":35051490,"name":"DRIVER","full_name":"WorldBank-Transport/DRIVER","owner":{"login":"WorldBank-Transport","id":5641611,"avatar_url":"https://avatars.githubusercontent.com/u/5641611?v=3","gravatar_id":"","url":"https://api.github.com/users/WorldBank-Transport","html_url":"https://github.com/WorldBank-Transport","followers_url":"https://api.github.com/users/WorldBank-Transport/followers","following_url":"https://api.github.com/users/WorldBank-Transport/following{/other_user}","gists_url":"https://api.github.com/users/WorldBank-Transport/gists{/gist_id}","starred_url":"https://api.github.com/users/WorldBank-Transport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WorldBank-Transport/subscriptions","organizations_url":"https://api.github.com/users/WorldBank-Transport/orgs","repos_url":"https://api.github.com/users/WorldBank-Transport/repos","events_url":"https://api.github.com/users/WorldBank-Transport/events{/privacy}","received_events_url":"https://api.github.com/users/WorldBank-Transport/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WorldBank-Transport/DRIVER","description":"DRIVER - Data for Road Incident Visualization, Evaluation, and Reporting ","fork":false,"url":"https://api.github.com/repos/WorldBank-Transport/DRIVER","forks_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/forks","keys_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/teams","hooks_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/hooks","issue_events_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/events{/number}","events_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/events","assignees_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/assignees{/user}","branches_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/branches{/branch}","tags_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/tags","blobs_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/refs{/sha}","trees_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/statuses/{sha}","languages_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/languages","stargazers_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/stargazers","contributors_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/contributors","subscribers_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/subscribers","subscription_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/subscription","commits_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/commits{/sha}","git_commits_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/git/commits{/sha}","comments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/comments{/number}","issue_comment_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/comments{/number}","contents_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/contents/{+path}","compare_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/merges","archive_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/downloads","issues_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues{/number}","pulls_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls{/number}","milestones_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/milestones{/number}","notifications_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/labels{/name}","releases_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/releases{/id}","deployments_url":"https://api.github.com/repos/WorldBank-Transport/DRIVER/deployments","created_at":"2015-05-04T18:20:38Z","updated_at":"2016-01-11T15:34:37Z","pushed_at":"2016-02-04T16:26:00Z","git_url":"git://github.com/WorldBank-Transport/DRIVER.git","ssh_url":"git@github.com:WorldBank-Transport/DRIVER.git","clone_url":"https://github.com/WorldBank-Transport/DRIVER.git","svn_url":"https://github.com/WorldBank-Transport/DRIVER","homepage":null,"size":19811,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":29,"forks":3,"open_issues":29,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/393"},"html":{"href":"https://github.com/WorldBank-Transport/DRIVER/pull/393"},"issue":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/393"},"comments":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/issues/393/comments"},"review_comments":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/393/comments"},"review_comment":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/pulls/393/commits"},"statuses":{"href":"https://api.github.com/repos/WorldBank-Transport/DRIVER/statuses/52ee4e9351d63b99124c4d5ab7d7ea509b4c79a1"}}}}