data("popUS")
us <- US(data = popUS, unit = "state")
###############
# Statics #
###############
mappingUS(data = us, var = "population")
mappingUS(data = us, var = "population",
subset = ~I(id == "california" | id == "texas"))
mappingUS(data = us, var = "population",
subset = ~I(id == "california" | id == "texas"), facets = "id")
# \donttest{
mappingUS(data = us, var = "population", typeStatic = "choro.cart")
###############
# Interactive #
###############
mappingUS(data = us, var = "population", type = "interactive")
mappingUS(data = us, var = "population", type = "interactive",
subset = ~I(id == "california" | id == "texas" | id == "new york" ))
# }
Run the code above in your browser using DataLab