Title: | China Administrative Divisions Geospatial Shapefile Data |
---|---|
Description: | Geospatial shapefile data of China administrative divisions to the county/district-level. |
Authors: | Mingchu Xu [aut, cre] |
Maintainer: | Mingchu Xu <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-02-12 04:11:00 UTC |
Source: | https://github.com/xmc811/mapchina |
A simple feature dataframe of China administrative divisions. The data was originally queried from OpenStreetMap and manually corrected for errors in QGIS
china
china
A simple feature dataframe of China administrative divisions
Code of county-level administrative division.
Code of perfecture-level administrative division.
Code of province-level administrative division.
Chinese name of province-level administrative division.
Chinese name of perfecture-level administrative division.
Chinese name of county-level administrative division.
Chinese Pinyin.
Population in Year 2000.
Population in Year 2010.
Estimated population in Year 2017.
Estimated population in Year 2018.
Land area in square km.
Population density in every square km.
vector geometry of the administrative division.
<https://www.openstreetmap.org/> <http://www.mca.gov.cn/article/sj/xzqh/1980/2019/202002281436.html>
head(china)
head(china)
Generate map colors by greedy coloring algorithm so that bordering features are colored differently
generate_map_colors(sf)
generate_map_colors(sf)
sf |
An simple feature dataframe - the shapefile of investigation |
An integer vector - the indices of map colors
generate_map_colors(head(china, 10))
generate_map_colors(head(china, 10))
Get the mex number of a vector
get_mex(v, colors, idx)
get_mex(v, colors, idx)
v |
An logical vector - the intersection vector |
colors |
An integer vector - the color assignment vector |
idx |
An integer - the index |
An integer
get_mex(c(TRUE,TRUE,FALSE,FALSE,TRUE), 1:5, 4)
get_mex(c(TRUE,TRUE,FALSE,FALSE,TRUE), 1:5, 4)