Does Tobler's First Law of Geography Apply to Star Composition? There is a principle in Geography called Tobler's First Law of Geography which states that "Everything is related to everything else, but near things are more related than distant things."

Does this principle apply to star composition?  Do stars that are closer together have similar compositions than those that are far apart?  I'm guessing that stars that are formed in the same stellar nursery would have similar compositions.  Have studies been done to compare the compositions and proximity of stars?
As you say stars composition depend on the composition of the molecular cloud where they were created. You have a molecular cloud where many stars are being created at the same time, all with the same composition and age, but some are bigger than others. As time goes the bigger stars will die earlier, adding new heavier materials to the cloud which will lead to a new generation of stars with a bigger metalicity.

So the star's composition not only depends on where it was created but also on how old it is.

The best way this can be checked is by studying the stars within a star cluster. You may find this site interesting.