Example Dynamic Web Site
display collected data using Google Maps and in tabular form. You can
see an example here: http://infinitemonkeycorps.net/projects/cityspeed/
of the source distribution. They expect to find the .json data files in a
subdirectory data/ on your web site. If you don’t want to generate
your own, you can steal some sample data. The web pages don’t require any
- The main page shows a color-coded Google Map and tabulates the stats for each city.
It gets its data from data/citystats.json via AJAX.
- The city detail page; shows a Google Map with the starting and ending points for
that city. The city file name is passed as a URL parameter and the corresponding
.json files are retrieved and displayed via AJAX. Shows a table with the
addresses of all starting and ending points.
- The Cascading Style Sheet that makes the whole thing look pretty.
and parsing the JSON data, as well as populating the maps and tables. This code is
LAGPLv3 licensed like the Python source.
- Douglas Crockford’s JSON parser from http://json.org/js.html. Incidentally, all the
JSLint rocks. This code is in the public domain.
- ajaxCaller.js, util.js
- AjaxCaller is an XMLHttpRequest wrapper from Ajax Design Patterns, copyright by
It’s been slightly patched to fix a bug and you’ll need to use this patched version.
This code is Creative Commons Attribution Noncommercial Share Alike 2.5 licensed.
- sorttable is Stuart Langridge’s lovely dynamic table sorting script. It’s X11 licensed.