IF you want to know how we got here, to a three-week lockdown in the west of Scotland in a last-ditch bid to 'save Christmas', you need to trace the figures back to the very beginning of the second wave.

When did things start to change, and when did they start getting out of control?

A quick scan through the testing data published by the Scottish Government shows that the tipping point occurred in July.

On July 8, the number of new Covid cases bottomed out at 50 over the space of a week. From then on, a slow, inexorable rise began.

On July 15, indoor hospitality - pubs, restaurants, and cafes – reopened, along with hairdressers, nail bars, and indoor shopping centres. People were finally allowed to visit friends and family indoors, at one another’s homes.

By August 2, 125 Covid cases per week were being detected.

It is no surprise that infections rose as more people were allowed to mix again indoors as this is exactly how the virus spreads, and lockdown had to end.

READ MORE: Students will be tested before returning home for Christmas

By September 2, however, the trajectory was clearly upwards with 871 new cases of Covid over the previous seven days – a seven-fold increase in four weeks, far outstripping any increase in testing capacity (the number of tests being processed each day had roughly doubled over the same period).

HeraldScotland: The 'second wave' saw case rise steadily at first and then sharply from late September, before peaking towards the end of OctoberThe 'second wave' saw case rise steadily at first and then sharply from late September, before peaking towards the end of October

Various things could have been at play. There was the Aberdeen Covid outbreak mainly linked to city pubs. There was the UK Government’s ‘Eat Out to Help Out’ scheme, which encouraged diners to pack out (at one-metre distances) the country’s hospitality venues from Mondays to Wednesdays.

There were bugs brought back from summer holidays abroad, and potentially not quarantined as they should have been.

Presciently, the Scottish Government scientific advisor and public health expert Professor Devi Sridhar warned we would pay for summer holidays with winter lockdowns.

Between June 22 and November 8, according to Public Health Scotland data, 168,835 people entering Scotland were required to quarantine, but only 20,558 (12%) were followed up by contact tracers.

Schools went back of course, though this is something of a red herring: the return of pupils sparked an upsurge in demand for testing but not actual virus cases. In the whole of August, just 154 cases of Covid were detected among children aged five to 17, out of a total of 1,833 across Scotland.

Cases among children aged two to 17 have increased as overall cases in the population have increased, but they have remained consistently around 10% of the total.

On August 28, police were handed powers to break up household gatherings of more than 15 people amid concerns that house parties were driving transmission, and on September 1 people in Glasgow, East Renfrewshire and West Dunbartonshire were banned from visiting other people’s homes.

READ MORE: Nicola Sturgeon announces new household visiting restrictions for Glasgow area 

And yet, the rise continued.

Perhaps the single biggest blunder of the past four months was the mishandling of universities restarting. The data bears this out, and starkly.

As thousands of students from across the UK – and the world – poured onto campuses and found themselves confined together in halls of residence, the number of Covid cases being detected in Scotland soared from 2,742 in the week ending September 25 to 6,346 by the week ending October 9.

It was also during this point that the percentage positivity rate first broke through the 5% threshold used by the World Health Organisation to gauge when an outbreak is beginning to run out of control.

Something else was happening in September though: contact tracing was too slow.

HeraldScotland: From August 31 until October 11, around 30% of cases - sometimes up to 36% - were taking more than 72 hours for contact tracing to completeFrom August 31 until October 11, around 30% of cases - sometimes up to 36% - were taking more than 72 hours for contact tracing to complete

From August 31 until October 11, between 28% and 36% of cases each week were taking more than 72 hours to ‘close’.

This is the time it takes contact tracers from being notified of a positive case, to interviewing that person about their contacts in the seven days prior to symptoms, to successfully tracing each of these close contacts to tell them to self-isolate.

In May, SAGE warned that “any delay beyond 48-72 hours total before isolation of contacts results in a significant impact on R”.

In other words, the spread of the virus accelerates and prevalence rapidly increases: exactly as it did.

READ MORE: 'Too slow' contact tracing overlapped with surge in cases during second wave

On October 26 – after a mix of hospitality curfews, closures, and alcohol bans – the Covid toll finally peaked, with 10,166 cases in the space of a week.

Since then it has been declining, but faster in some areas than others.

HeraldScotland:

HeraldScotland: Glasgow will move into Level 4 tomorrow while Edinburgh remains in Level 3Glasgow will move into Level 4 tomorrow while Edinburgh remains in Level 3

In Glasgow, the prevalence of the virus remains more than three times higher than in Edinburgh and, at 274 cases per 100,000 population, well above the European Centre for Disease Control’s ‘red traffic light’ warning of 150 cases per 100,000 (though this is based on a test positivity rate of 4% or less, whereas Edinburgh's is averaging 6.7% and Glasgow's 11.7%).

In Edinburgh, prevalence peaked on October 6 and has fallen 56% since; in Glasgow, virus rates have come down by 34% over the same period, but fluctuated and actually peaked as recently as October 26.

There is no sign of a "significant and sustained decline", as Nicola Sturgeon has stated.

And yet - as if we have learned nothing - the UK Government has now tasked its scientists with working out how to relax the rules for five days over Christmas in England, possibly allowing more than six people from four different households to mingle indoors.

Something similar will no doubt follow in Scotland, along with the inevitable spike in cases come January.

The Covid vaccine is more than a remedy for the virus then - it seems it's also the only cure for our own endless cycle of foolishness.