How groundhogs became the animal that predicted the weather

On Groundhog Day, a bunch of men, wearing suits and top hats, pull a groundhog out of a hole in Punxsutawney, Pennsylvania. They then read a scroll the groundhog supposedly wrote, that states whether or not it saw its shadow. This determines if winter will last another six weeks, or if spring is coming soon. It's a bit of an odd tradition, but a similar practice has been taking places for centuries.