{"action":"created","comment":{"url":"https://api.github.com/repos/KatherineHanson/StormData/pulls/comments/76901779","id":76901779,"diff_hunk":"@@ -0,0 +1,50 @@\n+# Step 3, Question 2\n+# -----------------------------------------------------\n+# How many storms impacting trees happened between \n+# 8PM EST and 8AM EST in 2000?\n+# -----------------------------------------------------\n+\n+# use csv\n+# create a function\n+#   create an array\n+#     for each row\n+#       not starting with A, B, or C in column 15\n+#         including values (between 0 and 900 or 2100 and 2400 in column 2) or (between 0 and 900 or 2100 and 2400 in column 5) and where column 18 includes \"AST\"\n+#         including values (between 0 and 800 or 2000 and 2400 in column 2) or (between 0 and 800 or 2000 and 2400 in column 5) and where column 18 includes \"EST\"\n+#         including values (between 0 and 700 or 1900 and 2400 in column 2) or (between 0 and 700 or 1900 and 2400 in column 5) and where column 18 includes \"CST\"\n+#         including values (between 0 and 600 or 1800 and 2400 in column 2) or (between 0 and 600 or 1800 and 2400 in column 5) and where column 18 includes \"MST\"\n+#         including values (between 0 and 500 or 1700 and 2400 in column 2) or (between 0 and 500 or 1700 and 2400 in column 5) and where column 18 includes \"PST\"\n+#         including values (between 0 and 400 or 1600 and 2400 in column 2) or (between 0 and 400 or 1600 and 2400 in column 5) and where column 18 includes \"AKST\"\n+#         including values (between 0 and 300 or 1500 and 2400 in column 2) or (between 0 and 300 or 1500 and 2400 in column 5) and where column 18 includes \"HST\"\n+#         including values (between 400 and 1600 in column 2) or (between 400 and 1600 in column 5) and where column 18 includes \"GST\"\n+#         including values (between 800 and 2000 in column 2) or (between 800 and 2000 in column 5) and where column 18 includes \"SST\"\n+#             count all rows including value user inputs for value type (\"trees\" or \"Trees\" for the purposes of answering this question) in column 48\n+\n+require \"csv\"\n+\n+StormsImpact2000 = []\n+\n+puts \"The following data excludes Counties/Parishes, Zones, and Marines whose names begin with the letters A, B, or C.\"\n+puts \"What kind of impact did storms cause between 8PM EST and 8AM EST in 2000? Enter the impact keyword you want to look up. (e.g. trees or Trees)\"\n+impactType = gets.chomp\n+\n+\n+def StormsImpactingTrees(impactType)\n+  CSV.foreach('2000_c20160223.csv', encoding: 'ISO-8859-1') do |row|\n+    if !(row.at(15).start_with?(\"A\",\"B\",\"C\"))\n+  \t  if (row.at(2).to_i.between?(0,900) || row.at(2).to_i.between?(2100,2400) || row.at(5).to_i.between?(startTime = 0,900) || row.at(5).to_i.between?(startTime = 2100,2400) && row.at(18).include?(\"AST\")) || (row.at(2).to_i.between?(0,800) || row.at(2).to_i.between?(2000,2400) || row.at(5).to_i.between?(startTime = 0,800) || row.at(5).to_i.between?(startTime = 2000,2400) && row.at(18).include?(\"EST\")) || (row.at(2).to_i.between?(0,700) || row.at(2).to_i.between?(1900,2400) || row.at(5).to_i.between?(startTime = 0,700) || row.at(5).to_i.between?(startTime = 1900,2400) && row.at(18).include?(\"CST\")) || (row.at(2).to_i.between?(0,600) || row.at(2).to_i.between?(1800,2400) || row.at(5).to_i.between?(startTime = 0,600) || row.at(5).to_i.between?(startTime = 1800,2400) && row.at(18).include?(\"MST\")) || (row.at(2).to_i.between?(0,500) || row.at(2).to_i.between?(1700,2400) || row.at(5).to_i.between?(startTime = 0,500) || row.at(5).to_i.between?(startTime = 1700,2400) && row.at(18).include?(\"PST\")) || (row.at(2).to_i.between?(0,400) || row.at(2).to_i.between?(1600,2400) || row.at(5).to_i.between?(startTime = 0,400) || row.at(5).to_i.between?(startTime = 1600,2400) && row.at(18).include?(\"AKST\")) || (row.at(2).to_i.between?(0,300) || row.at(2).to_i.between?(1500,2400) || row.at(5).to_i.between?(startTime = 0,300) || row.at(5).to_i.between?(startTime = 1500,2400) && row.at(18).include?(\"HST\")) || (row.at(2).to_i.between?(400,1600) || row.at(5).to_i.between?(startTime = 400,1600) && row.at(18).include?(\"GST\")) || (row.at(2).to_i.between?(800,2000) || row.at(5).to_i.between?(startTime = 800,2000) && row.at(18).include?(\"SST\"))","path":"Step3_Question2.rb","position":35,"original_position":35,"commit_id":"d687737a6d0c9d8cc302dd4081f1487f27328d97","original_commit_id":"d687737a6d0c9d8cc302dd4081f1487f27328d97","user":{"login":"amysutedja","id":1725106,"avatar_url":"https://avatars.githubusercontent.com/u/1725106?v=3","gravatar_id":"","url":"https://api.github.com/users/amysutedja","html_url":"https://github.com/amysutedja","followers_url":"https://api.github.com/users/amysutedja/followers","following_url":"https://api.github.com/users/amysutedja/following{/other_user}","gists_url":"https://api.github.com/users/amysutedja/gists{/gist_id}","starred_url":"https://api.github.com/users/amysutedja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amysutedja/subscriptions","organizations_url":"https://api.github.com/users/amysutedja/orgs","repos_url":"https://api.github.com/users/amysutedja/repos","events_url":"https://api.github.com/users/amysutedja/events{/privacy}","received_events_url":"https://api.github.com/users/amysutedja/received_events","type":"User","site_admin":false},"body":"Again, weird. See note above.","created_at":"2016-08-30T23:54:26Z","updated_at":"2016-08-30T23:54:26Z","html_url":"https://github.com/KatherineHanson/StormData/pull/1#discussion_r76901779","pull_request_url":"https://api.github.com/repos/KatherineHanson/StormData/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/KatherineHanson/StormData/pulls/comments/76901779"},"html":{"href":"https://github.com/KatherineHanson/StormData/pull/1#discussion_r76901779"},"pull_request":{"href":"https://api.github.com/repos/KatherineHanson/StormData/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/KatherineHanson/StormData/pulls/1","id":83366863,"html_url":"https://github.com/KatherineHanson/StormData/pull/1","diff_url":"https://github.com/KatherineHanson/StormData/pull/1.diff","patch_url":"https://github.com/KatherineHanson/StormData/pull/1.patch","issue_url":"https://api.github.com/repos/KatherineHanson/StormData/issues/1","number":1,"state":"open","locked":false,"title":"StormDataPrograms_Raw","user":{"login":"KatherineHanson","id":13264771,"avatar_url":"https://avatars.githubusercontent.com/u/13264771?v=3","gravatar_id":"","url":"https://api.github.com/users/KatherineHanson","html_url":"https://github.com/KatherineHanson","followers_url":"https://api.github.com/users/KatherineHanson/followers","following_url":"https://api.github.com/users/KatherineHanson/following{/other_user}","gists_url":"https://api.github.com/users/KatherineHanson/gists{/gist_id}","starred_url":"https://api.github.com/users/KatherineHanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KatherineHanson/subscriptions","organizations_url":"https://api.github.com/users/KatherineHanson/orgs","repos_url":"https://api.github.com/users/KatherineHanson/repos","events_url":"https://api.github.com/users/KatherineHanson/events{/privacy}","received_events_url":"https://api.github.com/users/KatherineHanson/received_events","type":"User","site_admin":false},"body":"Initial code for storm data","created_at":"2016-08-30T23:46:58Z","updated_at":"2016-08-30T23:54:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"01bab5c3f06644d92c155c7260e4404d8f46707c","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/KatherineHanson/StormData/pulls/1/commits","review_comments_url":"https://api.github.com/repos/KatherineHanson/StormData/pulls/1/comments","review_comment_url":"https://api.github.com/repos/KatherineHanson/StormData/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KatherineHanson/StormData/issues/1/comments","statuses_url":"https://api.github.com/repos/KatherineHanson/StormData/statuses/d687737a6d0c9d8cc302dd4081f1487f27328d97","head":{"label":"KatherineHanson:StormDataPrograms_Raw","ref":"StormDataPrograms_Raw","sha":"d687737a6d0c9d8cc302dd4081f1487f27328d97","user":{"login":"KatherineHanson","id":13264771,"avatar_url":"https://avatars.githubusercontent.com/u/13264771?v=3","gravatar_id":"","url":"https://api.github.com/users/KatherineHanson","html_url":"https://github.com/KatherineHanson","followers_url":"https://api.github.com/users/KatherineHanson/followers","following_url":"https://api.github.com/users/KatherineHanson/following{/other_user}","gists_url":"https://api.github.com/users/KatherineHanson/gists{/gist_id}","starred_url":"https://api.github.com/users/KatherineHanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KatherineHanson/subscriptions","organizations_url":"https://api.github.com/users/KatherineHanson/orgs","repos_url":"https://api.github.com/users/KatherineHanson/repos","events_url":"https://api.github.com/users/KatherineHanson/events{/privacy}","received_events_url":"https://api.github.com/users/KatherineHanson/received_events","type":"User","site_admin":false},"repo":{"id":66984386,"name":"StormData","full_name":"KatherineHanson/StormData","owner":{"login":"KatherineHanson","id":13264771,"avatar_url":"https://avatars.githubusercontent.com/u/13264771?v=3","gravatar_id":"","url":"https://api.github.com/users/KatherineHanson","html_url":"https://github.com/KatherineHanson","followers_url":"https://api.github.com/users/KatherineHanson/followers","following_url":"https://api.github.com/users/KatherineHanson/following{/other_user}","gists_url":"https://api.github.com/users/KatherineHanson/gists{/gist_id}","starred_url":"https://api.github.com/users/KatherineHanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KatherineHanson/subscriptions","organizations_url":"https://api.github.com/users/KatherineHanson/orgs","repos_url":"https://api.github.com/users/KatherineHanson/repos","events_url":"https://api.github.com/users/KatherineHanson/events{/privacy}","received_events_url":"https://api.github.com/users/KatherineHanson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KatherineHanson/StormData","description":"Data about storms","fork":false,"url":"https://api.github.com/repos/KatherineHanson/StormData","forks_url":"https://api.github.com/repos/KatherineHanson/StormData/forks","keys_url":"https://api.github.com/repos/KatherineHanson/StormData/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KatherineHanson/StormData/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KatherineHanson/StormData/teams","hooks_url":"https://api.github.com/repos/KatherineHanson/StormData/hooks","issue_events_url":"https://api.github.com/repos/KatherineHanson/StormData/issues/events{/number}","events_url":"https://api.github.com/repos/KatherineHanson/StormData/events","assignees_url":"https://api.github.com/repos/KatherineHanson/StormData/assignees{/user}","branches_url":"https://api.github.com/repos/KatherineHanson/StormData/branches{/branch}","tags_url":"https://api.github.com/repos/KatherineHanson/StormData/tags","blobs_url":"https://api.github.com/repos/KatherineHanson/StormData/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KatherineHanson/StormData/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KatherineHanson/StormData/git/refs{/sha}","trees_url":"https://api.github.com/repos/KatherineHanson/StormData/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KatherineHanson/StormData/statuses/{sha}","languages_url":"https://api.github.com/repos/KatherineHanson/StormData/languages","stargazers_url":"https://api.github.com/repos/KatherineHanson/StormData/stargazers","contributors_url":"https://api.github.com/repos/KatherineHanson/StormData/contributors","subscribers_url":"https://api.github.com/repos/KatherineHanson/StormData/subscribers","subscription_url":"https://api.github.com/repos/KatherineHanson/StormData/subscription","commits_url":"https://api.github.com/repos/KatherineHanson/StormData/commits{/sha}","git_commits_url":"https://api.github.com/repos/KatherineHanson/StormData/git/commits{/sha}","comments_url":"https://api.github.com/repos/KatherineHanson/StormData/comments{/number}","issue_comment_url":"https://api.github.com/repos/KatherineHanson/StormData/issues/comments{/number}","contents_url":"https://api.github.com/repos/KatherineHanson/StormData/contents/{+path}","compare_url":"https://api.github.com/repos/KatherineHanson/StormData/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KatherineHanson/StormData/merges","archive_url":"https://api.github.com/repos/KatherineHanson/StormData/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KatherineHanson/StormData/downloads","issues_url":"https://api.github.com/repos/KatherineHanson/StormData/issues{/number}","pulls_url":"https://api.github.com/repos/KatherineHanson/StormData/pulls{/number}","milestones_url":"https://api.github.com/repos/KatherineHanson/StormData/milestones{/number}","notifications_url":"https://api.github.com/repos/KatherineHanson/StormData/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KatherineHanson/StormData/labels{/name}","releases_url":"https://api.github.com/repos/KatherineHanson/StormData/releases{/id}","deployments_url":"https://api.github.com/repos/KatherineHanson/StormData/deployments","created_at":"2016-08-30T23:12:48Z","updated_at":"2016-08-30T23:12:48Z","pushed_at":"2016-08-30T23:46:58Z","git_url":"git://github.com/KatherineHanson/StormData.git","ssh_url":"git@github.com:KatherineHanson/StormData.git","clone_url":"https://github.com/KatherineHanson/StormData.git","svn_url":"https://github.com/KatherineHanson/StormData","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"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":"KatherineHanson:master","ref":"master","sha":"7930834817ab05f2778d091b44c3832b34d2f63f","user":{"login":"KatherineHanson","id":13264771,"avatar_url":"https://avatars.githubusercontent.com/u/13264771?v=3","gravatar_id":"","url":"https://api.github.com/users/KatherineHanson","html_url":"https://github.com/KatherineHanson","followers_url":"https://api.github.com/users/KatherineHanson/followers","following_url":"https://api.github.com/users/KatherineHanson/following{/other_user}","gists_url":"https://api.github.com/users/KatherineHanson/gists{/gist_id}","starred_url":"https://api.github.com/users/KatherineHanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KatherineHanson/subscriptions","organizations_url":"https://api.github.com/users/KatherineHanson/orgs","repos_url":"https://api.github.com/users/KatherineHanson/repos","events_url":"https://api.github.com/users/KatherineHanson/events{/privacy}","received_events_url":"https://api.github.com/users/KatherineHanson/received_events","type":"User","site_admin":false},"repo":{"id":66984386,"name":"StormData","full_name":"KatherineHanson/StormData","owner":{"login":"KatherineHanson","id":13264771,"avatar_url":"https://avatars.githubusercontent.com/u/13264771?v=3","gravatar_id":"","url":"https://api.github.com/users/KatherineHanson","html_url":"https://github.com/KatherineHanson","followers_url":"https://api.github.com/users/KatherineHanson/followers","following_url":"https://api.github.com/users/KatherineHanson/following{/other_user}","gists_url":"https://api.github.com/users/KatherineHanson/gists{/gist_id}","starred_url":"https://api.github.com/users/KatherineHanson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KatherineHanson/subscriptions","organizations_url":"https://api.github.com/users/KatherineHanson/orgs","repos_url":"https://api.github.com/users/KatherineHanson/repos","events_url":"https://api.github.com/users/KatherineHanson/events{/privacy}","received_events_url":"https://api.github.com/users/KatherineHanson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KatherineHanson/StormData","description":"Data about storms","fork":false,"url":"https://api.github.com/repos/KatherineHanson/StormData","forks_url":"https://api.github.com/repos/KatherineHanson/StormData/forks","keys_url":"https://api.github.com/repos/KatherineHanson/StormData/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KatherineHanson/StormData/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KatherineHanson/StormData/teams","hooks_url":"https://api.github.com/repos/KatherineHanson/StormData/hooks","issue_events_url":"https://api.github.com/repos/KatherineHanson/StormData/issues/events{/number}","events_url":"https://api.github.com/repos/KatherineHanson/StormData/events","assignees_url":"https://api.github.com/repos/KatherineHanson/StormData/assignees{/user}","branches_url":"https://api.github.com/repos/KatherineHanson/StormData/branches{/branch}","tags_url":"https://api.github.com/repos/KatherineHanson/StormData/tags","blobs_url":"https://api.github.com/repos/KatherineHanson/StormData/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KatherineHanson/StormData/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KatherineHanson/StormData/git/refs{/sha}","trees_url":"https://api.github.com/repos/KatherineHanson/StormData/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KatherineHanson/StormData/statuses/{sha}","languages_url":"https://api.github.com/repos/KatherineHanson/StormData/languages","stargazers_url":"https://api.github.com/repos/KatherineHanson/StormData/stargazers","contributors_url":"https://api.github.com/repos/KatherineHanson/StormData/contributors","subscribers_url":"https://api.github.com/repos/KatherineHanson/StormData/subscribers","subscription_url":"https://api.github.com/repos/KatherineHanson/StormData/subscription","commits_url":"https://api.github.com/repos/KatherineHanson/StormData/commits{/sha}","git_commits_url":"https://api.github.com/repos/KatherineHanson/StormData/git/commits{/sha}","comments_url":"https://api.github.com/repos/KatherineHanson/StormData/comments{/number}","issue_comment_url":"https://api.github.com/repos/KatherineHanson/StormData/issues/comments{/number}","contents_url":"https://api.github.com/repos/KatherineHanson/StormData/contents/{+path}","compare_url":"https://api.github.com/repos/KatherineHanson/StormData/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KatherineHanson/StormData/merges","archive_url":"https://api.github.com/repos/KatherineHanson/StormData/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KatherineHanson/StormData/downloads","issues_url":"https://api.github.com/repos/KatherineHanson/StormData/issues{/number}","pulls_url":"https://api.github.com/repos/KatherineHanson/StormData/pulls{/number}","milestones_url":"https://api.github.com/repos/KatherineHanson/StormData/milestones{/number}","notifications_url":"https://api.github.com/repos/KatherineHanson/StormData/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KatherineHanson/StormData/labels{/name}","releases_url":"https://api.github.com/repos/KatherineHanson/StormData/releases{/id}","deployments_url":"https://api.github.com/repos/KatherineHanson/StormData/deployments","created_at":"2016-08-30T23:12:48Z","updated_at":"2016-08-30T23:12:48Z","pushed_at":"2016-08-30T23:46:58Z","git_url":"git://github.com/KatherineHanson/StormData.git","ssh_url":"git@github.com:KatherineHanson/StormData.git","clone_url":"https://github.com/KatherineHanson/StormData.git","svn_url":"https://github.com/KatherineHanson/StormData","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"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/KatherineHanson/StormData/pulls/1"},"html":{"href":"https://github.com/KatherineHanson/StormData/pull/1"},"issue":{"href":"https://api.github.com/repos/KatherineHanson/StormData/issues/1"},"comments":{"href":"https://api.github.com/repos/KatherineHanson/StormData/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/KatherineHanson/StormData/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/KatherineHanson/StormData/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KatherineHanson/StormData/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/KatherineHanson/StormData/statuses/d687737a6d0c9d8cc302dd4081f1487f27328d97"}}}}
{"actor":{"display_login":"amysutedja"}}