Despite a resurgence in popularity, horoscopes are generally considered to be pseudoscience today - but they were once a cutting-edge scientific tool. In this ingenious work of history, data scientist Alexander Boxer examines a treasure trove of esoteric classical sources to expose the deep imaginative framework by which - for millennia - we made sense of our fates. Astrology, he argues, was the ancient world's most ambitious applied mathematics problem, a grand data-analysis enterprise sustained by some of history's most brilliant minds, from Ptolemy to al-Kindi to Kepler. A Scheme of Heaven explores the wonderful subtleties of astrological ideas. Telling the stories of their inventors and most influential exponents, Boxer puts them through their paces using modern data sets - finding that the methods of today's scientists are often uncomfortably close to those of astrology's ancient sages.