Text this: The electronic structure of rare-earth metals and alloys