›› 2026, Vol. 50 ›› Issue (生态统计方法专题): 0-.DOI: 10.17521/cjpe.2025.0318

• •    

R程序包“ggmapcn”在合规专题地图绘制中的应用

任梁, 黄永梅, 邸彦峰, 邓国臣, 段雷   

  1. 清华大学环境学院, 北京 100084 中国
    北京师范大学地理科学学部中药资源保护与利用北京市重点实验室, 北京 100875 中国
    中国科学院新疆生态与地理研究所干旱区生态安全与可持续发展全国重点实验室, 新疆维吾尔自治区 830011 中国
    中国测绘科学研究院, 北京 100830 中国
    区域环境安全全国重点实验室, 北京 100084 中国
  • 收稿日期:2025-08-28 修回日期:2025-11-26 出版日期:2026-08-30
  • 基金资助:
    国家重点研发计划(2023YFF1305304)

Application of the R package “ggmapcn” in the production of compliant thematic maps

REN Liang, HUANG Yong-mei, DI Yan-feng, DENG Guo-chen, DUAN Lei   

  1. School of Environment, Tsinghua University 100084, China
    Beijing Key Laboratory of Traditional Chinese Medicine Protection and Utilization, Faculty of Geographical Science, Beijing Normal University 100875, China
    Key Laboratory of Ecological Safety and Sustainable Development in Arid Lands, Xinjiang Institute of Ecology and Geography, Chinese Academy of Sciences 830011, China
    , Chinese Academy of Surveying and Mapping 100830, China
    , State Key Laboratory of Regional Environment and Sustainability 100084, China
  • Received:2025-08-28 Revised:2025-11-26 Online:2026-08-30
  • Supported by:
    National Key Research and Development Project(2023YFF1305304)

摘要: 地图是国家版图的主要表现形式,其规范性表达直接关系到国家主权与领土完整。然而,现有R语言制图程序包多基于国际地理数据集,在中国版图的完整表达、符号样式控制与投影参数设置等方面存在一定局限,难以满足科研制图的合规性要求。针对上述问题,“ggmapcn”程序包基于“ggplot2”图形语法框架构建,整合国家地理信息公共服务平台的行政区划数据,采用分层可视化架构实现中国和世界地图的合规绘制,并支持灵活的投影变换以及矢量与栅格数据的集成表达功能。本文系统介绍了“ggmapcn”包的功能架构与使用方法,并通过典型操作示例展示了其在制作符合国家规定的专题地图中的实际应用。结果表明,该程序包能够在R环境中实现符合中国和世界各国国界线画法标准的地图输出,为R语言空间制图工具体系提供了补充。最后,本文结合现有功能特点,对“ggmapcn”包未来的功能完善与应用拓展提出了展望。

关键词: “ggmapcn”包, 专题地图, 标准地图, 中国行政区划, 空间可视化

Abstract: Maps serve as the primary representation of national territory, and their normative expression is closely tied to na-tional sovereignty and territorial integrity. However, most existing R mapping packages rely on international geo-graphic datasets and therefore face limitations in providing a complete and compliant representation of China’s territory, controlling map symbology, and configuring projection parameters, making them insufficient for com-pliance-oriented scientific cartography. To address these challenges, the “ggmapcn” package was developed within the “ggplot2” grammar of graphics framework. It integrates administrative division data from the National Plat-form for Common GeoSpatial Information Services and employs a layered visualization architecture to enable compliant mapping of both China and the world, while supporting flexible projection transformations and inte-grated visualization of vector and raster data. This paper systematically introduces the functional architecture and usage of “ggmapcn” and illustrates its application in producing thematic maps that comply with national standards through representative examples. The results demonstrate that “ggmapcn” can generate map outputs in R that con-form to official national boundary standards for China and other countries, thereby enriching the R ecosystem for spatial cartography. Finally, the paper outlines future directions for functional improvement and broader applica-tion of the package.

Key words: “ggmapcn” package, thematic mapping, standard map, China administrative divisions, spatial visualization