{"action":"closed","issue":{"url":"https://api.github.com/repos/kevinwolz/hisafer/issues/100","repository_url":"https://api.github.com/repos/kevinwolz/hisafer","labels_url":"https://api.github.com/repos/kevinwolz/hisafer/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/kevinwolz/hisafer/issues/100/comments","events_url":"https://api.github.com/repos/kevinwolz/hisafer/issues/100/events","html_url":"https://github.com/kevinwolz/hisafer/issues/100","id":339096307,"node_id":"MDU6SXNzdWUzMzkwOTYzMDc=","number":100,"title":"Create plot function for displaying water table, root depth, and root senescence simultaneously ","user":{"login":"kevinwolz","id":11711566,"node_id":"MDQ6VXNlcjExNzExNTY2","avatar_url":"https://avatars1.githubusercontent.com/u/11711566?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinwolz","html_url":"https://github.com/kevinwolz","followers_url":"https://api.github.com/users/kevinwolz/followers","following_url":"https://api.github.com/users/kevinwolz/following{/other_user}","gists_url":"https://api.github.com/users/kevinwolz/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinwolz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinwolz/subscriptions","organizations_url":"https://api.github.com/users/kevinwolz/orgs","repos_url":"https://api.github.com/users/kevinwolz/repos","events_url":"https://api.github.com/users/kevinwolz/events{/privacy}","received_events_url":"https://api.github.com/users/kevinwolz/received_events","type":"User","site_admin":false},"labels":[{"id":746697600,"node_id":"MDU6TGFiZWw3NDY2OTc2MDA=","url":"https://api.github.com/repos/kevinwolz/hisafer/labels/feature%20request","name":"feature request","color":"0e20ba","default":false}],"state":"closed","locked":false,"assignee":{"login":"kevinwolz","id":11711566,"node_id":"MDQ6VXNlcjExNzExNTY2","avatar_url":"https://avatars1.githubusercontent.com/u/11711566?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinwolz","html_url":"https://github.com/kevinwolz","followers_url":"https://api.github.com/users/kevinwolz/followers","following_url":"https://api.github.com/users/kevinwolz/following{/other_user}","gists_url":"https://api.github.com/users/kevinwolz/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinwolz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinwolz/subscriptions","organizations_url":"https://api.github.com/users/kevinwolz/orgs","repos_url":"https://api.github.com/users/kevinwolz/repos","events_url":"https://api.github.com/users/kevinwolz/events{/privacy}","received_events_url":"https://api.github.com/users/kevinwolz/received_events","type":"User","site_admin":false},"assignees":[{"login":"kevinwolz","id":11711566,"node_id":"MDQ6VXNlcjExNzExNTY2","avatar_url":"https://avatars1.githubusercontent.com/u/11711566?v=4","gravatar_id":"","url":"https://api.github.com/users/kevinwolz","html_url":"https://github.com/kevinwolz","followers_url":"https://api.github.com/users/kevinwolz/followers","following_url":"https://api.github.com/users/kevinwolz/following{/other_user}","gists_url":"https://api.github.com/users/kevinwolz/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinwolz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinwolz/subscriptions","organizations_url":"https://api.github.com/users/kevinwolz/orgs","repos_url":"https://api.github.com/users/kevinwolz/repos","events_url":"https://api.github.com/users/kevinwolz/events{/privacy}","received_events_url":"https://api.github.com/users/kevinwolz/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-07-06T23:29:21Z","updated_at":"2018-08-01T15:59:24Z","closed_at":"2018-08-01T15:59:24Z","author_association":"OWNER","body":"Here's a start! Can only do one tree at a time. \r\n\r\nplot_water_table <- function(hop, simu.name, tree.id = 1) {\r\n  plot.data <- hop$trees %>%\r\n    dplyr::left_join(hop$plot, by = c(\"SimulationName\", \"Date\", \"Day\", \"Month\", \"Year\", \"JulianDay\", \"stepNum\")) %>%\r\n    dplyr::filter(SimulationName == simu.name) %>%\r\n    dplyr::filter(id == tree.id) %>%\r\n    dplyr::mutate(rootingDepth = -rootingDepth) %>%\r\n    tidyr::gather(key = \"component\", value = \"Depth\", waterTableDepth, rootingDepth) %>%\r\n    dplyr::select(SimulationName, Year, Date, JulianDay, component, Depth) %>%\r\n    dplyr::mutate(component = factor(component, \r\n                                     levels = c(\"rootingDepth\", \"waterTableDepth\"), \r\n                                     labels = c(\"Tree root\", \"Water table\")))\r\n  \r\n  ggplot(plot.data, aes(x = JulianDay, y = Depth, color = component)) +\r\n    labs(x = \"Day of year\", y = \"Depth (m)\", color = NULL) +\r\n    geom_line() +\r\n    scale_color_manual(values = c(\"black\", \"blue\")) +\r\n    facet_wrap(~Year, scales = \"free_x\")\r\n}"}}
{"actor":{"display_login":"kevinwolz"}}