Something has gone surprisingly right about the jobs market. Even David Cameron is describing it as a "miracle" - generously ascribing to supernatural powers what other prime ministers might have claimed, at election time, as their own handiwork.

The most recent figures show 248,000 more people in work across the UK, when winter is compared with last autumn. At the same time, 76,000 fewer people were looking for work.

Scottish employment and unemployment has been quite closely aligned with that of the UK for much of the downturn, but this month's figures - from the December to February survey - looked rather less impressive. Unemployment rose by 9000 to 167,000, while a growth in the total labour market meant it was possible also for employment to rise, by a comparatively very modest 3000.

Underneath those figures, there's a lot of change afoot, and a lot of it is not going as right as the headlines - surprisingly or otherwise. So as these are the last figures before the Westminster general election, let's take a look at what the Office for National Statistics can tell us about what's been going on over the past five years. Be prepared for quite a lot of numbers.

Inactive and out

Image copyrightAP

The number of Scots adults in the labour market has been growing, as it has for the whole UK. Partly, that reflects a more attractive set of options as the recovery takes hold. It probably also reflects squeezed household earnings, meaning that partners need to supplement the wages of a main earner.

During 2014, the average number of working aged adults (16 to 64) who were 'economically inactive' was 769,000. Of them, the survey suggested that 191,000 wanted a job, but weren't making themselves available for it.

Of the others, 208,000 were long-term sick, split evenly between men and women, 192,000 were students, while 162,000 were looking after their family or home, of whom only 22,000 were men. Some 123,000 had retired before the age of 65, and 19,000 were temporarily sick.

The number of Scots in work has risen from 2,465,000 in May 2010 to 2,615,000 in the most recent figures. That's a rise of 150,000. (The Scottish Conservatives claim the rise is 178,000. For that extra lift, they have to go back to the February-April figures from 2010.)

The number of Scots looking for work this winter, at 167,000, is down from 236,000 in the spring of 2010.

And the Jobseekers' Allowance claimant count has fallen, partly due to falling unemployment, but also because the eligibility rules have been changing. As part of that, a sanctions regime has been introduced and attracted strong criticism.

In March, there were 78,400 people claiming JSA in Scotland, less than 3% of the workforce. Of them, 53,000 were men. Back in May 2010, the total stood at 134,800,

If you drill down further into the claimant count figures (which are more reliable and accurate, because they're not based on a survey but on actual claims), you find that there were, last month, 20,100 Scots who had been on JSA for more than a year.

Of 19,300 aged 18 to 24 who were claiming JSA, 2100 had been doing so for more than a year. That long-term youth unemployment figure comes after a fall of more than 50% in the past year.

Do it yourself

Image copyrightChristopher Furlong

Of those who are in work, what are the features of the modern, flexible labour market which has delivered such strong headline figures, and how have they changed?

Self-employment has been one of the big change themes. We all know people who have been "let go", often in middle age, and rather than claim benefit, they have used redundancy money to set out on their own, often not too productively. That is while a lot of self-employed people do well, notably including construction and offshore work.

Across the UK, there are now reckoned to be more than 4.5m self-employed workers. That has seen significant growth, though more of it through the deepest part of the downturn than in the past five years. According to the ONS, in a study published last year, in the two years from the first quarter of 2008, the number of employees fell by 758,000 while the number of self-employed rose by 69,000.

From the start of 2010 to the middle of 2014, the number of employees rose 1.1m and the number of self-employed rose much faster, by 663,000. These were disproportionately women, aged over 50. As the numbers rose, their average earnings fell.

It's striking how much stronger this self-employment growth was in London and south-east England than in other parts of the country. In London, one in six workers is self-employed. In Scotland, it's one in nine.

And within Scotland, there are big variations. Rural and island areas have high self-employment rates. In Orkney, the last census showed it was above 28%. Argyll and the Scottish Borders weren't far behind. But in urban areas, with deprivation and where the loss of heavy industry has left a heavy legacy, the rate was below 10%, including West Dunbartonshire and Inverclyde.

The most recent picture, from this winter's ONS survey, shows 301,000 Scots were self-employed. In common with Wales and North-East England, that hasn't risen nearly as fast as the south-east of England. At the end of 2008, amid the financial crunch, there were 268,000 self-employed Scots.

Part-time and temporary

Temporary and part-time work has also been a feature of this more flexible labour market. From that most recent survey, from December to February, it was calculated there were 703,000 part-time workers, of whom 533,000 were women. There were 103,000 workers with second or third jobs. And there were 133,000 on temporary contracts.

As with self-employment, these are often the choices of people not to work in a conventional full-time job with a wage or salary. But the survey figures can show us those who would prefer to step up to more work.

Of 690,000 Scots in part-time work, 112,000 were doing it because they could not find a full-time one.

Of 133,000 Scots in temporary work during last winter, 27,000 did not want a permanent job, while 49,000 did.

What these numbers fail to capture is the extent to which people are frustrated to be in jobs which don't use their skills or their full potential - particularly among young people with degrees, and the debts that go with them.

Zero hours

Image copyrightGetty ImagesImage caption
Without guaranteed work, zero hours can mean a frustrating wait for a call from your employer

A lot of election campaign rhetoric is being directed at zero-hours contracts, which place employees on call, often without any guarantee of work and with uncertainty from week to week or even from day to day. Conservatives have sought to rebrand them as 'flexible hours contracts', while their opponents want to ban "exploitative zero hours contracts".

It is not clear if they mean that "exploitative" covers all zero hours contracts, or that they intend to define the type that exploits and differentiate it, in the law, from the type of flexible contract which suits both employer and employee. The former would disadvantage some who like working flexibly. The latter is difficult to define.

Either way, there's a lack of data on the Scottish use of zero hours contracts. But the ONS published a report last year which suggested there were 1.8m people across the UK on contracts which did not guarantee a minimum number of hours, though they varied a lot by season. More than half of employers in accommodation and food services used them last year. They're also extensively used in education where, for instance, university researchers pick up some teaching hours on such a basis.

The ONS surveyors also asked people if they were on zero hours contracts, and got a very different result, with 700,000 people saying they had such a contract. That may reflect a lack of recognition of the term, when asked about it.

The average number of hours worked was 25 hours per week, reported the ONS. And those most likely to be on such contracts were women, and those under 25 or over 65.

Generation game

Image copyrightThinkstock

And that brings us to a significant generational issue that's grown up in the labour market. Legislation to ban age discrimination, and allowing people to work beyond the conventional retirement age of 65, has seen a notable increase in the number of people doing just that. For some, that's because they want to. For others, it's because their pension provision, or lack of it, means they have to.

In Scotland over the past five years, the number of people aged over 65 who were working has risen from 57,000 to 80,000. Of the latter figure, 47,000 were men. That's a significant rise. It may be partly explained by baby boomers reaching their 60s, bringing their demographic bulge with them. There's a higher share of older workers across the UK as a whole. More than 1.1m people over 65 were working during the winter survey months. That's more than 10% of the age cohort, and 13.4% of older men.

Younger people may have had their job search constrained because older people have not been vacating jobs that younger ones could have taken on. But there have been other factors. To get on the career ladder, intern posts are now a feature of the jobs landscape, particularly for graduates. Many of these are unpaid but taken in order to get work experience. The young are more likely to be temporary workers or on zero hours contracts.

Excluding those in full-time education, the unemployment rate for Scots aged 16 to 24 was at 18.5% five years ago. It peaked at nearly 22% (more than one in five) during 2012, and fell back a bit to 17.1% during the winter past. That's still nearly three times the rate for all working age people, and it has been slightly above the UK youth unemployment level over most of the past five years.

In people terms, that translates to 67,000 young Scots on a job search during winter. And in people terms, the decisions made by the government elected on 7 May will probably have a big impact on the future job prospects and career paths for a generation that's had it particularly tough through the downturn years.