{"action":"created","issue":{"url":"https://api.github.com/repos/projectmesa/mesa/issues/143","labels_url":"https://api.github.com/repos/projectmesa/mesa/issues/143/labels{/name}","comments_url":"https://api.github.com/repos/projectmesa/mesa/issues/143/comments","events_url":"https://api.github.com/repos/projectmesa/mesa/issues/143/events","html_url":"https://github.com/projectmesa/mesa/issues/143","id":94216990,"number":143,"title":"Finish turning paper into tutorial ","user":{"login":"jackiekazil","id":166734,"avatar_url":"https://avatars.githubusercontent.com/u/166734?v=3","gravatar_id":"","url":"https://api.github.com/users/jackiekazil","html_url":"https://github.com/jackiekazil","followers_url":"https://api.github.com/users/jackiekazil/followers","following_url":"https://api.github.com/users/jackiekazil/following{/other_user}","gists_url":"https://api.github.com/users/jackiekazil/gists{/gist_id}","starred_url":"https://api.github.com/users/jackiekazil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jackiekazil/subscriptions","organizations_url":"https://api.github.com/users/jackiekazil/orgs","repos_url":"https://api.github.com/users/jackiekazil/repos","events_url":"https://api.github.com/users/jackiekazil/events{/privacy}","received_events_url":"https://api.github.com/users/jackiekazil/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/projectmesa/mesa/labels/3%20-%20Working","name":"3 - Working","color":"84B59F"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-07-10T05:25:13Z","updated_at":"2015-07-20T18:27:50Z","closed_at":null,"body":"We wrote a paper for Scipy -- http://nipy.bic.berkeley.edu:5000/download/23\r\nWe are turning it into a tutorial in our docs -- http://mesa.readthedocs.org/en/latest/. \r\n\r\nWe started building it out, but if someone wants to run with this -- that would be awesome! This would be a great way to learn about the library AND contribute at the same time!\r\n\r\nPlease reach out to myself or @dmasad if you have questions"},"comment":{"url":"https://api.github.com/repos/projectmesa/mesa/issues/comments/122976797","html_url":"https://github.com/projectmesa/mesa/issues/143#issuecomment-122976797","issue_url":"https://api.github.com/repos/projectmesa/mesa/issues/143","id":122976797,"user":{"login":"dmasad","id":596978,"avatar_url":"https://avatars.githubusercontent.com/u/596978?v=3","gravatar_id":"","url":"https://api.github.com/users/dmasad","html_url":"https://github.com/dmasad","followers_url":"https://api.github.com/users/dmasad/followers","following_url":"https://api.github.com/users/dmasad/following{/other_user}","gists_url":"https://api.github.com/users/dmasad/gists{/gist_id}","starred_url":"https://api.github.com/users/dmasad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmasad/subscriptions","organizations_url":"https://api.github.com/users/dmasad/orgs","repos_url":"https://api.github.com/users/dmasad/repos","events_url":"https://api.github.com/users/dmasad/events{/privacy}","received_events_url":"https://api.github.com/users/dmasad/received_events","type":"User","site_admin":false},"created_at":"2015-07-20T18:27:50Z","updated_at":"2015-07-20T18:27:50Z","body":"Yup, it's:\r\n\r\n```python\r\ndef compute_gini(model):\r\n    agent_wealths = [agent.wealth for agent in model.schedule.agents]\r\n    x = sorted(agent_wealths)\r\n    N = model.num_agents\r\n    B = sum( xi * (N-i) for i,xi in enumerate(x) ) / (N*sum(x))\r\n    return (1 + (1/N) - 2*B)\r\n```\r\n\r\nAll of the code should be in the [example notebook](https://github.com/projectmesa/scipy_proceedings/blob/2015/papers/jacqueline_kazil/Sample%20Model%20Variants.ipynb) and [model code](https://github.com/projectmesa/scipy_proceedings/blob/2015/papers/jacqueline_kazil/MoneyModel.py) from the SciPy proceedings paper directory."}}