Rick Seymour

Electoral constituency boundary changes & mapping tool

The Boundary Commission for England has begun a consultation into the changes they are planning to constituency boundaries following the enactment of Parliamentary Voting System and Constituencies Act 2011. This instructs the LGBCE to redraw the constituency boundaries to standardise the number of electors per constituency, plus or minus 5% away from the quota of []

Django – In development – settings and views

This is a quick way for a Django site to display an “In Development” message. It is not designed to be “secure”, so make sure you have a disallow * in your robots.txt file to ensure urls aren’t guessable. urls.py Place at the top of urls.py (then include subsequent additions with “urlpatterns+=”) if settings.DEVELOPERMODE: urlpatterns []

Lancaster City Council spending Twitter Robot

Today sees the launch of a Twitter robot that takes Lancaster City Council‘s spending data and makes it available for ANYONE to search to see what the council is up to and where YOUR council tax is going. www.twitter.com/CouncilSpending You don’t need to follow it, simply tweet:- @CouncilSpending “Capita Symonds” and you’ll get back just []

Mapping Exercise – Include the most people

So, you want to create a regioned mapping system, so that the maximum people are included within it… but including the maximum amount of land area. This example shows for the UK, and takes population data mashed with location for the populace, then says “I want another zone, more than X miles.. where can I []

Police UK Crime Data Facebook Application

This Facebook application allows users to compare crime in their and their friend’s street. http://apps.facebook.com/police_uk_crime/ The user enters their postcode and is presented with crime data from the Police.UK police database. The user is shown all their friends who are also using the application, and can compare side by side the crime in both postcodes. []

Police.UK Regional Overview

Where is the best and worst place in the UK to live based on crime figures? That itself is very subjective, much like the data itself in that many areas of crime simply aren’t included, such as fraud. Nor do we have any idea of the number of convictions. Is there any way you would []

Police.UK Vehicle Crime Data Hotspots

postcode count within0.5 DA119BY 20 24 CB74PS 16 24 HA01AE 11 14 M31DQ 11 25 SL14YA 11 36 BL97SP 9 9 NW80SF 9 33 OL82RB 9 9 BA111PJ 8 12 BS13LL 8 30 The table shows the Top 10 Vehicle Crime postcodes from the data on Police.UK, highlighting the hotspots when it comes to Vehicle []

Cambridge University – Most Crime ridden Postcode (Police.UK Data)

Cambridge University postcode, CB2 3PP has the UK’s worst crime figure. With 254 crimes in December alone this postcode it dwarfs all other UK postal codes. BBC News covered Glovers Court in Preston, PR1 3LS, but the University of Cambridge makes strolling past Truth and The Loft, two late night nightclubs on Glovers Court seem []

Police.uk Crime Totals per Police Force

Police.Uk Crime Data – Per Police Force (Grouped by Crime Type) The data on this spreadsheet comes from the Police.uk crime site, (accessed via the Data API) and highlights crime per police force for December 2010. Image linked to Google Docs Spreadsheet, download the spreadsheet, but note the Open Government License   License: Open Government []

Police.uk API Bug – Incorrect Police Force Names

Apparently bug testing wasn’t included in the £300k that UK Government paid to RKH for Police.uk Mapping software. Works http://policeapi2.rkh.co.uk/api/lancashire/neighbourhoods Not Working (404) http://policeapi2.rkh.co.uk/api/avon-somerset/neighbourhoods   FIXES avon-somerset => avon-and-somerset devon-cornwall => devon-and-cornwall

Police.uk API PHP Curl Class

Police.uk has a JSON based REST API web service to access UK crime data. Attached is a PHP class to access the API.  The class is object based, uses curl and returns PHP Associative Arrays (or boolean false) Update: 6/2 – MySQL schema & import functions added.   https://github.com/RickSeymour/Police.uk-API-PHP-Curl-Class   Code is licensed as HireWare []

Ordnance Survey UK Postcode Database

Thank you to Ordnance Survey for making the UK Postcode database available. From the 1st of April 2010, OS OpenData was released, including geo-information, UK full postcodes and topographical information. I have now installed the UK postcode database and made it easily indexable to the websites I host in Manchester. The data is invaluble especially []

Sky Broadband Router – Netgear DG834G vs Sagem F@st 2504

Below is a comparison of two routers used by Sky Broadband (UK). I’m currently using the Sagem, mainly due to the “potential” power savings (0.7A vs 1A) and also a slight improvement in the wireless strength. If someone could provide Wattage usage that would be great (in various states). Netgear DG834G Firmware Version    V2.02.44 ADSL []

PHP-FRM – Solving the 200 Code returned on Fatal Error

With FastCGI & default PHP, if you have PHP display_errors turned off (which in production you should), your server will return a blank HTTP status Code 200 page, with no information to the end user as to what happened. A new php.ini directive has been added with php-frm (Due to be incorporated into PHP Trunk []

Xdebug in PHP

Xdebug in PHP is speeding up my debuging of code. It allows me to backtrack through errors to see which function they were originally part of. As any web product grows it is sometimes difficult to diagnose where a function call was made that resulted in an error being generated. Below is a snippet from []