The LCZ4r package provides a comprehensive suite of tools for analyzing and visualizing Local Climate Zones (LCZ) and Urban Heat Islands (UHI) in R. Designed for researchers, urban planners, and climate scientists, LCZ4r simplifies the process of downloading, processing, and interpreting LCZ data.
The LCZ4r package is available on GitHub and can be installed in two ways.
We recommend Option 1 for most users.
This is the fastest way to get the latest version of the package.
::: callout-tip
Prerequisite: If you already have remotes or devtools installed, you can skip this step.
:::
if (!require("remotes")) { install.packages("remotes")}
# Install or update directly from GitHub
remotes::install_github("ByMaxAnjos/climasus4r", upgrade = "never")::: callout-warning
Updates: LCZ4r is under active development. To update, simply run the command above again.
R will automatically overwrite the previous version. After updating, it is recommended to restart your R session
(Session > Restart R).
:::
This option is recommended for: unstable internet connections, restricted networks (e.g., institutional environments), and training sessions with multiple users.
Steps:
-
Download the package 👉 https://github.com/ByMaxAnjos/LCZ4r/archive/refs/heads/main.zip
-
Extract the file 👉 After downloading, extract the .zip file to a local folder (e.g., Downloads or Desktop)
-
Install locally
# IMPORTANT: Adjust the path to where you extracted the folder
remotes::install_local(
"C:/Path/to/your/folder/LCZ4r-main",
upgrade = "never"
)::: callout-tip Example: If you downloaded and extracted the file to your Downloads folder:
remotes::install_local(
"/Users/maxanjos/Downloads/LCZ4r-main",
upgrade = "never"
):::
After installation, load the package whenever you start a new R session:
library(LCZ4r)--
(Click the image to explore the LCZ4r in Posit Cloud.)
The LCZ4r package is inspired by the following works:
-
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.
We value your input! If you have ideas for improvement or spot any issues, please let us know by opening an issue on GitHub.
Open an Issue on GitHub