Monday, 27 September 2010

Fun with metadata

Many – possibly all of us – have long lists of police officers on our websites, mostly those attached to Safer Neighbourhood Teams. They’re a pain to maintain – but our usage stats show that members of the public do find them useful.

Here’s one of ours:

I’ve always felt the way we published ours was a bit unsophisticated. Essentially, each officer is an article managed and rendered by our content management system, but there’s no way to extract any meaningful information from the profile other than by manually copying-and-pasting.

In an effort to improve this, I spent a few hours rummaging around in our officer “contact” template. We use GOSS iCM, and our contact template looks something like this:

<h2><!--#Contact[CONTACT.NAME.TITLE]--> <!--#Contact[CONTACT.NAME.FIRSTNAME]--> <!--#Contact[CONTACT.NAME.LASTNAME]--></h2>

<div class="label">Address:</div>

<div class="value"><!--~Contact[Address]--></div>

I’ve cut it down for simplicity, but you get the idea. The things like #Contact[CONTACT.NAME.TITLE] are variables that the CMS reads from the individual officer article itself.

If the user views the page source, the HTML looks like this:

<h2>PC Ed Rogerson</h2>

<div class="label">Address:</div>

<div class="value">Harrogate Police Station North Park Road Harrogate North Yorkshire HG1 5PJ United Kingdom</div>

So the CMS knows that #Contact[CONTACT.NAME.TITLE] must be a rank (PCSO, Sergeant, whatever). But once the page is rendered into HTML, that “semantic” information is lost. The web browser just sees it as plain text (“PC” in this case).

What we want, is some way to tell Google (and any other web services that are interested) that Ed Rogerson is a named person, with the rank of PC, who works at Harrogate Police Station.

Google recently started incorporating “semantic” data into its search results in certain circumstances. Do a search for Tamara Drew ( and look for the IMDb result, but don’t click on it. You’ll see that Google has worked out who the director is, who the actors are, and even the average viewer rating.

This information is generated automatically, via metadata – and we can use exactly the same principle to tell Google more about our officers.

(Crime mapping was before my time, but I understand that some of the more advanced forces also populate with team data via XML. This is basically the same principle, but I don’t think it is a consistent standard that is any use outside of TeamDB).

By adding metadata to our officer contact list, we can add useful information such as an individual’s contact phone number, even beat ward. One day – we’re not there yet! – a user could type their street name into Google, and it would bring up their local officer (not simply because that street name appears in the officer’s profile, but because it knows the geographic location of their beat).

The good news is that adding RDFa metadata is pretty straightforward. Using our code above as an example, here is the rendered HTML:

<div xmlns:v="" typeof="v:Person">

<h2><span property="v:title">PC</span> <span property="v:name">Ed Rogerson</span></h2>

<div class="label">Force:</div>

<div class="value"><span property="v:affiliation">North Yorkshire Police</span></div>

<div class="label">Address:</div>

<div class="value"><span property="v:address">Harrogate Police Station North Park Road Harrogate North Yorkshire HG1 5PJ United Kingdom</span></div>


The first div tells the browser that there is metadata on the page. Then each piece of information (rank, name, address) is marked with a span property in a tag. I also added an “affiliation” property in there, to tell Google that the individual works for North Yorkshire Police.

You can easily see how this works in the real world via Google’s Rich Snippets Testing Tool. For example:

Ignore the breadcrumb stuff (although that’s quite clever too) and you’ll see that Google now recognises Ed as a human being with the following information attached to him:


title = PC
name = Ed Rogerson
affiliation = North Yorkshire Police
address = Harrogate Police Station North Park Road Harrogate North Yorkshire HG1 5PJ United Kingdom

This is all pretty new – if I had more time, I’m sure I could do a lot more with it. And at the moment Google is only using RDF in very specific circumstances, such as reviews, business directories, that sort of thing. But it does look likely that they will expand it in the future. There’s lots of useful documentation here:

In short: assuming you aren’t afraid to get your hands dirty with some fairly simple HTML, adding metadata is a really straightforward tweak that will – in the not too distant future – make your police officer databases much more useful.

Wednesday, 8 September 2010

Facebook - police force pages

People who like official UK police Facebook sites - September 2010

Tonight, I thought I would post up the links to the police force pages on Facebook, including some organisational pages Facebook have put up for some police web services.  Most of the content for these organisational pages seem to be sourced from Wikipedia. There are 26 official force sites at the moment.

City of London (page, 11 people like this)
City of London (organisation, 50 people like this)
City of London (company, 1 person likes this)
City of London (interest)
Metropolitan (organisation, 213 people like this)
Metropolitan (company, 2 people like this)
Metropolitan (organisation, 3 people like this)
Metropolitan (topic, 1 person likes this)
Bedfordshire (official site, 3675 people like this)
Bedfordshire (interest, 1 person likes this)
Bedfordshire (abuse site, 12 people like this)
Cambridgeshire (company, 1 person likes this)
Essex (organisation, 93 people likes this)
Essex (company, 11 people like this)
Essex (fan site of training centre choco milk drink, 196 people like this)
Essex (special constabulary, 1 person likes this)
Herts (official site, 2199 people like this)
Norfolk (organisation, 4 people like this)
Norfolk (official site, 625 people like this)
Suffolk (organisation, 41 people like this)
Suffolk (official site, 891 people like this)
Hampshire (official site, 1121 people like this)
Kent (company, 19 people like this)
Surrey (organisation, 13 people like this)
Sussex (organisation, 113 people like this)
Thames Valley (official site, 2781 people like this)
Thames Valley (company, 67 people like this)
Avon and Somerset (official site, 1278 people like this)
Devon and Cornwall (official site, 459 people like this)
Dorset (organisation, 9 people like this)
Gloucestershire (official site, 711 people like this)
Gloucestershire (company, 7 people like this)
Wiltshire (official site, 496 people like this)
Derbyshire (official site, 435 people like this)
Leicestershire (official site, 668 people like this)
Leicestershire (organisation, 1 person likes this)
Lincolnshire (official site, 840 people like this)
Northamptonshire (official site, 1319 people like this)
Northamptonshire (organisation, 18 people like this)
Nottinghamshire (person)
Nottinghamshire (organisation, 5 people like this)
Nottinghamshire (company, 10 people like this)
Staffordshire (official site, 858 people like this)
Staffordshire (organisation, 6 people like this)
Warwickshire (company, 39 people like this)
Warwickshire (official site, 193 people like this)
Warwickshire (company, 2 people like this)
West Mercia (official site, 761 people like this)
West Mercia (organisation, 16 people like this)
West Midlands (official site, 4441 people like this)
West Midlands (organisation, 43 people like this)
West Midlands (sports team - police fc, 2 people like this)
West Midlands (business)
Cleveland (official site, 907 people like this)
Cleveland (organisation, 17 people like this)
Cleveland (abuse site, 2593 people like this)
Durham (organisation, 22 people like this)
Humberside (organisation, 19 people like this)
North Yorkshire (organisation, 7 people like this)
North Yorkshire (official site, 404 people like this)
Northumbria (official site, 1329 people like this)
Northumbria (organisation)
South Yorkshire (official site, 1322 people like this)
South Yorkshire (organisation, 38 people like this)
South Yorkshire (company, 14 people like this)
West Yorkshire (official site, 4823 people like this)
West Yorkshire (company, 8 people like this)
West Yorkshire (organisation, 8 people like this)
Cheshire (abuse site, 939 people like this)
Cheshire (company, 7 people liked this)
Cumbria (official site, 1741 people like this)
Cumbria (personal page, 1 person likes this)
GMP (personal page, 2 likes)
GMP (personal page)
GMP (company page, 32 people like this)
GMP (company page, 6 people like this)
GMP (organisation, 36 people like this)
Merseyside (organisation, 66 people like this)
Merseyside (abuse site, 6573 people like this)
Lancashire (organisation, 2 people like this)
PSNI (official site, 1027 people like this)
Dyfed-Powys (organisation, 6 people like this)
Gwent (official site, 190 people like this)
Gwent (organisation, 4 people like this)
North Wales (official site, 1061 people like this)
North Wales (organisation, 2 people like this)
South Wales (organisation, 23 people like this)
South Wales (company, 17 people like this)

Friday, 3 September 2010

Twitter - un-followers

I have some police stats to share for daily, weekly and monthly tweets and followers since the launch in May 2010.

The first chart shows cumulative counts of tweets and followers.

Target volumes for tweets are no more than 5 per day and this rate has remained constant.

The rate of followers has gradually increased.  The slight drops are adjustments at the end of each month for those who unfollowed (more about that below).
A consistent pattern of increasing followers is emerging and this is most easily seen in the monthly chart.  If this trend continues, we can expect 400 followers per month by December 2010.
During August 2010 there were were 234 followers and 16 of those un-followed during the same month.

103 of these followers were from the force area.

Out of 16 un-followers, 19% (3 un-followers) were from the force area while the remaining 81% (13 un-followers) were from elsewhere.

So out of 103 followers from the force area during August, only 3 un-followed within the same month.

Thursday, 2 September 2010

Twitter - who's following who?

From a sample of approx. 550 followers
September 2010
This is a bit of research I did this evening to investigate the different types of followers of a typical police Twitter channel.  I looked at each follower and determined which of the nine categories they best fitted.  The pie chart shows the most relevant category first (local public), moving round clockwise to the least relevant category (unknown).  Unknown followers were those with no obvious information on location and usually had no tweets and/or very few followers of their own. These can be considered irrelevant as they are either spam or redundant accounts.

The findings show that 44% of the total followers were relevant local members of the public or local businesses with a further 11% of local partnerships, websites and media.  In total 51% of the total followers are local with the remaining 49% made up of public and businesses located outside the local area - in fact, some from overseas.  It must be noted that although a large percentage of the businesses were likely to have been touting for business, the out-of-area public followers could well be ex-locals, locals working overseas, and friends or family of people in the local area. A significant number of followers were other forces and police agencies both in the UK and overseas.

Based on these findings, it is safe to conclude that around 60%-70% of followers are local people, businesses, partnership organisations and media together with other people and businesses from outside the local area who have a significant interest in the Twitter channel they have followed.  About 30%-40% of the remaining followers are not particularly interested in the Twitter channel or not interested at all.

To follow or not to follow?
There seems to be a keen debate about whether to follow your followers or not.  Some sources suggest that followers should be followed to show commitment to 2-way communication and establish the opportunity for both parties to Direct Message each other if required.  Twitter is all about a conversation after all and not a one-way channel.  If a one-way communication channel is all that is required, the RSS feeds which services most police force twitter channels are more then adequate.

However, there are also arguments that following the followers of your Twitter channel will cause an administrative burden and invite a number of incoming messages which will require timely replies and further admin commitments.  It must be noted that, regardless of who is followed, messages can always be directed @ us which still require a timely reply.

Some have suggested that not following relevant followers (i.e. the 60%-70% of those highlighted above), is similar to them acknowledging us in the street with a friendly 'hello' but being ignored by us in return.

Comments about this post are welcomed - especially opinions about the 'to follow or not to follow' debate.