Category Archives: Data & Online

The way this website works

This website has gone through a few design changes over the years. That’s going to happen to a work in progress, which this very much is, but I wanted to explain a few of the choices I made.

This may be a pointless exercise, but, if anything, it’ll make it clearer to me.

First and foremost, what is this site all about? It is my portfolio site, and a place to show off to the world what I have done, and collate it together. That is it’s primary focus on the web.

The second, I guess, is to collate all the links of where I am elsewhere on the web, and make this one central point.

That explains why this website looks the way it does. First, the design. It’s a WordPress theme, yes. It is Coraline by Automattic, and it is this way because it looks good. We’ll get to why in a second. But, the theme is in place because I know that I cannot code a website myself, and cannot design a good user experience. I made this job a little easier.

I used this, with the three column approach, because it looks like a newspaper. It wasn’t at the forefront of my mind when I put it in (I wanted a clean, column approach), but I suppose it does look like a newspaper, and it stays. Mainly, I am about news, so it works.

I have my previous blog posts on one side, and published articles on another, with the content in the middle. This is because all three of the things are important to me, and hopefully to you, the reader. The blog posts link to the blogs, and the published articles link to the web version, or a copied version on to this website.

Underneath that I have put my Tweets and my Facebook page on the left hand side. I figured that anything I say on that is less of an importance to you if you’re reading a story, article or blog post on here. Links to other relevant, interesting, or good websites are also underneath the stories on the right hand side. This, I thought, would be because if you’re reading what I have to say, then when you get to the bottom,y you may want to see who influences me. It’s closer to the end of the article, that way.

Sharing buttons are important. I have the Facebook, Twitter, Google+ and Pinterest button at the top, dead centre of the article, and big. WordPress, with Jetpack, would put them at the bottom. I decided I would use a plugin to stick them higher, and customise them a bit. I chose Facebook and Twitter because they’re the two big ones, G+ because it’s supposedly the third big one, and Pinterest because I do a lot of photos and video content, so they can pin those (watermarked, of course). No others. I don’t need them on here. Maybe you disagree?

Finally, the layout at the top. It’s a nice big picture I took, of star trails. I thought it looked nice as a banner. I hope you agree. The menus link to the important parts, with the Contact and elsewhere on the web page linking to the multitude of different places you can find me.

My CV is in full and available to download on the CV page, via Scribd. I have talked about it elsewhere on the website, to (hopefully) work with Google Search Rankings.

And I suppose I need to explain where it started. This website was basically forced to be started, as a wordpress.com weblog, in 2009 via Sue Greenwood at Staffs University, as part of a level 2 online journalism module. I moved it to self-hosted quickly after that, and now use it as my primary point of contact for me.

I hope this was a little bit interesting to you. It helped me reason why I made some choices on this website the way I did. I quite like this now. I hope you do to.

#3652012 Project – 165 days done!

I’ve done 165 days of my 365 project… just 201 to go!

So, it’s time for a little recap. I keep calling it a 365 project, yet it’s actually the 366 project, seeing as it’s a leap year and all that. So, it’s time for a review of sorts with an imaginary interviewer. (me, if you were wondering).

How have you found it?

Funnily enough, it’s been pretty good. I’ve enjoyed it, and it’s meant i’ve explored a lot of places and taken some really good pictures that I probably wouldn’t have done. I can’t say that’s strictly true for all of it – I do take a lot of pictures of things and whats happening – not people as such with my phone. I don’t overload Facebook with a million of the same drunken pose. I take pictures of where I am. For example, I took the one above with @nicktheguitar said ‘let’s go to Covent Garden’ – and we passed the Spooks HQ (in the TV series). I love Spooks, so it’s a great shot to have. (It’s also smaller than I imagined it).

Most of the time, getting a decent shot hasn’t been a problem, and a lot of the time, the problem has been getting a unique angle.

Have you struggled?

As I said above, getting a decent shot isn’t an issue. It’s getting a shot thats worthy of it. Many of the days when I have thought at the last minute are the days when i’ve been really busy, and at a computer or in one place all day. What helps is going about and exploring, and just looking for photos. Looking for a shot that you know can go in the project. Sometimes, things just aren’t photogenic, or you’re having a day where you think ‘you know what, this is a waste of time’.

What have you enjoyed?

Actually exploring and seeing things. Using Instagram, it’s made you think in terms of composition. It’s a square image from a iPhone shaped picture, so you have to think whats going to be missing from the crop, and how the image will look. Are you going to fill the frame, or go for landscape and put black lines at the top and bottom? Also, how much blur do you want to apply. You need to think about it. You want to make it the best as possible, so you have to make it still, get the moment right, and ideally not use HDR on a fast moving shot. It’s all a skill.

People decide to say Instagram is hipster-ish – well, maybe, but it’s good. I am in no way pretending that it’s photography on it’s own. It is by no means a replacement for my camera – but as the saying goes, the best camera in the world is the one you have on you. The iPhone is pretty much always on me – sometimes it has no battery, but it’s always on me!

Instagram works wonders on images. Yes, they’re faux-old style, but it’s what I want them to be. It’s the same as the over done HDRs on Flickr – I don’t cry about them. I don’t like them, and maybe I wish HDR was never invented, but I don’t cry to your face about them. So, I use Instagram. Let’s all take photos how we want in peace! Yes.

A storify of #3652012 today!

So, I decided to take a look at the #3652012 project on Storify today…

This is the result:

How to make data look good: Food Standards Agency Ratings

Food hygiene ratings are important. They tell you how good somewhere is at keeping things clean – and that matters.

I’ve done this for the Daily Post before, and explained scraping in that post, but for North Wales only. This map is a bit more advanced than what I’ve previously done. It contains two layer elements, and fuses individual businesses data with a county overview to create a national picture.

This is a snapshot from May 19, 2012, and data is accurate as it is. Until I can use scraperwiki to scrape live data into a Google Fusion Table, snapshots are the best that can be done.

The counties are coloured to represent the percentage of businesses rated between 0 and 2. The lower the percentage, the more green they are. The higher the percentage, the more red they are. The businesses are coloured red for 0, yellow for 1 and blue for 2.

The info boxes tell you details about the county or the business.

How did I do this?

Well, to start with, data journalism is basically journalism flipped on its head. In normal journalism, you can end up with a front page scoop or a huge feature from just a simple line, and you do the investigation to build the story. But with data journalism, you get lots of stats and information, and have to investigate by whittling it down to just what you need or in a way you can make sense of it, and tell the story. This is explained a lot more clearly by one of my tutors at City University, London on this – Paul Bradshaw. His inverted pyramid is fantastic.

 

Inverted data journalism pyramid by Paul Bradshaw

So, this data. To start with, I had one huge dataset. The food standards agency database. This contains all the data about businesses, including where they are, with addresses, and ratings. I had to mash this up with latitude and longitude data, and overall data, which i gathered from the database.

The businesses and addresses, their ratings and when they were last inspected, was scraped using this scraperwiki code from ratings.food.gov.uk. I changed it do to this 22 times, once for each county.

I merged the databases, scraped on May 19th overnight, into one single Excel file, and added the relevant county name after each. Then, I sorted them by rating, and added a column, in which I put the code for the Google Fusion Tables icon name after each different rating.

After that, I made a copy of the table as a second excel file, and used pivot tables to find out overall data. I made a data table which brought out how many were rated 0, 1 and 2 in each county. I got from the food standards agency website the total amount of businesses in an area, and then used excel formulas to work out the percentage rated 0-2 and the percentage rated 0 for each county, and then the average for Wales. From this, I was also able to work out the percentage rated between 3 and 5. I then used Info Base Cymru to get spending data per head for the last financial year (2010/11) for each of the counties on environmental services, the total spend per head overall, and then worked environmental spend as a percentage of total spend.

My final excel document looked a bit like this:

Excel chart

I then uploaded the first document to Google Refine. First, I removed the space in the postcode column by using Google Refine Expression Language (GREL) value.replace(“ “,””) to make another column, and used value.parseJson to pull in postcode data from uk-postcodes.com API, and then pull the latitude and longitude data for all the businesses from that postcodes data.

I then downloaded the document which resulted, and put it into Google Fusion Tables, and geocoded using two column location with latitude and longitude to get a more precise location, and edited the info box window to make the information more readable to viewers with this code:

<font size=”+1″>This is <b>{name}</b> in <b>{County}</b>.<br></font>
<br>
They were rated as <b>{rating}</b> on {date}<br>
<br>
<font size=”-1″>This was correct on May 19, 2012. To find out more, search for them on <a href=”http://ratings.food.gov.uk” target=”_blank”>the FSA ratings site.</a>

At the same as all this was being done – mainly, whilst waiting for APIs and scrapers to work – I created a map of KML layers of the different counties in Google Earth, using data from My Society Mapit, and sourced Pembrokeshire data separately as the file was broken. I uploaded that to Fusion Tables as a KML.

I then uploaded the second table of overall data to merge with the counties map, and edited the info box code to show me what I wanted it to show:

This is <b>{Council}.</b> They have <b>{Total premises}</b> premises in the county which have been rated.<br>

<br>

They have <b>{Total 0}</b> rated 0, <b>{Total 1}</b> rated as 1, and <b>{Total 2}</b> rated as 2.<br>

<br>

That means <b>{Percentage of premises rated 0-2}%</b> of the premises are rated 0-2.<br>

<br>

In 2010/11, they spent <b>£{Gross spend on local environmental services per head}</b> on environmental services, per head. It was <b>{Environment spend as a % of total expenditure}%</b> of their total spend per head.

I coloured it using the percentage of businesses in an area with 0-2 ratings. Green was the lower percentage, changing to white and then moving to red for the higher percentage.

I then used a Google Fusion Table builder wizard to merge the two tables and create a map containing the counties coloured to represent the percentage of how many 0-2 rated businesses there are, with the businesses, coloured by rating, on top, and a select tool to filter by 0, 1 and 2 rated businesses. That is the map we see above.

I also used the experimental feature to make a Map Chart, which allows you to click and compare up to four counties on defined metrics.

The metrics are the total premises rated 0-2 in that area, the percentage of premises rated 0-2 in that area, gross spend on local environmental services per head and environment spend as a % of total expenditure. This can compare up to four different areas at a time, useful for people comparing where to go on holiday or visit.

And the reason I was so happy on social media that this was able to be shown? Well, the Google Fusion Table wizard writes HTML code that won’t embed into WordPress, but will into Drupal (which I don’t use). However, I followed a quick guide on Paul Bradshaw’s Online Journalism Blog, and made the code a separate HTML file. A bit of fiddling about later, and this is now on Dropbox (it should be my server, but oh well), and it is embedded on here as an iframe. Now, anything I need to show, I can.

And now, for submission on Friday, I need to write the story. Suffice to say, it’s also pretty good data journalism in my book. All the data is open, but I did the research.