{"action":"created","comment":{"url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/comments/149669588","pull_request_review_id":75098299,"id":149669588,"diff_hunk":"@@ -0,0 +1,86 @@\n+/**************************************************************************\n+ Program:  Crime_forweb\n+ Library:  Police\n+ Project:  NeighborhoodInfo DC\n+ Author:   Rob Pitingolo\n+ Created:  11/07/2017\n+ Version:  SAS 9.4\n+ Environment:  Windows\n+ Modifications: \n+\n+**************************************************************************/\n+\n+%include \"L:\\SAS\\Inc\\StdLocal.sas\"; \n+\n+** Define libraries **;\n+%DCData_lib( Police )\n+%DCData_lib( Web )\n+\n+\n+/***** Update the let statements for the data you want to create CSV files for *****/\n+\n+%let library = police; /* Library of the summary data to be transposed */\n+%let outfolder = crime; /* Name of folder where output CSV will be saved */\n+%let sumdata = crimes_sum; /* Summary dataset name (without geo suffix) */\n+%let start = 2000; /* Start year */\n+%let end = 2016; /* End year */\n+%let keepvars = crimes_pt1 Crimes_pt1_property Crimes_pt1_violent Crime_rate_pop; /* Summary variables to keep and transpose */\n+\n+\n+/***** Update the web_varcreate marcro if you need to create final indicators for the website after transposing *****/\n+\n+%macro web_varcreate;\n+\n+Crimes_pt1_per1000 = crimes_pt1 / Crime_rate_pop*1000;\n+Crimes_pt1_property_per1000 = Crimes_pt1_property / Crime_rate_pop*1000;\n+Crimes_pt1_violent_per1000 = Crimes_pt1_violent / Crime_rate_pop*1000;\n+\n+%mend web_varcreate;\n+\n+\n+\n+/**************** DO NOT UPDATE BELOW THIS LINE ****************/\n+\n+%macro csv_create(geo);\n+\t\t\t \n+%web_transpose(&library., &outfolder., &sumdata., &geo., &start., &end., &keepvars. );\n+\n+/* Load transposed data, create indicators for profiles */\n+data &sumdata._&geo._long_allyr;\n+\tset &sumdata._&geo._long;\n+\t%web_varcreate;\n+run;\n+\n+/* Output all-years CSV */\n+ods csv file =\"&_dcdata_default_path.\\web\\output\\&outfolder.\\&geo.\\&outfolder._&geo._AllYears.csv\";","path":"Prog/Crimes_forweb.sas","position":55,"original_position":55,"commit_id":"a91792f8c3689b20f8b753765e15e8d78f2a7dfb","original_commit_id":"a91792f8c3689b20f8b753765e15e8d78f2a7dfb","user":{"login":"ptatian","id":13188332,"avatar_url":"https://avatars2.githubusercontent.com/u/13188332?v=4","gravatar_id":"","url":"https://api.github.com/users/ptatian","html_url":"https://github.com/ptatian","followers_url":"https://api.github.com/users/ptatian/followers","following_url":"https://api.github.com/users/ptatian/following{/other_user}","gists_url":"https://api.github.com/users/ptatian/gists{/gist_id}","starred_url":"https://api.github.com/users/ptatian/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ptatian/subscriptions","organizations_url":"https://api.github.com/users/ptatian/orgs","repos_url":"https://api.github.com/users/ptatian/repos","events_url":"https://api.github.com/users/ptatian/events{/privacy}","received_events_url":"https://api.github.com/users/ptatian/received_events","type":"User","site_admin":false},"body":"@rpitingolo If the folders already exist, MKDIR should not do anything to disturb them. I've used it in other programs and that's the way it works. \r\n\r\nNote that you will want to include an `options noxwait;` statement in the program so that it won't stop everytime it opens a command prompt. ","created_at":"2017-11-08T13:38:49Z","updated_at":"2017-11-08T13:38:49Z","html_url":"https://github.com/NeighborhoodInfoDC/Police/pull/17#discussion_r149669588","pull_request_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/17","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/comments/149669588"},"html":{"href":"https://github.com/NeighborhoodInfoDC/Police/pull/17#discussion_r149669588"},"pull_request":{"href":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/17"}},"in_reply_to_id":149529195},"pull_request":{"url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/17","id":151225280,"html_url":"https://github.com/NeighborhoodInfoDC/Police/pull/17","diff_url":"https://github.com/NeighborhoodInfoDC/Police/pull/17.diff","patch_url":"https://github.com/NeighborhoodInfoDC/Police/pull/17.patch","issue_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/issues/17","number":17,"state":"open","locked":false,"title":"Develop 16","user":{"login":"rpitingolo","id":17182169,"avatar_url":"https://avatars3.githubusercontent.com/u/17182169?v=4","gravatar_id":"","url":"https://api.github.com/users/rpitingolo","html_url":"https://github.com/rpitingolo","followers_url":"https://api.github.com/users/rpitingolo/followers","following_url":"https://api.github.com/users/rpitingolo/following{/other_user}","gists_url":"https://api.github.com/users/rpitingolo/gists{/gist_id}","starred_url":"https://api.github.com/users/rpitingolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpitingolo/subscriptions","organizations_url":"https://api.github.com/users/rpitingolo/orgs","repos_url":"https://api.github.com/users/rpitingolo/repos","events_url":"https://api.github.com/users/rpitingolo/events{/privacy}","received_events_url":"https://api.github.com/users/rpitingolo/received_events","type":"User","site_admin":false},"body":"@NeighborhoodInfoDC/review Peter - here's the program that I created in the crime library that would create the csvs needed for the new website. You also need the web_transpose macro in the web library. If you think there's a better way to loop through the geographies, let me know. I didn't want to spend too much time on that now. ","created_at":"2017-11-07T20:57:54Z","updated_at":"2017-11-08T13:38:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"81ba5ce1ddfce6c67b57fb832becc8e4fa2ca175","assignee":{"login":"rpitingolo","id":17182169,"avatar_url":"https://avatars3.githubusercontent.com/u/17182169?v=4","gravatar_id":"","url":"https://api.github.com/users/rpitingolo","html_url":"https://github.com/rpitingolo","followers_url":"https://api.github.com/users/rpitingolo/followers","following_url":"https://api.github.com/users/rpitingolo/following{/other_user}","gists_url":"https://api.github.com/users/rpitingolo/gists{/gist_id}","starred_url":"https://api.github.com/users/rpitingolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpitingolo/subscriptions","organizations_url":"https://api.github.com/users/rpitingolo/orgs","repos_url":"https://api.github.com/users/rpitingolo/repos","events_url":"https://api.github.com/users/rpitingolo/events{/privacy}","received_events_url":"https://api.github.com/users/rpitingolo/received_events","type":"User","site_admin":false},"assignees":[{"login":"rpitingolo","id":17182169,"avatar_url":"https://avatars3.githubusercontent.com/u/17182169?v=4","gravatar_id":"","url":"https://api.github.com/users/rpitingolo","html_url":"https://github.com/rpitingolo","followers_url":"https://api.github.com/users/rpitingolo/followers","following_url":"https://api.github.com/users/rpitingolo/following{/other_user}","gists_url":"https://api.github.com/users/rpitingolo/gists{/gist_id}","starred_url":"https://api.github.com/users/rpitingolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rpitingolo/subscriptions","organizations_url":"https://api.github.com/users/rpitingolo/orgs","repos_url":"https://api.github.com/users/rpitingolo/repos","events_url":"https://api.github.com/users/rpitingolo/events{/privacy}","received_events_url":"https://api.github.com/users/rpitingolo/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/17/commits","review_comments_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/17/comments","review_comment_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/issues/17/comments","statuses_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/statuses/a91792f8c3689b20f8b753765e15e8d78f2a7dfb","head":{"label":"NeighborhoodInfoDC:develop-#16","ref":"develop-#16","sha":"a91792f8c3689b20f8b753765e15e8d78f2a7dfb","user":{"login":"NeighborhoodInfoDC","id":13206720,"avatar_url":"https://avatars1.githubusercontent.com/u/13206720?v=4","gravatar_id":"","url":"https://api.github.com/users/NeighborhoodInfoDC","html_url":"https://github.com/NeighborhoodInfoDC","followers_url":"https://api.github.com/users/NeighborhoodInfoDC/followers","following_url":"https://api.github.com/users/NeighborhoodInfoDC/following{/other_user}","gists_url":"https://api.github.com/users/NeighborhoodInfoDC/gists{/gist_id}","starred_url":"https://api.github.com/users/NeighborhoodInfoDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeighborhoodInfoDC/subscriptions","organizations_url":"https://api.github.com/users/NeighborhoodInfoDC/orgs","repos_url":"https://api.github.com/users/NeighborhoodInfoDC/repos","events_url":"https://api.github.com/users/NeighborhoodInfoDC/events{/privacy}","received_events_url":"https://api.github.com/users/NeighborhoodInfoDC/received_events","type":"Organization","site_admin":false},"repo":{"id":50038067,"name":"Police","full_name":"NeighborhoodInfoDC/Police","owner":{"login":"NeighborhoodInfoDC","id":13206720,"avatar_url":"https://avatars1.githubusercontent.com/u/13206720?v=4","gravatar_id":"","url":"https://api.github.com/users/NeighborhoodInfoDC","html_url":"https://github.com/NeighborhoodInfoDC","followers_url":"https://api.github.com/users/NeighborhoodInfoDC/followers","following_url":"https://api.github.com/users/NeighborhoodInfoDC/following{/other_user}","gists_url":"https://api.github.com/users/NeighborhoodInfoDC/gists{/gist_id}","starred_url":"https://api.github.com/users/NeighborhoodInfoDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeighborhoodInfoDC/subscriptions","organizations_url":"https://api.github.com/users/NeighborhoodInfoDC/orgs","repos_url":"https://api.github.com/users/NeighborhoodInfoDC/repos","events_url":"https://api.github.com/users/NeighborhoodInfoDC/events{/privacy}","received_events_url":"https://api.github.com/users/NeighborhoodInfoDC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NeighborhoodInfoDC/Police","description":"Crime reports, arrests, and 911 calls","fork":false,"url":"https://api.github.com/repos/NeighborhoodInfoDC/Police","forks_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/forks","keys_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/teams","hooks_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/hooks","issue_events_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/issues/events{/number}","events_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/events","assignees_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/assignees{/user}","branches_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/branches{/branch}","tags_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/tags","blobs_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/git/refs{/sha}","trees_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/statuses/{sha}","languages_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/languages","stargazers_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/stargazers","contributors_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/contributors","subscribers_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/subscribers","subscription_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/subscription","commits_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/commits{/sha}","git_commits_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/git/commits{/sha}","comments_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/comments{/number}","issue_comment_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/issues/comments{/number}","contents_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/contents/{+path}","compare_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/merges","archive_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/downloads","issues_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/issues{/number}","pulls_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls{/number}","milestones_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/milestones{/number}","notifications_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/labels{/name}","releases_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/releases{/id}","deployments_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/deployments","created_at":"2016-01-20T15:12:05Z","updated_at":"2016-01-20T16:28:44Z","pushed_at":"2017-11-07T20:57:55Z","git_url":"git://github.com/NeighborhoodInfoDC/Police.git","ssh_url":"git@github.com:NeighborhoodInfoDC/Police.git","clone_url":"https://github.com/NeighborhoodInfoDC/Police.git","svn_url":"https://github.com/NeighborhoodInfoDC/Police","homepage":null,"size":42,"stargazers_count":0,"watchers_count":0,"language":"SAS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"NeighborhoodInfoDC:master","ref":"master","sha":"2bfd51499d7d501a1e65d6ef322203c3770a9b30","user":{"login":"NeighborhoodInfoDC","id":13206720,"avatar_url":"https://avatars1.githubusercontent.com/u/13206720?v=4","gravatar_id":"","url":"https://api.github.com/users/NeighborhoodInfoDC","html_url":"https://github.com/NeighborhoodInfoDC","followers_url":"https://api.github.com/users/NeighborhoodInfoDC/followers","following_url":"https://api.github.com/users/NeighborhoodInfoDC/following{/other_user}","gists_url":"https://api.github.com/users/NeighborhoodInfoDC/gists{/gist_id}","starred_url":"https://api.github.com/users/NeighborhoodInfoDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeighborhoodInfoDC/subscriptions","organizations_url":"https://api.github.com/users/NeighborhoodInfoDC/orgs","repos_url":"https://api.github.com/users/NeighborhoodInfoDC/repos","events_url":"https://api.github.com/users/NeighborhoodInfoDC/events{/privacy}","received_events_url":"https://api.github.com/users/NeighborhoodInfoDC/received_events","type":"Organization","site_admin":false},"repo":{"id":50038067,"name":"Police","full_name":"NeighborhoodInfoDC/Police","owner":{"login":"NeighborhoodInfoDC","id":13206720,"avatar_url":"https://avatars1.githubusercontent.com/u/13206720?v=4","gravatar_id":"","url":"https://api.github.com/users/NeighborhoodInfoDC","html_url":"https://github.com/NeighborhoodInfoDC","followers_url":"https://api.github.com/users/NeighborhoodInfoDC/followers","following_url":"https://api.github.com/users/NeighborhoodInfoDC/following{/other_user}","gists_url":"https://api.github.com/users/NeighborhoodInfoDC/gists{/gist_id}","starred_url":"https://api.github.com/users/NeighborhoodInfoDC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NeighborhoodInfoDC/subscriptions","organizations_url":"https://api.github.com/users/NeighborhoodInfoDC/orgs","repos_url":"https://api.github.com/users/NeighborhoodInfoDC/repos","events_url":"https://api.github.com/users/NeighborhoodInfoDC/events{/privacy}","received_events_url":"https://api.github.com/users/NeighborhoodInfoDC/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NeighborhoodInfoDC/Police","description":"Crime reports, arrests, and 911 calls","fork":false,"url":"https://api.github.com/repos/NeighborhoodInfoDC/Police","forks_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/forks","keys_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/teams","hooks_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/hooks","issue_events_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/issues/events{/number}","events_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/events","assignees_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/assignees{/user}","branches_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/branches{/branch}","tags_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/tags","blobs_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/git/refs{/sha}","trees_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/statuses/{sha}","languages_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/languages","stargazers_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/stargazers","contributors_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/contributors","subscribers_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/subscribers","subscription_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/subscription","commits_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/commits{/sha}","git_commits_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/git/commits{/sha}","comments_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/comments{/number}","issue_comment_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/issues/comments{/number}","contents_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/contents/{+path}","compare_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/merges","archive_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/downloads","issues_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/issues{/number}","pulls_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls{/number}","milestones_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/milestones{/number}","notifications_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/labels{/name}","releases_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/releases{/id}","deployments_url":"https://api.github.com/repos/NeighborhoodInfoDC/Police/deployments","created_at":"2016-01-20T15:12:05Z","updated_at":"2016-01-20T16:28:44Z","pushed_at":"2017-11-07T20:57:55Z","git_url":"git://github.com/NeighborhoodInfoDC/Police.git","ssh_url":"git@github.com:NeighborhoodInfoDC/Police.git","clone_url":"https://github.com/NeighborhoodInfoDC/Police.git","svn_url":"https://github.com/NeighborhoodInfoDC/Police","homepage":null,"size":42,"stargazers_count":0,"watchers_count":0,"language":"SAS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/17"},"html":{"href":"https://github.com/NeighborhoodInfoDC/Police/pull/17"},"issue":{"href":"https://api.github.com/repos/NeighborhoodInfoDC/Police/issues/17"},"comments":{"href":"https://api.github.com/repos/NeighborhoodInfoDC/Police/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NeighborhoodInfoDC/Police/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/NeighborhoodInfoDC/Police/statuses/a91792f8c3689b20f8b753765e15e8d78f2a7dfb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ptatian"}}