{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/comments/55679981","id":55679981,"diff_hunk":"@@ -15,9 +15,12 @@ def get_query(query_path):\n         return json.load(f)\n \n \n-def init_writer(filename):\n-    writer = get_csv_writer(filename)\n-    writer.writerow(['domain','form_id','user_id','time_completed','time_received','delta_cs_hours'])\n+def init_writer(query_choice):\n+    writer = get_csv_writer(output_file)","path":"dumper/main.py","position":null,"original_position":19,"commit_id":"ca697568141820453ab3f64bfa4d6ecb5c04c9ad","original_commit_id":"af39621549fe000c7e8566100d1c59c55d820203","user":{"login":"amstone326","id":3723143,"avatar_url":"https://avatars.githubusercontent.com/u/3723143?v=3","gravatar_id":"","url":"https://api.github.com/users/amstone326","html_url":"https://github.com/amstone326","followers_url":"https://api.github.com/users/amstone326/followers","following_url":"https://api.github.com/users/amstone326/following{/other_user}","gists_url":"https://api.github.com/users/amstone326/gists{/gist_id}","starred_url":"https://api.github.com/users/amstone326/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amstone326/subscriptions","organizations_url":"https://api.github.com/users/amstone326/orgs","repos_url":"https://api.github.com/users/amstone326/repos","events_url":"https://api.github.com/users/amstone326/events{/privacy}","received_events_url":"https://api.github.com/users/amstone326/received_events","type":"User","site_admin":false},"body":"fixed","created_at":"2016-03-10T13:46:43Z","updated_at":"2016-03-10T13:46:43Z","html_url":"https://github.com/dimagi/deltacs-data-blog/pull/2#discussion_r55679981","pull_request_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/comments/55679981"},"html":{"href":"https://github.com/dimagi/deltacs-data-blog/pull/2#discussion_r55679981"},"pull_request":{"href":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/2","id":62373087,"html_url":"https://github.com/dimagi/deltacs-data-blog/pull/2","diff_url":"https://github.com/dimagi/deltacs-data-blog/pull/2.diff","patch_url":"https://github.com/dimagi/deltacs-data-blog/pull/2.patch","issue_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/issues/2","number":2,"state":"open","locked":false,"title":"Add dumping aggregation-by-user","user":{"login":"amstone326","id":3723143,"avatar_url":"https://avatars.githubusercontent.com/u/3723143?v=3","gravatar_id":"","url":"https://api.github.com/users/amstone326","html_url":"https://github.com/amstone326","followers_url":"https://api.github.com/users/amstone326/followers","following_url":"https://api.github.com/users/amstone326/following{/other_user}","gists_url":"https://api.github.com/users/amstone326/gists{/gist_id}","starred_url":"https://api.github.com/users/amstone326/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amstone326/subscriptions","organizations_url":"https://api.github.com/users/amstone326/orgs","repos_url":"https://api.github.com/users/amstone326/repos","events_url":"https://api.github.com/users/amstone326/events{/privacy}","received_events_url":"https://api.github.com/users/amstone326/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-10T11:06:15Z","updated_at":"2016-03-10T13:46:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"578bce0832a28456b52f51203175afce2666968d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/2/commits","review_comments_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/2/comments","review_comment_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/issues/2/comments","statuses_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/statuses/ca697568141820453ab3f64bfa4d6ecb5c04c9ad","head":{"label":"dimagi:dump_aggregate_query","ref":"dump_aggregate_query","sha":"ca697568141820453ab3f64bfa4d6ecb5c04c9ad","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":53485640,"name":"deltacs-data-blog","full_name":"dimagi/deltacs-data-blog","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/deltacs-data-blog","description":"Scripts, queries, and data analysis for examining the time elapsed between form completion and submission across all CommCare form submissions.","fork":false,"url":"https://api.github.com/repos/dimagi/deltacs-data-blog","forks_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/forks","keys_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/teams","hooks_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/hooks","issue_events_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/events","assignees_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/tags","blobs_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/languages","stargazers_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/stargazers","contributors_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/contributors","subscribers_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/subscribers","subscription_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/subscription","commits_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/merges","archive_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/downloads","issues_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/deployments","created_at":"2016-03-09T09:34:19Z","updated_at":"2016-03-09T12:29:22Z","pushed_at":"2016-03-10T13:45:54Z","git_url":"git://github.com/dimagi/deltacs-data-blog.git","ssh_url":"git@github.com:dimagi/deltacs-data-blog.git","clone_url":"https://github.com/dimagi/deltacs-data-blog.git","svn_url":"https://github.com/dimagi/deltacs-data-blog","homepage":"","size":13,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"dimagi:master","ref":"master","sha":"225a0169f995155ed94b3eb4f333bb08f5fa891b","user":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":53485640,"name":"deltacs-data-blog","full_name":"dimagi/deltacs-data-blog","owner":{"login":"dimagi","id":94514,"avatar_url":"https://avatars.githubusercontent.com/u/94514?v=3","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dimagi/deltacs-data-blog","description":"Scripts, queries, and data analysis for examining the time elapsed between form completion and submission across all CommCare form submissions.","fork":false,"url":"https://api.github.com/repos/dimagi/deltacs-data-blog","forks_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/forks","keys_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/teams","hooks_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/hooks","issue_events_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/events","assignees_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/tags","blobs_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/languages","stargazers_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/stargazers","contributors_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/contributors","subscribers_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/subscribers","subscription_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/subscription","commits_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/merges","archive_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/downloads","issues_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/deltacs-data-blog/deployments","created_at":"2016-03-09T09:34:19Z","updated_at":"2016-03-09T12:29:22Z","pushed_at":"2016-03-10T13:45:54Z","git_url":"git://github.com/dimagi/deltacs-data-blog.git","ssh_url":"git@github.com:dimagi/deltacs-data-blog.git","clone_url":"https://github.com/dimagi/deltacs-data-blog.git","svn_url":"https://github.com/dimagi/deltacs-data-blog","homepage":"","size":13,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/2"},"html":{"href":"https://github.com/dimagi/deltacs-data-blog/pull/2"},"issue":{"href":"https://api.github.com/repos/dimagi/deltacs-data-blog/issues/2"},"comments":{"href":"https://api.github.com/repos/dimagi/deltacs-data-blog/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimagi/deltacs-data-blog/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/deltacs-data-blog/statuses/ca697568141820453ab3f64bfa4d6ecb5c04c9ad"}}}}