I doubt being near a window has anything to do with it. But the water situation is very different. Buying some big storage containers could help to keep water that’s ready and stable on hand. If you have access and room for at least one it would probably be a good idea.
What kind of contaminants are in the river water? Also curious what country your in.