Datong is a prefecture-level city in northern Shanxi Province of North China, located a few hundred kilometres west by rail from Beijing with an elevation of 1,040 metres (3,410 ft). It has a population of 3,318,057 at the 2010 census of whom 1,447,150 live in the built up area made of 3 out of 4 urban districts (City, Mining and Nanjiao).
Near here was the Beidi kingdom of Tai which was conquered by the Zhou dynasty in 457BC. It bordered on the Hu nomads and traded in horses. Tai was later a commandery or county.
The town was founded as Píngchéng in 200 BC during the Han Dynasty, after the Battle of Baideng between the Han and the Xiongnu. Located near the Great Wall Pass to Inner Mongolia. It blossomed during the following period and became a stop-off point for Camel Caravans moving from China into Mongolia and beyond. It was sacked at the end of the Eastern Han Dynasty. Pingcheng became the capital of Northern Wei from 398 AD until 494 AD. The famous Yungang Grottoes were constructed during the later part of this period (460 – 494 AD).
The city was renamed Datong in 1048 AD and sacked again at the end of the Ming Dynasty (1649 AD), but promptly rebuilt in 1652 AD.
Information based on http://en.wikipedia.org/wiki/Datong