Bonnyrigg, originally a small mining town, sits around 6 miles outside of Edinburgh. Coal was being mined from the area around Bonnyrigg from the end of the 18th century and in the years since the Second World War, eight collieries have operated in this part of Midlothian but none of them are still in operation. The Scottish Mining Museum is located in Bonnybridge and the King George V Park contains a monument to the miners leader, Mick McGahey.
Bonnyrigg appeared, as "Bonnebrig", a tiny hamlet on William Roy's Military Survey of Scotland undertaken in the years mid 18th century. The name has also at various times appeared as "Bannockrigg" and “Bannocrig". In 1817 the village is named Bonny Ridge, then Bonny Rigg in 1828, Bonnyrig in 1834, Bonny Rig in 1850 until the Ordnance Survey map of 1850-1852 standardises the name as Bonnyrigg. Today, it is largely a commuter town to Edinburgh as it has good bus and train links.