*Make sure you have downloaded ===Mapping with Leaflet=== [[Image:leaflet.png|200px|thumb|right|Interactive map on Leaflet]][[Image:marker.png|200px|thumb|right|Interactive map with Markers]] Leaflet is one of the RgoogleMaps most popular open-source JavaScript libraries for interactive maps. This R packagemakes it easy to integrate and control Leaflet maps in R. Introduction: https://rstudio.github.io/leaflet/ <br>Markers: https://rstudio. github.io/leaflet/markers.html <br>Github: https://github.com/rstudio/leaflet <br> Features*Interactive panning/zooming* codeCompose maps using arbitrary combinations of: library(Rgooglemaps) *Map tiles *Markers *Polygons *Lines *Popups *GeoJSON* Create a base map maps right from the R console or RStudio*Embed maps in knitr/R Markdown documents and Shiny apps*find geocode for center of desired mapEasily render Spatial objects from the sp package, adjust zoom as neededor data frames with latitude/longitude columns*Use map bounds and mouse events to drive Shiny logic *example code (for map of North America)Sample Code: newmap SBDE <- GetMap(center = cread.csv(39, -95), zoom = 3, destfile = "NorthAmericaSBDE.pngcsv")#Import the CSV file with your data set library(leaflet) #Use the leaflet library*Transform addresses into geocode via http://www.geocodezip.com/v3_example_geo2.asp?addr1 #data(SBDE) m <- leaflet(data =UnitedSBDE) %>%20States#Define your map with the data you specified earlier addTiles() %20of>%20America&geocode=1*Plot # Add default OpenStreetMap map, adjust variablestiles. Make sure to use the %>% symbol!** example code: PlotOnStaticMap addMarkers(newmap~longitude, lat ~latitude, popup = c~as.character(30.268606, 41.888519link))%>% #Add points on your map addLegend("bottomright", lon colors= c(-97.740467"#1878cd", -87.63548), pch labels= 20"Resources", col title= "redHouston Small Biz Guide")#Add a legend**lat m # Print map ---- ===latitude; lonOther R Packages=longitude, pch = point style, color="color"