• Kathaleen Ledecky competes in the championship final of the Women's 800 m Freestyle

Kathaleen Ledecky competes in the championship final of the Women's 800 m Freestyle (Photo : Jamie Squire/Getty Images)

Swimming is almost everyone's favorite activity during the summer but the Centers for Disease Control and Prevention warn that there are a lot of public pools that are considered dirty and unsanitary.

Pools could be the next best thing to beaches and lakes. They are easier to get to and families often plan their summer trips with a pool in mind.

Like Us on Facebook

However, the CDC said that one in eight swimming pools in five of the most populous states in the US are closed because of several heath code violations. In addition, the water can also be dangerous for swimmers especially the children and the elderly.

The health authorities have checked and inspected nearly 50,000 pools, water parks and hot tubs. States that were involved in the inspection were Texas, California, Arizona, New York and Florida.

After the inspections, one in eight of the pools inspected were immediately closed because of the health violations. Most of them had the cryptosporidium parasite that causes vomiting and diarrhea, Discovery News has learned.

CDC's Healthy Swimming Program chief Michele Hlavsa said that nearly one third of the country's local health departments fail to regulate and even inspect the public pools for the safety of swimmers. Some have faulty safety equipment, waters have too high or too low pH levels and disinfectant concentration.

"We should all check for inspection results online or on site before using public pools, hot tubs or water playgrounds and do our own inspection before getting into the water," said Hlavsa.

Families are not discouraged from going to swim on public pools, the ones that passed the inspections at least. Swimming has many benefits that can improve a person's mental and physical health, the Los Angeles Times reported.

Over 50 million Americans that are aged six years and above swim at least six times in a year. That huge amount of people can be in danger if the public pools, hot tubs and water parks they go to do not pass health inspections.

Swimmers are advised to try and buy test strips that can measure the pool water's pH and disinfectant level. If they find that the pool has less or more than the safe pH levels of 7.2 and 7.8, it means that the pool is not safe.