I've found that speaking to the dog often helps. Start as soon as you see (or hear) the dog so your appearance won't be a surprise. Remember that dogs that are out wandering the neighborhood are out of their home territory, and may be more nervous and easily threatened than dogs that are hanging out in their front yards.
When approaching any dog, while a long distance off, I start with, "Hi, Fella! Beautiful day, isn't it? Amazing the folks that come by your place!" etc. I keep the tone upbeat, friendly and calm.
I learned this trick when I adopted a very challenging rescue dog. She was a chow-spaniel mix who inherited the aggressiveness of one parent and the nervousness of the other.
She would lunge aggressively at almost everything, including bikes. We had to walk her on a short leash with either a prong collar or a halter, One day we were walking a foot trail in the Michaux State Forest in PA. We arrived at an intersection with a bike trail, and there, leaning against a tree, we found a cyclist who had dismounted to eat his lunch. We chatted for a few minutes, the guy patted our dog on the head and then got on his bike and rode away. You could almost see the light bulb light up over our dog's head!
"Oh.....that fast moving thing with shiny rotating parts, that seems to be half animal and half machine....it's a human on top of one of those contraptions that we have in our garage!"
We don't ride at home, so she had never made the connection.