Full code examples


We thought it might be useful to see some fully worked examples of code, as well as fragments. With this in mind, the list below will increase as the course goes on. Feel free to volunteer code!


Mapping and map analysis

BoundaryTypeAnalysis
Analyses Arc topology elements.

Map containing javascript code for linking to GoogleDocs and a GeoRSS feed (see page source). Should draw down a geoRSS stream and info from a GoogleDocs table, and should also geolocate if used on a GPS device. (See also this tutorial - and links in source comments). Also, somewhat simpler Fusion Tables.


Agent-based models

Simple disease model
Built in Processing 1.5 and exported as an applet, plus application versions.

RepastCity
A stripped-down version of Nick's agent-based crime model, which can be used as a starting point for any city model using agents that need to find paths around a space.