My version of the code from the Data Mashups in R book, which is sorely out-of-date.
After painstakingly working through the foreclosure mapping example and pouring over the errata, I decided to share my solution. The book requires using the Yahoo geocoding API, which is now a paid service. The errata acknowledges the API change but still requires you to use the paid XML service. I switched to the Google geocoding API with JSON.
To run this code, launch R then source the file in.
source("mapping-foreclosures.r")
You might need to setwd(".")
Code adapted from Data Mashups in R.