Edinburgh (; Scots: Edinburgh; Scottish Gaelic: Dùn Èideann [ˈt̪uːn ˈeːtʲən̪ˠ]) is the capital city of Scotland and one of its 32 council areas. Historically part of the county of Midlothian (interchangeably Edinburghshire before 1921), it is located in Lothian on the Firth of Forth's southern shore. Edinburgh is Scotland's second-most populous city and the seventh-most populous city in the United Kingdom.
Recognised as the capital of Scotland since at least the 15th century, Edinburgh is the seat of the Scottish Government, the Scottish Parliament and the highest courts in Scotland. The city's Palace of Holyroodhouse is the official residence of the monarch in Scotland. The city has long been a centre of education, particularly in the fields of medicine, Scots law, literature, philosophy, the sciences and engineering. After London, it is the second-largest financial centre in the United Kingdom, and the city's historical and cultural attractions have made it the UK's second-most visited tourist destination, again after London, attracting 4.9 million visits, including 2.4 million from overseas in 2018. 
Edinburgh's official population estimates are 488,050 (mid-2016) for the Edinburgh locality, 518,500 (mid-2019) for the City of Edinburgh council area, and 1,339,380 (2014) for the wider city region. Edinburgh lies at the heart of the Edinburgh and South East Scotland city region comprising East Lothian, Edinburgh, Fife, Midlothian, Scottish Borders and West Lothian.
The city is the annual venue of the General Assembly of the Church of Scotland. It is home to national cultural institutions such as the National Museum of Scotland, the National Library of Scotland and the Scottish National Gallery. The University of Edinburgh, founded in 1582 and now one of three in the city, is placed 20th in the QS World University Rankings for 2020. The city is also known for the Edinburgh International Festival and the Fringe, the latter being the world's largest annual international arts festival. Historic sites in Edinburgh include Edinburgh Castle, the Palace of Holyroodhouse, the churches of St. Giles, Greyfriars and the Canongate, and the extensive Georgian New Town built in the 18th/19th centuries. Edinburgh's Old Town and New Town together are listed as a UNESCO World Heritage site, which has been managed by Edinburgh World Heritage since 1999.
"Edin", the root of the city's name, derives from Eidyn, the name for this region in Cumbric, the Brittonic Celtic language formerly spoken there. The name's meaning is unknown. The district of Eidyn centred on the stronghold Din Eidyn, the dun or hillfort of Eidyn. This stronghold is believed to have been located at Castle Rock, now the site of Edinburgh Castle. Eidyn was conquered by the Angles of Bernicia in the 7th century and later by the Scots in the 10th century. As the language shifted to Old English, and subsequently to Scots, the Brittonic din in Din Eidyn was replaced by burh, producing Edinburgh. Similarly, din became dùn in Scottish Gaelic, producing Dùn Èideann.
The city is affectionately nicknamed Auld Reekie, Scots for Old Smoky, for the views from the country of the smoke-covered Old Town. A remark on a poem in an 1800 collection of the poems of Allan Ramsay said, "Auld Reeky. A name the country people give Edinburgh from the cloud of smoke or reek that is always impending over it."
Thomas Carlyle said, "Smoke cloud hangs over old Edinburgh,—for, ever since Aeneas Silvius's time and earlier, the people have the art, very strange to Aeneas, of burning a certain sort of black stones, and Edinburgh with its chimneys is called 'Auld Reekie' by the country people."
Robert Chambers who said that the sobriquet could not be traced before the reign of Charles II attributed the name to a Fife laird, Durham of Largo, who regulated the bedtime of his children by the smoke rising above Edinburgh from the fires of the tenements. "It's time now bairns, to tak' the beuks, and gang to our beds, for yonder's Auld Reekie, I see, putting on her nicht -cap!"
Some have called Edinburgh the Athens of the North for a variety of reasons. The earliest comparison between the two cities showed that they had a similar topography, with the Castle Rock of Edinburgh performing a similar role to the Athenian Acropolis. Both of them had flatter, fertile agricultural land sloping down to a port several miles away (respectively Leith and Piraeus). Although this arrangement is common in Southern Europe, it is rare in Northwestern Europe. The 18th-century intellectual life, referred to as the Scottish Enlightenment, was a key influence in gaining the name. Such luminaries as David Hume and Adam Smith shone during this period. As Edinburgh lost most of its political importance after the Union, some hoped that the city could gain a similar influence on London as Athens had on Rome. Also a contributing factor was the later neoclassical architecture, particularly that of William Henry Playfair, and the National Monument. Tom Stoppard's character Archie, of Jumpers, said, perhaps playing on Reykjavík meaning "smoky bay", that the "Reykjavík of the South" would be more appropriate.
Edina is a late 18th century poetical form used by the Scots poets Robert Fergusson and Robert Burns. "Embra" or "Embro" are colloquialisms from the same time, as in Robert Garioch's Embro to the Ploy.
Ben Jonson described it as "Britaine's other eye", and Sir Walter Scott referred to it as "yon Empress of the North". Robert Louis Stevenson, also a son of the city, wrote that Edinburgh "is what Paris ought to be."
The earliest known human habitation in the Edinburgh area was at Cramond, where evidence was found of a Mesolithic camp site dated to c. 8500 BC. Traces of later Bronze Age and Iron Age settlements have been found on Castle Rock, Arthur's Seat, Craiglockhart Hill and the Pentland Hills.
When the Romans arrived in Lothian at the end of the 1st century AD, they found a Brittonic Celtic tribe whose name they recorded as the Votadini. The Votadini transitioned into the Gododdin kingdom in the Early Middle Ages, with Eidyn serving as one of the kingdom's districts. During this period, the Castle Rock site, thought to have been the stronghold of Din Eidyn, emerged as the kingdom's major centre. The medieval poem Y Gododdin describes a war band from across the Brittonic world who gathered in Eidyn before a fateful raid; this may describe a historical event around AD 600.
In 638, the Gododdin stronghold was besieged by forces loyal to King Oswald of Northumbria, and around this time control of Lothian passed to the Angles. Their influence continued for the next three centuries until around 950, when, during the reign of Indulf, son of Constantine II, the "burh" (fortress), named in the 10th-century Pictish Chronicle as oppidum Eden, was abandoned to the Scots. It thenceforth remained under their jurisdiction.
The royal burgh was founded by King David I in the early 12th century on land belonging to the Crown, though the date of its charter is unknown. The first documentary evidence of the medieval burgh is a royal charter, c. 1124–1127, by King David I granting a toft in burgo meo de Edenesburg to the Priory of Dunfermline. By the middle of the 14th century, the French chronicler Jean Froissart was describing it as the capital of Scotland (c. 1365), and James III (1451–88) referred to it in the 15th century as "the principal burgh of our kingdom". Despite the destruction caused by an English assault in 1544, the town slowly recovered, and was at the centre of events in the 16th-century Scottish Reformation and 17th-century Wars of the Covenant.
In 1603, King James VI of Scotland succeeded to the English throne, uniting the crowns of Scotland and England in a personal union known as the Union of the Crowns, though Scotland remained, in all other respects, a separate kingdom. In 1638, King Charles I's attempt to introduce Anglican church forms in Scotland encountered stiff Presbyterian opposition culminating in the conflicts of the Wars of the Three Kingdoms. Subsequent Scottish support for Charles Stuart's restoration to the throne of England resulted in Edinburgh's occupation by Oliver Cromwell's Commonwealth of England forces – the New Model Army – in 1650.
In the 17th century, Edinburgh's boundaries were still defined by the city's defensive town walls. As a result, the city's growing population was accommodated by increasing the height of the houses. Buildings of 11 storeys or more were common, and have been described as forerunners of the modern-day skyscraper. Most of these old structures were replaced by the predominantly Victorian buildings seen in today's Old Town.
Following the Treaty of Union in 1706, the Parliaments of England and Scotland passed Acts of Union in 1706 and 1707 respectively, uniting the two kingdoms in the Kingdom of Great Britain effective from 1 May 1707. As a consequence, the Parliament of Scotland merged with the Parliament of England to form the Parliament of Great Britain, which sat at Westminster in London. The Union was opposed by many Scots, resulting in riots in the city.
By the first half of the 18th century, Edinburgh was described as one of Europe's most densely populated, overcrowded and unsanitary towns. Visitors were struck by the fact that the various social classes shared the same urban space, even inhabiting the same tenement buildings; although here a form of social segregation did prevail, whereby shopkeepers and tradesmen tended to occupy the cheaper-to-rent cellars and garrets, while the more well-to-do professional classes occupied the more expensive middle storeys.
During the Jacobite rising of 1745, Edinburgh was briefly occupied by the Jacobite "Highland Army" before its march into England. After its eventual defeat at Culloden, there followed a period of reprisals and pacification, largely directed at the rebellious clans. In Edinburgh, the Town Council, keen to emulate London by initiating city improvements and expansion to the north of the castle, reaffirmed its belief in the Union and loyalty to the Hanoverian monarch George III by its choice of names for the streets of the New Town: for example, Rose Street and Thistle Street; and for the royal family, George Street, Queen Street, Hanover Street, Frederick Street and Princes Street (in honour of George's two sons).
In the second half of the century, the city was at the heart of the Scottish Enlightenment, when thinkers like David Hume, Adam Smith, James Hutton and Joseph Black were familiar figures in its streets. Edinburgh became a major intellectual centre, earning it the nickname "Athens of the North" because of its many neo-classical buildings and reputation for learning, recalling ancient Athens. In the 18th-century novel The Expedition of Humphry Clinker by Tobias Smollett one character describes Edinburgh as a "hotbed of genius". Edinburgh was also a major centre for the Scottish book trade. The highly successful London bookseller Andrew Millar was apprenticed there to James McEuen.
From the 1770s onwards, the professional and business classes gradually deserted the Old Town in favour of the more elegant "one-family" residences of the New Town, a migration that changed the city's social character. According to the foremost historian of this development, "Unity of social feeling was one of the most valuable heritages of old Edinburgh, and its disappearance was widely and properly lamented."
Although Edinburgh's traditional industries of printing, brewing and distilling continued to grow in the 19th century, and were joined by new rubber works and engineering works, there was little industrialisation compared with other cities in Britain. By 1821, Edinburgh had been overtaken by Glasgow as Scotland's largest city. The city centre between Princes Street and George Street became a major commercial and shopping district, a development partly stimulated by the arrival of railways in the 1840s. The Old Town became an increasingly dilapidated, overcrowded slum with high mortality rates. Improvements carried out under Lord Provost William Chambers in the 1860s began the transformation of the area into the predominantly Victorian Old Town seen today. More improvements followed in the early 20th century as a result of the work of Patrick Geddes, but relative economic stagnation during the two world wars and beyond saw the Old Town deteriorate further before major slum clearance in the 1960s and 1970s began to reverse the process. University building developments which transformed the George Square and Potterrow areas proved highly controversial.
Since the 1990s a new "financial district", including the Edinburgh International Conference Centre, has grown mainly on demolished railway property to the west of the castle, stretching into Fountainbridge, a run-down 19th-century industrial suburb which has undergone radical change since the 1980s with the demise of industrial and brewery premises. This ongoing development has enabled Edinburgh to maintain its place as the United Kingdom's second largest financial and administrative centre after London. Financial services now account for a third of all commercial office space in the city. The development of Edinburgh Park, a new business and technology park covering 38 acres (15 ha), 4 mi (6 km) west of the city centre, has also contributed to the District Council's strategy for the city's major economic regeneration.
In 1998, the Scotland Act, which came into force the following year, established a devolved Scottish Parliament and Scottish Executive (renamed the Scottish Government since September 2007). Both based in Edinburgh, they are responsible for governing Scotland while reserved matters such as defence, taxation and foreign affairs remain the responsibility of the Parliament of the United Kingdom in London.
Situated in Scotland's Central Belt, Edinburgh lies on the Firth of Forth's southern shore. The city centre is 2 1⁄2 miles (4.0 km) southwest of the shoreline of Leith and 26 miles (42 km) inland, as the crow flies, from the east coast of Scotland and the North Sea at Dunbar. While the early burgh grew up near the prominent Castle Rock, the modern city is often said to be built on seven hills, namely Calton Hill, Corstorphine Hill, Craiglockhart Hill, Braid Hill, Blackford Hill, Arthur's Seat and the Castle Rock, giving rise to allusions to the seven hills of Rome.
Occupying a narrow gap between the Firth of Forth to the north and the Pentland Hills and their outrunners to the south, the city sprawls over a landscape which is the product of early volcanic activity and later periods of intensive glaciation. :64–65 Igneous activity between 350 and 400 million years ago, coupled with faulting, led to the creation of tough basalt volcanic plugs, which predominate over much of the area.:64–65 One such example is the Castle Rock which forced the advancing ice sheet to divide, sheltering the softer rock and forming a 1-mile-long (1.6 km) tail of material to the east, thus creating a distinctive crag and tail formation.:64–65 Glacial erosion on the north side of the crag gouged a deep valley later filled by the now drained Nor Loch. These features, along with another hollow on the rock's south side, formed an ideal natural strongpoint upon which Edinburgh Castle was built.:64–65 Similarly, Arthur's Seat is the remains of a volcano dating from the Carboniferous period, which was eroded by a glacier moving west to east during the ice age.:64–65 Erosive action such as plucking and abrasion exposed the rocky crags to the west before leaving a tail of deposited glacial material swept to the east. This process formed the distinctive Salisbury Crags, a series of teschenite cliffs between Arthur's Seat and the location of the early burgh. The residential areas of Marchmont and Bruntsfield are built along a series of drumlin ridges south of the city centre, which were deposited as the glacier receded.:64–65
Other prominent landforms such as Calton Hill and Corstorphine Hill are also products of glacial erosion.:64–65 The Braid Hills and Blackford Hill are a series of small summits to the south of the city centre that command expansive views looking northwards over the urban area to the Firth of Forth.:64–65
Edinburgh is drained by the river named the Water of Leith, which rises at the Colzium Springs in the Pentland Hills and runs for 29 kilometres (18 mi) through the south and west of the city, emptying into the Firth of Forth at Leith. The nearest the river gets to the city centre is at Dean Village on the north-western edge of the New Town, where a deep gorge is spanned by Thomas Telford's Dean Bridge, built in 1832 for the road to Queensferry. The Water of Leith Walkway is a mixed-use trail that follows the course of the river for 19.6 kilometres (12.2 mi) from Balerno to Leith.
Excepting the shoreline of the Firth of Forth, Edinburgh is encircled by a green belt, designated in 1957, which stretches from Dalmeny in the west to Prestongrange in the east. With an average width of 3.2 kilometres (2 mi) the principal objectives of the green belt were to contain the outward expansion of the city and to prevent the agglomeration of urban areas. Expansion affecting the green belt is strictly controlled but developments such as Edinburgh Airport and the Royal Highland Showground at Ingliston lie within the zone. Similarly, suburbs such as Juniper Green and Balerno are situated on green belt land. One feature of the Edinburgh green belt is the inclusion of parcels of land within the city which are designated green belt, even though they do not connect with the peripheral ring. Examples of these independent wedges of green belt include Holyrood Park and Corstorphine Hill.
Edinburgh includes former towns and villages that retain much of their original character as settlements in existence before they were absorbed into the expanding city of the nineteenth and twentieth centuries. Many areas, such as Dalry, contain residences that are multi-occupancy buildings known as tenements, although the more southern and western parts of the city have traditionally been less built-up with a greater number of detached and semi-detached villas.
The historic centre of Edinburgh is divided in two by the broad green swathe of Princes Street Gardens. To the south, the view is dominated by Edinburgh Castle, built high on Castle Rock, and the long sweep of the Old Town descending towards Holyrood Palace. To the north lie Princes Street and the New Town.
The West End includes the financial district, with insurance and banking offices as well as the Edinburgh International Conference Centre.
Edinburgh's Old and New Towns were listed as a UNESCO World Heritage Site in 1995 in recognition of the unique character of the Old Town with its medieval street layout and the planned Georgian New Town, including the adjoining Dean Village and Calton Hill areas. There are over 4,500 listed buildings within the city, a higher proportion relative to area than any other city in the United Kingdom.
The Royal Mile runs downhill and terminates at Holyrood Palace. Minor streets (called closes or wynds) lie on either side of the main spine forming a herringbone pattern. The street has several fine public buildings such as St Giles' Cathedral, the City Chambers and the Law Courts. Other places of historical interest nearby are Greyfriars Kirkyard and the Grassmarket. The street layout is typical of the old quarters of many Northwestern European cities.
The castle is perched on top of a rocky crag (the remnant of an extinct volcano) and the Royal Mile runs down the crest of a ridge from it. Due to space restrictions imposed by the narrowness of this landform, the Old Town became home to some of the earliest "high rise" residential buildings. Multi-storey dwellings known as lands were the norm from the 16th century onwards with ten and eleven storeys being typical and one even reaching fourteen or fifteen storeys. Numerous vaults below street level were inhabited to accommodate the influx of incomers, particularly Irish immigrants, during the Industrial Revolution.
The New Town was an 18th-century solution to the problem of an increasingly crowded city which had been confined to the ridge sloping down from the castle. In 1766 a competition to design a "New Town" was won by James Craig, a 27-year-old architect. The plan was a rigid, ordered grid, which fitted in well with Enlightenment ideas of rationality. The principal street was to be George Street, running along the natural ridge to the north of what became known as the "Old Town". To either side of it are two other main streets: Princes Street and Queen Street. Princes Street has become Edinburgh's main shopping street and now has few of its Georgian buildings in their original state. The three main streets are connected by a series of streets running perpendicular to them. The east and west ends of George Street are terminated by St Andrew Square and Charlotte Square respectively. The latter, designed by Robert Adam, influenced the architectural style of the New Town into the early 19th century. Bute House, the official residence of the First Minister of Scotland, is on the north side of Charlotte Square.
The hollow between the Old and New Towns was formerly the Nor Loch, which was created for the town's defence but came to be used by the inhabitants for dumping their sewage. It was drained by the 1820s as part of the city's northward expansion. Craig's original plan included an ornamental canal on the site of the loch, but this idea was abandoned. Soil excavated while laying the foundations of buildings in the New Town was dumped on the site of the loch to create the slope connecting the Old and New Towns known as The Mound.
In the middle of the 19th century the National Gallery of Scotland and Royal Scottish Academy Building were built on The Mound, and tunnels for the railway line between Haymarket and Waverley stations were driven through it.
The Southside is a residential part of the city, which includes the districts of St Leonards, Marchmont, Morningside, Newington, Sciennes, the Grange and Blackford. The Southside is broadly analogous to the area covered formerly by the Burgh Muir, and was developed as a residential area after the opening of the South Bridge in the 1780s. The Southside is particularly popular with families (many state and private schools are here), young professionals and students (the central University of Edinburgh campus is based around George Square just north of Marchmont and the Meadows), and Napier University (with major campuses around Merchiston and Morningside). The area is also well provided with hotel and "bed and breakfast" accommodation for visiting festival-goers. These districts often feature in works of fiction. For example, Church Hill in Morningside, was the home of Muriel Spark's Miss Jean Brodie, and Ian Rankin's Inspector Rebus lives in Marchmont and works in St Leonards.
Leith was historically the port of Edinburgh, an arrangement of unknown date that was confirmed by the royal charter Robert the Bruce granted to the city in 1329. The port developed a separate identity from Edinburgh, which to some extent it still retains, and it was a matter of great resentment when the two burghs merged in 1920 into the City of Edinburgh. Even today the parliamentary seat is known as "Edinburgh North and Leith". The loss of traditional industries and commerce (the last shipyard closed in 1983) resulted in economic decline. The Edinburgh Waterfront development has transformed old dockland areas from Leith to Granton into residential areas with shopping and leisure facilities and helped rejuvenate the area. With the redevelopment, Edinburgh has gained the business of cruise liner companies which now provide cruises to Norway, Sweden, Denmark, Germany, and the Netherlands.
The coastal suburb of Portobello is characterised by Georgian villas, Victorian tenements, a beach and promenade and cafés, bars, restaurants and independent shops. There are rowing and sailing clubs and a restored Victorian swimming pool, including Turkish baths.
The urban area of Edinburgh is almost entirely within the City of Edinburgh Council boundary, merging with Musselburgh in East Lothian. Towns within easy reach of the city boundary include Haddington, Tranent, Prestonpans, Dalkeith, Bonnyrigg, Loanhead, Penicuik, Broxburn, Livingston and Dunfermline. Edinburgh lies at the heart of the Edinburgh & South East Scotland City region with a population in 2014 of 1,339,380.
Like most of Scotland, Edinburgh has a cool, temperate, maritime climate which, despite its northerly latitude, is milder than places which lie at similar latitudes such as Moscow and Labrador. The city's proximity to the sea mitigates any large variations in temperature or extremes of climate. Winter daytime temperatures rarely fall below freezing while summer temperatures are moderate, rarely exceeding 22 °C (72 °F). The highest temperature recorded in the city was 31.6 °C (88.9 °F) on 25 July 2019 at Gogarbank, beating the previous record of 31 °C (88 °F) on 4 August 1975 at Edinburgh Airport. The lowest temperature recorded in recent years was −14.6 °C (5.7 °F) during December 2010 at Gogarbank.
Given Edinburgh's position between the coast and hills, it is renowned as "the windy city", with the prevailing wind direction coming from the south-west, which is often associated with warm, unstable air from the North Atlantic Current that can give rise to rainfall – although considerably less than cities to the west, such as Glasgow. Rainfall is distributed fairly evenly throughout the year. Winds from an easterly direction are usually drier but considerably colder, and may be accompanied by haar, a persistent coastal fog. Vigorous Atlantic depressions, known as European windstorms, can affect the city between October and May.
Located slightly north of the city centre, the weather station at the Royal Botanic Garden Edinburgh (RBGE) has been an official weather station for the Met Office since 1956. The Met Office operates its own weather station at Gogarbank on the city's western outskirts, near Edinburgh Airport. This slightly inland station has a slightly wider temperature span between seasons, is cloudier and somewhat wetter, but differences are minor.
Temperature and rainfall records have been kept at the Royal Observatory since 1764. In that time, the warmest month on record was July 1779, with an average temperature of 18.4 °C (65.1 °F), whereas the coldest was January 1814, with a mean temperature of −3.1 °C (26.4 °F). The warmest years on record are 1779 and 1846, both with mean temperatures of 9.8 °C (49.6 °F). The coldest year on record is 1879, with a mean temperature of 6.6 °C (43.9 °F). The wettest month on record was August 1948, with 238.8 millimetres (9.40 in). The driest was February 1934, with 2.3 millimetres (0.091 in). The wettest year on record was 1916, with 992.9 millimetres (39.09 in). The driest year on record was 1826, with 388.0 millimetres (15.28 in) of rainfall.
Edinburgh has a high proportion of young adults, with 19.5% of the population in their 20s (exceeded only by Aberdeen) and 15.2% in their 30s which is the highest in Scotland. The proportion of Edinburgh's population born in the UK fell from 92% to 84% between 2001 and 2011, while the proportion of White Scottish-born fell from 78% to 70%. Of those Edinburgh residents born in the UK, 335,000 or 83% were born in Scotland, with 58,000 or 14% being born in England.
Some 13,000 people or 2.7% of the city's population are of Polish descent. 39,500 people or 8.2% of Edinburgh's population class themselves as Non-White which is an increase from 4% in 2001. Of the Non-White population, the largest group by far are Asian, totalling 26,264 people. Within the Asian population, people of Chinese descent are now the largest sub-group, with 8,076 people, amounting to about 1.7% of the city's total population. The city's population of Indian descent amounts to 6,470 (1.4% of the total population), while there are some 5,858 of Pakistani descent (1.2% of the total population). Although they account for only 1,277 people or 0.3% of the city's population, Edinburgh has the highest number and proportion of people of Bangladeshi descent in Scotland. Over 7,000 people were born in African countries (1.6% of the total population) and nearly 7,000 in the Americas. With the notable exception of Inner London, Edinburgh has a higher number of people born in the United States (over 3,700) than any other city in the UK.
The proportion of people born outside the UK was 15.9% compared with 8% in 2001.
A census by the Edinburgh presbytery in 1592 recorded a population of 8,003 adults spread equally north and south of the High Street which runs along the spine of the ridge sloping down from the Castle. In the 18th and 19th centuries, the population expanded rapidly, rising from 49,000 in 1751 to 136,000 in 1831, primarily due to migration from rural areas.:9 As the population grew, problems of overcrowding in the Old Town, particularly in the cramped tenements that lined the present day Royal Mile and the Cowgate, were exacerbated.:9 Poor sanitary arrangements resulted in a high incidence of disease,:9 with outbreaks of cholera occurring in 1832, 1848 and 1866.
The construction of the New Town from 1767 onwards witnessed the migration of the professional and business classes from the difficult living conditions in the Old Town to the lower density, higher quality surroundings taking shape on land to the north.  Expansion southwards from the Old Town saw more tenements being built in the 19th century, giving rise to Victorian suburbs such as Dalry, Newington, Marchmont and Bruntsfield.
Early 20th-century population growth coincided with lower-density suburban development. As the city expanded to the south and west, detached and semi-detached villas with large gardens replaced tenements as the predominant building style. Nonetheless, the 2001 census revealed that over 55% of Edinburgh's population were still living in tenements or blocks of flats, a figure in line with other Scottish cities, but much higher than other British cities, and even central London.
From the early to mid 20th century, the growth in population, together with slum clearance in the Old Town and other areas, such as Dumbiedykes, Leith, and Fountainbridge, led to the creation of new estates such as Stenhouse and Saughton, Craigmillar and Niddrie, Pilton and Muirhouse, Piershill, and Sighthill.
In 2018 the Church of Scotland had 20,956 members in 71 congregations in the Presbytery of Edinburgh. Its most prominent church is St Giles' on the Royal Mile, first dedicated in 1243 but believed to date from before the 12th century. Saint Giles is historically the patron saint of Edinburgh. St Cuthbert's, situated at the west end of Princes Street Gardens in the shadow of Edinburgh Castle and St Giles' can lay claim to being the oldest Christian sites in the city, though the present St Cuthbert's, designed by Hippolyte Blanc, was dedicated in 1894.
Other Church of Scotland churches include Greyfriars Kirk, the Canongate Kirk, St Andrew's and St George's West Church and the Barclay Church. The Church of Scotland Offices are in Edinburgh, as is the Assembly Hall where the annual General Assembly is held.
The has 27 parishes across the city. The Archbishop of St Andrews and Edinburgh has his official residence in Greenhill, and the diocesan offices are in nearby Marchmont. The Diocese of Edinburgh of the Scottish Episcopal Church has over 50 churches, half of them in the city. Its centre is the late-19th-century Gothic style St Mary's Cathedral in the West End's Palmerston Place. Orthodox Christianity is represented by Pan, Romanian and Russian Orthodox churches. There are several independent churches in the city, both Catholic and Protestant, including Charlotte Chapel, Carrubbers Christian Centre, Bellevue Chapel and Sacred Heart. There are also churches belonging to Quakers, Christadelphians, Seventh-day Adventists, Church of Christ, Scientist, The Church of Jesus Christ of Latter-day Saints (LDS Church) and Elim Pentecostal Church.
Muslims have several places of worship across the city. Edinburgh Central Mosque, the largest Islamic place of worship, is located in Potterrow on the city's Southside, near Bristo Square. Construction was largely financed by a gift from King Fahd of Saudi Arabia and was completed in 1998. There is also an Ahmadiyya Muslim community.
The first recorded presence of a Jewish community in Edinburgh dates back to the late 18th century. Edinburgh's Orthodox synagogue, opened in 1932, is in Salisbury Road and can accommodate a congregation of 2000. A Liberal Jewish congregation also meets in the city.
The Edinburgh Buddhist Centre, run by the Triratna Buddhist Community, formerly situated in Melville Terrace, now runs sessions at the Healthy Life Centre, Bread Street. Other Buddhist traditions are represented by groups which meet in the capital: the Community of Interbeing (followers of Thich Nhat Hanh), Rigpa, Samye Dzong, Theravadin, Pure Land and Shambala. There is a Sōtō Zen Priory in Portobello and a Theravadin Thai Buddhist Monastery in Slateford Road.
Edinburgh has the strongest economy of any city in the United Kingdom outside London and the highest percentage of professionals in the UK with 43% of the population holding a degree-level or professional qualification. According to the Centre for International Competitiveness, it is the most competitive large city in the United Kingdom. It also has the highest gross value added per employee of any city in the UK outside London, measuring £57,594 in 2010. It was named European Best Large City of the Future for Foreign Direct Investment and Best Large City for Foreign Direct Investment Strategy in the Financial Times fDi magazine awards 2012/13.
In the 19th century, Edinburgh's economy was known for banking, publishing and brewing. Today, its economy is based mainly on financial services, scientific research, higher education, and tourism. In March 2010, unemployment in Edinburgh was comparatively low at 3.6%, and it remains consistently below the Scottish average of 4.5%. Edinburgh is the second most visited city by foreign visitors in the UK after London.
Banking has been a mainstay of the Edinburgh economy for over 300 years, since the Bank of Scotland was established by an act of the Scottish Parliament in 1695. Today, the financial services industry, with its particularly strong insurance and investment sectors, and underpinned by Edinburgh-based firms such as Scottish Widows and Standard Life Aberdeen, accounts for the city being the UK's second financial centre after London and Europe's fourth in terms of equity assets. The NatWest Group (formerly Royal Bank of Scotland Group) opened new global headquarters at Gogarburn in the west of the city in October 2005. The city is home to the headquarters of Bank of Scotland, Sainsbury's Bank, Tesco Bank, and TSB Bank.
Tourism is also an important element in the city's economy. As a World Heritage Site, tourists visit historical sites such as Edinburgh Castle, the Palace of Holyroodhouse and the Old and New Towns. Their numbers are augmented in August each year during the Edinburgh Festivals, which attracts 4.4 million visitors, and generates over £100m for the local economy.
As the centre of Scotland's government and legal system, the public sector plays a central role in Edinburgh's economy. Many departments of the Scottish Government are in the city. Other major employers include NHS Scotland and local government administration. When the £1.3bn Edinburgh & South East Scotland City Region Deal was signed in 2018, the region's Gross Value Added (GVA) contribution to the Scottish economy was cited as £33bn, or 33% of the country's output. But the Deal's partners noted that prosperity was not evenly spread across the city region, citing 22.4% of children living in poverty and a shortage of affordable housing.
The city hosts a series of festivals that run between the end of July and early September each year. The best known of these events are the Edinburgh Festival Fringe, the Edinburgh International Festival, the Edinburgh Military Tattoo, the Edinburgh Art Festival and the Edinburgh International Book Festival.
The longest established of these festivals is the Edinburgh International Festival, which was first held in 1947 and consists mainly of a programme of high-profile theatre productions and classical music performances, featuring international directors, conductors, theatre companies and orchestras.
This has since been overtaken in size by the Edinburgh Fringe which began as a programme of marginal acts alongside the "official" Festival and has become the world's largest performing arts festival. In 2017, nearly 3400 different shows were staged in 300 venues across the city. Comedy has become one of the mainstays of the Fringe, with numerous well-known comedians getting their first 'break' there, often by being chosen to receive the Edinburgh Comedy Award. The Edinburgh Military Tattoo, occupies the Castle Esplanade every night for three weeks each August, with massed pipe bands and military bands drawn from around the world. Performances end with a short fireworks display.
The summer of 2020 was the first time in its 70-year history that the Edinburgh festival was not run, being cancelled due to the COVID-19 pandemic. This affected many of the tourist-focused businesses in Edinburgh which depend on the various festivals over summer to return an annual profit.
The annual Edinburgh Hogmanay celebration was originally an informal street party focused on the Tron Kirk in the Old Town's High Street. Since 1993, it has been officially organised with the focus moved to Princes Street. In 1996, over 300,000 people attended, leading to ticketing of the main street party in later years up to a limit of 100,000 tickets. Hogmanay now covers four days of processions, concerts and fireworks, with the street party beginning on Hogmanay. Alternative tickets are available for entrance into the Princes Street Gardens concert and Cèilidh, where well-known artists perform and ticket holders can participate in traditional Scottish cèilidh dancing. The event attracts thousands of people from all over the world.
On the night of 30 April the Beltane Fire Festival takes place on Calton Hill, involving a procession followed by scenes inspired by pagan old spring fertility celebrations. At the beginning of October each year the Dussehra Hindu Festival is also held on Calton Hill.
Outside the Festival season, Edinburgh supports several theatres and production companies. The Royal Lyceum Theatre has its own company, while the King's Theatre, Edinburgh Festival Theatre and Edinburgh Playhouse stage large touring shows. The Traverse Theatre presents a more contemporary repertoire. Amateur theatre companies productions are staged at the Bedlam Theatre, Church Hill Theatre and King's Theatre among others.
The Usher Hall is Edinburgh's premier venue for classical music, as well as occasional popular music concerts. It was the venue for the Eurovision Song Contest 1972. Other halls staging music and theatre include The Hub, the Assembly Rooms and the Queen's Hall. The Scottish Chamber Orchestra is based in Edinburgh.
Edinburgh has a healthy popular music scene. Occasionally large concerts are staged at Murrayfield and Meadowbank, while mid-sized events take place at smaller venues such as 'The Corn Exchange', 'The Liquid Rooms' and 'The Bongo Club'. In 2010, PRS for Music listed Edinburgh among the UK's top ten 'most musical' cities. Several city pubs are well known for their live performances of folk music. They include 'Sandy Bell's' in Forrest Road, 'Captain's Bar' in South College Street and 'Whistlebinkies' in South Bridge.
Edinburgh is home to a flourishing group of contemporary composers such as Nigel Osborne, Peter Nelson, Lyell Cresswell, Hafliði Hallgrímsson, Edward Harper, Robert Crawford, Robert Dow and John McLeod. McLeod's music is heard regularly on BBC Radio 3 and throughout the UK.
The city has two commercial radio stations: Forth 1, a station which broadcasts mainstream chart music, and Forth 2 on medium wave which plays classic hits. Capital Radio Scotland and Eklipse Sports Radio also have transmitters covering Edinburgh. Along with the UK national radio stations, Radio Scotland and the Gaelic language service BBC Radio nan Gàidheal are also broadcast. DAB digital radio is broadcast over two local multiplexes. BFBS Radio broadcasts from studios on the base at Dreghorn Barracks across the city on 98.5FM as part of its UK Bases network
Television, along with most radio services, is broadcast to the city from the Craigkelly transmitting station situated in Fife on the opposite side of the Firth of Forth and the Black Hill transmitting station in North Lanarkshire to the west.
Edinburgh has many museums and libraries. These include the National Museum of Scotland, the National Library of Scotland, National War Museum, the Museum of Edinburgh, Surgeons' Hall Museum, the Writers' Museum, the Museum of Childhood and Dynamic Earth. The Museum on The Mound has exhibits on money and banking.
Edinburgh Zoo, covering 82 acres (33 ha) on Corstorphine Hill, is the second most visited paid tourist attraction in Scotland, and currently home to two giant pandas, Tian Tian and Yang Guang, on loan from the People's Republic of China.
Edinburgh contains Scotland's three National Galleries of Art as well as numerous smaller art galleries. The national collection is housed in the Scottish National Gallery, located on The Mound, comprising the linked National Gallery of Scotland building and the Royal Scottish Academy building. Contemporary collections are shown in the Scottish National Gallery of Modern Art which occupies a split site at Belford. The Scottish National Portrait Gallery on Queen Street focuses on portraits and photography.
The council-owned City Art Centre in Market Street mounts regular art exhibitions. Across the road, The Fruitmarket Gallery offers world-class exhibitions of contemporary art, featuring work by British and international artists with both emerging and established international reputations.
The city hosts several of Scotland's galleries and organisations dedicated to contemporary visual art. Significant strands of this infrastructure include Creative Scotland, Edinburgh College of Art, Talbot Rice Gallery (University of Edinburgh), Collective Gallery (based at the City Observatory) and the Edinburgh Annuale.
There are also many small private shops/galleries that provide space to showcase works from local artists.
The locale around Princes Street is the main shopping area in the city centre, with souvenir shops, chain stores such as Boots the Chemist, Edinburgh Woollen Mill, H&M and Jenners. George Street, north of Princes Street, is the preferred location for some upmarket shops and independent stores. At the east end of Princes Street, the St. James Centre is currently being redeveloped  while next to the Balmoral Hotel and Waverley Station is the Waverley Mall. Multrees Walk, adjacent to the St. James Centre, is a recent addition to the central shopping district, dominated by the presence of Harvey Nichols. Shops here include Louis Vuitton, Mulberry and Calvin Klein.
Edinburgh also has substantial retail parks outside the city centre. These include The Gyle Shopping Centre and Hermiston Gait in the west of the city, Cameron Toll Shopping Centre, Straiton Retail Park (actually just outside the city, in Midlothian) and Fort Kinnaird in the south and east, and Ocean Terminal in the north on the Leith waterfront.
Following local government reorganisation in 1996, the City of Edinburgh Council constitutes one of the 32 council areas of Scotland. Like all other local authorities of Scotland, the council has powers over most matters of local administration such as housing, planning, local transport, parks, economic development and regeneration. The council comprises 58 elected councillors, returned from 17 multi-member electoral wards in the city. Following the 2007 City of Edinburgh Council election the incumbent Labour Party lost majority control of the council after 23 years to a Liberal Democrat/SNP coalition. The 2012 City of Edinburgh Council election saw a Scottish Labour/SNP coalition. The 2017 City of Edinburgh Council election, saw a continuation of this administration, but with the SNP as the largest party.
Edinburgh, like all of Scotland, is represented in the Scottish Parliament, situated in the Holyrood area of the city. For electoral purposes, the city is divided into six constituencies which, along with 3 seats outside of the city, form part of the Lothian region. Each constituency elects one Member of the Scottish Parliament (MSP) by the first past the post system of election, and the region elects seven additional MSPs to produce a result based on a form of proportional representation.
As of the 2016 election, the Scottish National Party have three MSPs: Ash Denham for Edinburgh Eastern, Ben Macpherson for Edinburgh Northern and Leith and Gordon MacDonald for Edinburgh Pentlands constituencies. Alex Cole-Hamilton of the Scottish Liberal Democrats represents Edinburgh Western, Daniel Johnson of the Scottish Labour Party represents Edinburgh Southern constituency, and former Leader of the Scottish Conservative Party, Ruth Davidson currently represents the Edinburgh Central constituency.
In addition, the city is also represented by seven regional MSPs representing the Lothian electoral region: The Conservatives have three regional MSPs: Jeremy Balfour, Miles Briggs and Gordon Lindhurst, Labour have two regional MSPs: Sarah Boyack and Neil Findlay, Scottish Greens have one regional MSP: Alison Johnstone and there is one independent MSP: Andy Wightman (elected as a Scottish Green).
Edinburgh is also represented in the House of Commons of the United Kingdom by five Members of Parliament. The city is divided into Edinburgh North and Leith, Edinburgh East, Edinburgh South, Edinburgh South West, and Edinburgh West, each constituency electing one member by the first past the post system. Edinburgh is currently represented by three MPs affiliated with the Scottish National Party, one Liberal Democrat MP in Edinburgh West and one Labour MP in Edinburgh South.
Edinburgh Airport is Scotland's busiest airport and the principal international gateway to the capital, handling over 14.7 million passengers, it was also the sixth-busiest airport in the United Kingdom by total passengers in 2019. In anticipation of rising passenger numbers, the former operator of the airport BAA outlined a draft masterplan in 2011 to provide for the expansion of the airfield and the terminal building. In June 2012, Global Infrastructure Partners purchased the airport for £807 million. The possibility of building a second runway to cope with an increased number of aircraft movements has also been mooted.
Travel in Edinburgh is undertaken predominantly by bus. Lothian Buses, the successor company to Edinburgh Corporation Transport Department, operate the majority of city bus services within the city and to surrounding suburbs, with the most routes running via Princes Street. Services further afield operate from the Edinburgh Bus Station off St Andrew Square and Waterloo Place and are operated mainly by Stagecoach East Scotland, Scottish Citylink, National Express Coaches and Borders Buses.
Lothian Buses also operates all of the city's branded public tour buses, night bus service and airport bus link. In 2019, Lothian Buses recorded 124.2 million passenger journeys.
Edinburgh Waverley is the second-busiest railway station in Scotland, with only Glasgow Central handling more passengers. On the evidence of passenger entries and exits between April 2015 and March 2016, Edinburgh Waverley is the fifth-busiest station outside London; it is also the UK's second biggest station in terms of the number of platforms and area size. Waverley is the terminus for most trains arriving from London King's Cross and the departure point for many rail services within Scotland operated by Abellio ScotRail.
To the west of the city centre lies Haymarket Station which is an important commuter stop. Opened in 2003, Edinburgh Park station serves the Gyle business park in the west of the city and the nearby Gogarburn headquarters of the Royal Bank of Scotland. The Edinburgh Crossrail route connects Edinburgh Park with Haymarket, Edinburgh Waverley and the suburban stations of Brunstane and Newcraighall in the east of the city. There are also commuter lines to South Gyle and Dalmeny, the latter serving South Queensferry by the Forth Bridges, and to Wester Hailes and Curriehill in the south-west of the city.
To tackle traffic congestion, Edinburgh is now served by six park and ride sites on the periphery of the city at Sheriffhall (in Midlothian), Ingliston, Riccarton, Inverkeithing (in Fife), Newcraighall and Straiton (in Midlothian). A referendum of Edinburgh residents in February 2005 rejected a proposal to introduce congestion charging in the city. 
Edinburgh Trams became operational on 31 May 2014. The city had been without a tram system since Edinburgh Corporation Tramways ceased on 16 November 1956. Following parliamentary approval in 2007, construction began in early 2008. The first stage of the project was expected to be completed by July 2011 but, following delays caused by extra utility work and a long-running contractual dispute between the council and the main contractor, Bilfinger SE, the project was rescheduled. The cost of the project rose from the original projection of £545 million to £750 million in mid-2011 and some suggest it could eventually exceed £1 billion. The completed line is 8.7 miles (14.0 km) in length, running from Edinburgh Airport, west of the city, to its current terminus at York Place in the city centre's East End. It was originally planned to continue down Leith Walk to Ocean Terminal and terminate at Newhaven.
Should the original plan be taken to completion, trams will also run from Haymarket through Ravelston and Craigleith to Granton Square on the Waterfront Edinburgh. Long-term proposals envisage a line running west from the airport to Ratho and Newbridge and another connecting Granton Square to Newhaven via Lower Granton Road, thus completing the Line 1 (North Edinburgh) loop. A further line serving the south of the city has also been suggested.
Lothian Buses and Edinburgh Trams are both owned and operated by Transport for Edinburgh.
Established by royal charter in 1583, the University of Edinburgh is one of Scotland's ancient universities and is the fourth oldest in the country after St Andrews, Glasgow and Aberdeen. Originally centred on Old College the university expanded to premises on The Mound, the Royal Mile and George Square. Today, the King's Buildings in the south of the city contain most of the schools within the College of Science and Engineering. In 2002, the medical school moved to purpose built accommodation adjacent to the new Royal Infirmary of Edinburgh at Little France. The University is placed 20th in the QS World University Rankings for 2020.
Heriot-Watt University is based at the Riccarton campus in the west of Edinburgh. Originally established in 1821 as the world's first mechanics' institute it was granted university status by royal charter in 1966. It has other campuses in the Scottish Borders, Orkney, United Arab Emirates and Putrajaya in Malaysia. It takes the name Heriot-Watt from Scottish inventor James Watt and Scottish philanthropist and goldsmith George Heriot. Heriot-Watt University has been named International University of the Year by The Times and Sunday Times Good University Guide 2018. In the latest Research Excellence Framework, it was ranked overall in the Top 25% of UK universities and 1st in Scotland for research impact.
Edinburgh Napier University was originally founded as the Napier College which was renamed Napier Polytechnic in 1986 and gained university status in 1992. Edinburgh Napier University has campuses in the south and west of the city, including the former Merchiston Tower and Craiglockhart Hydropathic. It is home to the Screen Academy Scotland.
Until 2012 further education colleges in the city included Jewel and Esk College (incorporating Leith Nautical College founded in 1903), Telford College, opened in 1968, and Stevenson College, opened in 1970. These have now been amalgamated to form Edinburgh College. Scotland's Rural College also has a campus in south Edinburgh. Other institutions include the Royal College of Surgeons of Edinburgh and the Royal College of Physicians of Edinburgh which were established by royal charter in 1506 and 1681 respectively. The Trustees Drawing Academy of Edinburgh, founded in 1760, became the Edinburgh College of Art in 1907.
There are 18 nursery, 94 primary and 23 secondary schools administered by the City of Edinburgh Council. Edinburgh is home to The Royal High School, one of the oldest schools in the country and the world. The city also has several independent, fee-paying schools including Edinburgh Academy, Fettes College, George Heriot's School, George Watson's College, Merchiston Castle School, Stewart's Melville College and The Mary Erskine School. In 2009, the proportion of pupils attending independent schools was 24.2%, far above the Scottish national average of just over 7% and higher than in any other region of Scotland. In August 2013, the City of Edinburgh Council opened the city's first stand-alone Gaelic primary school, Bun-sgoil Taobh na Pàirce.
The main NHS Lothian hospitals serving the Edinburgh area are the Royal Infirmary of Edinburgh, which includes the University of Edinburgh Medical School, and the Western General Hospital, which has a large cancer treatment centre and nurse-led Minor Injuries Clinic. The Royal Edinburgh Hospital in Morningside specialises in mental health. The Royal Hospital for Sick Children, colloquially referred to as 'the Sick Kids', is a specialist paediatrics hospital.
Heart of Midlothian and Hibernian are known locally as "Hearts" and "Hibs", respectively. The former plays in the Scottish Championship, the second-highest division of professional football in Scotland, while the latter plays in the top-level Scottish Premiership. They are the oldest city rivals in Scotland and the Edinburgh derby is one of the oldest derby matches in world football. Both clubs have won the Scottish league championship four times. Hearts have won the Scottish Cup eight times and the Scottish League Cup four times. Hibs have won the Scottish Cup and the Scottish League Cup three times each. Edinburgh City were promoted to Scottish League Two in the 2015–16 season, becoming the first club to win promotion to the SPFL via the pyramid system playoffs.
Edinburgh was also home to four other former Scottish Football League clubs: the original Edinburgh City (founded in 1928), Leith Athletic, Meadowbank Thistle and St Bernard's. Meadowbank Thistle played at Meadowbank Stadium until 1995, when the club moved to Livingston and became Livingston F.C. The Scottish national team has very occasionally played at Easter Road and Tynecastle, although its normal home stadium is Hampden Park in Glasgow. St Bernard's' New Logie Green was used to host the 1896 Scottish Cup Final, the only time the match has been played outside Glasgow.
The city also plays host to Lowland Football League clubs Civil Service Strollers, Edinburgh University and Spartans, as well as East of Scotland League clubs Craigroyston, Edinburgh United, Heriot-Watt University, Leith Athletic, Lothian Thistle Hutchison Vale, and Tynecastle.
The Scotland national rugby union team and the professional Edinburgh Rugby team play at Murrayfield Stadium, which is owned by the Scottish Rugby Union and also used for other events, including music concerts. It is the largest capacity stadium in Scotland, seating 67,144 spectators. Edinburgh is also home to Scottish Premiership teams Boroughmuir RFC, Currie RFC, the Edinburgh Academicals, Heriot's Rugby Club and Watsonians RFC.
Rugby league is represented by the Edinburgh Eagles who play in the Rugby League Conference Scotland Division. Murrayfield Stadium has hosted the Magic Weekend where all Super League matches are played in the stadium over one weekend.
The Murrayfield Racers are the latest of a succession of ice hockey clubs in the Scottish capital. Previously Edinburgh was represented by the Edinburgh Capitals (who folded in 2018), the original Murrayfield Racers (who folded in 1996) and the Edinburgh Racers. The club play their home games at the Murrayfield Ice Rink and have competed in the eleven-team professional Scottish National League (SNL) since the 2018–19 season.
Next door to Murrayfield Ice Rink is a 7-sheeter dedicated curling facility where curling is played from October to March each season.
Caledonia Pride are the only women's professional basketball team in Scotland. Established in 2016, the team compete in the UK wide Women's British Basketball League and play their home matches at the Oriam National Performance Centre. Edinburgh also has several men's basketball teams within the Scottish National League. Boroughmuir Blaze, City of Edinburgh Kings, Edinburgh Lions and Edinburgh University all compete in Division 1 of the National League, and Pleasance B.C. compete in Division 2. Boroughmuir won the league in 2016, and won the playoffs in the same year, beating the University in the final.
The Edinburgh Diamond Devils is a baseball club which won its first Scottish Championship in 1991 as the "Reivers." 1992 saw the team repeat the achievement, becoming the first team to do so in league history. The same year saw the start of their first youth team, the Blue Jays. The club adopted its present name in 1999.
Edinburgh has also hosted national and international sports events including the World Student Games, the 1970 British Commonwealth Games, the 1986 Commonwealth Games and the inaugural 2000 Commonwealth Youth Games. For the 1970 Games the city built Olympic standard venues and facilities including Meadowbank Stadium and the Royal Commonwealth Pool. The Pool underwent refurbishment in 2012 and hosted the Diving competition in the 2014 Commonwealth Games which were held in Glasgow.
In American football, the Scottish Claymores played WLAF/NFL Europe games at Murrayfield, including their World Bowl 96 victory. From 1995 to 1997 they played all their games there, from 1998 to 2000 they split their home matches between Murrayfield and Glasgow's Hampden Park, then moved to Glasgow full-time, with one final Murrayfield appearance in 2002. The city's most successful non-professional team are the Edinburgh Wolves who play at Meadowbank Stadium.
The Edinburgh Marathon has been held annually in the city since 2003 with more than 16,000 runners taking part on each occasion. Its organisers have called it "the fastest marathon in the UK" due to the elevation drop of 40 metres (130 ft). The city also organises a half-marathon, as well as 10 km (6.2 miles) and 5 km (3.1 mi) races, including a 5 km (3 miles) race on 1 January each year.
Edinburgh has a speedway team, the Edinburgh Monarchs, which, since the loss of its stadium in the city, has raced at the Lothian Arena in Armadale, West Lothian. The Monarchs have won the Premier League championship five times in their history, in 2003 and again in 2008, 2010, 2014 and 2015.
Edinburgh has a long literary tradition, which became especially evident during the Scottish Enlightenment. This heritage and the city's lively literary life in the present led to it being declared the first UNESCO City of Literature in 2004. Prominent authors who have lived in Edinburgh include the economist Adam Smith, born in Kirkcaldy and author of The Wealth of Nations, James Boswell, biographer of Samuel Johnson; Sir Walter Scott, creator of the historical novel and author of works such as Rob Roy, Ivanhoe, and Heart of Midlothian; James Hogg, author of ; Robert Louis Stevenson, creator of Treasure Island, Kidnapped, and The Strange Case of Dr Jekyll and Mr Hyde; Sir Arthur Conan Doyle, the creator of Sherlock Holmes; Muriel Spark, author of The Prime of Miss Jean Brodie; Irvine Welsh, author of Trainspotting, whose novels are mostly set in the city and often written in colloquial Scots;  Ian Rankin, author of the Inspector Rebus series of crime thrillers, Alexander McCall Smith, author of the No. 1 Ladies' Detective Agency series, and J. K. Rowling, creator of Harry Potter, who began her first book in an Edinburgh coffee shop and who lives in the Cramond area of the city.
Scotland has a rich history of science and engineering, with Edinburgh producing a number of leading figures. John Napier, inventor of logarithms, was born in Merchiston Tower and lived and died in the city. His house now forms part of the original campus of Napier University which was named in his honour. He lies buried under St. Cuthbert's Church. James Clerk Maxwell, founder of the modern theory of electromagnetism, was born at 14 India Street (now the home of the James Clerk Maxwell Foundation) and educated at the Edinburgh Academy and the University of Edinburgh, as was the engineer and telephone pioneer Alexander Graham Bell. James Braidwood, who organised Britain's first municipal fire brigade, was also born in the city and began his career there.
Other names connected with the city include Max Born, physicist and Nobel laureate; Charles Darwin, the biologist who propounded the theory of natural selection; David Hume, philosopher, economist and historian; James Hutton, regarded as the "Father of Geology"; Joseph Black, the chemist and one of the founders of thermodynamics; pioneering medical researchers Joseph Lister and James Young Simpson; chemist and discoverer of the element nitrogen Daniel Rutherford; Colin Maclaurin, mathematician and developer of the Maclaurin series, and Ian Wilmut, the geneticist involved in the cloning of Dolly the sheep just outside Edinburgh. The stuffed carcass of Dolly the sheep is now on display in the National Museum of Scotland. The latest in a long line of science celebrities associated with the city is theoretical physicist and Nobel Prizewinner Professor Emeritus Peter Higgs, born in Newcastle but resident in Edinburgh for most of his academic career, after whom the Higgs boson particle has been named.
Edinburgh has been the birthplace of actors like Alastair Sim and Sir Sean Connery, known for being the first cinematic James Bond, the comedian and actor Ronnie Corbett, best known as one of The Two Ronnies, and the impressionist Rory Bremner. Famous artists from the city include the portrait painters Sir Henry Raeburn, Sir David Wilkie and Allan Ramsay.
The city has produced or been home to some very successful musicians in recent decades, particularly Ian Anderson, front man of the band Jethro Tull, The Incredible String Band, the folk duo The Corries, Wattie Buchan, lead singer and founding member of punk band The Exploited, Shirley Manson, lead singer of the band Garbage, the Bay City Rollers, The Proclaimers, Boards of Canada and Idlewild.
Notorious criminals from Edinburgh's past include Deacon Brodie, head of a trades guild and Edinburgh city councillor by day but a burglar by night, who is said to have been the inspiration for Robert Louis Stevenson's story, the Strange Case of Dr Jekyll and Mr Hyde, and murderers Burke and Hare who delivered fresh corpses for dissection to the famous anatomist Robert Knox.
Another well-known Edinburgh resident was Greyfriars Bobby. The small Skye Terrier reputedly kept vigil over his dead master's grave in Greyfriars Kirkyard for 14 years in the 1860s and 1870s, giving rise to a story of canine devotion which plays a part in attracting visitors to the city.
The City of Edinburgh has entered into 14 international twinning arrangements since 1954. Most of the arrangements are styled as 'Twin Cities' but the agreement with Kraków is designated as a 'Partner City', and the agreement with Kyoto Prefecture is officially styled as a 'Friendship Link', reflecting its status as the only region to be twinned with Edinburgh.
For a list of consulates in Edinburgh, see List of diplomatic missions in Scotland.