getEuropeReferenceTable | R Documentation |
SpatialPolygonsDataFrame
)This function builds a custom Europe map and return a SpatialPolygonsDataFrame
.
The output can be use by example in mapLayout with the map
argument.
getEuropeReferenceTable()
getEuropeCountries(mergeCountry = TRUE)
getEuropeStates()
getSpMaps(countries = "all", states = NULL, mergeCountry = TRUE)
mergeCountry |
|
countries |
|
states |
|
SpatialPolygonsDataFrame
# default map : Europe without states
europe_cty <- getSpMaps()
plot(europe_cty)
# subset on some countries
ref_table <- getEuropeReferenceTable()
italy_spain_fra <- getSpMaps(countries = c("FRA", "ITA", "ESP"))
plot(italy_spain_fra)
## Not run:
italy_spain_fra_states <- getSpMaps(countries = NULL, states = c("FRA", "ITA", "ESP"))
plot(italy_spain_fra_states)
# combine countries and states
combine_map <- getSpMaps(countries = c("ITA", "ESP"), states = "FRA")
plot(combine_map)
# build your custom map : you can use directly data
# to subset the area you really want
europe_states <- getEuropeStates()
europe_countries <- getEuropeCountries()
# for example, have a look to GBR states map
summary(europe_states)
gbr_states_districts <- europe_states[
europe_states$code %in% "GBR" &
europe_states$type %in% "Administrative County",]
plot(gbr_states_districts)
# combine with another map : you just have to have the same columns...
# getSpMaps only return "name" and "code" column
custom_states <- rbind(
getSpMaps(countries = NULL, states = "FRA"),
gbr_states_districts[, c("name", "code"), drop = FALSE])
plot(custom_states)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.