I’ve been aware that the age profile of the people I talk to about Whitehall is changing – that is, it is getting older, and faster than you'd expect – but I couldn’t be certain that the pattern was holding across the piece.

But over at the Institute for Government, Gavin Freeguard has crunched the numbers and confirmed it: the Civil Service is getting older, with the exception of the Treasury, which is getting younger.

What follows is purely anecdotal, but there are several interesting stories behind the data, I think, all of which deserve further study.

The first is a hint of the wasting effect of the public sector pay freeze is going to have on the Civil Service’s institutional memory. What’s clear from the ONS data is that what is driving up the age profile of some departments are the missing generation from 30 to 50. And I’ve noticed that increasing numbers of Whitehall’s thirty and fortysomethings quitting to get a raise. My – again, wholly anecdotal – impression is that this is also behind the Treasury’s younger age profile. The options to “trade up” salary-wise are greater earlier in that department.

There are couple of problems this is going to cause. The first is the perpetual problem for the Treasury and the Revenue – that it’s more lucrative to leave the department to advise large companies how to avoid paying as much money to government as possible. The second is the lack of people around the top of the Civil Service with prolonged experience of managing big projects to completion. This issue is already acute in the Treasury, where, as one civil servant noted to me during the row over national insurance contributions, no one in the building has any experience of negotiating policy through a small Commons majority (Labour’s majority by the time it lost power was 60, the coalition parties had a combined majority of 77).

When the current wave of 50-somethings retire – and some will retire early, of course – their departments, too, will lose a great deal of institutional memory, as there is not a rising generation of 30- and 40-somethings to replace them.

Tied to both of those problems is the second interesting story: the effect of London’s overheated housing market on not just the Civil Service but the public sector as whole. When you talk to civil servants at the top of the age distribution, they tend to be mortgage-holders or even owner-occupiers, because they got onto the London property ladder before prices spiralled out of reach.

This problem isn’t just confined to Whitehall. Two senior teachers can borrow around £350,000, which in inner London buys you a flat and in Manchester gets you a three or four bedroom-house. That's true across much of the public sector. (It's true in the private sector too but the skills of a qualified teacher, nurse or doctor are more easily transferable across the country for obvious reasons.) London as a whole is getting younger. The plural of anecdote isn't data but my strong impression is that trend is being driven by people leaving the capital in order to afford somewhere with space for children. If housing in the south-east continues to get more and more unaffordable, the public sector is either headed for a recruitment crisis or a salary crisis or both.

The third story and in many ways the least remarkable is morale. Some of those quitting – again, I’m speaking purely anecdotally – might have respected some of their Conservative ministers but came into the Civil Service under a Labour government and hoped to work for one again in 2015. Now they think the Conservatives will be in power for the foreseeable future, they are getting out of Dodge. And again, there’s a specific generational squeeze here – people in their 40s and below for whom Labour government was the norm rather than the historical exception.

The fourth is less party-political, and more personal. I don’t know whether the civil servants who believe that Theresa May wandered into the row over Easter Eggs out of “revenge” are right or not. But what’s more interesting is the large number of civil servants who don’t like the new boss at all and are also looking for an exit. Civil Service brain drain may become a serious crisis sooner than we think.