Any idea how or if the states of Mexico or other countries ie Chile can be displayed with the states borders drawn and the names of the states displayed with Google Maps.?
USA maps have each state displayed as default.
Do I need to do some sort of overlay?
The state outlines are available in the Natural Earth Data set in FusionTables also and can be overlaid using a FusionTablesLayer:
Mexico
Chile
You need to get the outlines from a third party, and then draw them as an overlay.
I believe one source you can use for the US is TIGER.
*from this question: How did google get the outline for postcodes on maps?
EDIT: I also read that you can use the OpenStreetMap API to get the outlines.
Related
I have plot the map for Sarawak state(in the country Malaysia) along with the boundaries at district level as shown in diagram.
However my question is, how can I color specific districts(two or more)? Can someone help me, any districts in Sarawak will do as an example. Code are as below:
#sarawak map with divisions
library(raster)
#country Malaysia with all boundaries at the district level
Malaysia <- getData('GADM', country='MYS', level=2)
#listing all districts in every states in Malaysia e.g. there are 32 districts for Sarawak state
Malaysia$NAME_1
#plotting Sarawak with all districts and their boundaries
Sarawak <- Malaysia[98:128,]
plot(Sarawak)
Let me start by recommending (to everyone) to go to CRAN, clicking on the "packages" link, and then on the "CRAN Task Views" link. That page collects packages by general area of applicability; there's a whole section on maps and mapping and GEOS, etc.
For your particular case, I think some of the tools in the package maptools here are designed for coloring designated regions in a map.
Is there a simple way to display only a single state? For example
qmap("Texas", zoom=6)
produces
which obviously also includes all of Oklahoma, most of New Mexico, etc...is there a way to "mask" the surrounding states (and Mexico) to display only Texas?
The short answer is that you need to tell ggmap where Texas is. Typically you'd do that using a shapefile. See e.g.
R: ggmap – Overlay shapefile with filled polygon of regions
Plotting Choropleths from Shapefiles in R with ggmap
I didn't find updated Spatial data for Germany on county level. I used a SpatialPolygonsDataFrame from gadm before, which were perfect until some reforms concerning administrative boundaries. Further, I tried an updated version from Geodatenzentrum, but I didn't get a complete map of all German counties or had failed to transform UTM 32 data properly.
If anyone has an idea how to get these data it would be great.
Are the openstreetmap administrative areas appropriate?
http://download.geofabrik.de/europe/germany.html
Using R: I'm looking to add a world map to my existing plot but I am having issues. My existing plot shows sea surface temperatures of the pacific ocean so I need to essentially shift the world map from the traditional Atlantic view to a pacific view.
When I add the map, it is not aligned with my existing plot of world-wide Sea Surface Temperatures. I need the landmass to align with the white spaces on the map. (you can see the map by viewing the link below)
I've been using map() from the library maps. The lat-long that my existing plot is based on are decimal degrees. I have tried xlim and ylim arguments in map()- they haven't seemed to do anything. I haven't played around with coordinate systems though- mainly because I don't know what to try. Any suggestions? My code is at the link below.
http://rpubs.com/redi1102/9930
The section I specifically am asking about is this:
image.plot(xlong,ylat,zmat,ylim=range(-60,80))
contour(xlong,ylat,(zmat),ylim=range(-60,80),add=TRUE,nlev=6,lwd=2)
world(xlim=c(-150,150), ylim=c(-60,80),add=T)
Thankyou!
I'm trying to create an intensity map with Google Fusion Tables. Most of the country values display fine, but for some reason, the value for Russia does not appear in the 'World' view. When I switch the view to Region: 'Russian Federation' , it works fine (although the color is not correct).
I tried changing from Russia to Russian Federation, RU etc. but I keep having the same problem.
Thanks for your advice
As described in the documentation, you must use the two-digit country code for the intensity map to work.
I copied your table and replaced "Russia" with "RU" and then it works:
Map
Table