0

私は、インドのすべての州とその人口のデータを持っています。次のコードを使用しました

 `G3 <- gvisGeoChart(Population, "States", "Population",
  options=list(region="IN", displayMode="regions", 
  resolution="provinces",
  width=600, height=400))
  plot(G3)`

マップは正常に表示されますが、チャティスガル州のデータが表示されません (データはアップロードしたテキスト ファイルにあります)。Web で同様のグラフを見たことがありますが、同じグラフは表示されません。

http://visual.yantrajaal.com/2015/05/googlevis-best-of-r-and-googlecharts.html

4

1 に答える 1

0

(with )に置き換えると機能Chattisgarhします。2 つのプロットを比較します。ChhattisgarhChh...

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)))

チャティスガルが表示されない

StateMilk_with_2_h <- StateMilk
StateMilk_with_2_h$State[StateMilk_with_2_h$State == "Chattisgarh"] <- "Chhattisgarh"
plot(gvisGeoChart(StateMilk_with_2_h, "State", "Total", 
                  options=list(region="IN", displayMode="regions", resolution="provinces", width=600, height=400)))

チャッティースガル州のディスプレイ

于 2017-01-12T15:44:28.037 に答える