Edinburgh in 1700 was a squalid, overcrowded, almost medieval city. It had been rendered a political backwater by James VI's departure to become James I of England in 1603, and hadn't recovered since.
It was the capital of a country still deeply divided along political and religious lines and which had eleven years earlier suffered the first of three Jacobite Uprisings. Its intellectual life was under the control of radically Presbyterian Protestant clergy who as recently as 1697 had hanged an 18 year-old student, Thomas Aikenhead, for blasphemy. Scotland's economy was innately weak relative to England's; something made far worse by English tariffs on trade and its restrictions on Scots trading with English colonies abroad. And what was left of the Scottish economy was effectively wiped out by Scotland's ill-fated and hugely expensive attempt to establish a colony of its own in Central America, at Darien, in 1698 and 1699.
And yet... by 1790 Edinburgh was a thriving city; the capital city of a country seen as the intellectual powerhouse of Europe; and of a country enjoying an era of innovation in science, engineering and many other fields that allowed it to take a leading role in the industrial revolution and exert an influence on every corner of the globe. Meanwhile, although Edinburgh continued to be referred to by its residents as "Auld Reekie", work was well under way on the Edinburgh New Town, in effect a whole new city being built on open land to the north of what then became known as the Old Town. And people were no longer hung for expressing dissenting religious views.
What had happened to bring about this remarkable set of changes within the space of a single century? Beneath the surface of the otherwise grim 1700 picture, there were already positive elements in place. The 1696 Education Act in Scotland was only the second nationwide system of school education introduced anywhere in the world: and the first since the days of ancient Sparta. And while the Kirk's wish to promote literacy was driven by a desire to ensure everyone could and would read the Bible, once you can read, you can read anything. From the early 1700s Scotland had the highest levels of literacy in the world.
A second factor that led to change in Scotland was the 1707 Act of Union, under which the Scottish Parliament voted itself out of existence and brought about the union of Scotland and England. This was deeply unpopular right across Scotland, and only took place because of a mixture of English bribery of individual Scottish parliamentarians and English economic blackmail of Scotland at large: offering free trade on the one hand, but even more punishing tariffs and barriers if Union did not go ahead. But the Union, however unwillingly Scotland had become part of it, opened up genuine economic opportunities at home and around the world that adventurous and entrepreneurial Scots were quick to exploit.
And the third main pre-existing factor was Scotland's long-standing closeness with France, a country to which Scotland looked for friendship, education, and interchange of ideas to a far greater extent than it ever had with England. In the first decades of the 1700s France was starting out on the intellectual and philosophical revolution that later became known as the Enlightenment. Scotland's close academic links with France meant that the changes in thinking caught hold here, but the Scottish Enlightenment that started to emerge from the 1730s was very different from the French Enlightenment that inspired it.
In France, there was a tendency to see ideas as ends in themselves, to see the philosophy as a product of the Enlightenment rather than as part of a wider process. In Scotland, the wider base of literacy, and a more collaborative spirit among the key thinkers of the day, meant that although world-class philosophers emerged, their ideas were taken on board, developed, and - most importantly - applied by others whose interests ranged from economics through medicine, engineering, geology, law, archeology, physics, chemistry, biology, history and more. The result was astonishing and has since been described as the greatest outpouring of intellectual and scientific accomplishment seen in any nation at any time in history. Not bad for a country that had not long before been considered one of the poorest and most backward in Europe.
The story of how this came about could fill (and has filled) many books. But if one man set the ball rolling, it was Francis Hutcheson, Professor of Philosophy at the University of Glasgow from 1729 to 1746. Over time Hutcheson became the figurehead of a group of academics at Glasgow University including Adam Smith, Thomas Reid and John Millar: while contemporaries at the University of Edinburgh like Adam Ferguson, Dugald Stewart and William Robertson were making their own contributions to the radical new ways of thinking. There were also significant contributions made by non academics: men like Lord Kames, Sir James Steuart, Dr James Anderson and, most of all, the giant of the Scottish Enlightenment, David Hume.
Interaction between these various thinkers took place both inside and outside the academic environment, and in an Edinburgh with few public spaces, taverns, coffee shops and individuals' homes became important debating chambers as ideas were dissected, discussed, and developed, especially ideas in the fields of moral philosophy, political economy and history. Perhaps the most telling comment on this purely philosophical aspect of the Scottish Enlightenment was made by the contemporary French philosopher, Voltaire, when he said: "we look to Scotland for all our ideas of civilization".
But it was when the Scottish Enlightenment spread beyond the realm of the philosophers that it really began to make a lasting impact on Scotland and on the wider world. David Hume had an impact in many areas, especially in that of moral philosophy, but he and his friend Adam Smith were to revolutionise thinking in economics. Adam Smith's 1776 book "An Inquiry into the Nature and Causes of the Wealth of Nations" was the starting point of the subject we now call economics, and one of the most influential books ever written. Hume also revolutionised the way history was written with the narrative approach he adopted in his "History of England".
Other important figures involved in spreading the methods and the impact of the Scottish Enlightenment into areas beyond philosophy included James Hutton, who more or less invented the discipline of geology as a result; Joseph Black, the physicist and chemist; John Walker the natural historian; William Cullen, the doctor and chemist; James Anderson, the lawyer and agricultural expert; James Watt, whose improvements to the steam engine triggered the industrial revolution; the engineer William Murdoch who, amongst other achievements, invented gas lighting in the 1790s; and Scotland's leading writers, Robert Burns and Sir Walter Scott.
And although the first full flowering of the Scottish Enlightenment had passed by 1800, it left a legacy of scientific excellence in Scotland that fed directly to the successes of later scientists like Lord Kelvin and James Clerk Maxwell, a man who Einstein ranked alongside Newton in the all time greats of physics.