Description Usage Arguments Value Examples
View source: R/DELE_function.R
mapping data by delegation
1 2 3 | DELE_function(data, DELEcode, var, mapTitle = "", mapColor = NULL,
titleColor = "black", showVar1, showVar2, showVar3, addLeg = T,
prov = providers$Esri.WorldImagery, GovBoundaryColor = "black")
|
data |
a data set that contains at least your states and the variable to represent |
var |
a numeric that indicate the colum number that contains your variable |
mapTitle |
the map title |
mapColor |
the map color |
titleColor |
the color for the title |
showVar1 |
: the variables you want to show in the highlight box on the map |
showVar2 |
: the variables you want to show in the highlight box on the map |
showVar3 |
: the variables you want to show in the highlight box on the map |
addLeg |
: a boolean to set to true in you want to have legend by the side of the map |
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 |
GovBoundaryColor |
: the color for the states boundaries |
DELEcode |
a numeric that indicate the colum number that contains the Delegations code |
a map with your data
1 2 3 4 | testD <- cbind(tnMAPDELE@data[["NAME_2"]],tnMAPDELE@data[["HASC_2"]],tnMAPDELE@data[["NAME_1"]],rnorm(268,50,20))
testD=as.data.frame(testD)
testD[,4]=as.numeric(testD[,4])
DELE_function(data = testD,var=4,mapTitle= "new MAp ",titleColor = "red",mapColor = NULL,DELEcode = 2,showVar1 = 1,showVar2 = 4,showVar3 = 3,addLeg = T,prov= providers$Esri.OceanBasemap,GovBoundaryColor="black")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.