Posts filed under Graphics (287)

December 15, 2014

Interactive city statistics from UK

From the Centre for Advanced Spatial Analysis, at University College London, beautiful and informative maps: is a mapping platform designed to explore the performance and dynamics of cities in Great Britain. The site brings together a wide range of key city indicators, including population, growth, housing, travel behaviour, employment, business location and energy use. These indicators are mapped using a new 3D approach that highlights the size and density of urban centres, and allows relationships between urban form and city performance to be analysed.

The credits are also interesting:

Maps created using TileMill opensource software by Mapbox. Website design uses the following javascript libraries- leaflet.js, mapbox.js and dimple.js (based on d3.js).

Source data Crown © Office for National Statistics, National Records of Scotland, DEFRA, Land Registry, DfT and Ordnance Survey 2014.

All the datasets used are government open data. Websites such as LuminoCity would not be possible without recent open data initiatives and the release of considerable government data into the public domain. Links to the specific datasets used in each map are provided to the bottom right of the page under “Source Data”.

The proliferation of interesting interactive graphics relies very heavily on open-source software (so designers don’t have to be expert programmers) and open data (to give something to display).

December 14, 2014

Statistics about the media: Lorde edition

From @andrewbprice on Twitter: number of articles in the NZ Herald each day about the musician Lorde


The scampi industry, which brings in similar export earnings (via Matt Nippert), doesn’t get anything like the coverage (and fair enough).

More surprisingly, Lorde seems to get more coverage than the mother of our next head of state but two.  It may seem that the royal couple is always in the paper, but actually whole weeks can sometimes go past without a Will & Kate story.

December 13, 2014

Barchart of the week


Via SkepChick, this chart from Venezolana de Televisión (Venezuelan national TV) during the 2013 elections almost makes Fox News look good.

December 12, 2014

Diversity maps

From Aaron Schiff, household income diversity at the census area level, for Auckland


The diversity measure is based on how well the distribution of income groups in the census area unit matches the distribution across the entire Auckland region, so in a sense it’s more a representativeness measure —  an area unit with only very high and very low incomes would have low diversity in this sense (but there aren’t really any). The red areas are low diversity and include the wealthy suburbs on the Waitemātā harbour and the Gulf, and the poor suburbs of south Auckland. This is an example of something that can’t be a dot map: diversity is intrinsically a property of an area, not an individual


From Luis Apiolaza, ethnic diversity in schools across the country



This screenshot shows an area in south Auckland, and it illustrates that ‘diversity’ really means ‘diversity’, it’s not just a code word for non-white. The low-diversity schools (white circles) in the lower half of the shot include Westmount School (99% Pākehā), but also Te Kura Māori o Ngā Tapuwae (99% Māori), and St Mary MacKillop Catholic School (90% Pasifika).  The high-diversity schools in the top half of the shot don’t have a majority of students from any ethnic group.

December 8, 2014

Political opinion: winning the right battles

From Lord Ashcroft (UK, Conservative) via Alex Harroway (UK, decidedly not Conservative), an examination of trends in UK opinion on a bunch of issues, graphed by whether they favour Labour or the Conservatives, and how important they are to respondents. It’s an important combination of information, and a good way to display it (or it would be if it weren’t a low-quality JPEG)



Ashcroft says

The higher up the issue, the more important it is; the further to the right, the bigger the Conservative lead on that issue. The Tories, then, need as many of these things as possible to be in the top right quadrant.

Two things are immediately apparent. One is that the golden quadrant is pretty sparsely populated. There is currently only one measure – being a party who will do what they say (in yellow, near the centre) – on which the Conservatives are ahead of Labour and which is of above average importance in people’s choice of party.

and Alex expands

When you campaign, you’re trying to do two things: convince, and mobilise. You need to win the argument, but you also need to make people think it was worth having the argument. The Tories are paying for the success of pouring abuse on Miliband with the people turned away by the undignified bully yelling. This goes, quite clearly, for the personalisation strategy in general.

December 2, 2014

Known and unknown unkowns

This graph is from the Ministry of Transport Strategic Policy Programme, looking at forecasts of demand for transport infrastructure.


The coloured lines show forecasts of driving (billion vehicle-km) made in the past; the black diamonds show actual driving. It’s clear that actual driving flattened out about ten years ago and the forecasts didn’t. What’s not clear is the implication. It could be that the old models need to be thrown out and that increases in driving are a twentieth-century phase we’ve grown out of. Or, it could be that growth in driving will restart soon. Or something else entirely.

The MoT report very sensibly accepts that we don’t really know what’s going on, and emphasises the importance of flexibility: if you aren’t confident about the future, you should be willing to accept extra costs to avoid premature lock-in, and you should also be prepared to pay for research to get better information.


December 1, 2014

Drug graphs

The Economist has a story on the changes in heroin abuse in the US (via @nzdrug).  It’s interesting to read, but I want to comment on the graphs.  The first one, and the one in the tweet, was this:


The source (if you use the clues in the story to search at JAMA Psychiatry) is here; the format of the graph is the same in the research paper.  I really don’t like this style with two lines for one proportion. At first glance it looks as though there’s information in the way one line mirrors the other, with the total staying approximately constant over time. Then you see that the total is exactly constant over time. It’s 100%.

The other interesting graph is different in the research paper and the story. The data are the same, but the visual impression is different.

drug-nozero drug-zero

The graph on the left, from The Economist, has no zero. The graph on the right has a zero, making the change in mean age look a lot smaller.  In this case I think I’m with The Economist when it comes to the design, though I’d argue for a slightly wider and flatter graph. Barcharts must start at zero (defined appropriately for the data), but lines don’t have to, and an increase in mean age of first use from 16.5 to 22.9 is a pretty big change.

Where I’m not with The Economist is the numbers. The research paper, as I said, gives the numbers as 16.5 in the 1960s and 22.9 in the 2010s. The graph from the story is definitely too high at the maximum and probably too low at the minimum.



National income map

From the Herald’s data blog again, an interactive map of household incomes across the country, by Chris McDowall.

This is a dot map, with one dot for each household. The locations aren’t exact, since that sort of information isn’t publicly available; they are placed randomly within the Census meshblock (which presumably explains the household in the middle of the old Mangere Bridge in the example below).


Dot maps handle varying population density much better than shaded maps: if you zoom out, you can see that typical household income is not even a thing in most of the geographical area of NZ, but if you zoom in on a city, like Auckland, or a small town, like Raetihi or Ohakune, you can see the patterns of income.

You can’t do everything with dots, though.  Firstly, they only work where there really is a location for each number. If you wanted to map air pollution or land value, the reality is spread out, not localised.

More interesting, though, is the comparison with this map from StatsNZ over household income over time in Auckland


A single household income is localised at a single point, but a change between two censuses isn’t.  If you used different dot locations for the four census times, some of the visual change would just be noise from the dot locations, but if you used the same dot locations you’d be implying that those specific households had those specific income changes.


November 28, 2014

Speed, crashes, and tolerances

The police think the speed tolerance change last year worked

Last year’s Safer Summer campaign introduced a speed tolerance of 4km/h above the speed limit for all of December and January, rather than just over the Christmas and New Year period. Police reported a 36 per cent decrease in drivers exceeding the speed limit by 1-10km/h and a 45 per cent decrease for speeding in excess of 10km/h.

Fatal crashes decreased by 22 per cent over the summer campaign. Serious injury crashes decreased by 8 per cent.

According to data from the NZTA Crash Analysis System, ‘driving too fast for the conditions’ was one of the contributing factors in about 20% of serious injury crashes and 30% of fatal crashes over the past seven years. The reductions in crashes seem more than you’d expect from those reductions in speeding.

So, I decided to look at the reduction in crashes where speed was a contributing factor, according to the Crash Analysis System data.

Here’s the trend for December and January, with the four lines showing all crashes where speed was a factor, those with any injury, those with a severe or fatal injury, and those with a fatality. The reduced-tolerance campaign was active for the last time period, December 2013 and January 2014. It looks as though the trend over years is pretty consistent.



For comparison, here’s the trend in November and February, when there wasn’t a campaign running, again showing crashes where speed was listed in the database as a contributing cause, and with the four lines giving all, injury, severe or fatal, and fatal.


There really isn’t much sign that the trend was different last summer from recent years, or that the decrease was bigger in the months that had the campaign.  The trend of fewer crashes and fewer deaths has been going on for some time. Decreases in speeding are part of it, and the police have surely played an important role. That’s the context for assessing any new campaign: unless you have some reason to think last year was especially bad and the decrease would have stopped without the zero-tolerance policy, there isn’t much sign of an impact in the data.

The zero tolerance could be a permanent part of road policing, Mr Bush said.

“We’ll assess that at the end of the campaign, but I can’t see us changing our approach on that.”

No, I can’t either.

November 26, 2014

What doesn’t get into the papers

I complain a lot about the publicity-based surveys of varying quality that make it into the NZ media, but there’s a lot more that gets filtered out.

A journalist (who I’m not sure if I should name) sent me an example from Mitre 10

The research surveyed more than 1,500 New Zealanders on their connection to the quarter-acre dream and asked their opinions on the size of back yards and what they were doing to make the most of them.

An overwhelming 84 per cent of respondents agreed that they liked the idea of the traditional Kiwi quarter-acre paradise – a large plot of land with a standalone house on it, with plenty of room outdoors, and almost all said they would rather live on the traditional quarter-acre section than in high-density housing with reduced outdoor living spaces.

Over half of respondents felt that their outdoor living space is smaller now than what they had growing up (53%). Fifty percent of respondents attributed this to sections of land getting smaller, while 35 per cent believe houses are getting bigger, so there’s less room on a section for an outdoor living space.

The press release is a well-crafted example, with supporting evidence from QV that house sizes are increasing and quotes from a Massey University researcher — not about the survey, but about the general topic.

The survey, on the other hand, was fairly bogus. It was online, and most of the respondents got there through the Mitre 10 Facebook page.  You’d expect (and the Mitre 10 CEO has said) that the Facebook page attracts Mitre 10 customers, not necessarily a representative sample.  The report confirms this, with 88% of respondents being born in NZ, compared to about 75% of the population as a whole.

To make matters worse, here’s the reported data for the paragraphs quoted above. “Houses are bigger” and “sections are smaller” were alternative responses to the same question. You couldn’t answer that both were true — the correct answer, and the position that the report itself is pushing.



One more finding I can’t resist quoting: “The majority of Kiwis (24%) have spent between $1,000 and $5,000 on their outdoor living spaces over the past year. “

Untitled 2