Google Books Ngram Viewer is an interesting application for looking up the frequency of phrases in books over time. For example, I recently ran a search from 1800-2000 for the different spellings of 北京: Peking, Beijing, Peiping and Beiping.
As expected, Peking is the dominant English name for 北京. Peiping appeared at some point in the mid-1920s, but that spelling has since disappeared. Interestingly, the rise of Beijing coincides not with the founding of the PRC in 1949 but with the normalization of US-China relations in the mid-1970s. Beijing finally eclipsed Peking in the late 1980s.