From 457173db863f4ef3f882c771221c4476180ce147 Mon Sep 17 00:00:00 2001 From: mtennekes Date: Wed, 15 Jan 2025 09:56:53 +0100 Subject: [PATCH] submitted :-) --- .Rbuildignore | 1 + DESCRIPTION | 2 +- NEWS.md | 63 ++++++++++++------------------------------------ R/tm_pos.R | 21 ---------------- cran-comments.md | 4 +++ man/tm_pos.Rd | 22 ----------------- 6 files changed, 22 insertions(+), 91 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index e42291112..9eb68b0f5 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -29,3 +29,4 @@ ubuntu_17_installation.sh ^vignettes$ man/figures/shiny_plot.jpg man/figures/shiny_view.jpg +^CRAN-SUBMISSION$ diff --git a/DESCRIPTION b/DESCRIPTION index 49edd7a35..64f3e1a78 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: tmap Title: Thematic Maps -Version: 3.99.9003 +Version: 4.0 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 3fca63bd4..22749f4ab 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,59 +1,28 @@ -# tmap 4.0 (development version) +# tmap 4.0 -tmap v4 is a major release and has been rewritten from scratch. It contains a ton -of new features. Although we did our best to make changes backwards compatible, some things may not work as expected. +tmap v4 is a major release and has been rewritten from scratch. It contains tons of new features. Although we did our best to make changes backwards compatible, some things may not work as expected. -## New features +### New syntax -* `tm_vars()` is a new function for multivariate scale (#819) +* The arguments of layer functions such as `tm_symbols()` have been reorganized. [Visual variables](https://r-tmap.github.io/tmap/articles/01_basics_vv.html) are used with explicit [scales](https://r-tmap.github.io/tmap/articles/basics_scales), [legends](https://r-tmap.github.io/tmap/articles/basics_legends), and [charts](https://r-tmap.github.io/tmap/articles/basics_charts). +* The names of visual variables are consistent across standard map layer functions. For vector data, `fill` is the visual variable for fill color and `col` for border color. +* New [vignettes](https://r-tmap.github.io/tmap/index.html) available to explain how to upgrade your code to tmap v4. -* New family of functions `tm_chart_*()` to do charting (See `?tm_chart`) (#581) +### Updated datasets -* Default styles have been updated and palettes now use the cols4all package for enhanced accessibility (#906) +* `rivers` has been renamed to `World_rivers` due to the name clash with `rivers` from `datasets`. +* The Netherlands datasets have been updated: from 2022 `NLD_prov`, `NLD_muni`, and (new) `NLD_dist` (district level) have been included with new demographic variables. +* `land` has included color tables -## New syntax +### Extensions -* tmap now uses [visual variables](https://r-tmap.github.io/tmap/articles/01_basics_vv.html) - * For consistency with ggplot2, `tm_polygons()` now recognizes the `fill` argument instead of `col`. - * Similarly, `border.col` is now `col`. +* tmap can now be [extended](https://r-tmap.github.io/tmap/articles/adv_extensions) in several ways. -* New [vignettes](https://r-tmap.github.io/tmap/articles/) available to explain how to upgrade your code to tmap v4. +### Backwards compatibility -## View mode - -* In view mode, `hover` is now independent from `id` (#851). - -* `tm_credits()` now works in view mode (#806). - -* Popup variables have been revamped. - -## Deprecated functions and arguments - -We introduced messages to make it easier for you to upgrade your code (#961, #928, #854) - -Functions - - * `tm_scale_bar()` -> `tm_scalebar()` - * As of version 4.0, `tm_scalebar()` is used instead of `tm_scale_bar()` because of the potential confusion with the `tm_scale_*()` scaling functions (like `tm_scale_continuous()`). - * `tm_format()` and friends are now deprecated (#976). - -Arguments - - * `projection` -> `crs` (in `tm_shape()`, `tm_grid()`) - -## For developers - -* The internal structure of a tmap object is not compatible with tmap v3. Therefore, some tests may fail. - -* tmap exports many functions to make it easier to create an extension (#866) See`?tmap_internal`. - -## Other fixes and improvements - -* tmap now requires R 3.6 and above. - -* datasets were reviewed and use a more recent crs. (#967, #665) - -* Usage of the cli package for messages. +* All tmap v3 code should be backwards compatible with v4. +* We added 'v3' styles to make the layout (almost) identical to v3 +* We introduced messages to make it easier for you to upgrade your code # tmap 3.3-4 - (!) last version of tmap 3.x. Next CRAN version will be tmap 4.x diff --git a/R/tm_pos.R b/R/tm_pos.R index 27d9f598c..730b4667f 100644 --- a/R/tm_pos.R +++ b/R/tm_pos.R @@ -31,27 +31,6 @@ #' @param just.h,just.v The justification of the components. #' Only used in case `pos.h` and `pos.v` are numbers. #' @details -#' -#' | | | | | | -#' |---------------:|:---------------|:------------------|:------------------|:------| -#' | | +------------------- | +-------------------------------- | +------------------- | + -#' | | \| | \| |\| |\| | -#' | `"top"` | \| | \| |\| |\| | -#' | | \| | \| |\| |\| | -#' | | +------------------- | +-------------------------------- | +------------------- | + -#' | | \| | \| |\| |\| | -#' | | \| | \| |\| |\| | -#' | `cell.v`  "center"| \| | \|   Map(s) |\| |\| | -#' | | \| | \| |\| |\| | -#' | | \| | \| |\| |\| | -#' | | +------------------- | +-------------------------------- | +------------------- | + -#' | | \| | \| |\| |\| | -#' | `"bottom"` | \| | \| |\| |\| | -#' | | \| | \| |\| |\| | -#' | | +------------------- | +-------------------------------- | +------------------- | + -#' | |   `"left"` |   `"center"` |    `"right"` | | -#' | | |   `cell.h` | | | -#' #' `tm_pos_in()` sets the position of the component(s) inside the maps area, #' which is equivalent to the center-center cell (in case there are facets, #' these are all drawn in this center-center cell). diff --git a/cran-comments.md b/cran-comments.md index cf29da1ee..5c0dbc14b 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -4,6 +4,10 @@ ## Submission note +* Major release +* All reverse dependencies have been carefully checked +* We did our utmost best to keep the package as small as possible (e.g. vignettes are only online) + ## R CMD check results 0 errors | 0 warnings | 0 note diff --git a/man/tm_pos.Rd b/man/tm_pos.Rd index c39d64e05..86c4af131 100644 --- a/man/tm_pos.Rd +++ b/man/tm_pos.Rd @@ -58,28 +58,6 @@ are used to set the components automatically, and should be used via \code{\link[=tmap_options]{tmap_options()}}. See Details how the positioning works. } \details{ -\tabular{rllll}{ - \tab \tab \tab \tab \cr - \tab +------------------- \tab +-------------------------------- \tab +------------------- \tab + \cr - \tab | \tab | \tab | \tab | \cr - \code{"top"} \tab | \tab | \tab | \tab | \cr - \tab | \tab | \tab | \tab | \cr - \tab +------------------- \tab +-------------------------------- \tab +------------------- \tab + \cr - \tab | \tab | \tab | \tab | \cr - \tab | \tab | \tab | \tab | \cr - \code{cell.v}  "center" \tab | \tab |   Map(s) \tab | \tab | \cr - \tab | \tab | \tab | \tab | \cr - \tab | \tab | \tab | \tab | \cr - \tab +------------------- \tab +-------------------------------- \tab +------------------- \tab + \cr - \tab | \tab | \tab | \tab | \cr - \code{"bottom"} \tab | \tab | \tab | \tab | \cr - \tab | \tab | \tab | \tab | \cr - \tab +------------------- \tab +-------------------------------- \tab +------------------- \tab + \cr - \tab   \code{"left"} \tab   \code{"center"} \tab    \code{"right"} \tab \cr - \tab \tab   \code{cell.h} \tab \tab \cr -} - - \code{tm_pos_in()} sets the position of the component(s) inside the maps area, which is equivalent to the center-center cell (in case there are facets, these are all drawn in this center-center cell).