I want to generate a map of India in R. I have five indicators with different values of every state. I want to plot bubbles with five different colors, and their size should represent their intensity in every state. For example:
State A B C D E
Kerala - 39, 5, 34, 29, 11
Bihar - 6, 54, 13, 63, 81
Assam - 55, 498, 89, 15, 48,
Chandigarh - 66, 11, 44, 33, 71
I have gone through some links related to my problem:
[1] http://www.r-bloggers.com/nrega-and-indian-maps-in-r/
But these links could not serve my purpose. Any help in this direction would be greatly appreciated.
I have also tried
library(mapproj)
map(database= "world", regions = "India", exact=T, col="grey80", fill=TRUE, projection="gilbert", orientation= c(90,0,90))
lat <- c(23.30, 28.38)
lon <- c(80, 77.12) # Lon and Lat for two cities Bhopal and Delhi
coord <- mapproject(lon, lat, proj="gilbert", orientation=c(90, 0, 90))
points(coord, pch=20, cex=1.2, col="red")
In nut shell problems are:
(1) It does not give me plot at district level. Not even boundries of states.
(2) How to create bubbles or dots of my data in this plot, if I have only name of locations and corresponding value to plot?
(3) can this be done in easily in library(RgoogleMaps) or library(ggplot2)? (Just a guess, I do not know much about these packages)
Once you have the shapefile for India, you need to create a choropleth. That will take the shapefule map and color each State in India on a gradient that reflects your data. You may want to create a panel of five plots, each one showing India and its states colored according to one of your five variables.
For others who can push this answer farthr, here is the
dputof the data frame, after a bit of cleaning.