NZ Crime 10K – Project Overview


The main purpose of this project is to show the number of recorded offences for every 10,000 residents.


All the data for this project has been sourced from Statistics New Zealand. The boundaries of the Police Districts have been aggregated from the Meshblock Digital Boundaries (http://www.stats.govt.nz/statistics-by-area/regional-statistics/geography-mapping/download-digital-boundaries.htm).

Using the 2006 Census of Population & Dwellings Meshblock dataset, the size of the Usually Resident Population of each Police District was able to be calculated (http://www.stats.govt.nz/census/census-outputs/meshblock/default.htm).

Then using the data of Recorded Offences for the 2006 calendar year (http://www.stats.govt.nz/products-and-services/table-builder/crime-tables/offences/offence-calendar.htm) a value was able to be calculated for the number of offences per 10,000 residents.


After researching different methods of presenting the data, the most reliable method utilises Javascript with the Google Maps API (http://code.google.com/apis/maps/), and Keyhole Mark-up Language (KML) to create a thematic map of the regions, coloured to the corresponding range the region falls in (rounded quintiles, with outliers). This also allowed interactivity were if the user clicks on a region, an info-window will be displayed detailing the region, within this we used the Google Charts API (http://code.google.com/apis/chart/) to display a graph of the total recorded offences for the region over 10 years. A separate KML parser was also used (http://econym.googlepages.com/egeoxml.htm) to display a window on the side displaying a list of the small regions in the major cities that are not visible on a high zoom level.


There are still limitations with this technique, where being the colours of the regions are not able to be dynamically changed, therefore there must be a separate KMZ file (zipped KML) for every category (approximately 800 kilobytes each), this means there is significant initial loading time for each category. Also occasionally the Google Maps API is unable to load and render the KML due to caching issues on the Google server, also because of this at some zoom levels the image will load but the user will not be able to click a region to open an info-window.