diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml
index 74d8c9743..73bfb2159 100644
--- a/.github/workflows/R-CMD-check.yaml
+++ b/.github/workflows/R-CMD-check.yaml
@@ -4,9 +4,10 @@ on:
push:
branches: [main, master]
pull_request:
- branches: [main, master]
-name: R-CMD-check
+name: R-CMD-check.yaml
+
+permissions: read-all
jobs:
R-CMD-check:
@@ -29,7 +30,7 @@ jobs:
R_KEEP_PKG_SOURCE: yes
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- uses: r-lib/actions/setup-pandoc@v2
@@ -37,7 +38,6 @@ jobs:
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
- use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
@@ -47,3 +47,4 @@ jobs:
- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
+ build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'
diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml
index a7276e855..16c6c8b8b 100644
--- a/.github/workflows/pkgdown.yaml
+++ b/.github/workflows/pkgdown.yaml
@@ -4,12 +4,13 @@ on:
push:
branches: [main, master]
pull_request:
- branches: [main, master]
release:
types: [published]
workflow_dispatch:
-name: pkgdown
+name: pkgdown.yaml
+
+permissions: read-all
jobs:
pkgdown:
@@ -22,13 +23,11 @@ jobs:
permissions:
contents: write
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
- with:
- use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
@@ -41,7 +40,7 @@ jobs:
- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
- uses: JamesIves/github-pages-deploy-action@v4.5.0
+ uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # v4.8.0
with:
clean: false
branch: gh-pages
diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml
index fefc52e27..5e820d396 100644
--- a/.github/workflows/test-coverage.yaml
+++ b/.github/workflows/test-coverage.yaml
@@ -4,9 +4,8 @@ on:
push:
branches: [main, master]
pull_request:
- branches: [main, master]
-name: test-coverage
+name: test-coverage.yaml
permissions: read-all
@@ -17,11 +16,9 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v6
- uses: r-lib/actions/setup-r@v2
- with:
- use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
@@ -35,14 +32,16 @@ jobs:
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
+ print(cov)
covr::to_cobertura(cov)
shell: Rscript {0}
- - uses: codecov/codecov-action@v4
+ - uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7
with:
- fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
- file: ./cobertura.xml
- plugin: noop
+ # Fail if error if not on PR, or if on PR and token is given
+ fail_ci_if_error: ${{ github.event_name != 'pull_request' || secrets.CODECOV_TOKEN }}
+ files: ./cobertura.xml
+ plugins: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}
@@ -55,7 +54,7 @@ jobs:
- name: Upload test results
if: failure()
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@v7
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
diff --git a/DESCRIPTION b/DESCRIPTION
index 8437d8386..fee1191e4 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,6 +1,6 @@
Package: tmap
Title: Thematic Maps
-Version: 4.4-1
+Version: 4.4-1.9000
Authors@R: c(
person("Martijn", "Tennekes", , "mtennekes@gmail.com", role = c("aut", "cre")),
person("Jakub", "Nowosad", , "nowosad.jakub@gmail.com", role = "ctb"),
diff --git a/NEWS.md b/NEWS.md
index e63a3be2b..a012c9784 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,18 +1,22 @@
+# tmap (development version)
+
+- fixed partial matching.
+
# tmap 4.4-1
- Documentation-only release: more informative and de-duplicated man-page titles, and terminology harmonized across the documentation for consistency with upcoming publications.
# tmap 4.4
-- [!] added tm_circles (circles with fixed unit-based radii)
-- [!] added blend argument to all layers
-- [!] added hitbox to tm_lines and tm_symbols for view mode (so hovering and clicking also works well for small objects)
+- [!] added `tm_circles()` (circles with fixed unit-based radii)
+- [!] added `blend` argument to all layers
+- [!] added `hitbox` to `tm_lines()` and `tm_symbols()` for view mode (so hovering and clicking also works well for small objects)
- added `tmap_mode_pool()` to restrict which modes are cycled by `ttm()` and `rtm()`, e.g. `library(tmap.mapgl); tmap_mode_pool(c("plot", "maplibre"))`
- shiny dispatch methods added (to allow integration for other modes)
- added support for terra's PackedSpatX objects
-- added support for stars_proxy when changed after evaluation
-- tm_crs() can take bbox and tmaptools::bb arguments
-- added height to tmap_arrange (for interactive modes)
+- added support for `stars_proxy` when changed after evaluation
+- `tm_crs()` can take `bbox` and `tmaptools::bb` arguments
+- added height to `tmap_arrange()` (for interactive modes)
- fixed date/time formatting of facet labels
- bug fixes (most importantly regarding >=1000 polygons in view mode)
@@ -20,30 +24,30 @@
# tmap 4.3
- [!] support for PMTiles via new and experimental package tmap.sources
-- [!] tm_text: halo, shadow and background rectangles implemented in plot and view mode
-- [!] tm_scalebar: improved measurement (using ellipsoidal distance rather than Eucledian distances in projected crs)
+- [!] `tm_text()`: halo, shadow and background rectangles implemented in plot and view mode
+- [!] `tm_scalebar()`: improved measurement (using ellipsoidal distance rather than Eucledian distances in projected crs)
- crs handling improved: local crs accepted
-- tmap_save can also save in other modes (e.g. from tmap.mapgl)
+- `tmap_save()` can also save in other modes (e.g. from tmap.mapgl)
- fixed many view-mode/shiny related bugs
# tmap 4.2
- [!] improved legend (labeling #1174 and continuous-style intervals #1175)
-- [!] added tm_insets: inset maps, ggplot2 plots etc. excepted
-- [!] added tm_minimap for plot mode
+- [!] added `tm_insets()`: inset maps, ggplot2 plots etc. excepted
+- [!] added `tm_minimap()` for plot mode
- improved animations (#1160)
-- tmap_overview added, which provides an overview of all map elements (layers and components)
-- tm_layout arguments limited to the useful ones
-- tm_components (was tm_comp_group) improved: now also applicable to map component functions
-- bbox added to tm_crs. Special value is "FULL" which refers to the whole earth
+- `tmap_overview()` added, which provides an overview of all map elements (layers and components)
+- `tm_layout()` arguments limited to the useful ones
+- `tm_components()` (was tm_comp_group) improved: now also applicable to map component functions
+- `bbox` added to `tm_crs()`. Special value is "FULL" which refers to the whole earth
# tmap 4.1
This fixes a few regressions in the tmap v4 release and adds improvements.
- [!] basemaps in plot mode much sharper, added `tmap_providers()` (#1041, #1042)
-- [!] tm_comp_group() added to specify grouped components (incl legends)
-- [!] added tm_animate() (main use case: cartograms)
+- [!] `tm_comp_group()` added to specify grouped components (incl legends)
+- [!] added `tm_animate()` (main use case: cartograms)
- for the background and frame we introduce: `bg`/`bg.color` and `frame`/`frame.color`
- `tm_remove_layer()` works again in Shiny (#1044)
- `tm_logo()` works again in view mode (#1038).
diff --git a/R/tm_component_functions.R b/R/tm_component_functions.R
index 782cfa1b7..3870d7543 100644
--- a/R/tm_component_functions.R
+++ b/R/tm_component_functions.R
@@ -89,12 +89,12 @@ tm_credits = function(text, size, color, padding, fontface, fontfamily, alpha, s
#' Map component that adds a compass
#'
#' @param north north
-#' @param type compass type, one of: \code{"arrow"}, \code{"4star"}, \code{"8star"}, \code{"radar"}, \code{"rose"}. The default is controlled by \code{\link{tm_layout}} (which uses \code{"arrow"} for the default style)
-#' @param text.size text.size
+#' @param type compass type, one of: `"arrow"`, `"4star"`, `"8star"`, `"radar"`, `"rose"`. The default is controlled by [tm_layout()] (which uses `"arrow"` for the default style)
+#' @param text.size Text size
#' @param size size
-#' @param show.labels show.labels
+#' @param show.labels Show labels
#' @param cardinal.directions cardinal.directions
-#' @param text.color text.color
+#' @param text.color Text color
#' @param color.dark color.dark
#' @param color.light color.light
#' @param lwd lwd
@@ -228,10 +228,10 @@ tm_mouse_coordinates <- function(stack,
#'
#' Map component that adds a [minimap][leaflet::addMiniMap()] in view mode.
#'
-#' @param server name of the provider or an URL (see \code{\link{tm_tiles}}).
+#' @param server name of the provider or an URL (see [tm_tiles()]).
#' By default, it shows the same map as the basemap, and moreover, it will automatically change when the user switches basemaps.
#' Note the latter does not happen when `server` is specified.
-#' @param toggle should the minimap have a button to minimise it? By default \code{TRUE}.
+#' @param toggle should the minimap have a button to minimise it? By default `TRUE`.
#' @inheritParams tm_title
#' @inheritParams tm_inset
#' @inheritDotParams leaflet::addMiniMap
diff --git a/R/tm_layers_symbols.R b/R/tm_layers_symbols.R
index 5b94a8092..4e8411283 100644
--- a/R/tm_layers_symbols.R
+++ b/R/tm_layers_symbols.R
@@ -9,9 +9,9 @@
#' \enumerate{
#' \item{A numeric value that specifies the plotting character of the symbol. See parameter \code{pch} of \code{\link[graphics:points]{points}} and the last example to create a plot with all options. Note that this is not supported for the \code{"view" mode.}}
#' \item{A \code{\link[grid:grid.grob]{grob}} object, which can be a ggplot2 plot object created with \code{\link[ggplot2:ggplotGrob]{ggplotGrob}}. To specify multiple shapes, a list of grob objects is required. Tip: for proportional symbols, such as donuts or pies, see the extension package `r .doc_see_vig("ext_glyphs")`.}
-#' \item{An icon specification, which can be created with \code{\link{tmap_icons}}.}
+#' \item{An icon specification, which can be created with [tmap_icons()]}.
#' }
-#' To specify multiple shapes (needed for the \code{shapes} argument), a vector or list of these shape specification is required. The shape specification options can also be mixed. For the \code{shapes} argument, it is possible to use a named vector or list, where the names correspond to the value of the variable specified by the \code{shape} argument.
+#' To specify multiple shapes (needed for the `shapes` argument), a vector or list of these shape specification is required. The shape specification options can also be mixed. For the \code{shapes} argument, it is possible to use a named vector or list, where the names correspond to the value of the variable specified by the \code{shape} argument.
#' For small multiples, a list of these shape specification(s) should be provided.
#'
#' @param fill,fill.scale,fill.legend,fill.chart,fill.free `r .doc_vv("fill")` `r .doc_unit("fill")`
diff --git a/R/tmapGridComp.R b/R/tmapGridComp.R
index 5e62ce7f5..db92dcdc5 100644
--- a/R/tmapGridComp.R
+++ b/R/tmapGridComp.R
@@ -8,7 +8,7 @@ gridCell = function(rows, cols, e) {
process_comp_box = function(comp, sc, o) {
comp = within(comp, {
- if ("frame.color" %in% comp$called) {
+ if ("frame.color" %in% comp$called_via_comp_group) {
frame = TRUE
frame.lwd = frame.lwd * sc
} else {
@@ -286,7 +286,7 @@ tmapGetCompGroupArgs = function(comp) {
if (any(frms) && (any(!frms))) grp$frame = any_legend_chart_inset
}
if (!("bg" %in%grp_called)) grp$bg = any_legend_chart_inset
- grp$called = comp[[1]]$called
+ grp$called = comp[[1]]$called_via_comp_group
grp
}
diff --git a/README.Rmd b/README.Rmd
index d7a7ddac0..8207c9b27 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -39,7 +39,7 @@ knitr::knit_hooks$set(output = function(x, options) {
[](https://github.com/r-tmap/tmap/actions/workflows/R-CMD-check.yaml)
-[](https://app.codecov.io/gh/r-tmap/tmap?branch=master)
+[](https://app.codecov.io/gh/r-tmap/tmap)
[](https://cran.r-project.org/package=tmap)
[](https://cran.r-project.org/web/checks/check_results_tmap.html)
[](https://www.r-pkg.org:443/pkg/tmap)
@@ -80,7 +80,7 @@ tmap depend on other R packages, which will automatically be installed along. Ho
Instructions for the libraries GEOS, GDAL and PROJ (required by **sf**): see the installation instructions of **terra** which requires the same libraries: [MacOS](https://rspatial.github.io/terra/index.html?q=installation#macos) and [Linux](https://rspatial.github.io/terra/index.html?q=installation#linux)
-Instructions for the libraries Abseil and OpenSS (required by **s2**): see the [installation instructions](https://r-spatial.github.io/s2/#installation).
+Instructions for the libraries Abseil and OpenSSL (required by **s2**): see the [installation instructions](https://r-spatial.github.io/s2/#installation).
## Getting started
diff --git a/README.md b/README.md
index 041216f84..c84709d2c 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
[](https://github.com/r-tmap/tmap/actions/workflows/R-CMD-check.yaml)
[](https://app.codecov.io/gh/r-tmap/tmap?branch=master)
+coverage](https://codecov.io/gh/r-tmap/tmap/graph/badge.svg)](https://app.codecov.io/gh/r-tmap/tmap)
[](https://cran.r-project.org/package=tmap)
[](https://cran.r-project.org/web/checks/check_results_tmap.html)
@@ -77,7 +77,7 @@ tm_shape(World) +
tm_polygons(fill = "HPI")
```
-
+
This map can be enhanced in several ways. For instance:
@@ -91,14 +91,12 @@ tm_shape(World, crs = "+proj=robin") +
)
```
-
+
+
## Additional Resources for Learning **tmap**
@@ -111,9 +109,9 @@ following resources:
- **Official Vignettes:** A collection of vignettes at
[r-tmap.github.io](https://r-tmap.github.io/tmap/articles/) covers
both basic and advanced topics with examples.
-- **Work-in-Progress Book:** *Elegant and Informative Maps with tmap* is
- an upcoming book available at
- [tmap.geocompx.org](https://tmap.geocompx.org/).
+- **Work-in-Progress Book:** *Spatial Data Visualization with tmap: A
+ Practical Guide to Thematic Mapping in R* is an upcoming book
+ available at [tmap.geocompx.org](https://tmap.geocompx.org/).
These resources provide a solid foundation for working with **tmap** in
R.
diff --git a/man/tm_compass.Rd b/man/tm_compass.Rd
index 66718bf5c..5d757dc59 100644
--- a/man/tm_compass.Rd
+++ b/man/tm_compass.Rd
@@ -35,17 +35,17 @@ tm_compass(
\arguments{
\item{north}{north}
-\item{type}{compass type, one of: \code{"arrow"}, \code{"4star"}, \code{"8star"}, \code{"radar"}, \code{"rose"}. The default is controlled by \code{\link{tm_layout}} (which uses \code{"arrow"} for the default style)}
+\item{type}{compass type, one of: \code{"arrow"}, \code{"4star"}, \code{"8star"}, \code{"radar"}, \code{"rose"}. The default is controlled by \code{\link[=tm_layout]{tm_layout()}} (which uses \code{"arrow"} for the default style)}
-\item{text.size}{text.size}
+\item{text.size}{Text size}
\item{size}{size}
-\item{show.labels}{show.labels}
+\item{show.labels}{Show labels}
\item{cardinal.directions}{cardinal.directions}
-\item{text.color}{text.color}
+\item{text.color}{Text color}
\item{color.dark}{color.dark}
diff --git a/man/tm_minimap.Rd b/man/tm_minimap.Rd
index e37aad872..808bf95aa 100644
--- a/man/tm_minimap.Rd
+++ b/man/tm_minimap.Rd
@@ -26,7 +26,7 @@ tm_minimap(
)
}
\arguments{
-\item{server}{name of the provider or an URL (see \code{\link{tm_tiles}}).
+\item{server}{name of the provider or an URL (see \code{\link[=tm_tiles]{tm_tiles()}}).
By default, it shows the same map as the basemap, and moreover, it will automatically change when the user switches basemaps.
Note the latter does not happen when \code{server} is specified.}
diff --git a/man/tm_symbols.Rd b/man/tm_symbols.Rd
index 5c3813446..0056c2a5c 100644
--- a/man/tm_symbols.Rd
+++ b/man/tm_symbols.Rd
@@ -461,7 +461,7 @@ A symbol shape specification is one of the following three options.
\enumerate{
\item{A numeric value that specifies the plotting character of the symbol. See parameter \code{pch} of \code{\link[graphics:points]{points}} and the last example to create a plot with all options. Note that this is not supported for the \code{"view" mode.}}
\item{A \code{\link[grid:grid.grob]{grob}} object, which can be a ggplot2 plot object created with \code{\link[ggplot2:ggplotGrob]{ggplotGrob}}. To specify multiple shapes, a list of grob objects is required. Tip: for proportional symbols, such as donuts or pies, see the extension package vignette: \href{https://r-tmap.github.io/tmap/articles/ext_glyphs}{tmap.glyphs}.}
-\item{An icon specification, which can be created with \code{\link{tmap_icons}}.}
+\item{An icon specification, which can be created with \code{\link[=tmap_icons]{tmap_icons()}}}.
}
To specify multiple shapes (needed for the \code{shapes} argument), a vector or list of these shape specification is required. The shape specification options can also be mixed. For the \code{shapes} argument, it is possible to use a named vector or list, where the names correspond to the value of the variable specified by the \code{shape} argument.
For small multiples, a list of these shape specification(s) should be provided.