Title: China Map Data from AutoNavi Map
Version: 0.1.0
Maintainer: Panfeng Zhang <zhangpanfeng@jlnu.edu.cn>
Description: According to the code or the name of the administrative division at the county level and above provided by the Ministry of Civil Affairs of the People's Republic of China in 2022 (https://www.mca.gov.cn/mzsj/xzqh/2022/202201xzqh.html), get the map file online from the website of AutoNavi Map (http://datav.aliyun.com/portal/school/atlas/area_selector).
URL: https://github.com/PanfengZhang/cnmap
BugReports: https://github.com/PanfengZhang/cnmap/issues
Depends: R (≥ 4.3.0)
Imports: sf, terra
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.3.1
LazyData: true
Suggests: knitr, rmarkdown, ggplot2
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2024-04-01 12:58:51 UTC; zhang
Author: Panfeng Zhang ORCID iD [aut, cre]
Repository: CRAN
Date/Publication: 2024-04-02 12:42:06 UTC

Description

the code and name of China's administrative divisions

Usage

ad

Format

A data frame with 3212 rows and 2 variables:

ID

character, the code of China's administrative divisions

name

character, asscii code, the name of China's administrative divisions. The asscii code can be converted to Chinese character using rawToChar()

...


China Map Data from AutoNavi Map

Description

According to the code and name of the administrative division at the county level and above provided by the Ministry of Civil Affairs of the People's Republic of China in 2022 (https://www.mca.gov.cn/mzsj/xzqh/2022/202201xzqh.html), get the map vector file online from the website of AutoNavi Map (http://datav.aliyun.com/portal/school/atlas/area_selector).

Usage

getMap(
  name = NULL,
  code = "100000",
  subRegion = FALSE,
  returnClass = c("sf", "sv")
)

Arguments

name

character. An name of the China's administrative division at the county level or above. The name of administrative division needs to be consistent with the website provided by the Ministry of Civil Affairs of the People's Republic of China in 2022 (https://www.mca.gov.cn/mzsj/xzqh/2022/202201xzqh.html).

code

character. A code of the China's administrative division at the county level or above. The code of administrative division needs to be consistent with the website provided by the Ministry of Civil Affairs of the People's Republic of China in 2022 (https://www.mca.gov.cn/mzsj/xzqh/2022/202201xzqh.html).

subRegion

A logical evaluating to TRUE or FALSE indicating whether the sub regions of the administrative region should be included. The default is FALSE, not included.

returnClass

A string determining the spatial object to return. Either "sf" for for simple feature (from 'sf' package, the default) or "sv" for a 'SpatVector' (from 'terra' package).

Value

a 'sf' or a 'SpatVector' object.

Examples

library(cnmap)

map1 <- getMap(code = "110000") # get the map data of Beijing City

map2 <- getMap(code = "100000") # get the map data of China.

# get the map data of Beijing City, and sub regions is also included.
map1 <- getMap(code = "110000", subRegion = TRUE)

mirror server hosted at Truenetwork, Russian Federation.