Application developer guest post - UK Fuel Prices

Welcome to the final in our series of guest blog posts written by Data.gov.uk community members who have developed applications using data available on Data.gov.uk. This week, Raphael Corre writes about the UK Fuel Prices application.

Inspiration

I've been really enthusiastic for a while about mashup applications, and I've experienced many platforms and APIs. But the big issue is to find reliable, open data. A few months ago, I finally found this data and this is where my story begins.

The time for choices

Which data ?

I'm a French guy, and it may seem weird to use UK data to launch a new application. My first idea was to use French data, and I found an official French web site displaying fuel prices.

This web site provides data on fuel prices trends, but the fee is very high: 38 500 Euro a year. My budget was almost nil, so this solution wasn't the right one. I then discovered the UK Government open data initiative, and voilà! I could finally start my web app with zero cash and zero risk.

My next step was to find the right technical platform.

Technical platform choice

I'm a professional Java programmer, and I wanted to use a platform on which I could be efficient as quickly as possible. I had the same requirements on fees for the platform as for the data - free!  The Google App Engine (GAE) provides hosting on Java Servlet technology, based on Jetty servlet engine. GAE's business model is quite attractive for small services, it's totally free under some quotas (CPU, bandwidth, stored data).

Google App Engine

GAE is a cloud service, so scaling doesn't matter for a developer, rather it's the responsibility of the system.  GAE is a high level cloud service, as opposed to Amazon Web Service (AWS) which is low level.  The main advantage of GAE is that you don't have to be a system administrator (no operating system to install, no Tomcat to configure), the only thing you have to do is the programming, following some strict guidelines from Google. GAE is well fitted with Eclipse, and just two clicks are needed to deploy the web app on the cloud!

The drawback is that GAE has some restrictions on Java SDK classes that can be used. For example, it's forbidden to use java.io.FileWriter class. The main consequence of this is the difficulty in using use third party libraries if you don't know exactly which classes they use.

There is some controversy around GAE, notably a post from a Spanish entrepreneur - 'Goodbye Google App Engine'.  My view is that GAE is a good platform for a personal project, but perhaps not for a commercial one. There are too many uncertainties because of restrictions, SDK classes as I've already noted are one example, but  there are also limits on long requests.

Datasets

Fuel prices trend

 My first idea was to find a dataset holding geographical records on pump prices. Unfortunately, this data is not available through the data.gov.uk database.  I eventually found a dataset holding pump prices trend since 2003.  I decided to build my webapp around these records. The main drawback for this dataset is the format, a Microsoft Excel file, it would have been better to provide data in a more open format like XML.

Articles on fuel prices

The second dataset I used came from DirectGov.  My aim was to display articles around fuel prices in the UK, to add more related content to my site. DirectGov provides a really good REST API to search articles on a particular subject. The available result formats are XHTML, ATOM or JSON. A complete developer documentation set is also available online, so it's very easy to use the API.

Next steps

UK government Open data initiative is an excellent idea, which can fuel many businesses in the future. The next step would be to have a consistent API through every dataset, using REST and open formats. This would speed up developers work.

The next step for my site?  I don't have any idea. It's mainly a personal project, I don't have any stress to make it better. I'm currently searching for inspiration.

Comments

Me too!

Coincidently, I've been using the same tools to develop an embeddable widget and a mobile app for the FCO Country Advice data. I find GAE pretty good to use and, of course, it's free for small apps (although you can buy extra facilities for larger projects). 

 Flag as offensive 

fuel prices

when is this likely to be ready?

http://www.bbc.co.uk/news

 Flag as offensive 

nice application

Very nice application. Will the application free?

 Flag as offensive 

sears rugs

This post is really full of important information.It’s hard to believe that average fuel prices today are around 30p more per litre than they were just five years ago

 Flag as offensive