UK Election maps

We had some maps from our political pundit this week. The guys in News found the first a bit big for reading into Flash, the second had the points mashed up a bit. The same problem that we had a few years ago and when we decided to correct it all manually.

I decided this time to have a look at the Governments Open Data initiative which should give us the map data free. I downloaded from https://www.ordnancesurvey.co.uk/opendatadownload/products.html where you can also get map image data and postcode information. Downloaded the Boundary Line ESRI GB data (10/2010), about 270Mb. Also looked at the OS Vector District Map which gave a raster form for each OS square. The point data was huge and with all the errors of the previous dataset so I had a look at the MapPublisher plugin from Avenza to help clean it up.
Continue reading “UK Election maps”

Advertisements

US Election interactive

I’ve spent the last week or two battling with the vizRT scripting interfaces. We produced a creditable output in the end, but it wasn’t the easiest of jobs. This was the interactive interface on a 100″ Panasonic display that Martin Stanford used on the Sky News election evening. Przemek Pluta did the graphics animation and most of the scripting. I’ve been teaching Przemek how to program and this project seemed to get him into a higher gear. I did the producers interface using Adobe Air which allowed the results to be input and sent to the vizRT machine.
Continue reading “US Election interactive”

Adobe Flex and Apollo for Elections

I’ve had a busy couple of weeks putting together some intranet pages for the 2007 Local Election coverage. The pages are used by the journalists covering the event and had to show a deailed view of the constituency results. I started off with Expression and ASP with some Ajax thrown in, but later decided that it would be an ideal test for a Flex application. It’s a one night only situation, so if it doesn’t work well it would only matter for a day or so. We served it with prebuilt xml files of the results, which are transferred to the client with regular updates. The flex app at the client end can then make various filters and selections from the list to create the separate displays. We had designed the system to be driven from a web service but, in the end, there was much debate and jostling around with database interfacing and we didn’t want to be delayed. We decided to start with the xml files and move later if we had time. Of course, we didn’t. Now that the database is finalised, we can move to the web service option for the General elections when they arrive later in the year.

The Flex app was extremely easy to put together. I used several of the built in components: accordions, split boxes, charts, repeaters etc and I also put together the result bars as mxml components. This is the page,
Local elections intranet

Click on the picture to see the final results; it may take a few seconds to download the xml files as they are over 200k. The bars were all setup as mxml components and were able to take their colouring from a css file. All I had to do to get a list was to give a repeater control and tell it the filtered data source. Flex was then able to display the list with all items fully coloured. So easy. The charts were useful. They were given the same data source and just produced a basic display straight away. To get the histos individually coloured, I had to write a custom renderer, but that was again, surprisingly easy to add in. The components seem to be written with the idea of programmer modification, and I think that will be sufficient for most people. If you need to , then the Flex interface controls have recently been made open source so you can go right back to the code. This is so easy that there must be a downside. I think that performance might be something to be aware of. By making it easy to combine controls together, nest controls within other controls and have many of the sizes controlled from bindable variables the novice programmer could put together a complex interface that takes a large part of your processing power. In this system, it was quick and easy to get data from xml files, but they grew in size as the evening went on, which slowed down the refresh proportionally. We need to plan to hold result objects on the client so that we only need to get the new results each time. We shall do this for the General Elections. I think that it was a valuable experience to see how quickly developments can be done in Flex and what the problems might be.

In the same vein, I wanted to try Apollo and we had an ideal small job for it. On the night we had to get figures from the database into our vizRT graphics system. As the evening progresses, the prediction for the colours of the seats in the Parliament changes, so it’s handy to have an automated way of keeping the model up-to-date without the operators having to deal with the depths of the model. It’s easy to get things wrong in the heat of the moment. The graphics machine is controlled through a TCP socket and this is easy to setup in Flex. We had already read the results from the xml so there wasn’t much more than a few calculations to do. Because we were now a desktop app, we took advantage of saving various defaults and settings onto our local drive as a file that any user would be able to see. The installation of the Apollo runtime was less than 5Mb and was simple to do. The building of the install file, (called an air file) allowed us to bundle in some icons and a style sheet. It installed very quickly. It doesn’t give a choice of where the install should go yet. This is coming later apparently, but I’m not sure whether we would want to put it anywhere other than the default. Our corporate IT lockdown will probably dictate where they install in the end. Updates also installed over the top with no problems. The whole operation was easier than I’d imagined. I must try to do the same on a Macintosh. In theory it should be identical. As more of the designers are sitting with Macs, it might be a way to help them automate some of their day to day tasks.

All in all this was a pleasant experience from Adobe and goes some way to balance their appalling upgrade prices on the CS3 software. I’m still angry that it will cost us almost as much to update our Photoshop Creative Suite and Production Studio bundle as we paid for them less than six months ago. I do want the new technology, but the feeling I get from the Flex software is much more positive.