{"action":"created","issue":{"url":"https://api.github.com/repos/achubaty/grainscape/issues/47","repository_url":"https://api.github.com/repos/achubaty/grainscape","labels_url":"https://api.github.com/repos/achubaty/grainscape/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/achubaty/grainscape/issues/47/comments","events_url":"https://api.github.com/repos/achubaty/grainscape/issues/47/events","html_url":"https://github.com/achubaty/grainscape/issues/47","id":243025318,"number":47,"title":"Implement two simple ggplotting helpers","user":{"login":"ecologics","id":17838640,"avatar_url":"https://avatars4.githubusercontent.com/u/17838640?v=4","gravatar_id":"","url":"https://api.github.com/users/ecologics","html_url":"https://github.com/ecologics","followers_url":"https://api.github.com/users/ecologics/followers","following_url":"https://api.github.com/users/ecologics/following{/other_user}","gists_url":"https://api.github.com/users/ecologics/gists{/gist_id}","starred_url":"https://api.github.com/users/ecologics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecologics/subscriptions","organizations_url":"https://api.github.com/users/ecologics/orgs","repos_url":"https://api.github.com/users/ecologics/repos","events_url":"https://api.github.com/users/ecologics/events{/privacy}","received_events_url":"https://api.github.com/users/ecologics/received_events","type":"User","site_admin":false},"labels":[{"id":403895817,"url":"https://api.github.com/repos/achubaty/grainscape/labels/enhancement","name":"enhancement","color":"fef2c0","default":true}],"state":"open","locked":false,"assignee":{"login":"ecologics","id":17838640,"avatar_url":"https://avatars4.githubusercontent.com/u/17838640?v=4","gravatar_id":"","url":"https://api.github.com/users/ecologics","html_url":"https://github.com/ecologics","followers_url":"https://api.github.com/users/ecologics/followers","following_url":"https://api.github.com/users/ecologics/following{/other_user}","gists_url":"https://api.github.com/users/ecologics/gists{/gist_id}","starred_url":"https://api.github.com/users/ecologics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecologics/subscriptions","organizations_url":"https://api.github.com/users/ecologics/orgs","repos_url":"https://api.github.com/users/ecologics/repos","events_url":"https://api.github.com/users/ecologics/events{/privacy}","received_events_url":"https://api.github.com/users/ecologics/received_events","type":"User","site_admin":false},"assignees":[{"login":"ecologics","id":17838640,"avatar_url":"https://avatars4.githubusercontent.com/u/17838640?v=4","gravatar_id":"","url":"https://api.github.com/users/ecologics","html_url":"https://github.com/ecologics","followers_url":"https://api.github.com/users/ecologics/followers","following_url":"https://api.github.com/users/ecologics/following{/other_user}","gists_url":"https://api.github.com/users/ecologics/gists{/gist_id}","starred_url":"https://api.github.com/users/ecologics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ecologics/subscriptions","organizations_url":"https://api.github.com/users/ecologics/orgs","repos_url":"https://api.github.com/users/ecologics/repos","events_url":"https://api.github.com/users/ecologics/events{/privacy}","received_events_url":"https://api.github.com/users/ecologics/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2017-07-14T15:09:08Z","updated_at":"2017-07-14T20:21:17Z","closed_at":null,"body":"I am going back and forth on this.  I think a middle ground is appropriate.\r\n\r\nI propose the following:\r\n\r\nA new function called `ggGS()` which is very simple.  It will take either an `MPG` or `grain` object and a second parameter with the slot name, and possibly a third parameter. \r\n\r\n If it is a raster it will prep that raster by turning it into a `data.frame` with columns `x`, `y`, and `value` so that it can be used with `geom_raster()` in `ggplot2` as follows:\r\n\r\n```r\r\nggplot() + geom_raster(ggGS(myMPG, \"patchId\"), aes(x=x, y=y, fill=value)\r\n```\r\n\r\nIf it is an `igraph` object and a `type` parameter `='node'` it will produce a `data.frame` with the nodes and attributes.  If `type='link'` it will produce a `data.frame` with the links, their endpoints and attributes.  For example:\r\n\r\n```r\r\nggplot() + geom_segment(ggGS(myMPG, \"mpg\", \"link\"), aes( ...)) # etc\r\n```\r\n\r\nIn this sense it is basically a fortify tool for tidying objects for ggplotting.\r\n\r\nWhen this functionality is developed, it will be simple to create a `plot()` for class `MPG` and `grain` that takes a second variable specifying the type of plot.  It will then wrap these calls to produce canned quick visualizations with various other elements (e.g. themes, scales and layouts) preset for a fast look at the state of the data.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/achubaty/grainscape/issues/comments/315458049","html_url":"https://github.com/achubaty/grainscape/issues/47#issuecomment-315458049","issue_url":"https://api.github.com/repos/achubaty/grainscape/issues/47","id":315458049,"user":{"login":"achubaty","id":3435577,"avatar_url":"https://avatars6.githubusercontent.com/u/3435577?v=4","gravatar_id":"","url":"https://api.github.com/users/achubaty","html_url":"https://github.com/achubaty","followers_url":"https://api.github.com/users/achubaty/followers","following_url":"https://api.github.com/users/achubaty/following{/other_user}","gists_url":"https://api.github.com/users/achubaty/gists{/gist_id}","starred_url":"https://api.github.com/users/achubaty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achubaty/subscriptions","organizations_url":"https://api.github.com/users/achubaty/orgs","repos_url":"https://api.github.com/users/achubaty/repos","events_url":"https://api.github.com/users/achubaty/events{/privacy}","received_events_url":"https://api.github.com/users/achubaty/received_events","type":"User","site_admin":false},"created_at":"2017-07-14T20:21:17Z","updated_at":"2017-07-14T20:21:17Z","body":"i'm just pushing the last of my cleanup/fixes. please make sure you are up to date before making further changes"}}
{"actor":{"display_login":"achubaty"}}