A couple of years ago when I used to cycle out in the country, Spring time would always be a worry... the Magpies are mean (& scary) buggers and (I suppose rightly so) defend their nests with a vengeance.
There were several spots that I had to cycle like the very devil was on my tail because the birds would dive bomb me as I rode past their tree/nests.
I found the best way to stop them mid-bomb, was to shout loudly and wave one arm above my head... not so easy to do while going up a steep hill and trying to change gears!