
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.
0. What’s new in 0.2.0
-
11 languages: every exported function accepts
lang = "en"(pluspt,es,fr,zh,de,it,ja,ko,ru,ar). -
Publication-ready figures:
lcz_theme_journal()andlcz_save_figure()produce 120/190 mm figures at 600 dpi or vector PDF/SVG. -
UHI without dual axes:
group = TRUEdraws two aligned panels,- urban/rural temperature and (b) UHI intensity.
-
Much faster:
lcz_get_parameters()~83×,two.stepextraction ~16×. - Clear diagnostics when stations do not match the LCZ map.
- Reviewed LCZ terminology against published national nomenclatures.
0.1 Languages
Every exported function accepts a lang argument. Messages, error text, axis labels, legends and the 17 LCZ class names are translated into 11 languages: en (default), pt, es, fr, zh, de, it, ja, ko, ru, ar.
0.2 Publication-ready figures
All maps and charts share one editorial system: left-aligned titles, no top/right spines, colour-blind-safe palettes and a single-column LCZ legend so the map keeps its area.
library(LCZ4r)
my_map <- lcz_get_map(city = "Berlin", lang = "en")
p <- lcz_plot_map(my_map, lang = "en", title = "Local Climate Zones",
scalebar = TRUE, north_arrow = TRUE)
lcz_save_figure(p, "fig_map.pdf", width = "double", height = 150)
data(lcz_data)
p_uhi <- lcz_uhi_intensity(my_map, lcz_data, var = "airT",
station_id = "station", group = TRUE, lang = "en")
lcz_save_figure(p_uhi, "fig_uhi.pdf", width = "double", height = 165)Full specification: dev/design-system.md.
1. Installation
The LCZ4r package is available on GitHub and can be installed in two ways.
We recommend Option 1 for most users.
Option 1: Install from GitHub (Recommended)
This is the fastest way to get the latest version of the package.
Prerequisite: If you already have remotes or devtools installed, you can skip this step.
# Install from R-universe (recommended, no GitHub token needed)
install.packages("LCZ4r", repos = c("https://bymaxanjos.r-universe.dev", "https://cloud.r-project.org"))
# Or install directly from GitHub
if (!require("remotes")) { install.packages("remotes")}
remotes::install_github("ByMaxAnjos/LCZ4r", upgrade = "never")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).
Option 2: Install from Local File (.zip)
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"
)Example: If you downloaded and extracted the file to your Downloads folder:
remotes::install_local(
"/Users/maxanjos/Downloads/LCZ4r-main",
upgrade = "never"
)Loading the package
After installation, load the package whenever you start a new R session:
library(LCZ4r)Run LCZ4r in Posit Cloud, no RStudio installation required!

(Click the image to explore the LCZ4r in Posit Cloud.)
LCZ4r-QGIS Plugin: Multilingual Integration
The LCZ4r-QGIS plugin integrates the LCZ4r package with QGIS, enabling users to analyze Local Climate Zones and urban heat islands directly within the QGIS environment. The plugin supports multiple languages, making it accessible to a global audience.
Inspiration
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.
