Political Survey: Internals

For openness, it's important that all the internals of the site are available to public view. At the most basic level this means that the code and data used must be made available (subject to the restrictions described in the privacy statement). This, with a little luck, should be enough for anyone else to get their own version of the site up and running, and to check our own results. The data and programs may be of interest in their own right, too.


The code which runs this site is written in perl, with a little bit of C for speed. You need a modern version of perl (5.6.x), and various modules:

Many of these may already be included in your distribution. You will also need a C compiler. Although there's probably not much in there which is UNIX-specific, I have made no effort to make the code very portable; you are welcome to try to get it running on any other system, but you will save yourself work if you use Linux.

The database used by the site is SQLite; the distribution for the DBD::SQLite module contains a complete copy of the (public domain) SQLite libraries, but you may want to get the author's original distribution too, as it contains the useful sqlite command-line monitor program.

You can get a copy of the code as a compressed tar file: politicalsurvey.tar.gz.

As for documentation, you're rather on your own, though the code is extensively commented. Please email me with any questions.

The code is available under the GNU General Public Licence, version 2, or, at your option, any later version.


As described in the rationale, the results produced by this site are based on axes derived from the data itself. In order for the software to produce any results, it needs to be bootstrapped with a whole lot of data from surveys. The data from this site are available in the form of a bzip2-compressed dump of the SQL database, cleaned of privacy-sensitive information as described in the privacy statement.

You can download the data as data.sql.bz2 (quite a large file). Note that this dump does not contain the IP-address-to-country mapping which is used to guess respondents' countries of origin from their client IP addresses; that can be obtained separately.

Political Survey: an open, honest version of politicalcompass.org.
Copyright 2003 Chris Lightfoot. Available under a Creative Commons Licence.
Sponsored by Mythic Beasts Ltd. Check HTML; CSS.