Lee Kelleher’s Weblog

Just another WordPress.com weblog

Archive for the ‘data’ tag

Converting CSV to XML

with 4 comments

There’s a bit a functionality on one of the projects that I’m working on where I need to do a lookup. The data I’ve been given is in an Excel spreadsheet - which I needed to convert to XML (as ultimately the data will be stored in a CMS that handles XML better).

I’ve done a lot of projects where I need to convert XML to Excel (via CSV), but not many where I need to convert the other way.

I first saved the Excel as an “XML Spreadsheet” - which spat out all sorts of extra MS Office namespaces, styles, etc. Which is fine if I want to re-open the data in Excel. But I wanted the data to be cleaner (and more semantic).

I exported the Excel out as a CSV; then looked for a way to convert it to XML.

Then I found this very useful web-app tool: CSV to XML Converter by Creativyst

It did exactly what I needed! The tool has a 100Kb limit - which was great, because my CSV was 96Kb!

The outputted XML was around 450Kb - which got me thinking… if a lot of developers use that tool the way I did - then that’s a lot of load on their web-server! Maybe that’s where the new Google App Engine could come in handy?! They have the processing power and bandwidth to handle high usage!

I’d love to see other online text conversion utilities … you never know, maybe they could be all centralised on Google Apps?

Written by Lee Kelleher

April 14th, 2008 at 4:07 pm

Traffic Updates: RSS -> SMS

with one comment

Since moving down to Bristol, I have been subscribing to the Underscore mailing list - of which I’m guilty of non-participation. One of the threads today made me realise the potential of user empowerment using “Web 2.0″ services and technologies.

The thread was called “RSS -> SMS“, Andy wrote:

After my wife took three hours to get to work this morning due to the M5 being shut, I’ve built a Yahoo pipe that takes the Highways Agency feed and filters it to be just the M5 traffic alerts.

I can set up the RSS reader on her phone to cosume the feed from the pipe but was wondering if anyone knew a simple and free way of converting the feed to text messages sent to he phone? (It’ll only be for a low volume of messages (less than one a day))

The suggestion of Twitter’s SMS notifications was made, utilising the (very good) twitterfeed service, (which I used for both RSB and BLB tweets).

The UK Traffic information is provided by the Highways Agency in RSS format - which was routed through Yahoo Pipes to filter items containing information about the M5.

It was later found out that there is already a dedicated RSS feed for the M5, thus making the Yahoo Pipes method redundant. However the issue here isn’t about the range of RSS feeds and knowing what do with them… it’s about everyday people using openly available data to provide useful personalised information.

Sure, it’s mostly web-savvy developers doing this at the moment - yet as the web technologies evolve, we’ll start to see more personalised services that anyone can use.

If you want to follow the M5 Traffic Information on Twitter, visit: http://twitter.com/UK_M5_Traffic

Written by Lee Kelleher

March 5th, 2008 at 12:01 am