Start any video training course for FREE. More than 500 to choose from. Learn more
Data Mashups in R

Errata for Data Mashups in R

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted By Date Submitted Date Corrected
Page 2

The URL "" no longer works, I'm getting a "The page cannot be found" error. The URL used to work, without it, it is fifficult to use the article.

Note from the Author or Editor:
My apologies, it appears the City of Philadelphia has changed their distribution method. Fortunately, the Internet Archive's Wayback Machine has several auctions available:*/ for example: I've also uploaded some foreclosures from 2009 here:

Michael Maguire  May 14, 2010 
Page 10

I've been trying to get the Yahoo Maps API sample to work, I've signed up for my own developer's key. When I do it through the XML example I get: failed to load HTTP resource Error: 1: failed to load HTTP resource When I do it through the restful API, I get the following with my own appID or using the one in the book: <?xml version="1.0" encoding="UTF-8"?> -<Error xmlns="urn:yahoo:api"> <!-- uncompressed/chunked Fri Aug 24 19:58:34 UTC 2012 --> The following errors were detected: <Message>backend fetch error 404</Message> </Error> Please help.

Note from the Author or Editor:
Thank you for bringing this to my attention. It appears Yahoo has discontinued this version of their geocoding API, but the replacing the geocodeAddresses function with the one below will work with their newer PlaceFinder API. #input:vector of streets #output:data frame containing lat/longs in PBSmapping-acceptable format #this revised function uses the newer Yahoo PlaceFinder API geocodeAddresses<-function(myStreets){ myGeoTable<-data.frame(address=character(),lat=numeric(),long=numeric(),EID=numeric()) for(myStreet in myStreets){ requestUrl<-paste( "",appid,"&line1=", URLencode(myStreet), "&line2=Philadelphia,+PA" ,sep="") cat("geocoding:",myStreet,"\n") tryCatch({ xmlResult<-xmlTreeParse(requestUrl,isURL=TRUE,addAttributeNamespaces=TRUE) geoResult<-xmlResult$doc$children$ResultSet$children$Result if(xmlValue(geoResult[['quality']]) >= 87){ lat<-xmlValue(geoResult[['Latitude']]) long<-xmlValue(geoResult[['Longitude']]) myGeoTable<-rbind(myGeoTable,data.frame(address = myStreet, Y = lat, X = long,EID=NA)) } }, error=function(err) { cat("xml parsing or http error:", conditionMessage(err), "\n") }) Sys.sleep(0.5) } #let's use the built-in numbering as the event id that PBSmapping wants myGeoTable$EID<-as.numeric(rownames(myGeoTable)) myGeoTable }

Bryan Murtha  Aug 24, 2012 
Page 13
Top third in code

Use of Sys.sleep(0.5) #this pause helps keep Yahoo happy still throws a lot of "xml parsing or http error: 1: failed to load HTTP resource" errors. I've tried 1.0 and get fewer errors and 1.5 which so far has produce one error.

Note from the Author or Editor:
This is a good tip for others who are seeing a lot of timeouts.

Jan Vandermeer  Aug 31, 2012