Ab initio calculations provide a description of Ln electronic structure according to underlying physics rather than relying on experimental fitting. This leads to the second learning outcome: ab initio calculations agree with experimentally determined low-lying crystal field levels for Y1-xLnxW30 with an accuracy better than crystal field fitting models to magnetic data. The crystal field describes the effect of the electric field due to the surrounding ligands acting on the Ln ion.