gvisgeomap

Interactive Choropleth in R of Sweden

十年热恋 提交于 2020-01-14 03:11:08
问题 I'm trying to develop an interactive choropleth in a Shiny application in R. I've tried with plotly, gVis and rCharts, but still without any luck. I need to visualise it for Sweden right now, but I probably need it for other countries as well later on. This is what I have so far for gvisGeoMap: polygons <- readOGR("/ggshape", layer="SWE_adm1") polygons <- fortify(polygons, region="ID_1") data.poly <- as.data.frame(polygons) data.poly <- data.poly[,c(1,2)] data.poly.final <- data.frame

Interactive Choropleth in R of Sweden

好久不见. 提交于 2019-12-08 03:42:28
I'm trying to develop an interactive choropleth in a Shiny application in R. I've tried with plotly, gVis and rCharts, but still without any luck. I need to visualise it for Sweden right now, but I probably need it for other countries as well later on. This is what I have so far for gvisGeoMap: polygons <- readOGR("/ggshape", layer="SWE_adm1") polygons <- fortify(polygons, region="ID_1") data.poly <- as.data.frame(polygons) data.poly <- data.poly[,c(1,2)] data.poly.final <- data.frame(locationvar = paste(data.poly[,2],data.poly[,1], sep = ":"), numvar=1, hovervar="test") data.poly.final