Napa Valley wine tasting map: interactive version

July 12, 2012
By

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

Got some great reactions to the Napa Valley wine tasting map made with the ggmap package I posted on Monday. A couple of people asked if similar maps could be made for other wine regions (like Australia's Hunter Valley, or the Walla Walla region in Washington): provided you have a list of winery addresses, tweaks to the same R script should work just fine.

Another common question was whether the map can be made interactive. I haven't tried it myself, but you should be able to use the googlevis package's gvisGeoMap function (with the locationvar option) to create a zoomable, scrollable Google map with the wineries marked on the map. Barry Rowlingson used a different approach to create this interactive map (click on the screenshot to see it live -- I couldn't find a way to embed it): 

Winery map
Map image copyright OpenStreetMap Contributors, CC BY-SA.

Not only can you scroll and zoom the map, but clicking on one of the winery markers will tell you its address and whether an appointment is required for tastings. Barry used OpenStreetMaps and his own R package to build this map:

My off-CRAN package, webmaps has two capabilities - it can download map tiles like ggmap, and it can create slippy webmaps using OpenLayers. Recent changes to OpenLayers have however broken the slippy map functionality, and I'm working on a dedicated replacement package called openlayr. However, enough of the webmaps functionality exists to give me a good start on making a dynamic map of the wineries.

You can read all the details of how this map was created at Barry's blog, linked below.

Barry Rowlingson's GeoSpatial Blog: The World Wine Web

To leave a comment for the author, please follow the link and comment on his blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: ,

Comments are closed.