{"action":"created","issue":{"url":"https://api.github.com/repos/projectmesa/mesa/issues/247","repository_url":"https://api.github.com/repos/projectmesa/mesa","labels_url":"https://api.github.com/repos/projectmesa/mesa/issues/247/labels{/name}","comments_url":"https://api.github.com/repos/projectmesa/mesa/issues/247/comments","events_url":"https://api.github.com/repos/projectmesa/mesa/issues/247/events","html_url":"https://github.com/projectmesa/mesa/pull/247","id":158476833,"number":247,"title":"WIP: introduce Visualizer for rendering in notebooks.","user":{"login":"smacleod","id":1317296,"avatar_url":"https://avatars.githubusercontent.com/u/1317296?v=3","gravatar_id":"","url":"https://api.github.com/users/smacleod","html_url":"https://github.com/smacleod","followers_url":"https://api.github.com/users/smacleod/followers","following_url":"https://api.github.com/users/smacleod/following{/other_user}","gists_url":"https://api.github.com/users/smacleod/gists{/gist_id}","starred_url":"https://api.github.com/users/smacleod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smacleod/subscriptions","organizations_url":"https://api.github.com/users/smacleod/orgs","repos_url":"https://api.github.com/users/smacleod/repos","events_url":"https://api.github.com/users/smacleod/events{/privacy}","received_events_url":"https://api.github.com/users/smacleod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-06-04T00:20:35Z","updated_at":"2016-06-06T17:01:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/projectmesa/mesa/pulls/247","html_url":"https://github.com/projectmesa/mesa/pull/247","diff_url":"https://github.com/projectmesa/mesa/pull/247.diff","patch_url":"https://github.com/projectmesa/mesa/pull/247.patch"},"body":"This change is a Work In Progress.\r\n\r\nIt should be possible to render Mesa's javascript visualizations\r\ndirectly in jupyter notebook cells, where the model has been defined in\r\nthe notebook itself.\r\n\r\nThis introduces a helper Visualizer class which will inject the required\r\njavascript into the notebook, deal with running the model and, and\r\nsending the updated state data to the notebook.\r\n\r\nThis change is dependent upon #239\r\n\r\nfixes #246"},"comment":{"url":"https://api.github.com/repos/projectmesa/mesa/issues/comments/224020738","html_url":"https://github.com/projectmesa/mesa/pull/247#issuecomment-224020738","issue_url":"https://api.github.com/repos/projectmesa/mesa/issues/247","id":224020738,"user":{"login":"smacleod","id":1317296,"avatar_url":"https://avatars.githubusercontent.com/u/1317296?v=3","gravatar_id":"","url":"https://api.github.com/users/smacleod","html_url":"https://github.com/smacleod","followers_url":"https://api.github.com/users/smacleod/followers","following_url":"https://api.github.com/users/smacleod/following{/other_user}","gists_url":"https://api.github.com/users/smacleod/gists{/gist_id}","starred_url":"https://api.github.com/users/smacleod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smacleod/subscriptions","organizations_url":"https://api.github.com/users/smacleod/orgs","repos_url":"https://api.github.com/users/smacleod/repos","events_url":"https://api.github.com/users/smacleod/events{/privacy}","received_events_url":"https://api.github.com/users/smacleod/received_events","type":"User","site_admin":false},"created_at":"2016-06-06T17:01:12Z","updated_at":"2016-06-06T17:01:12Z","body":"> Turned out I didn't have ipywidgets installed, so I needed to install / enable that.\r\n\r\nAh, good call, we'll need to add some documentation around this.\r\n\r\n> At the moment, just importing the `Visualizer` class from `mesa.visualization.ipython` isn't enough, and `MESA_VISUALIZER_ID_COUNT` also needs to be imported. Is there a reason to have that as a global variable and not a Visualizer property?\r\n\r\nNo good reason for any of this. I actually prototyped the `Visualizer` by writing it in a notebook cell itself rather as a module of mesa - I was running out of time at the sprint so this pull request was put together pretty haphazardly. Definitely will need cleanup.\r\n\r\n> The visualization doesn't render until the first time \"Step the Model\" is pressed.\r\n\r\nYa, there are some UX warts. I was actually thinking the controls would be expanded giving the user the ability to run the model at some steps per second etc. - similar to the current visualization server UI. I'm no expert with in notebook animation or ipython widgets though, so we'll definitely need to do some exploring with respect to what's possible and makes sense.\r\n\r\n> Seriously, this will be an amazing new feature.\r\n\r\nYay! 😀 \r\n\r\n> I'm going to dive a bit more into this code and into how widgets work, to get a better idea of what's going on and how to help. \r\n\r\nAwesome. Just keep in mind this is more of a prototype with lots of room for improvement in the way we inject the JS and render things etc. So if you find something strange that's probably why."}}
{"actor":{"display_login":"smacleod"}}