
LCZ4r 包 提供了一套全面的工具,用于在 R 语言环境中分析和可视化局地气候区 (LCZ) 和城市热岛 (UHI)。该工具包专为研究人员、城市规划师和气候科学家设计,简化了 LCZ 数据的下载、处理和解释过程。
1. 安装说明
LCZ4r 包托管于 GitHub,可通过两种方式安装。
对于大多数用户,我们推荐方式一。
方式一:从 GitHub 安装(推荐)
这是获取最新版本包的最快方式。
前置要求: 如果您已经安装了 remotes 或 devtools 包,可以跳过此步骤。
if (!require("remotes")) { install.packages("remotes")}
# 直接从 GitHub 安装或更新
remotes::install_github("ByMaxAnjos/climasus4r", upgrade = "never")更新说明:LCZ4r 处于活跃开发阶段。如需更新,只需再次运行上述命令即可。 R 会自动覆盖之前的版本。更新后,建议重启 R 会话(会话 > 重启 R)。
方式二:从本地文件安装 (.zip)
此方式适用于以下场景:网络连接不稳定、网络受限环境(如机构内网)、多人培训课程。
安装步骤:
下载包文件 👉 https://github.com/ByMaxAnjos/LCZ4r/archive/refs/heads/main.zip
解压文件 👉 下载完成后,将 .zip 文件解压到本地文件夹(例如:下载文件夹或桌面)
本地安装
# 重要提示:请根据解压路径调整以下路径
remotes::install_local(
"C:/您的文件夹路径/LCZ4r-main",
upgrade = "never"
)示例:如果您将文件下载并解压到下载文件夹:
remotes::install_local(
"/Users/maxanjos/Downloads/LCZ4r-main",
upgrade = "never"
)灵感来源
LCZ4r 包的开发受到以下研究成果的启发:
Stewart, I., and T. Oke, 2012: Local Climate Zones for Urban Temperature Studies.
Ching, J., et al., 2018: WUDAPT: An Urban Weather, Climate, and Environmental Modeling Infrastructure for the Anthropocene.
Demuzere, M., et al., 2019: Mapping Europe into Local Climate Zones.
Demuzere, M., et al., 2020: Combining Expert and Crowd-Sourced Training Data to Map Urban Form and Functions for the Continental US.
Demuzere, M., et al., 2022: A Global Map of Local Climate Zones to Support Earth System Modelling and Urban-Scale Environmental Science.
