On November 23, 1221, Spanish King and astronomer Alfonso X of Castile was born, who encouraged the preparation of revised planetary tables. These “Alfonsine Tables” a revision and improvement of the Ptolemaic tables, were the best available during the Middle Ages.
“Had I been present at the Creation, I would have given some useful hints for the better ordering of the universe.”
– Alfonso X, after studying Ptolemy’s treatise on astronomy.
Alfonso X – Background
Alfonso was born in Toledo, Spain. It is not much known about his early life. However, it is widely believed that he started his career as a soldier when he was only 16 years old, under the command of his father – Ferdinand III of Castile. He succeeded his father as King of Castile and León in 1252.  As ruler, Alfonso X showed legislative skills and the desire to provide his kingdom with a code of law and a stable legal system. He completed the Las Siete Partidas collection of laws begun by his father, which did not become general land law until 1501.
During his reign, Alfonso developed an entire court in order to encourage and promote cosmopolitan learning. Numerous of his works were written in Arabic as well as Latin, which he had translated by the court into the vernacular Castilian language. This development encouraged the further advancement of scientific fields like literature, philosophy, and astronomy.  Alfonso X’s considerable scientific reputation is based on the fact that he was both the author of several major poems and a chemical and a philosophical work, as well as promoting astronomy and the recognition of Ptolemaic cosmology, which had become known to him through the Moors.
Updating Astronomical Tables
Back then, the field of astronomy also included astrology and cosmology and Alfonso managed to gain quite a reputation in these fields. Alfonso commanded his scholars to produce new tables in order to update the Tables of Toledo, based on astronomical works and observations by Islamic astronomers, adding observations by astronomers Alfonso had gathered in Toledo. The Alfonsine Tables were used for calculating the position of the Sun, Moon and the five classical planets Mercury, Venus, Mars, Jupiter and Saturn. The work was commissioned under the direction of the Jewish scholars Jehuda Ben Mose and Isaac Ben Sid.
The Alfonsine Tables
The first printed edition of the Alfonsine tables was probably published in 1483 and another followed in the later 15th century. It is assumed that Nicolaus Copernicus used the the second edition in his work, he is assumed to have bought a copy while at the University of Cracow, and to have it professionally bound with pieces of wood and leather. The Alfonsine tables were based on the Ptolemaic system and determined the year to be 365 days, five hours, 49 minutes and 16 seconds, which is about 20 minutes too short compared to the Sidereal Year. Around 1500, the positions of the planets calculated in this way deviated from those observed by up to 2°. The work was originally written in Castilian and was later translated into Latin. It became the most influential astronomical work in Europe until it was replaced in the 16th century by the Prutenian tables of Erasmus Reinhold, which in turn were based on the work De revolutionibus orbium coelestium by Nicolaus Copernicus. Georg von Peuerbach  used the Alfonsine tables for his astronomical book Theoricae novae planetarum.
Further Scientific Achievements
Alfonso X also founded a school for translators in Toledo, consisting of Jews, Muslims and Christians, which achieved great achievements in the transfer of Arab and Jewish knowledge to Christian Europe. Here the Old Testament was translated from the Latin version of the Vulgate into Castilian, as well as classical works on astronomy, mathematics and philosophy. Alfonso X is considered the founder of Castilian national literature, although he himself also wrote in Portuguese-Galician. He had his historiographers compile the first general history of Spain (Estoria de España) as well as a world history (General estoria) in Castilian, and had the public documents written in the national language. In addition to his other achievements, Alfonso X (if he did not collaborate on it himself) commissioned many literary works, for example the Cantigas de Santa Maria, more than 400 Galician songs of European importance about the Virgin Mary, and in 1283 the Libro de los juegos (“Book of Games“, also “Codex Alfonso“), which is considered to be the first and most important chess problem collection of the Middle Ages and is kept in the Escorial today. Almost all of the 103 chess problems are Arabic mansuben.
When Alfons wanted to divide the empire in favor of his grandchildren, Prince Sancho and the Castilian greats were outraged. In 1282 he was deprived of his power, but formally left in his royal title. A counter-reaction in his favor began only in the last years of his life. Alfons died on April 4, 1284 after several unsuccessful attempts to regain power, beaten as a refugee and alone in Seville. He left a will in which he still tried to exclude Sancho from his inheritance and thus avoid a civil war.
Charles Burnett, Transmission of Knowledge across Religious Boundaries in the Middle Ages 
References and Further Reading:
-  In German: Alfons X der Weise
-  In German: Der Sternkatalog des Almagest: die arabische-mittelalterliche Tradition
-  Alfonsine Tables at Britannica
-  José Chabás / Bernard R. Goldstein: The Alfonsine tables of Toledo. Kluwer Acad. Publ., Dordrecht, 2009
-  The full text of the book “Tabula astronomice Alfonsi Regis” published in 1492
-  Alphonso X – Book of Games
-  Free scores by Alfonso X of Castile at the International Music Score Library Project (IMSLP)
-  Works by or about Alfonso X of Castile at Internet Archive
-  Works by Alfonso X of Castile at LibriVox (public domain audiobooks)
-  Thomas Carlyle, History of Frederick the Great
-  Georg von Peuerbach – Astronomy at the Beginning of the Scientific Revolution in Early Modern Age, SciHi Blog
-  The Planetary Tables of Erasmus Reinhold, SciHi Blog
-  Nicolaus Copernicus and the Heliocentric Model, SciHi Blog
-  Alfonsine Tables at Wikidata
-  Charles Burnett, Transmission of Knowledge across Religious Boundaries in the Middle Ages, 2014, American University of Beirut @ youtube
-  Timeline of Astronomical Books, via Wikidata and DBpedia