data("popWR")
popWR <- popWR
wr <- WR(data = popWR, colID = "country_code",
matchWith = "iso3_eh", check.unit.names = FALSE,
res = "low")
###############
# Statics #
###############
mappingWR(data = wr, var = "total")
# \donttest{
mappingWR(data = wr, var = c("male","female"))
mappingWR(data = wr, var = "total", subset = ~I(iso2 == "IT"))
mappingWR(data = wr, var = "total", subset = ~I(region == "Americas"))
mappingWR(data = wr, var = "total", facets = "continent")
mappingWR(data = wr, var = "total",
subset = ~I(continent == "South America"),
facets = "name_wb")
# }
# \donttest{
mappingWR(data = wr, var = "total", typeStatic = "choro.cart")
mappingWR(data = wr, var = "total", aggregation_unit = "continent",
aggregation_fun = function(x) sum(x, na.rm = TRUE))
mappingWR(data = wr, var = "total", aggregation_unit = "subregion",
aggregation_fun = function(x) sum(x, na.rm = TRUE))
## World countries
wr1 <- loadCoordWR()
mappingWR(data = wr1)
###############
# Interactive #
###############
mappingWR(data = wr, var = "total", type = "interactive")
mappingWR(data = wr, var = c("male","female"), type = "interactive")
mappingWR(data = wr, var = "total", subset = ~I(iso2 == "IT"), type = "interactive")
# }
# \donttest{
mappingWR(data = wr, var = "total",
subset = ~I(region == "Americas"), type = "interactive")
mappingWR(data = wr, var = "total", type = "interactive",
aggregation_unit = "continent",
aggregation_fun = function(x) sum(x, na.rm = TRUE))
mappingWR(data = wr, var = "total", type = "interactive",
aggregation_unit = "subregion",
aggregation_fun = function(x) sum(x, na.rm = TRUE))
# }
Run the code above in your browser using DataLab