Showing posts with label problem. Show all posts
Showing posts with label problem. Show all posts

Thursday, 30 January 2014

Some tips for charts in Fusion Tables info windows

I've recently been working with some mortgage lending data from banks in Great Britain to produce a new mortgage lending maps site. Once again, I've used Google Fusion Tables to map the data because it's relatively quick and easy - further information can be found here. What's not so easy is getting the info windows to do exactly what you want, particularly when you want to include charts of the type shown below. In this post, I explain a little more about how you can get the info window to display such a chart, what can go wrong when trying to do so and what the code underlying code looks like.


The chart shown above is what you'll see when you click on any polygon in my mortgage lending map website. It takes the data from the underlying Fusion Table and provides a unique info window and chart for each postcode sector - in the case of the above it is for the Cardiff postcode sector of CF24 4, which as you can see had more than £117 million of outstanding mortgage debt owed by 839 households at the end of June 2013. The default info windows created in Fusion Table maps simply contain a number of default data records from columns from the underlying table. With this data, I was keen to show a visual comparison of lending mix in each area, and I wanted to do this using a horizontal bar chart. I'd done info window charts before (e.g. in my Deprivation in Scotland website) but these were line graphs showing change over time.

There is some general help on putting charts in info windows from Google, and this is a very good place to start, and you can also find a lot of explanation for what the different bits of chart code mean in Google's Charts Gallery, or in the Chart Feature List, but to help anyone who might be trying something similar to what I've produced, I thought I would provide an annotated code example. I also want to provide some general troubleshooting advice. Here's what the code looks like inside the Fusion Tables interface:



And here is a Word document with comments added explaining what each bit of code does. You'll notice that it's a bit messy but it produces a very nice looking chart. One thing that I noticed about all this is that if you want the numerical data to appear in the info window with comma separators - as above, for the £117 million figure - then it appears to disappear from the chart. This is what happened to me anyway. My advice would be to keep the number format for your data as 'none' in the Fusion Table field options. My other advice would be to remember to save a good version of your code but most of all to experiment with different things and then share the results.

I hope someone finds this useful! I know I would have before I got into this. 

Monday, 10 June 2013

The London Problem Revisited

I've been thinking about the matter of London and the kind of 'two-speed Britain' stories which have been in the press recently. The idea is that London's continued growth and prosperity - in contrast to the rest of the UK - is a problem. The BBC covered this via Stephanie Flanders in March and the Guardian did a piece on it in May this year. The Economist even did a special supplement on London last year, entitled 'On a High' in which they covered a range of issues, not just economic growth - e.g. a map and some of my work on deprivation on p. 7 of the pdf. These kinds of stories always generate a lot of debate (see the comments on the Guardian piece for an example) of the 'London vs. the rest' variety but I suppose the thing that sticks in my mind is that none of this is really new. The precise nature of London's recent resurgence is perhaps unique but it's hardly a new problem. I was reminded of this last week at the Centre for Urban Policy Studies 30th Anniversary conference in Manchester when Sir Brian Briscoe quoted from the Barlow Report of 1940 (photo below - yes, I actually have a real copy to hand!). 


This in turn reminded me of the 1985 edition of the Planner magazine that I've had on my desk for some time. Why do I have this? Because it's a special issue to commemorate the life of former Chief Planner and University of Sheffield Professor JR James, who featured on the front cover of the April 1985 edition, five years after his untimely death in September 1980. In this edition, leading planners of the time gave a series of lectures on seminal reports - Peter Hall on The Barlow Report, Gerald Wibberley on The Scott Report and HR Parker on The Uthwatt Report.





Peter Hall's reading  of Barlow is fascinating for many reasons but I found it interesting that he chose to pick out the exact same quote that Sir Brian Briscoe did last week: "the continued drift of population to London and the Home Counties constitutes a social, economic and strategical problem which demands immediate attention" (p. 202 - see below for copy of the original, in paragraph 5).


These words were written in very different times (e.g. it was published shortly after the outbreak of WW2 and in fact some of the content had to be changed to reflect this) but the over-arching message of a dominant London and a lagging rest of Britain resonates today. The policy solutions proposed in 1940, however, are rather different to those suggested today. For example, there was a strong emphasis on regionalism in the Barlow Report - unlike today. Further, there was a real concern about what could be done to address this nationally problematic uneven development (well, at least in theory) - e.g. Part IV from p. 185 is entitled 'Remedies ... And to Report what Remedial Measures, if any, should be taken in the National Interest'. So, this is not just an historical curiosity. On p. 197 we have more on 'methods of decentralisation or dispersal', which many today would like to see.

As for the man himself, Sir Anderson Montague-Barlow (image at bottom of page), I'm not sure what he'd make of the current rhetoric of a 'two-speed' UK but I'm sure he'd recognise that it's nothing new. The question that remains in my mind is whether this London boom will continue indefinitely and what the consequences of that might be. Some final thoughts for now...

1. Lost in much of this two-speed UK talk is the fact that inequality and poverty in London are quite extreme. That's what I was getting at in my very small contribution to the Economist supplement last year and in another Guardian piece. This is something that Ben Hennig has been looking at in more detail in recent times - see here for more.

2. Much less has been said about why this London/rest issue might be a problem and - more importantly - what might be done about it. Certainly, I don't think we'll see a Barlow-style Royal Commission about this any time soon.

3. What about the contribution of the rest of the UK to London's growth - e.g. in sending graduates, commuters, funding for infrastructure, and public transport - to name just four factors. The question here might be to what extent is London's growth down to the fact that it has a Barlow-esque gravity? Easy to answer but harder to quantify.

4. Are we witnessing a 'London supernova'? Will this bright shining star gradually fade? Fancy rhetoric, but worth thinking about, given the cyclical nature of boom and bust. See p. 52-54 of this RTPI report for more.

5. And, finally, we ought to look at old books and magazines more!