The scientific discipline that studies the presence and distribution of chemical elements in the geological systems of Earth.