gadmSEA: gadmSEA: maps of the countries of Southeast Asia.

Description Details Examples

Description

Contains the countries maps of Southeast Asia from GADM.

Details

Available maps are bhutan, cambodia, china, india, indonesia, laos, malaysia, myanmar, nepal, papuanewguinea, philippines, taiwan, thailand, vietnam.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
## Plotting Vietnam in Southeast Asia:
#library(sp)  # "plot"
#library(gadmSEA)  # "vietnam"
#library(dplyr)  # "mutate" function and the " %>% " pipe operator
### defining colors:
#rgb2 <- function(...) rgb(..., max = 255)
#blue   <- rgb2(200, 237, 255)
#grey   <- rgb2(225, 225, 225)
#yellow <- rgb2(253, 252, 235)
### the map:
#plot(vietnam, xlab = "longitude (decimal degree)", border = NA,
 #             ylab = "latitude (decimal degree)", bg = blue)
#mcutils::datasets("gadmSEA") %>%
 # as.data.frame(stringsAsFactors = FALSE) %>%
 # setNames("country") %>%
 # mutate(col = ifelse(country == "vietnam", yellow, grey)) %$%
 # invisible(purrr::map2(country, col, ~ plot(get(.x), col = .y, add = TRUE)))
 # axis(1); axis(2); box(bty = "o")

## Plotting some countries in southeast Asia:
#library(sp)  # for "plot"
#library(gadmSEA) # for the countries
#library(magrittr) # for " %$% " and " %>% "

#rgb2 <- function(...) rgb(..., max = 255)
#blue   <- rgb2(200, 237, 255)
#grey   <- rgb2(225, 225, 225)
#yellow <- rgb2(253, 252, 235)

### the map:
#plot(vietnam, xlab = "longitude (decimal degree)", border = NA,
#               ylab = "latitude (decimal degree)", bg = blue,
#              xlim = c(68, 146), ylim = c(-11, 54))
#ctr <- c("vietnam", "philippines", "cambodia", "japan", "china", "thailand",
 #        "singapore", "indonesia", "malaysia", "taiwan", "bangladesh", "laos",
  #       "india", "nepal")
#mcutils::datasets("gadmSEA") %>%
 # as.data.frame(stringsAsFactors = FALSE) %>%
 # setNames("country") %>%
 # dplyr::mutate(col = ifelse(country %in% ctr, yellow, grey)) %$%
  #invisible(purrr::map2(country, col, ~ plot(get(.x), col = .y, add = TRUE)))
#axis(1); axis(2); box(bty = "o")

#points(109.215971, 13.715266, col = "red", pch = 19)
#points(109.215971, 13.715266, col = "red", cex = 2)
#points(109.215971, 13.715266, col = "red", cex = 3)
#points(109.215971, 13.715266, col = "red", cex = 4)

choisy/gadmSEA documentation built on May 19, 2019, 1:42 a.m.