Skip to content

Commit

Permalink
Fix tutorial and example readme for port change
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Miller committed May 10, 2017
1 parent 1bdc4fb commit 8b57aa8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
8 changes: 4 additions & 4 deletions docs/tutorials/adv_tutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
" [grid], \n",
" \"Money Model\", \n",
" 100, 10, 10)\n",
"server.port = 8889\n",
"server.port = 8521 # The default\n",
"server.launch()\n",
"```\n",
"The full code should now look like:\n",
Expand All @@ -128,10 +128,10 @@
" [grid], \n",
" \"Money Model\", \n",
" 100, 10, 10)\n",
"server.port = 8889\n",
"server.port = 8521 # The default\n",
"server.launch()\n",
"```\n",
"Now run this file; this should launch the interactive visualization server. Open your web browser of choice, and enter [127.0.0.1:8889](127.0.0.1:8889).\n",
"Now run this file; this should launch the interactive visualization server and open your web browser automatically. (If the browser doesn't open automatically, try pointing it at [http://127.0.0.1:8521](http://127.0.0.1:8521) manually. If this doesn't show you the visualization, something may have gone wrong with the server launch.)\n",
"\n",
"You should see something like the figure below: the model title, an empty space where the grid will be, and a control panel off to the right.\n",
"\n",
Expand Down Expand Up @@ -174,7 +174,7 @@
" return portrayal\n",
"```\n",
"\n",
"Now launch the server again, open or refresh your browser page, and hit 'reset'. Initially it looks the same, but advance the model and smaller grey circles start to appear. Note that since the zero-wealth agents have a higher layer number, they are drawn on top of the red agents.\n",
"Now launch the server again - this will open a new browser window pointed at the updated visualization. Initially it looks the same, but advance the model and smaller grey circles start to appear. Note that since the zero-wealth agents have a higher layer number, they are drawn on top of the red agents.\n",
"\n",
"![Greycircles Visualization](files/viz_greycircles.png)"
]
Expand Down
19 changes: 11 additions & 8 deletions docs/tutorials/adv_tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Finally, when you're ready to run the visualization, use the server's
[grid],
"Money Model",
100, 10, 10)
server.port = 8889
server.port = 8521 # The default
server.launch()
The full code should now look like:
Expand All @@ -122,12 +122,14 @@ The full code should now look like:
[grid],
"Money Model",
100, 10, 10)
server.port = 8889
server.port = 8521 # The default
server.launch()
Now run this file; this should launch the interactive visualization
server. Open your web browser of choice, and enter
`127.0.0.1:8889 <127.0.0.1:8889>`__.
server and open your web browser automatically. (If the browser doesn't
open automatically, try pointing it at http://127.0.0.1:8521 manually.
If this doesn't show you the visualization, something may have gone
wrong with the server launch.)

You should see something like the figure below: the model title, an
empty space where the grid will be, and a control panel off to the
Expand Down Expand Up @@ -183,10 +185,11 @@ to change the portrayal based on the agent properties.
portrayal["r"] = 0.2
return portrayal
Now launch the server again, open or refresh your browser page, and hit
'reset'. Initially it looks the same, but advance the model and smaller
grey circles start to appear. Note that since the zero-wealth agents
have a higher layer number, they are drawn on top of the red agents.
Now launch the server again - this will open a new browser window
pointed at the updated visualization. Initially it looks the same, but
advance the model and smaller grey circles start to appear. Note that
since the zero-wealth agents have a higher layer number, they are drawn
on top of the red agents.

.. figure:: files/viz_greycircles.png
:alt: Greycircles Visualization
Expand Down
2 changes: 1 addition & 1 deletion examples/Boltzmann_Wealth_Model/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ To launch the interactive server, as described in the [last section of the tutor
$ python viz_money_model.py
```

Then open your browser to [http://127.0.0.1:8889/](http://127.0.0.1:8889/) and press Reset, then Run.
If your browser doesn't open automatically, point it to [http://127.0.0.1:8521/](http://127.0.0.1:8521/). When the visualization loads, press Reset, then Run.


## Files
Expand Down

0 comments on commit 8b57aa8

Please sign in to comment.