{"action":"created","issue":{"url":"https://api.github.com/repos/bcgov/WES-engagement-states/issues/5","repository_url":"https://api.github.com/repos/bcgov/WES-engagement-states","labels_url":"https://api.github.com/repos/bcgov/WES-engagement-states/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/bcgov/WES-engagement-states/issues/5/comments","events_url":"https://api.github.com/repos/bcgov/WES-engagement-states/issues/5/events","html_url":"https://github.com/bcgov/WES-engagement-states/issues/5","id":178800620,"number":5,"title":"Look into making engagement plot interactive","user":{"login":"daattali","id":952340,"avatar_url":"https://avatars.githubusercontent.com/u/952340?v=3","gravatar_id":"","url":"https://api.github.com/users/daattali","html_url":"https://github.com/daattali","followers_url":"https://api.github.com/users/daattali/followers","following_url":"https://api.github.com/users/daattali/following{/other_user}","gists_url":"https://api.github.com/users/daattali/gists{/gist_id}","starred_url":"https://api.github.com/users/daattali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daattali/subscriptions","organizations_url":"https://api.github.com/users/daattali/orgs","repos_url":"https://api.github.com/users/daattali/repos","events_url":"https://api.github.com/users/daattali/events{/privacy}","received_events_url":"https://api.github.com/users/daattali/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-23T07:04:12Z","updated_at":"2016-09-28T22:50:17Z","closed_at":null,"body":"I spent some time trying to convert the static ggplot2 engagement plot into an interactive plot, but it seems like there are simply no packages that are as powerful as ggplot2. Everything I try that supports interactivity has some problems. Try again later!"},"comment":{"url":"https://api.github.com/repos/bcgov/WES-engagement-states/issues/comments/250324406","html_url":"https://github.com/bcgov/WES-engagement-states/issues/5#issuecomment-250324406","issue_url":"https://api.github.com/repos/bcgov/WES-engagement-states/issues/5","id":250324406,"user":{"login":"daattali","id":952340,"avatar_url":"https://avatars.githubusercontent.com/u/952340?v=3","gravatar_id":"","url":"https://api.github.com/users/daattali","html_url":"https://github.com/daattali","followers_url":"https://api.github.com/users/daattali/followers","following_url":"https://api.github.com/users/daattali/following{/other_user}","gists_url":"https://api.github.com/users/daattali/gists{/gist_id}","starred_url":"https://api.github.com/users/daattali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daattali/subscriptions","organizations_url":"https://api.github.com/users/daattali/orgs","repos_url":"https://api.github.com/users/daattali/repos","events_url":"https://api.github.com/users/daattali/events{/privacy}","received_events_url":"https://api.github.com/users/daattali/received_events","type":"User","site_admin":false},"created_at":"2016-09-28T22:50:17Z","updated_at":"2016-09-28T22:50:17Z","body":"Unfortunately it seems like ggplot2 is still a few levels above all other visualization packages, and it's impossible to recreate the same plot in an interactive environment.  The closest I could get is using the following code (using `plotly` package, the biggest disadvantage here is that the legend doesn't get generated)\r\n\r\n```\r\nlayout(ggplotly(ggplot(\r\n    data,\r\n    aes(x = Commitment, y = Satisfaction,\r\n        text = paste0(Engagement.State, \" (\", Percent, \"%)\"), text2 = Satisfaction, text3 = Commitment,\r\n        fill = Engagement.State)) +\r\n        geom_vline(xintercept = mean_commitment, col = \"#555555\") +\r\n        geom_hline(yintercept = mean_satisfaction, col = \"#555555\") +\r\n        geom_point(aes(size = Percent), \r\n                   shape = 21, colour = \"black\", alpha=0.9) +\r\n        scale_size_area(max_size = 30, guide = FALSE) + \r\n        xlim(0, 120) + ylim(0, 120) +\r\n        scale_fill_manual(values = PLOT_COLS) +\r\n        theme_bw(26) +\r\n        guides(fill = guide_legend(\"Engagement State\",\r\n                                   override.aes = list(size = 4))) +\r\n        theme(legend.key = element_blank(), panel.grid.minor = element_blank(),\r\n              legend.key.height = unit(1.5, \"line\")),\r\n         tooltip=c(\"text\", \"text2\", \"text3\")),\r\n      showlegend = FALSE) %>%\r\n    config(displayModeBar = 'hover', displaylogo = FALSE) %>%\r\n    layout(xaxis=list(fixedrange=TRUE)) %>% layout(yaxis=list(fixedrange=TRUE))\r\n```"}}
{"actor":{"display_login":"daattali"}}