{"action":"created","comment":{"url":"https://api.github.com/repos/mguerrap/tydal/pulls/comments/91449029","pull_request_review_id":11956701,"id":91449029,"diff_hunk":"@@ -0,0 +1,193 @@\n+import os\n+import glob\n+import numpy as np\n+import pandas as pd\n+import xarray as xr\n+import matplotlib.pyplot as plt\n+\n+\n+def load_Neah_Bay(datadir):\n+    \"\"\"\n+    Function to load the Neah Bay tidal station data from 2015 - 2016\n+    and returns a dataframe and a Datetime Index object\n+    Datadir is the directory path to where the data is located\n+    \"\"\"\n+    if not glob.glob(os.path.join(datadir, '*NeahBay.csv')):\n+        return None\n+    else:\n+        NeahBay_2014 = pd.read_csv(datadir + \"2014_NeahBay.csv\",\n+                                   parse_dates=['Date Time'],\n+                                   index_col=['Date Time'])\n+        NeahBay_2015 = pd.read_csv(datadir + \"2015_NeahBay.csv\",\n+                                   parse_dates=['Date Time'],\n+                                   index_col=['Date Time'])\n+        NeahBay_2016 = pd.read_csv(datadir + \"2016_NeahBay.csv\",\n+                                   parse_dates=['Date Time'],\n+                                   index_col=['Date Time'])\n+        NeahBay = NeahBay_2014.append(NeahBay_2015)\n+        NeahBay = NeahBay.append(NeahBay_2016)\n+        NeahBay.index.rename('datetime', inplace=True)\n+        return NeahBay\n+\n+\n+def load_Port_Townsend(datadir):\n+    \"\"\"\n+    Function to load the Port Townsend tidal station data from 2015\n+    & 2016. Supply the directory to where the csv files with the\n+    data are saved. Returns None if files are not located in\n+    specified directory.\n+    \"\"\"","path":"Module/tide_utils2.py","position":39,"original_position":39,"commit_id":"dce4570022d185c9b4d05507f0bb55faae6536e0","original_commit_id":"dce4570022d185c9b4d05507f0bb55faae6536e0","user":{"login":"zippelsf","id":22601523,"avatar_url":"https://avatars.githubusercontent.com/u/22601523?v=3","gravatar_id":"","url":"https://api.github.com/users/zippelsf","html_url":"https://github.com/zippelsf","followers_url":"https://api.github.com/users/zippelsf/followers","following_url":"https://api.github.com/users/zippelsf/following{/other_user}","gists_url":"https://api.github.com/users/zippelsf/gists{/gist_id}","starred_url":"https://api.github.com/users/zippelsf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zippelsf/subscriptions","organizations_url":"https://api.github.com/users/zippelsf/orgs","repos_url":"https://api.github.com/users/zippelsf/repos","events_url":"https://api.github.com/users/zippelsf/events{/privacy}","received_events_url":"https://api.github.com/users/zippelsf/received_events","type":"User","site_admin":false},"body":"This could be combined with the above function in a more general form by including the tidal set name as an input. That way you wouldn't have to repeat essentially the same code as three functions","created_at":"2016-12-08T05:50:21Z","updated_at":"2016-12-08T05:50:21Z","html_url":"https://github.com/mguerrap/tydal/pull/9#discussion_r91449029","pull_request_url":"https://api.github.com/repos/mguerrap/tydal/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/mguerrap/tydal/pulls/comments/91449029"},"html":{"href":"https://github.com/mguerrap/tydal/pull/9#discussion_r91449029"},"pull_request":{"href":"https://api.github.com/repos/mguerrap/tydal/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/mguerrap/tydal/pulls/9","id":97024353,"html_url":"https://github.com/mguerrap/tydal/pull/9","diff_url":"https://github.com/mguerrap/tydal/pull/9.diff","patch_url":"https://github.com/mguerrap/tydal/pull/9.patch","issue_url":"https://api.github.com/repos/mguerrap/tydal/issues/9","number":9,"state":"open","locked":false,"title":"Hi Seth, here is a copy for you to use for Homework 7. Sorry I haven'…","user":{"login":"reedan88","id":22527731,"avatar_url":"https://avatars.githubusercontent.com/u/22527731?v=3","gravatar_id":"","url":"https://api.github.com/users/reedan88","html_url":"https://github.com/reedan88","followers_url":"https://api.github.com/users/reedan88/followers","following_url":"https://api.github.com/users/reedan88/following{/other_user}","gists_url":"https://api.github.com/users/reedan88/gists{/gist_id}","starred_url":"https://api.github.com/users/reedan88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reedan88/subscriptions","organizations_url":"https://api.github.com/users/reedan88/orgs","repos_url":"https://api.github.com/users/reedan88/repos","events_url":"https://api.github.com/users/reedan88/events{/privacy}","received_events_url":"https://api.github.com/users/reedan88/received_events","type":"User","site_admin":false},"body":"…t had time to change any actual code from the original.","created_at":"2016-12-07T22:50:51Z","updated_at":"2016-12-08T05:54:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bd1f4c6114631971a0ec04696db07545893bd8ee","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mguerrap/tydal/pulls/9/commits","review_comments_url":"https://api.github.com/repos/mguerrap/tydal/pulls/9/comments","review_comment_url":"https://api.github.com/repos/mguerrap/tydal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mguerrap/tydal/issues/9/comments","statuses_url":"https://api.github.com/repos/mguerrap/tydal/statuses/dce4570022d185c9b4d05507f0bb55faae6536e0","head":{"label":"mguerrap:Andrew","ref":"Andrew","sha":"dce4570022d185c9b4d05507f0bb55faae6536e0","user":{"login":"mguerrap","id":22599580,"avatar_url":"https://avatars.githubusercontent.com/u/22599580?v=3","gravatar_id":"","url":"https://api.github.com/users/mguerrap","html_url":"https://github.com/mguerrap","followers_url":"https://api.github.com/users/mguerrap/followers","following_url":"https://api.github.com/users/mguerrap/following{/other_user}","gists_url":"https://api.github.com/users/mguerrap/gists{/gist_id}","starred_url":"https://api.github.com/users/mguerrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mguerrap/subscriptions","organizations_url":"https://api.github.com/users/mguerrap/orgs","repos_url":"https://api.github.com/users/mguerrap/repos","events_url":"https://api.github.com/users/mguerrap/events{/privacy}","received_events_url":"https://api.github.com/users/mguerrap/received_events","type":"User","site_admin":false},"repo":{"id":73741130,"name":"tydal","full_name":"mguerrap/tydal","owner":{"login":"mguerrap","id":22599580,"avatar_url":"https://avatars.githubusercontent.com/u/22599580?v=3","gravatar_id":"","url":"https://api.github.com/users/mguerrap","html_url":"https://github.com/mguerrap","followers_url":"https://api.github.com/users/mguerrap/followers","following_url":"https://api.github.com/users/mguerrap/following{/other_user}","gists_url":"https://api.github.com/users/mguerrap/gists{/gist_id}","starred_url":"https://api.github.com/users/mguerrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mguerrap/subscriptions","organizations_url":"https://api.github.com/users/mguerrap/orgs","repos_url":"https://api.github.com/users/mguerrap/repos","events_url":"https://api.github.com/users/mguerrap/events{/privacy}","received_events_url":"https://api.github.com/users/mguerrap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mguerrap/tydal","description":"A tool to analyse tidal currents through Admiralty Inlet in Puget Sound, WA.","fork":false,"url":"https://api.github.com/repos/mguerrap/tydal","forks_url":"https://api.github.com/repos/mguerrap/tydal/forks","keys_url":"https://api.github.com/repos/mguerrap/tydal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mguerrap/tydal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mguerrap/tydal/teams","hooks_url":"https://api.github.com/repos/mguerrap/tydal/hooks","issue_events_url":"https://api.github.com/repos/mguerrap/tydal/issues/events{/number}","events_url":"https://api.github.com/repos/mguerrap/tydal/events","assignees_url":"https://api.github.com/repos/mguerrap/tydal/assignees{/user}","branches_url":"https://api.github.com/repos/mguerrap/tydal/branches{/branch}","tags_url":"https://api.github.com/repos/mguerrap/tydal/tags","blobs_url":"https://api.github.com/repos/mguerrap/tydal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mguerrap/tydal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mguerrap/tydal/git/refs{/sha}","trees_url":"https://api.github.com/repos/mguerrap/tydal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mguerrap/tydal/statuses/{sha}","languages_url":"https://api.github.com/repos/mguerrap/tydal/languages","stargazers_url":"https://api.github.com/repos/mguerrap/tydal/stargazers","contributors_url":"https://api.github.com/repos/mguerrap/tydal/contributors","subscribers_url":"https://api.github.com/repos/mguerrap/tydal/subscribers","subscription_url":"https://api.github.com/repos/mguerrap/tydal/subscription","commits_url":"https://api.github.com/repos/mguerrap/tydal/commits{/sha}","git_commits_url":"https://api.github.com/repos/mguerrap/tydal/git/commits{/sha}","comments_url":"https://api.github.com/repos/mguerrap/tydal/comments{/number}","issue_comment_url":"https://api.github.com/repos/mguerrap/tydal/issues/comments{/number}","contents_url":"https://api.github.com/repos/mguerrap/tydal/contents/{+path}","compare_url":"https://api.github.com/repos/mguerrap/tydal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mguerrap/tydal/merges","archive_url":"https://api.github.com/repos/mguerrap/tydal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mguerrap/tydal/downloads","issues_url":"https://api.github.com/repos/mguerrap/tydal/issues{/number}","pulls_url":"https://api.github.com/repos/mguerrap/tydal/pulls{/number}","milestones_url":"https://api.github.com/repos/mguerrap/tydal/milestones{/number}","notifications_url":"https://api.github.com/repos/mguerrap/tydal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mguerrap/tydal/labels{/name}","releases_url":"https://api.github.com/repos/mguerrap/tydal/releases{/id}","deployments_url":"https://api.github.com/repos/mguerrap/tydal/deployments","created_at":"2016-11-14T19:46:52Z","updated_at":"2016-11-30T16:32:28Z","pushed_at":"2016-12-07T22:50:51Z","git_url":"git://github.com/mguerrap/tydal.git","ssh_url":"git@github.com:mguerrap/tydal.git","clone_url":"https://github.com/mguerrap/tydal.git","svn_url":"https://github.com/mguerrap/tydal","homepage":null,"size":16632,"stargazers_count":2,"watchers_count":2,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":2,"default_branch":"master"}},"base":{"label":"mguerrap:master","ref":"master","sha":"70ee1a057d0dc98aec882413d8080370cda892ca","user":{"login":"mguerrap","id":22599580,"avatar_url":"https://avatars.githubusercontent.com/u/22599580?v=3","gravatar_id":"","url":"https://api.github.com/users/mguerrap","html_url":"https://github.com/mguerrap","followers_url":"https://api.github.com/users/mguerrap/followers","following_url":"https://api.github.com/users/mguerrap/following{/other_user}","gists_url":"https://api.github.com/users/mguerrap/gists{/gist_id}","starred_url":"https://api.github.com/users/mguerrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mguerrap/subscriptions","organizations_url":"https://api.github.com/users/mguerrap/orgs","repos_url":"https://api.github.com/users/mguerrap/repos","events_url":"https://api.github.com/users/mguerrap/events{/privacy}","received_events_url":"https://api.github.com/users/mguerrap/received_events","type":"User","site_admin":false},"repo":{"id":73741130,"name":"tydal","full_name":"mguerrap/tydal","owner":{"login":"mguerrap","id":22599580,"avatar_url":"https://avatars.githubusercontent.com/u/22599580?v=3","gravatar_id":"","url":"https://api.github.com/users/mguerrap","html_url":"https://github.com/mguerrap","followers_url":"https://api.github.com/users/mguerrap/followers","following_url":"https://api.github.com/users/mguerrap/following{/other_user}","gists_url":"https://api.github.com/users/mguerrap/gists{/gist_id}","starred_url":"https://api.github.com/users/mguerrap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mguerrap/subscriptions","organizations_url":"https://api.github.com/users/mguerrap/orgs","repos_url":"https://api.github.com/users/mguerrap/repos","events_url":"https://api.github.com/users/mguerrap/events{/privacy}","received_events_url":"https://api.github.com/users/mguerrap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mguerrap/tydal","description":"A tool to analyse tidal currents through Admiralty Inlet in Puget Sound, WA.","fork":false,"url":"https://api.github.com/repos/mguerrap/tydal","forks_url":"https://api.github.com/repos/mguerrap/tydal/forks","keys_url":"https://api.github.com/repos/mguerrap/tydal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mguerrap/tydal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mguerrap/tydal/teams","hooks_url":"https://api.github.com/repos/mguerrap/tydal/hooks","issue_events_url":"https://api.github.com/repos/mguerrap/tydal/issues/events{/number}","events_url":"https://api.github.com/repos/mguerrap/tydal/events","assignees_url":"https://api.github.com/repos/mguerrap/tydal/assignees{/user}","branches_url":"https://api.github.com/repos/mguerrap/tydal/branches{/branch}","tags_url":"https://api.github.com/repos/mguerrap/tydal/tags","blobs_url":"https://api.github.com/repos/mguerrap/tydal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mguerrap/tydal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mguerrap/tydal/git/refs{/sha}","trees_url":"https://api.github.com/repos/mguerrap/tydal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mguerrap/tydal/statuses/{sha}","languages_url":"https://api.github.com/repos/mguerrap/tydal/languages","stargazers_url":"https://api.github.com/repos/mguerrap/tydal/stargazers","contributors_url":"https://api.github.com/repos/mguerrap/tydal/contributors","subscribers_url":"https://api.github.com/repos/mguerrap/tydal/subscribers","subscription_url":"https://api.github.com/repos/mguerrap/tydal/subscription","commits_url":"https://api.github.com/repos/mguerrap/tydal/commits{/sha}","git_commits_url":"https://api.github.com/repos/mguerrap/tydal/git/commits{/sha}","comments_url":"https://api.github.com/repos/mguerrap/tydal/comments{/number}","issue_comment_url":"https://api.github.com/repos/mguerrap/tydal/issues/comments{/number}","contents_url":"https://api.github.com/repos/mguerrap/tydal/contents/{+path}","compare_url":"https://api.github.com/repos/mguerrap/tydal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mguerrap/tydal/merges","archive_url":"https://api.github.com/repos/mguerrap/tydal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mguerrap/tydal/downloads","issues_url":"https://api.github.com/repos/mguerrap/tydal/issues{/number}","pulls_url":"https://api.github.com/repos/mguerrap/tydal/pulls{/number}","milestones_url":"https://api.github.com/repos/mguerrap/tydal/milestones{/number}","notifications_url":"https://api.github.com/repos/mguerrap/tydal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mguerrap/tydal/labels{/name}","releases_url":"https://api.github.com/repos/mguerrap/tydal/releases{/id}","deployments_url":"https://api.github.com/repos/mguerrap/tydal/deployments","created_at":"2016-11-14T19:46:52Z","updated_at":"2016-11-30T16:32:28Z","pushed_at":"2016-12-07T22:50:51Z","git_url":"git://github.com/mguerrap/tydal.git","ssh_url":"git@github.com:mguerrap/tydal.git","clone_url":"https://github.com/mguerrap/tydal.git","svn_url":"https://github.com/mguerrap/tydal","homepage":null,"size":16632,"stargazers_count":2,"watchers_count":2,"language":"Jupyter Notebook","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mguerrap/tydal/pulls/9"},"html":{"href":"https://github.com/mguerrap/tydal/pull/9"},"issue":{"href":"https://api.github.com/repos/mguerrap/tydal/issues/9"},"comments":{"href":"https://api.github.com/repos/mguerrap/tydal/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/mguerrap/tydal/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/mguerrap/tydal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mguerrap/tydal/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/mguerrap/tydal/statuses/dce4570022d185c9b4d05507f0bb55faae6536e0"}}}}
{"actor":{"display_login":"zippelsf"}}