Description Usage Arguments Value Examples
View source: R/GovDotDensityMap.R
DELEDotDensityMap
1 2 3 4 5 | GovDotDensityMap(data, Govcode, var, DotWeight = 0.5,
polyEdgColor = "blue", OneDFor = 50,
dotColor = "lightgoldenrodyellow",
prov = providers$NASAGIBS.ViirsEarthAtNight2012,
polyColor = "midnightblue")
|
data |
a data set that contains at least your states and the variable to represent |
Govcode |
a numeric that indicate the colum number that contains the states code |
var |
a numeric that indicate the colum number that contains your variable |
DotWeight |
the dot weight |
polyEdgColor |
the boundries color |
OneDFor |
the unit (exp: 60 to present 60 votes per dot ) |
dotColor |
the dots color |
prov |
: it have to be in format : providers$... and the provider you want to have in the background you can see all the providers by typing View(providers) or going to https://leaflet-extras.github.io/leaflet-providers/preview/ where you can fin all the providers and how they look like |
polyColor |
the polygons filling color |
a map with your data
1 2 3 4 | testG <- cbind(tnMAP$NAME_1,rnorm(n = 24,mean = 20,sd = 13),tnMAP$HASC_1)
testG=as.data.frame(testG)
testG[,2]=as.numeric(testG[,2])
GovDotDensityMap(testG,Govcode = 3,var=2,prov = providers$OpenStreetMap)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.