Title: | China Map Data from AutoNavi Map |
---|---|
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>). |
Authors: | Panfeng Zhang [aut, cre] |
Maintainer: | Panfeng Zhang <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-02-28 03:01:34 UTC |
Source: | https://github.com/panfengzhang/cnmap |
the code and name of China's administrative divisions
ad
ad
A data frame with 3212 rows and 2 variables:
character, the code of China's administrative divisions
character, asscii code, the name of China's administrative divisions. The asscii code can be converted to Chinese character using rawToChar()
...
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).
getMap( name = NULL, code = "100000", subRegion = FALSE, returnClass = c("sf", "sv") )
getMap( name = NULL, code = "100000", subRegion = FALSE, returnClass = c("sf", "sv") )
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). |
a 'sf' or a 'SpatVector' object.
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)
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)