我和我一起有所有印度人口的数据。我使用了以下代码
`G3 <- gvisGeoChart(Population, "States", "Population",
options=list(region="IN", displayMode="regions",
resolution="provinces",
width=600, height=400))
plot(G3)`
地图正常,但State Chattisgarh的数据没有显示(数据在我上传的文本文件中)。 我在网上看到了类似的图表,也没有显示相同的图表。
http://visual.yantrajaal.com/2015/05/googlevis-best-of-r-and-googlecharts.html
答案 0 :(得分:0)
如果您将List<List<double>>
替换为Chattisgarh
(Chhattisgarh
),则此方法有效。比较两个图:
Chh...
library(googleVis)
StateMilk <- read.table(
text = "State 'Cow Milk CD' 'Cow Milk ND' 'Cow Milk Total' 'Buffalo Milk' 'Goat Milk' Total
'Andhra Pradesh' 1268.0 1054.0 2322.0 6603.0 0.4 8925.0
'Arunachal Pradesh' 9.0 23.0 32.0 NA NA 32.0
Assam 166.0 462.0 628.0 100.0 25.0 752.0
Bihar 986.0 1958.0 2943.0 2623.0 216.0 5783.0
Chattisgarh 56.0 471.0 527.0 296.0 43.0 866.0",
header = TRUE, stringsAsFactors = FALSE)
plot(gvisGeoChart(StateMilk, "State", "Total",
options=list(region="IN", displayMode="regions", resolution="provinces", width=600, height=400)))