Environmental influences on the chemical composition of shales and clays