This map is a good proxy for IQ. High IQ countries produce safe drinking water, low IQ countries produce crap water.
From Vox.com: As you can see, the CDC is very cautious, essentially arguing that only the richest countries have safe drinking water. In my personal experience, drinking tap water in Argentina, Vietnam, Cambodia, China, Costa Rica, Slovakia, Russia, and even the dread Mexico has worked out just fine. But your mileage may vary.