This visualization only works in modern browsers. Upgrade yours and enjoy.
This contains SQL for finding the nearest bus stop along each shapeid. It then creates individual segments, based on the shape.txt file, between each stop (for the tripid).