I have some shapefiles I want to plot over Google Maps tiles. What's the most efficient way to do this? One path might be to use the pkg RgoogleMaps, however, it is still unclear to me how to do this. I assume using PlotonStaticMap with some combination of reformatting the shapefile data
相关问题
- R - Quantstart: Testing Strategy on Multiple Equit
- Using predict with svyglm
- Reshape matrix by rows
- How do you change the color of the dotted line on
- Extract P-Values from Dunnett Test into a Table by
相关文章
- How to convert summary output to a data frame?
- How to plot smoother curves in R
- Paste all possible diagonals of an n*n matrix or d
- ess-rdired: I get this error “no ESS process is as
- How to use doMC under Windows or alternative paral
- dyLimit for limited time in Dygraphs
- Saving state of Shiny app to be restored later
- Avoiding “Sorry, we have no imagery here” with Goo
From the developer, it seems to work nicely.
The data is from data.gov.sg. Loading the packages required to plot the maps
Reading the shapefile using readOGR
We observe that the coordinates are in a different projection system. So we have to convert this to web mercator projection system. We transform the shapefile using spTransform.
We notice the transformed projection system. Let us plot it on top of a base map.