{"action":"created","comment":{"url":"https://api.github.com/repos/USGS-R/repgen/pulls/comments/98557909","pull_request_review_id":19200763,"id":98557909,"diff_hunk":"@@ -126,17 +138,28 @@ parseDVMinMaxIVs <- function(reportObject, timezone, type, invertedFlag, exclude\n #' vertical lines connecting the steps between those TS.\n #' @param stat the parsed non-estimated time series\n #' @param est the parsed estimated time series\n+#' @param excludeZeroNegativeFlag whether or not zero / negative values\n+#' will be removed\n #' @return a list of vertical lines connecting steps between stat and est\n #' @importFrom dplyr arrange\n-getEstimatedEdges <- function(stat, est){\n+#' @return a list of the edges with the folowing columns time, y0, y1,\n+#' and newSet. Time is the x position of the edge, y0 is the first y\n+#' value and y1 is the second. newSet is what the next time series is\n+getEstimatedEdges <- function(stat, est, excludeZeroNegativeFlag=NULL){\n   estEdges <- list()\n \n-  if(isEmptyOrBlank(est[['value']]) || isEmptyOrBlank(stat[['value']])){\n+  if(is.null(stat) || is.null(est) || isEmptyOrBlank(est[['points']][['value']]) || isEmptyOrBlank(stat[['points']][['value']])){\n     return(NULL)\n   }\n-  \n-  est <- est[c('time', 'value')]\n-  stat <- stat[c('time', 'value')]\n+\n+  #Don't render edges for values that will be removed if we are exculding zero and negative values\n+  if(!is.null(excludeZeroNegativeFlag) && excludeZeroNegativeFlag){\n+    stat[['points']] <- removeZeroNegative(stat[['points']])\n+    est[['points']] <- removeZeroNegative(est[['points']])\n+  }\n+\n+  est <- est[['points']][c('time', 'value')]\n+  stat <- stat[['points']][c('time', 'value')]","path":"R/dvhydrograph-data.R","position":132,"original_position":132,"commit_id":"ef9642e1c9dcad6115d883d511c9851ef535572f","original_commit_id":"ef9642e1c9dcad6115d883d511c9851ef535572f","user":{"login":"lindsaycarr","id":13220910,"avatar_url":"https://avatars.githubusercontent.com/u/13220910?v=3","gravatar_id":"","url":"https://api.github.com/users/lindsaycarr","html_url":"https://github.com/lindsaycarr","followers_url":"https://api.github.com/users/lindsaycarr/followers","following_url":"https://api.github.com/users/lindsaycarr/following{/other_user}","gists_url":"https://api.github.com/users/lindsaycarr/gists{/gist_id}","starred_url":"https://api.github.com/users/lindsaycarr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lindsaycarr/subscriptions","organizations_url":"https://api.github.com/users/lindsaycarr/orgs","repos_url":"https://api.github.com/users/lindsaycarr/repos","events_url":"https://api.github.com/users/lindsaycarr/events{/privacy}","received_events_url":"https://api.github.com/users/lindsaycarr/received_events","type":"User","site_admin":false},"body":"what do these two lines do?","created_at":"2017-01-30T22:31:01Z","updated_at":"2017-01-30T23:01:03Z","html_url":"https://github.com/USGS-R/repgen/pull/556#discussion_r98557909","pull_request_url":"https://api.github.com/repos/USGS-R/repgen/pulls/556","_links":{"self":{"href":"https://api.github.com/repos/USGS-R/repgen/pulls/comments/98557909"},"html":{"href":"https://github.com/USGS-R/repgen/pull/556#discussion_r98557909"},"pull_request":{"href":"https://api.github.com/repos/USGS-R/repgen/pulls/556"}}},"pull_request":{"url":"https://api.github.com/repos/USGS-R/repgen/pulls/556","id":103367421,"html_url":"https://github.com/USGS-R/repgen/pull/556","diff_url":"https://github.com/USGS-R/repgen/pull/556.diff","patch_url":"https://github.com/USGS-R/repgen/pull/556.patch","issue_url":"https://api.github.com/repos/USGS-R/repgen/issues/556","number":556,"state":"open","locked":false,"title":"AQCU-991: Continued DV Hydro refactor","user":{"login":"zmoore-usgs","id":20842403,"avatar_url":"https://avatars.githubusercontent.com/u/20842403?v=3","gravatar_id":"","url":"https://api.github.com/users/zmoore-usgs","html_url":"https://github.com/zmoore-usgs","followers_url":"https://api.github.com/users/zmoore-usgs/followers","following_url":"https://api.github.com/users/zmoore-usgs/following{/other_user}","gists_url":"https://api.github.com/users/zmoore-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/zmoore-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmoore-usgs/subscriptions","organizations_url":"https://api.github.com/users/zmoore-usgs/orgs","repos_url":"https://api.github.com/users/zmoore-usgs/repos","events_url":"https://api.github.com/users/zmoore-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/zmoore-usgs/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-01-26T18:59:28Z","updated_at":"2017-01-30T23:01:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"523ef373975892abfba31e09af96839f7e222775","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/USGS-R/repgen/pulls/556/commits","review_comments_url":"https://api.github.com/repos/USGS-R/repgen/pulls/556/comments","review_comment_url":"https://api.github.com/repos/USGS-R/repgen/pulls/comments{/number}","comments_url":"https://api.github.com/repos/USGS-R/repgen/issues/556/comments","statuses_url":"https://api.github.com/repos/USGS-R/repgen/statuses/ef9642e1c9dcad6115d883d511c9851ef535572f","head":{"label":"zmoore-usgs:feature/refactor-dv-hydro","ref":"feature/refactor-dv-hydro","sha":"ef9642e1c9dcad6115d883d511c9851ef535572f","user":{"login":"zmoore-usgs","id":20842403,"avatar_url":"https://avatars.githubusercontent.com/u/20842403?v=3","gravatar_id":"","url":"https://api.github.com/users/zmoore-usgs","html_url":"https://github.com/zmoore-usgs","followers_url":"https://api.github.com/users/zmoore-usgs/followers","following_url":"https://api.github.com/users/zmoore-usgs/following{/other_user}","gists_url":"https://api.github.com/users/zmoore-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/zmoore-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmoore-usgs/subscriptions","organizations_url":"https://api.github.com/users/zmoore-usgs/orgs","repos_url":"https://api.github.com/users/zmoore-usgs/repos","events_url":"https://api.github.com/users/zmoore-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/zmoore-usgs/received_events","type":"User","site_admin":false},"repo":{"id":65741799,"name":"repgen","full_name":"zmoore-usgs/repgen","owner":{"login":"zmoore-usgs","id":20842403,"avatar_url":"https://avatars.githubusercontent.com/u/20842403?v=3","gravatar_id":"","url":"https://api.github.com/users/zmoore-usgs","html_url":"https://github.com/zmoore-usgs","followers_url":"https://api.github.com/users/zmoore-usgs/followers","following_url":"https://api.github.com/users/zmoore-usgs/following{/other_user}","gists_url":"https://api.github.com/users/zmoore-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/zmoore-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zmoore-usgs/subscriptions","organizations_url":"https://api.github.com/users/zmoore-usgs/orgs","repos_url":"https://api.github.com/users/zmoore-usgs/repos","events_url":"https://api.github.com/users/zmoore-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/zmoore-usgs/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zmoore-usgs/repgen","description":"report generation in R","fork":true,"url":"https://api.github.com/repos/zmoore-usgs/repgen","forks_url":"https://api.github.com/repos/zmoore-usgs/repgen/forks","keys_url":"https://api.github.com/repos/zmoore-usgs/repgen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zmoore-usgs/repgen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zmoore-usgs/repgen/teams","hooks_url":"https://api.github.com/repos/zmoore-usgs/repgen/hooks","issue_events_url":"https://api.github.com/repos/zmoore-usgs/repgen/issues/events{/number}","events_url":"https://api.github.com/repos/zmoore-usgs/repgen/events","assignees_url":"https://api.github.com/repos/zmoore-usgs/repgen/assignees{/user}","branches_url":"https://api.github.com/repos/zmoore-usgs/repgen/branches{/branch}","tags_url":"https://api.github.com/repos/zmoore-usgs/repgen/tags","blobs_url":"https://api.github.com/repos/zmoore-usgs/repgen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zmoore-usgs/repgen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zmoore-usgs/repgen/git/refs{/sha}","trees_url":"https://api.github.com/repos/zmoore-usgs/repgen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zmoore-usgs/repgen/statuses/{sha}","languages_url":"https://api.github.com/repos/zmoore-usgs/repgen/languages","stargazers_url":"https://api.github.com/repos/zmoore-usgs/repgen/stargazers","contributors_url":"https://api.github.com/repos/zmoore-usgs/repgen/contributors","subscribers_url":"https://api.github.com/repos/zmoore-usgs/repgen/subscribers","subscription_url":"https://api.github.com/repos/zmoore-usgs/repgen/subscription","commits_url":"https://api.github.com/repos/zmoore-usgs/repgen/commits{/sha}","git_commits_url":"https://api.github.com/repos/zmoore-usgs/repgen/git/commits{/sha}","comments_url":"https://api.github.com/repos/zmoore-usgs/repgen/comments{/number}","issue_comment_url":"https://api.github.com/repos/zmoore-usgs/repgen/issues/comments{/number}","contents_url":"https://api.github.com/repos/zmoore-usgs/repgen/contents/{+path}","compare_url":"https://api.github.com/repos/zmoore-usgs/repgen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zmoore-usgs/repgen/merges","archive_url":"https://api.github.com/repos/zmoore-usgs/repgen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zmoore-usgs/repgen/downloads","issues_url":"https://api.github.com/repos/zmoore-usgs/repgen/issues{/number}","pulls_url":"https://api.github.com/repos/zmoore-usgs/repgen/pulls{/number}","milestones_url":"https://api.github.com/repos/zmoore-usgs/repgen/milestones{/number}","notifications_url":"https://api.github.com/repos/zmoore-usgs/repgen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zmoore-usgs/repgen/labels{/name}","releases_url":"https://api.github.com/repos/zmoore-usgs/repgen/releases{/id}","deployments_url":"https://api.github.com/repos/zmoore-usgs/repgen/deployments","created_at":"2016-08-15T15:12:50Z","updated_at":"2016-08-15T15:12:51Z","pushed_at":"2017-01-30T22:57:25Z","git_url":"git://github.com/zmoore-usgs/repgen.git","ssh_url":"git@github.com:zmoore-usgs/repgen.git","clone_url":"https://github.com/zmoore-usgs/repgen.git","svn_url":"https://github.com/zmoore-usgs/repgen","homepage":null,"size":13201,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"USGS-R:master","ref":"master","sha":"9eb0cd972dd20f8ea36be9b1f70d9e81668ad907","user":{"login":"USGS-R","id":3188813,"avatar_url":"https://avatars.githubusercontent.com/u/3188813?v=3","gravatar_id":"","url":"https://api.github.com/users/USGS-R","html_url":"https://github.com/USGS-R","followers_url":"https://api.github.com/users/USGS-R/followers","following_url":"https://api.github.com/users/USGS-R/following{/other_user}","gists_url":"https://api.github.com/users/USGS-R/gists{/gist_id}","starred_url":"https://api.github.com/users/USGS-R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/USGS-R/subscriptions","organizations_url":"https://api.github.com/users/USGS-R/orgs","repos_url":"https://api.github.com/users/USGS-R/repos","events_url":"https://api.github.com/users/USGS-R/events{/privacy}","received_events_url":"https://api.github.com/users/USGS-R/received_events","type":"Organization","site_admin":false},"repo":{"id":31678130,"name":"repgen","full_name":"USGS-R/repgen","owner":{"login":"USGS-R","id":3188813,"avatar_url":"https://avatars.githubusercontent.com/u/3188813?v=3","gravatar_id":"","url":"https://api.github.com/users/USGS-R","html_url":"https://github.com/USGS-R","followers_url":"https://api.github.com/users/USGS-R/followers","following_url":"https://api.github.com/users/USGS-R/following{/other_user}","gists_url":"https://api.github.com/users/USGS-R/gists{/gist_id}","starred_url":"https://api.github.com/users/USGS-R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/USGS-R/subscriptions","organizations_url":"https://api.github.com/users/USGS-R/orgs","repos_url":"https://api.github.com/users/USGS-R/repos","events_url":"https://api.github.com/users/USGS-R/events{/privacy}","received_events_url":"https://api.github.com/users/USGS-R/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/USGS-R/repgen","description":"report generation in R","fork":false,"url":"https://api.github.com/repos/USGS-R/repgen","forks_url":"https://api.github.com/repos/USGS-R/repgen/forks","keys_url":"https://api.github.com/repos/USGS-R/repgen/keys{/key_id}","collaborators_url":"https://api.github.com/repos/USGS-R/repgen/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/USGS-R/repgen/teams","hooks_url":"https://api.github.com/repos/USGS-R/repgen/hooks","issue_events_url":"https://api.github.com/repos/USGS-R/repgen/issues/events{/number}","events_url":"https://api.github.com/repos/USGS-R/repgen/events","assignees_url":"https://api.github.com/repos/USGS-R/repgen/assignees{/user}","branches_url":"https://api.github.com/repos/USGS-R/repgen/branches{/branch}","tags_url":"https://api.github.com/repos/USGS-R/repgen/tags","blobs_url":"https://api.github.com/repos/USGS-R/repgen/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/USGS-R/repgen/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/USGS-R/repgen/git/refs{/sha}","trees_url":"https://api.github.com/repos/USGS-R/repgen/git/trees{/sha}","statuses_url":"https://api.github.com/repos/USGS-R/repgen/statuses/{sha}","languages_url":"https://api.github.com/repos/USGS-R/repgen/languages","stargazers_url":"https://api.github.com/repos/USGS-R/repgen/stargazers","contributors_url":"https://api.github.com/repos/USGS-R/repgen/contributors","subscribers_url":"https://api.github.com/repos/USGS-R/repgen/subscribers","subscription_url":"https://api.github.com/repos/USGS-R/repgen/subscription","commits_url":"https://api.github.com/repos/USGS-R/repgen/commits{/sha}","git_commits_url":"https://api.github.com/repos/USGS-R/repgen/git/commits{/sha}","comments_url":"https://api.github.com/repos/USGS-R/repgen/comments{/number}","issue_comment_url":"https://api.github.com/repos/USGS-R/repgen/issues/comments{/number}","contents_url":"https://api.github.com/repos/USGS-R/repgen/contents/{+path}","compare_url":"https://api.github.com/repos/USGS-R/repgen/compare/{base}...{head}","merges_url":"https://api.github.com/repos/USGS-R/repgen/merges","archive_url":"https://api.github.com/repos/USGS-R/repgen/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/USGS-R/repgen/downloads","issues_url":"https://api.github.com/repos/USGS-R/repgen/issues{/number}","pulls_url":"https://api.github.com/repos/USGS-R/repgen/pulls{/number}","milestones_url":"https://api.github.com/repos/USGS-R/repgen/milestones{/number}","notifications_url":"https://api.github.com/repos/USGS-R/repgen/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/USGS-R/repgen/labels{/name}","releases_url":"https://api.github.com/repos/USGS-R/repgen/releases{/id}","deployments_url":"https://api.github.com/repos/USGS-R/repgen/deployments","created_at":"2015-03-04T20:24:02Z","updated_at":"2016-10-24T17:01:53Z","pushed_at":"2017-01-30T21:10:23Z","git_url":"git://github.com/USGS-R/repgen.git","ssh_url":"git@github.com:USGS-R/repgen.git","clone_url":"https://github.com/USGS-R/repgen.git","svn_url":"https://github.com/USGS-R/repgen","homepage":null,"size":13090,"stargazers_count":7,"watchers_count":7,"language":"R","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"open_issues_count":9,"forks":12,"open_issues":9,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/USGS-R/repgen/pulls/556"},"html":{"href":"https://github.com/USGS-R/repgen/pull/556"},"issue":{"href":"https://api.github.com/repos/USGS-R/repgen/issues/556"},"comments":{"href":"https://api.github.com/repos/USGS-R/repgen/issues/556/comments"},"review_comments":{"href":"https://api.github.com/repos/USGS-R/repgen/pulls/556/comments"},"review_comment":{"href":"https://api.github.com/repos/USGS-R/repgen/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/USGS-R/repgen/pulls/556/commits"},"statuses":{"href":"https://api.github.com/repos/USGS-R/repgen/statuses/ef9642e1c9dcad6115d883d511c9851ef535572f"}}}}
{"actor":{"display_login":"lindsaycarr"}}