From ebe618bbe038747c0c0e223e180966b0c5ffce32 Mon Sep 17 00:00:00 2001 From: mtennekes Date: Fri, 26 Apr 2024 12:17:08 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20r-tmap/t?= =?UTF-8?q?map@5e40dd70acbd7ead26ff7328acbb522b83a41927=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/articles/tmap_sneak_peek.html | 19 ++++--------------- dev/pkgdown.yml | 2 +- dev/reference/qtm.html | 6 ++++-- dev/reference/tm_layout.html | 2 ++ dev/reference/tm_raster.html | 5 ++--- dev/search.json | 2 +- 6 files changed, 14 insertions(+), 22 deletions(-) diff --git a/dev/articles/tmap_sneak_peek.html b/dev/articles/tmap_sneak_peek.html index 9825e884..25272b6f 100644 --- a/dev/articles/tmap_sneak_peek.html +++ b/dev/articles/tmap_sneak_peek.html @@ -194,7 +194,7 @@

Aesthetics= ""), lty.legend = tm_legend(title = "Life Expectancy") ) -
## (Some) components or legends are too high and are therefore rescaled. Set the tmap option component.autoscale to FALSE to disable this.
+
## [plot mode] legend/component: Some components or legends are too high and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this.

Besides these visual mapping aesthetics, which map data variables to visual variables, there is also another group of @@ -512,7 +512,7 @@

Positioning= "income_grp", size.scale = tm_scale(value.neutral = 0.5)) + tm_place_legends_left(0.2) -
## (Some) components or legends are too high and are therefore rescaled. Set the tmap option component.autoscale to FALSE to disable this.
+
## [plot mode] legend/component: Some components or legends are too high and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this.

@@ -582,7 +582,7 @@

Facets tm_shape(World) + tm_polygons("life_exp", fill.free = FALSE) + tm_facets_wrap("continent")

-
## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
+
## [plot mode] fit legend/component: Some legend items or map compoments do not fit well, and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this.

 # tmap v3
@@ -618,18 +618,7 @@ 

Facets fill = "red") + tm_facets_grid("income_grp", "economy") + tm_layout(meta.margins = c(.2, 0, 0,.1))

-
## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
-## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
-## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
-## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
-## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
-## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
-## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
-## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
-## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
-## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
-## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
-## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE
+
## [plot mode] fit legend/component: Some legend items or map compoments do not fit well, and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this.

What you see in the map is that life expectancy is shown as polygon fill in green, and GDP per capita as red bubbles. The maps are grouped diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml index fe7640a9..d5631c2d 100644 --- a/dev/pkgdown.yml +++ b/dev/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: tmap_sneak_peek: tmap_sneak_peek.html tmap_vv: tmap_vv.html -last_built: 2024-04-26T06:50Z +last_built: 2024-04-26T12:14Z urls: reference: https://r-tmap.github.io/tmap/reference article: https://r-tmap.github.io/tmap/articles diff --git a/dev/reference/qtm.html b/dev/reference/qtm.html index 4ed06aaf..31e40a77 100644 --- a/dev/reference/qtm.html +++ b/dev/reference/qtm.html @@ -234,8 +234,10 @@

Examples style = "gray", format = "World", projection = "+proj=eck4") #> -- tmap v3 code detected -- #> [v3->v4] qtm(): use 'crs' instead of 'projection' -#> tm_lines: Deprecated tmap v3 code detected. Code translated to v4 - +#> [v3->v4] tm_polygons(): migrate the argument(s) related to the scale of the visual variable 'fill', namely 'n', 'palette' (rename to 'values') to 'fill.scale = tm_scale(<HERE>)' +#> [v3->v4] tm_polygons(): migrate the argument(s) related to the legend of the visual variable 'fill', namely 'title' to 'fill.legend = tm_legend(<HERE>)' +#> [v3->v4] tm_lines(): migrate the argument(s) related to the scale of the visual variable 'col', namely 'n', 'palette' (rename to 'values') to 'col.scale = tm_scale(<HERE>)' +#> Error in imp("lwd.legend", NA): could not find function "imp" # this map can also be created with the main plotting method, # which is recommended in this case. if (FALSE) { diff --git a/dev/reference/tm_layout.html b/dev/reference/tm_layout.html index 2adec857..aaa9f8d3 100644 --- a/dev/reference/tm_layout.html +++ b/dev/reference/tm_layout.html @@ -454,6 +454,8 @@

Examples tm_legend(position=c("left", "bottom"), bg.color="grey95", frame=TRUE) #> -- tmap v3 code detected -- #> [v3->v4] tm_shape(): use 'crs' instead of 'projection' +#> [v3->v4] tm_polygons(): migrate the argument(s) related to the scale of the visual variable 'fill', namely 'n', 'palette' (rename to 'values') to 'fill.scale = tm_scale(<HERE>)' +#> [v3->v4] tm_polygons(): migrate the argument(s) related to the legend of the visual variable 'fill', namely 'title' to 'fill.legend = tm_legend(<HERE>)' #> [v3->v4] tm_legend(): use 'tm_legend()' inside a layer function, e.g. 'tm_polygons(..., fill.legend = tm_legend())' # Not working yet diff --git a/dev/reference/tm_raster.html b/dev/reference/tm_raster.html index 25e41155..fd3ec708 100644 --- a/dev/reference/tm_raster.html +++ b/dev/reference/tm_raster.html @@ -151,15 +151,14 @@

Examples tm_facets_hstack() #> stars object downsampled to 540 by 270 cells. #> [scale] tm_raster:() the data variable assigned to 'col' contains positive and negative values, so midpoint is set to 0. Set 'midpoint = NA' in 'fill.scale = tm_scale_intervals(<HERE>)' to use all visual values (e.g. colors) -#> Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE -#> Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE +#> [plot mode] fit legend/component: Some legend items or map compoments do not fit well, and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this. tm_shape(land) + tm_raster("elevation", col.scale = tm_scale_continuous(values = terrain.colors(9))) + tm_shape(World) + tm_borders() -#> Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE +#> [plot mode] fit legend/component: Some legend items or map compoments do not fit well, and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this. diff --git a/dev/search.json b/dev/search.json index 7e33ab52..993aac22 100644 --- a/dev/search.json +++ b/dev/search.json @@ -1 +1 @@ -[{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"extendability","dir":"Articles","previous_headings":"","what":"Extendability","title":"tmap v4: a sneak peek","text":"First foremost, tmap v4 fully extendable. precisely, following aspects can extended: Map layers: limited anymore fixed set tm_polygons(), tm_lines(), tm_symbols(), tm_raster() (derivatives tm_borders() tm_dots()), layer interest can developed extension tmap. illustrate tm_cartogram(). layers worthwhile implement tm_donuts(), tm_hexagons(), tm_network(), tm_hillshade(), etc. Aesthetics: many visual variables available. illustrate next section, already implemented 5 new aesthetics tm_polygons(). Moreover, much easier developers add new visual variables map layer functions. Graphics Engine: tmap v3 contains two modes: plot view (based grid graphics leaflet respectively) framework makes possible add modes well. Spatial data classes: tmap v3 build sf stars. also case tmap v4, developers, easier incorporate classes well, like SpatRaster SpatVector terra.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"aesthetics","dir":"Articles","previous_headings":"","what":"Aesthetics","title":"tmap v4: a sneak peek","text":"mentioned , added aesthetics (visual variables), easier developers add new aesthetics. reordered arguments specify configure aesthetics illustrated . arguments specify aesthetics remain . E.g., main aesthetic tm_polygons() fill, defines fill color polygons. However, arguments layer functions organized differently. Thus, aesthetic four arguments: aesthetic (fill) scale (fill.scale) legend (fill.legend) argument decides whether scales applied freely across facets (fill.free) scales legends discussed next sections. can see basic comparison tmap version 3 4 syntax: tmap v4, tm_polygons() aesthetics fill, col, fill_alpha, col_alpha, lwd, lty, eventually also pattern. standard map layers also additional aesthetics. data variable can mapped , using different scales (see next section overview). next example uses fill, lwd (line width), lty (line type) aesthetics: Besides visual mapping aesthetics, map data variables visual variables, also another group aesthetics, namely (data-driven) transformation aesthetics. used transform spatial objects. call data-driven, content data used input spatial transformation. example cartogram, shown next section. polygons distorted size (approximately) proportional data variable.","code":"# tmap v3 tm_shape(World) + tm_polygons(fill = \"HPI\", palette = \"Earth\", title = \"Happy Planet Index\") # tmap v4 tm_shape(World) + tm_polygons(fill = \"HPI\", fill.scale = tm_scale_intervals(values = \"purple_green\"), fill.legend = tm_legend(title = \"Happy Planet Index\")) # tmap v3 # ... not possible :( # tmap v4 World$life_exp_class = cut(World$life_exp, breaks = seq(40, 85, by = 15)) tm_shape(World, crs = \"+proj=eck4\") + tm_polygons(fill = \"HPI\", fill.scale = tm_scale_continuous(values = \"purple_green\"), fill.legend = tm_legend(title = \"Happy Planet Index\"), lwd = \"well_being\", lwd.scale = tm_scale_continuous(value.neutral = 1, values = c(0, 5), label.na = \"\"), lwd.legend = tm_legend(title = \"Well Being\"), lty = \"life_exp_class\", lty.scale = tm_scale_ordinal(values = c(\"dotted\", \"dashed\", \"solid\"), value.na = \"blank\", value.neutral = \"solid\", label.na = \"\"), lty.legend = tm_legend(title = \"Life Expectancy\") ) ## (Some) components or legends are too high and are therefore rescaled. Set the tmap option component.autoscale to FALSE to disable this."},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"map-layers-e-g--cartogram","dir":"Articles","previous_headings":"","what":"Map layers (e.g. cartogram)","title":"tmap v4: a sneak peek","text":"easy developers add new map layers extension. illustrate new map layer, tm_cartogram(). Cartograms already made tmap v3, explicitly required transforming data using cartogram package mapping. tmap v4, direct function tm_cartogram() (using cartogram package hood), uses transformation aesthetic size inherits visual aesthetics tm_polygons(): nice benefit cartograms directly tmap makes possible use available scaling functions. example, suppose want apply log 10 scale order make cartogram bit “balanced”:","code":"# tmap v3 library(cartogram) World_carto = World |> sf::st_transform(World, crs = \"+proj=eck4\") |> cartogram_cont(weight = \"pop_est\") tm_shape(World_carto, crs = \"+proj=eck4\") + tm_polygons(fill, palette = \"Earth\", title = \"Happy Planet Index\") # tmap v4 if (requireNamespace(\"cartogram\")) { tm_shape(World, crs = \"+proj=eck4\") + tm_cartogram(size = \"pop_est\", fill = \"HPI\", fill.scale = tm_scale_intervals(values = \"purple_green\"), fill.legend = tm_legend(title = \"Happy Planet Index\")) + tm_place_legends_right(width = 0.2) } # tmap v3 library(cartogram) World_carto = World |> sf::st_transform(World, crs = \"+proj=eck4\") |> dplyr::mutate(pop_est_log10 = log10(pop_est)) |> cartogram_cont(weight = \"pop_est_log10\") tm_shape(World_carto) + tm_polygons(fill, palette = \"Earth\", title = \"Happy Planet Index\") # tmap v4 if (requireNamespace(\"cartogram\")) { tm_shape(World, crs = \"+proj=eck4\") + tm_cartogram(size = \"pop_est\", size.scale = tm_scale_continuous_log1p(), fill = \"HPI\", fill.scale = tm_scale_intervals(values = \"purple_green\"), fill.legend = tm_legend(title = \"Happy Planet Index\")) + tm_place_legends_right(width = 0.2) }"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"scales","dir":"Articles","previous_headings":"","what":"Scales","title":"tmap v4: a sneak peek","text":"Scales used map data variables visual variables. Scales new map v4, used explicitly. following table shows scales currently available: main data type (second column) data type scale supposed applied. scale can applied data type (even though might make sense), one exception: continuous (log10) scales applied visual variables can take finite set values. Examples symbol shape line type. default, tm_scale_categorical(), tm_scale_ordinal(), tm_scale_intervals() used data class factor, ordered numeric respectively. Scales date/time variables included well. main argument scale function values, values visual variables. following table shows type values required visual variable: default values depend visual variable, also scale whether data values diverging. instance, tm_scale_intervals() applied numeric variable negative positive values visual variable fill, diverging color palette used. following map illustrates happens six scale functions applied data variable. use variable life expectancy (round order make sure number unique values limited): Scales existed tmap v3, applied implicitly via several arguments:","code":"data(World) Africa = World[World$continent == \"Africa\", ] Africa$life_exp = round(Africa$life_exp) # tmap v3 tm_shape(Africa) + tm_polygons(rep(\"life_exp\", 5), style = c(\"cat\", \"cat\", \"pretty\", \"cont\", \"log10\"), palette = list(\"Set2\", \"YlOrBr\", \"YlOrBr\", \"YlOrBr\", \"YlOrBr\"), title = \"\") + tm_layout(panel.labels = c(\"categorical scale\", \"ordinal scale\", \"intervals scale\", \"continuous scale\", \"log10 scale\"), inner.margins = c(0.05, 0.2, 0.1, 0.05), legend.text.size = 0.5) # discrete scale is not possible directly, but only via interval breaks: tm_shape(Africa) + tm_polygons(\"life_exp\", style = \"fixed\", palette = \"YlOrBr\", breaks = 49:76, as.count = TRUE, title = \"\") + tm_layout(panel.labels = \"discrete scale\", inner.margins = c(0.05, 0.2, 0.1, 0.05), legend.text.size = 0.5) # tmap v4 tm_shape(Africa) + tm_polygons(rep(\"life_exp\", 6), fill.scale = list(tm_scale_categorical(), tm_scale_ordinal(), tm_scale_intervals(), tm_scale_continuous(), tm_scale_continuous_log(), tm_scale_discrete()), fill.legend = tm_legend(title = \"\", position = tm_pos_in(\"left\", \"top\"))) + tm_layout(panel.labels = c(\"tm_scale_categorical\", \"tm_scale_ordinal\", \"tm_scale_intervals\", \"tm_scale_continuous\", \"tm_scale_continuous_log\", \"tm_scale_discrete\"), inner.margins = c(0.05, 0.2, 0.1, 0.05), legend.text.size = 0.5)"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"multivariate-scales","dir":"Articles","previous_headings":"","what":"Multivariate Scales","title":"tmap v4: a sneak peek","text":"possible assign multiple variables one aesthetic. can done function tm_mv() (stands multivariate). example bivariate choropleth, yet implemented, definitely . Another example multivariate aesthetics glpys, small charts used symbols. following example donut map. current implementation ‘one-trick-pony’ (see https://github.com/mtennekes/donutmaps) tmap v4 much easier:","code":"# tmap v4 tm_shape(World) + tm_symbols( fill = tm_mv(\"well_being\", \"footprint\"), fill.scale = tm_scale_bivariate(scale1 = tm_scale_intervals(breaks = c(2, 5, 6, 8)), scale2 = tm_scale_intervals(breaks = c(0, 3, 6, 20)), values = \"brewer.qualseq\") ) ## Labels abbreviated by the first letters, e.g.: \"0 to 3\" => \"0\" # tmap v4 (not implemented yet) library(tmap) library(tmapGlyps) # which include tm_donuts library(sfnetworks) # for origin-destination data methods tm_mode(\"view\") tm_shape(edges) + tm_halflines(lwd = \"flow\", col = \"dest\", start = 0.5, end = 1.0) + tm_shape(nodes) + tm_donuts(size = \"emplyoees\", parts = tm_mv(\"Amsterdam\", \"Rotterdam\", \"The Hague\", \"Utrecht\", \"Other_municipality\", \"Home_municipality\"))"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"legends","dir":"Articles","previous_headings":"","what":"Legends","title":"tmap v4: a sneak peek","text":"may noticed previous examples, legends look bit differently default.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"positioning","dir":"Articles","previous_headings":"Legends","what":"Positioning","title":"tmap v4: a sneak peek","text":"Legends currently placed outside map default tmap v4. ? Simply often space inside map. Furthermore, possible place legends different locations across map: tmap v3 contains many (often complicated) options rather simple things. options set globally via tmap_options() within single plot tm_layout(). tmap v4, directly related layout accessible via tm_layout(). However, ease use, bunch handy shortcut functions, tm_place_legends_left():","code":"# tmap v3 # ... not possible :( # tmap v4 tm_shape(World) + tm_symbols(fill = \"HPI\", size = \"pop_est\", shape = \"income_grp\", size.scale = tm_scale(value.neutral = 0.5), fill.legend = tm_legend(\"Happy Planet Index\", position = tm_pos_in(\"left\", \"top\")), size.legend = tm_legend(\"Population\", position = tm_pos_out(\"left\", \"center\")), shape.legend = tm_legend(\"Income Group\", position = tm_pos_out(\"center\", \"bottom\"))) # tmap v3 tm_shape(World) + tm_symbols(fill = \"HPI\", size = \"pop_est\", shape = \"income_grp\") + tm_layout(legend.outside.position = \"left\", legend.outside.size = 0.2) # tmap v4 tm_shape(World) + tm_symbols(fill = \"HPI\", size = \"pop_est\", shape = \"income_grp\", size.scale = tm_scale(value.neutral = 0.5)) + tm_place_legends_left(0.2) ## (Some) components or legends are too high and are therefore rescaled. Set the tmap option component.autoscale to FALSE to disable this."},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"combined-legends","dir":"Articles","previous_headings":"Legends","what":"Combined legends","title":"tmap v4: a sneak peek","text":"Another new feature possibility combine legends directly, quite hassle tmap v3.","code":"# tmap v3 tm_shape(metro) + tm_symbols(col = \"pop2020\", n = 4, size = \"pop2020\", legend.size.show = FALSE, legend.col.show = FALSE) + tm_add_legend(\"symbol\", col = RColorBrewer::brewer.pal(4, \"YlOrRd\"), border.col = \"grey40\", size = ((c(10, 20, 30, 40) * 1e6) / 40e6) ^ 0.5 * 2, labels = c(\"0 mln to 10 mln\", \"10 mln to 20 mln\", \"20 mln to 30 mln\", \"30 mln to 40 mln\"), title = \"Population in 2020\") + tm_layout(legend.outside = TRUE, legend.outside.position = \"bottom\") # tmap v4 tm_shape(metro) + tm_symbols(fill = \"pop2020\", fill.legend = tm_legend(\"Population in 2020\"), size = \"pop2020\", size.scale = tm_scale_intervals(), size.legend = tm_legend_combine(\"fill\"))"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"spacing-between-items","dir":"Articles","previous_headings":"Legends","what":"Spacing between items","title":"tmap v4: a sneak peek","text":"design legends () improved. prominently, space argument determines height legend item. specifically, legend item 1 + space line-height. also useful make continuous legends better.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"facets","dir":"Articles","previous_headings":"","what":"Facets","title":"tmap v4: a sneak peek","text":"tmap v4, convenient wrappers tm_facet_wrap() tm_facet_grid(), former wraps facets, latter places facets grid layout. Furthermore, visual variable free argument, determines whether scales free (TRUE) shared (FALSE) across facets. tmap v3 free argument set via tm_facets(), whereas tmap v4 argument moved layer functions: New tmap v4 facet grid, free argument can specified differently rows columns, show next complex (sorry ) example: see map life expectancy shown polygon fill green, GDP per capita red bubbles. maps grouped income group (rows) economy (columns). scale life expectancy set free columns. means scale applied column separately, legend per column. scale GDP per capita applied separately row.","code":"# tmap v3 tm_shape(World) + tm_borders() + tm_shape(World) + tm_polygons(\"life_exp\") + tm_facets(\"continent\", nrow = 1, free.scales.fill = FALSE, free.coords = FALSE) # tmap v4 tm_shape(World, crs = \"+proj=robin\") + tm_borders() + tm_shape(World) + tm_polygons(\"life_exp\", fill.free = FALSE) + tm_facets_wrap(\"continent\") ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE # tmap v3 tm_shape(World) + tm_borders() + tm_shape(World) + tm_polygons(\"life_exp\") + tm_facets(\"continent\", nrow = 1, free.scales.fill = TRUE, free.coords = FALSE) tm_shape(World, crs = \"+proj=robin\") + tm_borders() + tm_shape(World) + tm_polygons(\"life_exp\", fill.free = TRUE) + tm_facets_stack(\"continent\") # tmap v3 # ... not possible :( # tmap v4 tm_shape(World, crs = \"+proj=robin\") + tm_borders() + tm_shape(World) + tm_polygons(fill = \"life_exp\", fill.scale = tm_scale_intervals(values = \"brewer.greens\"), fill.free = c(rows = FALSE, columns = TRUE)) + tm_symbols(size = \"gdp_cap_est\", size.free = c(rows = TRUE, columns = FALSE), fill = \"red\") + tm_facets_grid(\"income_grp\", \"economy\") + tm_layout(meta.margins = c(.2, 0, 0,.1)) ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE ## Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"graphic-engines-modes","dir":"Articles","previous_headings":"","what":"Graphic Engines (modes)","title":"tmap v4: a sneak peek","text":"Just like tmap v3, \"plot\" \"view\" mode. However, framework used tmap v4 also facilitates developers write plotting methods modes. instance, CesiumJS great JavaScript library 3d globe visualizations. awesome include R. low-level interface CesiumJS R (similar R package leaflet interface JS library leaflet R), relatively easy developers add new mode 3d visualizations tmap v4.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"backward-compatibility","dir":"Articles","previous_headings":"","what":"Backward compatibility","title":"tmap v4: a sneak peek","text":"early development stage, tmap v3 code work tmap v4. However, tmap v4 stable, backwards compatible. Layer function arguments longer used, breaks palette deprecated, internally redirected new scale functions. Furthermore, options options tmap v4. instance, legends placed outside maps default, small space legend items shown . order keep layout close possible tmap v3, style set options back settings used default tmap v3. can set just one command: tmap_style(\"tmap_v3\")","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"color-palettes","dir":"Articles","previous_headings":"","what":"Color palettes","title":"tmap v4: a sneak peek","text":"huge number directly available color palettes. settled exact details, e.g. palettes include, can obtained. Ideas welcome (https://github.com/r-tmap/tmap/issues/566). current development version, function similar tmaptools::palette_explorer(), renders long png viewer pane RStudio browser: (click image see full png) also possible render color blindness simulation, e.g.: tmap_show_palettes(color_vision_deficiency = \"deutan\"). default palettes use usable color blind people.","code":"# tmap v4 tmap_show_palettes()"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"suggestions","dir":"Articles","previous_headings":"","what":"Suggestions","title":"tmap v4: a sneak peek","text":"suggestions? Please let us know! Via https://github.com/r-tmap/tmap/issues, please use tmap_v4 tag.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"tmap: charts","text":"tmap R package spatial data visualization. vignette describes alpha version major update (version 4), CRAN course 2024.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"tmap-4---tmap-3-x","dir":"Articles","previous_headings":"Introduction","what":"tmap 4 - tmap 3.x","title":"tmap: charts","text":"tmap 3.x supports several map layer variables, example \"col\", \"size\", \"shape\" tm_symbols() map layer function. many variables tmap 4. Besides visual variables, -called transformation variables also available. transformation variable role change spatial coordinates (instance, create cartogram). visual variable changes appearance spatial object, e.g. fill color line width. can find examples variables . Map layer arguments (e.g. arguments tm_polygons()) much better organized: visual/transformation variable, four arguments. case fill visual variable, : fill, fill.scale, fill.legend fill.free, respectively specify data variable visual value defines polygon fill color, used scaling function, legend layout, whether scales applied freely across facets. input visual/transformation variable can multivariate, sense multiple data variables scaled one transformation visual variable. example bivariate choropleth, cross tabulation two data variables mapped one (bivariate) color palette. User-defined map layer functions can written (e.g. extension package). Like tmap 3.x, tmap 4.0 comes two modes, \"plot\" \"view\" mode. However, modes can added well, may expect extension package tmap.rayshader point (start writing one ). Legends map components (scale bars) can drawn anywhere outside map. layout legends improved made much flexible. possible combine legends, useful data variable applied multiple visual variables using scaling function.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"tmap-4---ggplot2","dir":"Articles","previous_headings":"Introduction","what":"tmap 4 - ggplot2","title":"tmap: charts","text":"tmap package similar ggplot2 Grammar Graphics, tailored spatial data visualization, whereas ggplot2 much general. specifically: tmap, visual/transformation variables always specifies map layer functions, whereas ggplot2 aesthetics usually specified plot level. ggplot2, scales determined plot level, whereas tmap, determined map layer level. tmap, spatial data (e.g. sf object) specified tm_shape(). spatial coordinates (x y) considered part data (can changed transformation variables). principle, map layer function can used spatial class. E.g. tm_dots() renders dots sf points data, also works spatial classes: e.g. centroids sf polygons/lines raster data (stars / terra packages). However, ggplot2::ggplot(), spatial class requires custom map layer function, e.g. ggplot2::geom_sf() sf objects. tmap static plot mode interactive mode. …","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"tmap-4---other-r-packages","dir":"Articles","previous_headings":"Introduction","what":"tmap 4 - other R packages","title":"tmap: charts","text":"several great R packages spatial data visualization, including: ggplot2, mapview, leaflet, mapsf, generic plot function. interactive \"view\" mode tmap similar mapview sense uses building blocks (packages like leaflet, leafsync, leafgl). Colors important data visualization. purpose, tmap uses cols4all, new R package analyse color palettes, check color-blind-friendliness properties.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"map-layers","dir":"Articles","previous_headings":"","what":"Map layers","title":"tmap: charts","text":"(thematic) map consists one map layers. map layer specific set variables determine objects layer drawn. distinguish two type variables: transformation variables visual variables. transformation variable used change spatial coordinates (instance, cartogram distorts polygons). visual variable changes appearance spatial object, e.g. fill color line width. Transformation variables used specific map layers cartogram, whereas visual variables used almost map layers.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"visual-variables","dir":"Articles","previous_headings":"","what":"Visual variables","title":"tmap: charts","text":"visual variable describes certain visual property drawn object, color, size, shape, line width, line stroke, transparency, fill pattern (ggplot2 called aesthetics). visual variable can specified using constant value (e.g. fill = \"blue\") data-driven (later). can specified constant value, called visual constant. following table shows visual variables used standard map layers. New tmap 4.0 users can write custom map layer functions; another vignette. Important now map layers visual variables can extended needed.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"constant-visual-values","dir":"Articles","previous_headings":"Visual variables","what":"Constant visual values","title":"tmap: charts","text":"following code draws gold country polygons. visual variables mentioned previous table used, constant values. instance, polygon borders drawn width lwd colored col. visual variables default value, case border width color respectively 1 \"black\". visual variable specified different value fill, set \"gold\". completely new tmap: function tm_shape() specifies spatial data object, can spatial data object packages sf, stars, terra, sp, raster. subsequent map layer functions (stacked + operator) specify spatial data visualized. next example three layers: basemap OpenTopoMap, country polygon boundaries, dots metropolitan areas: visual variable argument can also specified data variable (e.g., column name). happens case values data variable mapped values corresponding visual variable. example, life expectancy per country shown, put precisely: data variable life expectancy mapped visual variable polygon fill. understand data mapping, consider following schematic dataset: first column contains spatial geometries (case polygons, can also points, lines, raster tiles). second column data variable like show. third column contains visual values, case colors. Important note many ways scale data values visual values. example data values put 5 year intervals sequential discrete blue scale used show . tm_scale_*() family functions, users free create scales. map uses continuous color scale colors CARTO. scales later.","code":"tm_shape(World) + tm_polygons(\"gold\") if (requireNamespace(\"maptiles\")) { tm_basemap(server = \"OpenTopoMap\", zoom = 2, alpha = 0.5) + tm_shape(World, bbox = sf::st_bbox(c(xmin = -180, xmax = 180, ymin = -86, ymax = 86))) + tm_polygons(fill = NA, col = \"black\") + tm_shape(metro) + tm_symbols(size = 0.1, col = \"red\") + tm_layout(inner.margins = rep(0, 4)) } ## Loading required namespace: maptiles tm_shape(World) + tm_polygons(\"life_exp\") ## geom x1 vv1 ## 1 polygon1 72 blue6 ## 2 polygon2 58 blue3 ## 3 polygon3 52 blue2 ## 4 polygon4 73 blue7 ## 5 ... ... ... tm_shape(World) + tm_polygons(\"life_exp\", fill.scale = tm_scale_continuous(values = \"-carto.earth\"), fill.legend = tm_legend(\"Life\\nExpectancy\"))"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"transformation-variables","dir":"Articles","previous_headings":"","what":"Transformation variables","title":"tmap: charts","text":"Besides visual variables, map layer may use spatial transformation variables. used two variables: size deform polygons using continuous cartogram fill color polygons. former example transformation variable. example schematic dataset: data variable x1, example pop_est (population estimation), scaled x1_scaled case normalization using continuous scale. Next, geometries distorted areas proportional x1_scaled (much cartogram algorithm able achieve).","code":"if (requireNamespace(\"cartogram\")) { tm_shape(World, crs = 8857) + tm_cartogram(size = \"pop_est\", fill = \"income_grp\") } ## Loading required namespace: cartogram ## Cartogram in progress... ## geom x1 x_scaled geom_transformed ## 1 polygon1 491,775 0.0007 polygon1' ## 2 polygon2 2,231,503 0.0033 polygon2' ## 3 polygon3 34,859,364 0.0554 polygon3' ## 4 polygon4 4,320,748 0.0067 polygon4' ## 5 ... ... ... ..."},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"scales","dir":"Articles","previous_headings":"","what":"Scales","title":"tmap: charts","text":"visual variable transformation variable can scaled one tm_scale_ functions. illustrate different options, show life expectancy across Africa, round order use categorical scales well. Like tmap 3.x, possible create facets specifying multiple data variable names scales one visual (transformation) variable, case \"fill\": tm_scale_categorical() tm_scale_ordinal() tread data categorical data, ignoring fact actually numbers. difference categorical assume order categories, whereas ordinal . similar factor R can ordered . shown scales can applied numeric data. Note example breaks tm_scale_intervals() similar tick marks tm_scale_continous(). However, using class intervals colors used (case 6 plus color missing values) whereas continuous scale gradient colors used. advantage using class intervals relatively easy read data values map, e.g. value South Africa 55 60, advantage using continuous color scale colors map accurate (unrounded). tm_scale_intervals() possible chose determine breaks (argument style). tm_scale_continous() possible use transformation function: case built-log transformation used (pretty useless particular example data range). Finally, tm_scale_discrete() uses discrete linear scale. Note different tm_scale_ordinal(), use colors values present (categories), instance 53. tm_scale_*() functions can (principle) applied visual transformation variable. Note different ggplot2 scales organized variable type (e.g. ggplot2::scale_fill_continuous()). related another difference ggplot2. tmap, scales set directly map layer function target visual/transformation variable, instance tm_polygons(fill = \"x\", fill.scale = tm_scale_continuous()). ggplot(), scales set outside layer functions. tm_scale_ function (least) following arguments: values, values.repeat, values.range, values.scale, value.na, value.null, value.neutral, labels, label.na, label.null, label.format. value* arguments determine visual values data values mapped. case scale applied visual variable represents color, takes color values color palette. However, instance scale applied line width, values numeric values represent line widths. illustrated following example: defaults value.* arguments stored tmap options. instance contains default color palettes visual variable \"fill\" different types data. instance, data values positive numbers, tm_scale_intervals() tm_scale_continuous() applied, default color palette \"hcl.blues3\", can seen examples . Regarding available color palettes: tmap uses new R package cols4all contains large number well-known color palettes. Please run cols4all::c4a_gui() starts interactive tool (successor tmaptools::palette_explorer()). course, also color palettes can loaded directly via vector color codes.","code":"data(World) Africa = World[World$continent == \"Africa\", ] Africa$life_exp = round(Africa$life_exp) tm_shape(Africa) + tm_polygons(rep(\"life_exp\", 6), fill.scale = list(tm_scale_categorical(), tm_scale_ordinal(), tm_scale_intervals(), tm_scale_continuous(), tm_scale_continuous_log(), tm_scale_discrete()), fill.legend = tm_legend(title = \"\", position = tm_pos_in(\"left\", \"top\"))) + tm_layout(panel.labels = c(\"tm_scale_categorical\", \"tm_scale_ordinal\", \"tm_scale_intervals\", \"tm_scale_continuous\", \"tm_scale_continuous_log\", \"tm_scale_discrete\"), inner.margins = c(0.05, 0.4, 0.1, 0.05), legend.text.size = 0.5) tm_shape(World) + tm_polygons(fill = \"HPI\", fill.scale = tm_scale_intervals(values = \"scico.roma\", value.na = \"grey95\", breaks = c(12,20,30,45))) + tm_symbols(size = \"HPI\", size.scale = tm_scale_intervals(values = c(0.3,0.5, 0.8), value.na = 0.1, breaks = c(12,20,30,45)), col = \"grey30\") tmap_options(\"values.var\")$values.var$fill ## $seq ## [1] \"hcl.blues3\" ## ## $div ## [1] \"pu_gn_div\" ## ## $unord ## [1] \"tol.muted\" ## ## $ord ## [1] \"hcl.blues3\" ## ## $cyc ## [1] \"tol.rainbow_pu_rd\" ## ## $biv ## [1] \"pu_gn_bivs\""},{"path":"https://r-tmap.github.io/tmap/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Martijn Tennekes. Author, maintainer. Jakub Nowosad. Contributor. Joel Gombin. Contributor. Sebastian Jeworutzki. Contributor. Kent Russell. Contributor. Richard Zijdeman. Contributor. John Clouse. Contributor. Robin Lovelace. Contributor. Jannes Muenchow. Contributor. Olivier Roy. Contributor.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Tennekes M (2018). “tmap: Thematic Maps R.” Journal Statistical Software, 84(6), 1–39. doi:10.18637/jss.v084.i06.","code":"@Article{, title = {{tmap}: Thematic Maps in {R}}, author = {Martijn Tennekes}, journal = {Journal of Statistical Software}, year = {2018}, volume = {84}, number = {6}, pages = {1--39}, doi = {10.18637/jss.v084.i06}, }"},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"tmap-thematic-maps-in-r-","dir":"","previous_headings":"","what":"Thematic Maps","title":"Thematic Maps","text":"tmap actively maintained open-source R-library drawing thematic maps. API based Layered Grammar Graphics resembles syntax ggplot2, popular R-library drawing charts. See source code images.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Thematic Maps","text":"tmap available . Installation straightforward: Linux macOS users new working spatial data R, may fail since additional (non-R) libraries required (automatically installed Windows users). Windows additional installation required. Linux (Ubuntu) See https://geocompx.org/post/2020/installing-r-spatial-packages-linux/. Please address installation issues issue. macOS See https://www.kyngchaos.com/. Please address installation issues issue.","code":"install.packages(\"tmap\")"},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"development","dir":"","previous_headings":"","what":"Development","title":"Thematic Maps","text":"latest development version can installed using remotes. order use development version tmap, recommended use development version tmaptools well: See NEWS latest features improvements issue list discussions enhancements bugs. want help development package? Please let us know! feedback, requests, tips, bug reports welcome!","code":"# install.packages(\"remotes\") install_github(\"r-tmap/tmap\") # On Linux, with pak # install.packages(\"pak\") pak::pak(\"r-tmap/tmap\") # Or from r-universe install.packages(\"tmap\", repos = c(\"https://r-tmap.r-universe.dev\", \"https://cloud.r-project.org\"))"},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Thematic Maps","text":"","code":"library(tmap)"},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"reference","dir":"","previous_headings":"","what":"Reference","title":"Thematic Maps","text":"Tennekes, M., 2018, tmap: Thematic Maps R, Journal Statistical Software, 84(6), 1-39 paper written tmap 1.11-2. See reproducible code using tmap 2.x.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Thematic Maps","text":"tmap v3: get started! tmap: changed recent versions?","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"tutorials","dir":"","previous_headings":"","what":"Tutorials","title":"Thematic Maps","text":"tmap RMarkdown","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"presentations","dir":"","previous_headings":"","what":"Presentations","title":"Thematic Maps","text":"Creating thematic maps R (OpenGeoHUB Summer School 2019) Plotting spatial data R (eRum 2018) Exploring presenting maps tmap (useR!2017) tmap: creating thematic maps flexible way (useR!2015)]","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"other-resources","dir":"","previous_headings":"","what":"Other resources","title":"Thematic Maps","text":"Geocomputation R; Making maps R, Robin Lovelace, Jakub Nowosad, Jannes Muenchow R tip: Create maps R Working Spatial Data using tmap, Samantha . Alger Computer World: Mapping R just got whole lot easier National Socio-Environmental Synthesis Center: Maps R Introduction visualizing spatial data R Blog post SpatialControl Blog post TWIAV Computer World: Create maps R 10 (fairly) easy steps Computer World: Great R packages data import, wrangling visualization Tutorial Visualizing spatial data: base shiny - workshop Stack Overflow questions (#tmap)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Thematic Maps","text":"two main places get help tmap: stackoverflow great source answers common tmap questions. also great place get help, created reproducible example illustrates problem. Please tag questions tmap. request think problem caused bug, please open issue, preferably reproducible example.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/Shapes.html","id":null,"dir":"Reference","previous_headings":"","what":"World and Netherlands map — World","title":"World and Netherlands map — World","text":"Maps world Netherlands (province municipality level), class sf","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/Shapes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"World and Netherlands map — World","text":"","code":"World NLD_prov NLD_muni"},{"path":"https://r-tmap.github.io/tmap/dev/reference/Shapes.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"World and Netherlands map — World","text":"https://www.naturalearthdata.com/ World https://happyplanetindex.org/ World https://www.cbs.nl/ NLD_prov NLD_muni.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/Shapes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"World and Netherlands map — World","text":"default projections maps Eckhart IV (World) Rijksdriehoekstelsel (Netherlands). See . projection can changed temporarily plotting purposes using projection argument tm_shape(). World World map. default projection world map Eckhart IV since area sizes preserved, important property choropleths. NLD_prov NLD_muni, maps Netherlands province municipality level 2013. used projection Rijksdriehoekstelsel projection. Important: publication maps allowed citing Statistics Netherlands (CBS) Kadaster Nederland source.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/Shapes.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"World and Netherlands map — World","text":"Statistics Netherlands (2014), Hague/Heerlen, Netherlands, https://www.cbs.nl/. Kadaster, Netherlands' Cadastre, Land Registry, Mapping Agency (2014), Apeldoorn, Netherlands, https://www.kadaster.nl/.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/get_fact_levels_na.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal tmap function that gets factor levels with NA's — get_fact_levels_na","title":"Internal tmap function that gets factor levels with NA's — get_fact_levels_na","text":"Internal tmap function gets factor levels NA's","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/get_fact_levels_na.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal tmap function that gets factor levels with NA's — get_fact_levels_na","text":"","code":"get_fact_levels_na(x, o)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/get_fact_levels_na.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal tmap function that gets factor levels with NA's — get_fact_levels_na","text":"x vector o options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/land.html","id":null,"dir":"Reference","previous_headings":"","what":"Spatial data of global land cover — land","title":"Spatial data of global land cover — land","text":"Spatial data global land cover, percent tree cover, elevation class stars. Two attributes object relates global land cover. cover layer classifies status land cover whole globe 20 categories, cover_cls layer uses 8 simplified categories. Percent Tree Cover (trees) represents density trees ground, last attribute represents elevation.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/land.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spatial data of global land cover — land","text":"","code":"land"},{"path":"https://r-tmap.github.io/tmap/dev/reference/land.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Spatial data of global land cover — land","text":"object class stars 1080 rows 540 columns.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/land.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Spatial data of global land cover — land","text":"Important: publication maps allowed cited Tateishi et al. (2014), \"Geospatial Information Authority Japan, Chiba University collaborating organizations.\" shown.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/land.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Spatial data of global land cover — land","text":"Production Global Land Cover Data - GLCNMO2008, Tateishi, R., Thanh Hoan, N., Kobayashi, T., Alsaaideh, B., Tana, G., Xuan Phong, D. (2014), Journal Geography Geology, 6 (3).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/make_by_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal tmap function to create by variables (used for faceting) — make_by_vars","title":"Internal tmap function to create by variables (used for faceting) — make_by_vars","text":"Internal tmap function create variables (used faceting)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/make_by_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal tmap function to create by variables (used for faceting) — make_by_vars","text":"","code":"make_by_vars(dt, tmf, smeta)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/make_by_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal tmap function to create by variables (used for faceting) — make_by_vars","text":"dt data.table tmf tmf object smeta smeta object","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/metro.html","id":null,"dir":"Reference","previous_headings":"","what":"Spatial data of metropolitan areas — metro","title":"Spatial data of metropolitan areas — metro","text":"metro includes population time series 1950 (forecasted) 2030. metro areas 1 million inhabitants 2010 included.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/metro.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spatial data of metropolitan areas — metro","text":"","code":"metro"},{"path":"https://r-tmap.github.io/tmap/dev/reference/metro.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Spatial data of metropolitan areas — metro","text":"object class sf (inherits data.frame) 436 rows 13 columns.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/metro.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Spatial data of metropolitan areas — metro","text":"https://population.un.org/wup/","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/metro.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Spatial data of metropolitan areas — metro","text":"United Nations, Department Economic Social Affairs, Population Division (2014). World Urbanization Prospects: 2014 Revision, CD-ROM Edition.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tm_element.html","id":null,"dir":"Reference","previous_headings":"","what":"Print tm_element — print.tm_element","title":"Print tm_element — print.tm_element","text":"Print tm_element","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tm_element.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print tm_element — print.tm_element","text":"","code":"# S3 method for tm_element print(x, ...) # S3 method for tm_shape print(x, ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tm_element.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print tm_element — print.tm_element","text":"x x ... passed ","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tmap.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw thematic map — print.tmap","title":"Draw thematic map — print.tmap","text":"Draw thematic map","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw thematic map — print.tmap","text":"","code":"# S3 method for tmap print( x, return.asp = FALSE, show = TRUE, vp = NULL, knit = FALSE, options = NULL, ... ) knit_print.tmap(x, ..., options = NULL)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw thematic map — print.tmap","text":"x tmap object. return.asp aspect ratio returned? show show map vp viewport (\"plot\" mode) knit logical, knit? options vector options ... used","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":null,"dir":"Reference","previous_headings":"","what":"Quick thematic map plot — qtm","title":"Quick thematic map plot — qtm","text":"Draw thematic map quickly. function convenient wrapper main plotting method stacking tmap-elements. Without arguments search term, functions draws interactive map.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quick thematic map plot — qtm","text":"","code":"qtm( shp, fill = tm_const(), col = tm_const(), size = tm_const(), shape = tm_const(), lwd = tm_const(), lty = tm_const(), fill_alpha = tm_const(), col_alpha = tm_const(), text = tm_const(), text_col = tm_const(), text_size = tm_const(), by = NULL, scale = NULL, title = NULL, crs = NULL, bbox = NULL, basemaps = NULL, overlays = NULL, zindex = NA, group = NA, group.control = \"check\", style = NULL, format = NULL, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quick thematic map plot — qtm","text":"shp One : shape object, object class defined sf stars package. Objects packages sp raster also supported, discouraged. specified, .e. qtm() executed. case plain interactive map shown. OpenStreetMap search string, e.g. qtm(\"Amsterdam\"). case plain interactive map shown positioned according results search query (OpenStreetMap nominatim) fill, col, size, shape, lwd, lty, fill_alpha, col_alpha Visual variables. data variable name data split, vector two variable names split data two variables (first used rows second columns). See also tm_facets(). scale numeric value serves global scale parameter. font sizes, symbol sizes, border widths, line widths controlled value. parameters symbols.size, text.size, lines.lwd can scaled separately respectively symbols.scale, text.scale, lines.scale. See also .... title main title. legend titles, use X.style, X layer name (see ...). crs Either crs object character value (PROJ.4 character string). default, projection used defined shp object . bbox bounding box. Argument passed tm_shape() basemaps name(s) provider URL tiled basemap. shortcut tm_basemap(). Set NULL disable basemaps. default, set tmap option basemaps. overlays name(s) provider URL tiled overlay map. shortcut tm_tiles(). zindex zindex group group group.control group.control style Layout options (see tm_layout()) define style. See tmap_style() details. format Layout options (see tm_layout()) define format. See tmap_format() details. ... arguments passed tm_* functions. prefix arguments layer function name without \"tm_\" period. instance, palette polygon fill color called fill.palette. following prefixes supported: shape., fill., borders., polygons., symbols., dots., lines., raster., text., layout., grid., facets., view.. Arguments unique name, .e. exist layer function, e.g. convert2density, can also called without prefix.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Quick thematic map plot — qtm","text":"tmap-element","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quick thematic map plot — qtm","text":"first argument shape object (normally specified tm_shape()). next arguments, fill raster, aesthetics main layers. remaining arguments related map layout. argument main layer function, tm_polygons(), can specified (see ...). also possible stack tmap-elements qtm plot. See examples. default, scale bar shown. option can set tmap_options() (argument qtm.scalebar). minimap shown default qtm called without arguments search term. option can set tmap_options() (argument qtm.minimap).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quick thematic map plot — qtm","text":"Tennekes, M., 2018, tmap: Thematic Maps R, Journal Statistical Software, 84(6), 1-39, doi:10.18637/jss.v084.i06","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quick thematic map plot — qtm","text":"","code":"data(World, rivers, metro) # just the map qtm(World) # choropleth qtm(World, fill = \"economy\", format = \"World\", style = \"col_blind\", projection = \"+proj=eck4\") #> -- tmap v3 code detected -- #> [v3->v4] qtm(): use 'crs' instead of 'projection' # choropleth with more specifications qtm(World, fill=\"HPI\", fill.n = 9, fill.palette = \"div\", fill.title = \"Happy Planet Index\", fill.id = \"name\", style = \"gray\", format = \"World\", projection = \"+proj=eck4\") #> -- tmap v3 code detected -- #> [v3->v4] qtm(): use 'crs' instead of 'projection' #> tm_lines: Deprecated tmap v3 code detected. Code translated to v4 # this map can also be created with the main plotting method, # which is recommended in this case. if (FALSE) { tm_shape(World, projection = \"+proj=eck4\") + tm_polygons(\"HPI\", n = 9, palette = \"div\", title = \"Happy Planet Index\", id = \"name\") + tm_style(\"gray\") + tm_format(\"World\") } # bubble map if (FALSE) { qtm(World, borders = NULL) + qtm(metro, symbols.size = \"pop2010\", symbols.title.size= \"Metropolitan Areas\", symbols.id= \"name\", format = \"World\") } # dot map if (FALSE) { current.mode <- tmap_mode(\"view\") qtm(metro, bbox = \"China\") tmap_mode(current.mode) # restore mode } if (FALSE) { # without arguments, a plain interactive map is shown (the mode is set to view) qtm() # search query for OpenStreetMap nominatim qtm(\"Amsterdam\") }"},{"path":"https://r-tmap.github.io/tmap/dev/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. leaflet providers","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/rivers.html","id":null,"dir":"Reference","previous_headings":"","what":"Spatial data of rivers — rivers","title":"Spatial data of rivers — rivers","text":"Spatial data rivers","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/rivers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spatial data of rivers — rivers","text":"","code":"rivers"},{"path":"https://r-tmap.github.io/tmap/dev/reference/rivers.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Spatial data of rivers — rivers","text":"object class sf (inherits data.frame) 1616 rows 5 columns.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/rivers.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Spatial data of rivers — rivers","text":"https://www.naturalearthdata.com","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/shapeTM.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal tmap function to create a tmap shape — shapeTM","title":"Internal tmap function to create a tmap shape — shapeTM","text":"Internal tmap function create tmap shape","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/shapeTM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal tmap function to create a tmap shape — shapeTM","text":"","code":"shapeTM(shp, tmapID = NULL, bbox = NULL, ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/shapeTM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal tmap function to create a tmap shape — shapeTM","text":"shp Shape file tmapID tmap Identifier bbox bounding box","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/theme_ps.html","id":null,"dir":"Reference","previous_headings":"","what":"ggplot2 theme for proportional symbols — theme_ps","title":"ggplot2 theme for proportional symbols — theme_ps","text":"ggplot2 theme proportional symbols. default, theme shows plotting area, without titles, axes, legend.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/theme_ps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ggplot2 theme for proportional symbols — theme_ps","text":"","code":"theme_ps( base_size = 12, base_family = \"\", plot.axes = FALSE, plot.legend = FALSE )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/theme_ps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ggplot2 theme for proportional symbols — theme_ps","text":"base_size base size base_family base family plot.axes axes shown? plot.legend legend(s) shown?","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_add_legend.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: manual legend — tm_add_legend","title":"Map component: manual legend — tm_add_legend","text":"Map component adds manual legend","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_add_legend.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: manual legend — tm_add_legend","text":"","code":"tm_add_legend( ..., labels, type = \"symbols\", title = \"\", design = NULL, orientation = NULL, group = NA, group.control = \"check\", resize.as.group = FALSE, z = as.integer(NA) )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_add_legend.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: manual legend — tm_add_legend","text":"... visual variables arguments passed tm_legend(). default, argument type set \"Symbols\", means supported visual variables : \"fill\", \"col\", \"shape\", \"size\", \"fill_alpha\", \"col_alpha\", \"lty\", \"lwd\", \"linejoin\", \"lineend\". labels labels type layer type visual variables (see ...) taken. Options: \"symbols\" (default), \"lines\", \"polygons\", \"text\". title text title design legend design orientation legend orientation group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). resize..group resize..group z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_basemap.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: basemap / overlay tiles — tm_basemap","title":"Map layer: basemap / overlay tiles — tm_basemap","text":"Map layer draws tiles tile server. tm_basemap() draws tile layer basemap, .e. bottom layer. contrast, tm_tiles() draws tile layer overlay layer, stacking order corresponds order layer called, just like map layers.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_basemap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: basemap / overlay tiles — tm_basemap","text":"","code":"tm_basemap( server = NULL, alpha = NULL, zoom = NULL, zindex = 0, group = NA, group.control = \"radio\" ) tm_tiles( server = NULL, alpha = NULL, zoom = NULL, zindex = NA, group = NA, group.control = \"check\" )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_basemap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: basemap / overlay tiles — tm_basemap","text":"server Name provider URL. list available providers can obtained providers (tip: RStudio, type providers$ see options). See https://leaflet-extras.github.io/leaflet-providers/preview/ preview . URL provided, template format, e.g. \"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\". Use NULL tm_basemap() disable basemaps. alpha Transparency level zoom Zoom level (used plot mode) zindex zindex pane view mode. default, set layer number plus 400. default, tmap layers therefore placed custom panes \"tmap401\", \"tmap402\", etc., except base tile layers, placed standard \"tile\". parameter determines name pane z-index, determines pane order bottom top. instance, zindex set 500, pane named \"tmap500\". group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_basemap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: basemap / overlay tiles — tm_basemap","text":"","code":"if (requireNamespace(\"maptiles\")) { tm_basemap() + tm_shape(World) + tm_polygons(\"HPI\") tm_basemap(\"OpenTopoMap\") + tm_shape(World) + tm_polygons(fill = NA, col = \"black\") tm_basemap(\"CartoDB.PositronNoLabels\") + tm_shape(NLD_prov, crs = 4236) + tm_borders() + tm_facets_wrap(\"name\") + tm_tiles(\"CartoDB.PositronOnlyLabels\") } #> Loading required namespace: maptiles #> SpatRaster object downsampled to 224 by 373 cells. #> SpatRaster object downsampled to 194 by 431 cells. #> SpatRaster object downsampled to 183 by 456 cells. #> SpatRaster object downsampled to 261 by 321 cells. #> SpatRaster object downsampled to 226 by 371 cells. #> SpatRaster object downsampled to 262 by 319 cells. #> SpatRaster object downsampled to 227 by 369 cells. #> SpatRaster object downsampled to 195 by 428 cells. #> SpatRaster object downsampled to 262 by 319 cells. #> SpatRaster object downsampled to 229 by 366 cells. #> SpatRaster object downsampled to 186 by 449 cells. #> SpatRaster object downsampled to 264 by 316 cells. #> SpatRaster object downsampled to 220 by 380 cells. #> SpatRaster object downsampled to 198 by 423 cells. #> SpatRaster object downsampled to 182 by 459 cells. #> SpatRaster object downsampled to 261 by 321 cells. #> SpatRaster object downsampled to 226 by 369 cells. #> SpatRaster object downsampled to 260 by 321 cells. #> SpatRaster object downsampled to 224 by 373 cells. #> SpatRaster object downsampled to 224 by 373 cells. #> SpatRaster object downsampled to 261 by 320 cells. #> SpatRaster object downsampled to 226 by 371 cells. #> SpatRaster object downsampled to 188 by 446 cells. #> SpatRaster object downsampled to 264 by 317 cells."},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_cartogram.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: cartogram — opt_tm_cartogram","title":"Map layer: cartogram — opt_tm_cartogram","text":"Map layer draws cartogram","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_cartogram.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: cartogram — opt_tm_cartogram","text":"","code":"opt_tm_cartogram(type = \"cont\", itermax = 15, ...) opt_tm_cartogram_ncont(type = \"ncont\", expansion = 1, inplace = FALSE, ...) opt_tm_cartogram_dorling(type = \"dorling\", share = 5, itermax = 1000, ...) tm_cartogram( size = 1, size.scale = tm_scale(), size.legend = tm_legend_hide(), size.chart = tm_chart_none(), size.free = NA, plot.order = tm_plot_order(\"size\", reverse = FALSE), options = opt_tm_cartogram(), ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_cartogram.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: cartogram — opt_tm_cartogram","text":"type cartogram type, one : \"cont\" contiguous cartogram, \"ncont\" non-contiguous cartogram \"dorling\" Dorling cartograms itermax, maximum number iterations (see cartogram::cartogram_cont()) ... Arguments passed tm_polygons fill,fill.scale,fill.legend,fill.chart,fill.free Visual variable determines fill color. See details. col,col.scale,col.legend,col.chart,col.free Visual variable determines border color. See details. lwd,lwd.scale,lwd.legend,lwd.chart,lwd.free Visual variable determines line width. See details. lty,lty.scale,lty.legend,lty.chart,lty.free Visual variable determines line type. See details. fill_alpha,fill_alpha.scale,fill_alpha.chart,fill_alpha.legend,fill_alpha.free Visual variable determines fill color alpha transparency See details. col_alpha,col_alpha.scale,col_alpha.legend,col_alpha.chart,col_alpha.free Visual variable determines border color alpha transparency. See details. linejoin,lineend Line join line end. See gpar() details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). popup.vars names data variables shown popups \"view\" mode. Set popup.vars TRUE show variables shape object. Set popup.vars FALSE disable popups. Set popup.vars character vector variable names variables popups. default (NA) depends whether visual variables (e.g.fill) used. , shown. variables shape object shown. popup.format list formatting options popup values. See argument legend.format options. applicable numeric data variables. one list formatting options provided, applied numeric variables popup.vars. Also, (named) list lists can provided. case, list formatting options applied named variable. hover name data variable specifies hover labels id name data variable specifies indices spatial features. used \"view\" mode. expansion factor expansion, see cartogram::cartogram_ncont() (argument k) inplace polygon modified original place? (TRUE default) share share bounding box filled larger circle (see cartogram::cartogram_dorling() argument k) size, size.scale, size.legend, size.chart, size.free Transformation variable determines size polygons. plot.order Specification order spatial features drawn. See tm_plot_order() details. options options passed corresponding opt_ function","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_chart.html","id":null,"dir":"Reference","previous_headings":"","what":"Legend charts — tm_chart_histogram","title":"Legend charts — tm_chart_histogram","text":"Legend charts small charts added map, usually addition legends.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_chart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Legend charts — tm_chart_histogram","text":"","code":"tm_chart_histogram( breaks, plot.axis.x, plot.axis.y, extra.ggplot2, position, width, height, stack, z, group.frame, resize.as.group ) tm_chart_bar( plot.axis.x, plot.axis.y, extra.ggplot2, position, width, height, stack, z, group.frame, resize.as.group ) tm_chart_donut(position, width, height, stack, z, group.frame, resize.as.group) tm_chart_violin( position, width, height, stack, z, group.frame, resize.as.group ) tm_chart_box(position, width, height, stack, z, group.frame, resize.as.group) tm_chart_none() tm_chart_heatmap( position, width, height, stack, z, group.frame, resize.as.group )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_chart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Legend charts — tm_chart_histogram","text":"breaks breaks bins (histograms) plot.axis.x, plot.axis.y x axis y axis plot? extra.ggplot2 Extra ggplot2 code position Position chart. See tm_pos() details width number text lines (height ) height number text lines stack stack map components? z stacking order group.frame group.frame resize..group resize..group","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_chart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Legend charts — tm_chart_histogram","text":"Note charts different charts drawn inside map. called glyphs (implemented).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_chart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Legend charts — tm_chart_histogram","text":"","code":"## numerical variable tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_intervals(), fill.chart = tm_chart_histogram()) tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_continuous(), fill.chart = tm_chart_histogram( position = tm_pos_out(\"center\", \"bottom\"), width = 30) ) tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_intervals(), fill.chart = tm_chart_donut()) tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_intervals(), fill.chart = tm_chart_box()) tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_intervals(), fill.chart = tm_chart_violin()) # with additional ggplot2 code require(ggplot2) #> Loading required package: ggplot2 tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_intervals(), fill.chart = tm_chart_bar( extra.ggplot2 = theme( panel.grid.major.y = element_line(colour = \"red\") )) ) tm_shape(land) + tm_raster(\"trees\", col.chart = tm_chart_histogram()) ## categorical variable tm_shape(World) + tm_polygons(\"economy\", fill.scale = tm_scale_categorical(), fill.chart = tm_chart_bar()) tm_shape(World) + tm_polygons(\"economy\", fill.scale = tm_scale_categorical(), fill.chart = tm_chart_donut()) # bivariate (in development) tm_shape(World) + tm_polygons(tm_mv(\"HPI\", \"well_being\"), fill.chart = tm_chart_heatmap()) #> Labels abbreviated by the first letters, e.g.: \"2 to 3\" => \"2\""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_compass.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: compass — tm_compass","title":"Map component: compass — tm_compass","text":"Map component adds compass","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_compass.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: compass — tm_compass","text":"","code":"tm_compass( north, type, text.size, size, show.labels, cardinal.directions, text.color, color.dark, color.light, lwd, position, bg.color, bg.alpha, stack, just, frame, frame.lwd, frame.r, margins, z )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_compass.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: compass — tm_compass","text":"north north type type text.size text.size size size show.labels show.labels cardinal.directions cardinal.directions text.color text.color color.dark color.dark color.light color.light lwd lwd position position bg.color bg.color bg.alpha bg.alpha stack stack just just frame frame frame.lwd frame.lwd frame.r frame.r margins margins z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_const.html","id":null,"dir":"Reference","previous_headings":"","what":"tmap function to define a constant visual value — tm_const","title":"tmap function to define a constant visual value — tm_const","text":"tmap function define constant visual value","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_const.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"tmap function to define a constant visual value — tm_const","text":"","code":"tm_const()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_credits.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: (credits) text — tm_credits","title":"Map component: (credits) text — tm_credits","text":"Map component adds text, typically used credits","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_credits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: (credits) text — tm_credits","text":"","code":"tm_credits( text, size, color, padding, fontface, fontfamily, stack, just, frame, frame.lwd, frame.r, bg.color, bg.alpha, position, width, height, group.frame, resize.as.group, z )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_credits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: (credits) text — tm_credits","text":"text text title size font size title color color padding padding fontface font face fontfamily font family stack stack just just frame frame frame.lwd frame.lwd frame.r frame.r bg.color bg.color bg.alpha bg.alpha position position width width height height group.frame group.frame resize..group resize..group z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_extra_innner_margin.html","id":null,"dir":"Reference","previous_headings":"","what":"tmap layout: helper functions — tm_place_legends_right","title":"tmap layout: helper functions — tm_place_legends_right","text":"tmap layout: helper functions","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_extra_innner_margin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"tmap layout: helper functions — tm_place_legends_right","text":"","code":"tm_place_legends_right(width = NA) tm_place_legends_left(width = NA) tm_place_legends_bottom(height = NA) tm_place_legends_top(height = NA) tm_place_legends_inside(pos.h = NULL, pos.v = NULL) tm_extra_innner_margin(left = 0, right = 0, top = 0, bottom = 0)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_extra_innner_margin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"tmap layout: helper functions — tm_place_legends_right","text":"width width height height pos.h, pos.v position (horizontal vertical) left, right, top, bottom extra margins","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_facets.html","id":null,"dir":"Reference","previous_headings":"","what":"Facets — tm_facets","title":"Facets — tm_facets","text":"Specify facets. tm_facets() core function, recommended use tm_facets_wrap(), tm_facets_stack() tm_facets_grid(). former two specify facets one grouping variable (one faceting dimension). difference wrap may place facets multiple rows columns whereas tm_facets_stack() stacks facets either horizontally vertically. tm_facets_grid() supports three faceting dimensions.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_facets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Facets — tm_facets","text":"","code":"tm_facets( by = NULL, rows = NULL, columns = NULL, pages = NULL, as.layers = FALSE, nrows = NA, ncols = NA, byrow = TRUE, orientation = NA, free.coords = NA, drop.units = TRUE, drop.empty.facets = TRUE, drop.NA.facets = FALSE, sync = TRUE, showNA = NA, textNA = \"Mssing\", scale.factor = 2, type = NA, along = NULL, free.scales = NULL ) tm_facets_grid(rows = NULL, columns = NULL, pages = NULL, ...) tm_facets_wrap(by = \"VARS__\", nrows = NA, ncols = NA, byrow = TRUE, ...) tm_facets_pagewise(by = \"VARS__\", nrows = 1, ncols = 1, byrow = TRUE, ...) tm_facets_stack(by = \"VARS__\", orientation = NA, ...) tm_facets_hstack(by = \"VARS__\", ...) tm_facets_vstack(by = \"VARS__\", ...) tm_facets_flip(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_facets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Facets — tm_facets","text":"Group variable (facet wrap facet stack) rows Variable specifies rows (facet grid) columns Variable specifies columns (facet grid) pages Variable specifies pages (facet grid) .layers show facets layers? nrows Number rows ncols Number columns byrow facets wrapped row? orientation facet stack: horizontal vertical? free.coords Logical. argument specified, map coordinate ranges? default TRUE, unless facets shown different layers (.layers = TRUE) drop.units Logical. argument specified, non-selected spatial units dropped? FALSE, plotted mapped aesthetics regarded missing values. applicable raster shapes. default TRUE. drop.empty.facets Logical. argument specified, empty facets dropped? Empty facets occur -variable contains unused levels. TRUE two -variables specified, empty rows columns dropped. drop.NA.facets Logical. argument specified, data values specific facets missing, facets dropped? FALSE default. sync Logical. navigation view mode (zooming panning) synchronized? default TRUE facets bounding box. generally case rasters plotted, free.coords FALSE. showNA argument specified, missing values -variable shown facet? two -variables specified, missing values shown additional row column? NA, missing values shown exist. Similar useNA argument table(), TRUE, FALSE, NA correspond \"always\", \"\", \"ifany\" respectively. textNA Text used facets missing values. scale.factor Number determines elements (e.g. font sizes, symbol sizes, line widths) small multiples scaled relation scaling factor shapes. elements scaled scale.factorth root scaling factor shapes. , scale.factor=1, scaled proportional scaling shapes. Since elements, especially text, often small read, higher value recommended. default, scale.factor=2. type \"grid\", \"wrap\" \"stack\" along deprecated Please use tm_facets_page() free.scales deprecated. Please use .free arguments layer functions, e.g. fill.free tm_polygons. ... passed tm_facets()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_graticules.html","id":null,"dir":"Reference","previous_headings":"","what":"Coordinate grid / graticule lines — tm_graticules","title":"Coordinate grid / graticule lines — tm_graticules","text":"Draw latitude longitude graticules. creates tmap-element draws coordinate grid lines. serves layer can drawn anywhere layers. See tm_grid() drawing horizontal lines.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_graticules.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coordinate grid / graticule lines — tm_graticules","text":"","code":"tm_graticules( x = NA, y = NA, n.x = NA, n.y = NA, crs = 4326, labels.format = list(suffix = intToUtf8(176)), labels.cardinal = TRUE, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_graticules.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coordinate grid / graticule lines — tm_graticules","text":"x X coordinates vertical grid lines. NA, specified pretty scale n.x. y Y coordinates horizontal grid lines. NA, specified pretty scale n.y. n.x Preferred number grid lines x axis. labels, pretty() sequence used, number actual labels may different n.x. n.y Preferred number grid lines y axis. labels, pretty() sequence used, number actual labels may different n.y. crs Projection character. specified, grid lines projected accordingly. Many world maps projected, still latitude longitude (EPSG 4326) grid lines. labels.format List formatting options grid labels. Parameters : fun Function specify labels. take numeric vector, return character vector size. default specified. specified, list items scientific, format, digits (see ) used. scientific labels formatted scientifically? , square brackets used, format numbers \"g\". Otherwise, format=\"f\", text.separator, text.less., text..used. Also, numbers automatically rounded millions billions applicable. format default, \"f\", .e. standard notation xxx.xxx, used. scientific=TRUE \"g\", means numbers formatted scientifically, .e. n.dddE+nn needed save space. digits Number digits decimal point format=\"f\", number significant digits otherwise. ... arguments passed formatC() labels.cardinal Add four cardinal directions (N, E, S, W) labels, instead using negative coordinates west south (assumes coordinates positive north-east direction). ... Arguments passed tm_grid col Color grid lines. lwd Line width grid lines alpha Alpha transparency grid lines. Number 0 1. default, alpha transparency col taken. labels.show Show tick labels. Either one value x y axis, vector two: first x latter y. labels.pos position labels. Vector two: horizontal (\"left\" \"right\") vertical (\"top\" \"bottom\") position. labels.size Font size tick labels labels.col Font color tick labels labels.rot Rotation angles labels. Vector two values: first rotation angle (degrees) tick labels x axis second rotation angle tick labels y axis. 0, 90, 180, 270 valid values. labels.margin.x Margin tick labels x axis frame. Note labels.inside.frame = FALSE ticks = TRUE, ticks adjusted accordingly. labels.margin.y Margin tick labels y axis frame. Note labels.inside.frame = FALSE ticks = TRUE, ticks adjusted accordingly. labels.space.x Space used labels ticks x-axis labels.inside.frame = FALSE. default, determined automatically using widths heights tick labels. unit parameter text line height. labels.space.y Space used labels ticks y-axis labels.inside.frame = FALSE. default, determined automatically using widths heights tick labels. unit parameter text line height. labels.inside.frame Show labels inside frame? default FALSE. ticks labels.inside.frame = FALSE, ticks can drawn labels frame? Either one value x y axis, vector two: first x latter y. lines labels.inside.frame = FALSE, grid lines can drawn? ndiscr Number points discretize parallel meridian (applicable curved grid lines) zindex zindex pane view mode. default, set layer number plus 400. default, tmap layers therefore placed custom panes \"tmap401\", \"tmap402\", etc., except base tile layers, placed standard \"tile\". parameter determines name pane z-index, determines pane order bottom top. instance, zindex set 500, pane named \"tmap500\". group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_graticules.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coordinate grid / graticule lines — tm_graticules","text":"","code":"current.mode <- tmap_mode(\"plot\") #> tmap mode set to 'plot' tm_shape(NLD_muni) + tm_polygons() + tm_grid() tm_shape(NLD_muni) + tm_polygons() + tm_grid(crs = 4326) tm_shape(NLD_muni) + tm_polygons() + tm_grid(crs = 3035, labels.inside.frame = TRUE) tm_shape(World) + tm_polygons() + tm_facets(by = \"continent\") + tm_grid(labels.inside.frame = TRUE) tm_shape(NLD_muni) + tm_polygons() + tm_graticules() tm_shape(NLD_muni) + tm_polygons() + tm_graticules(labels.pos = c(\"right\", \"top\")) data(NLD_muni, World) tmap_arrange( qtm(NLD_muni, borders = NULL) + tm_grid(), qtm(NLD_muni, borders = NULL) + tm_graticules() ) #> -- tmap v3 code detected -- #> [v3->v4] qtm(): use 'col = NA' instead of 'borders = NULL' #> [v3->v4] qtm(): use 'col = NA' instead of 'borders = NULL' qtm(World, shape.crs = \"+proj=robin\", style = \"natural\") + tm_graticules(ticks = FALSE) + tm_layout(frame=FALSE) #> -- tmap v3 code detected -- tmap_mode(current.mode) #> tmap mode set to 'plot'"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Coordinate grid / graticule lines — tm_grid","title":"Coordinate grid / graticule lines — tm_grid","text":"tm_grid() draws horizontal vertical lines according coordinate system (master) shape object. Creates tmap-element draws coordinate grid lines. serves layer can drawn anywhere layers. See tm_graticules() draw latitude longitude graticules.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coordinate grid / graticule lines — tm_grid","text":"","code":"tm_grid( x = NA, y = NA, n.x = NA, n.y = NA, crs = NA, col = NA, lwd = 1, alpha = NA, labels.show = TRUE, labels.pos = c(\"left\", \"bottom\"), labels.size = 0.6, labels.col = NA, labels.rot = c(0, 0), labels.format = list(big.mark = \",\"), labels.cardinal = FALSE, labels.margin.x = 0, labels.margin.y = 0, labels.space.x = NA, labels.space.y = NA, labels.inside.frame = FALSE, ticks = labels.show & !labels.inside.frame, lines = TRUE, ndiscr = 100, zindex = NA, group = NA, group.control = \"none\", ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coordinate grid / graticule lines — tm_grid","text":"x X coordinates vertical grid lines. NA, specified pretty scale n.x. y Y coordinates horizontal grid lines. NA, specified pretty scale n.y. n.x Preferred number grid lines x axis. labels, pretty() sequence used, number actual labels may different n.x. n.y Preferred number grid lines y axis. labels, pretty() sequence used, number actual labels may different n.y. crs Projection character. specified, grid lines projected accordingly. Many world maps projected, still latitude longitude (EPSG 4326) grid lines. col Color grid lines. lwd Line width grid lines alpha Alpha transparency grid lines. Number 0 1. default, alpha transparency col taken. labels.show Show tick labels. Either one value x y axis, vector two: first x latter y. labels.pos position labels. Vector two: horizontal (\"left\" \"right\") vertical (\"top\" \"bottom\") position. labels.size Font size tick labels labels.col Font color tick labels labels.rot Rotation angles labels. Vector two values: first rotation angle (degrees) tick labels x axis second rotation angle tick labels y axis. 0, 90, 180, 270 valid values. labels.format List formatting options grid labels. Parameters : fun Function specify labels. take numeric vector, return character vector size. default specified. specified, list items scientific, format, digits (see ) used. scientific labels formatted scientifically? , square brackets used, format numbers \"g\". Otherwise, format=\"f\", text.separator, text.less., text..used. Also, numbers automatically rounded millions billions applicable. format default, \"f\", .e. standard notation xxx.xxx, used. scientific=TRUE \"g\", means numbers formatted scientifically, .e. n.dddE+nn needed save space. digits Number digits decimal point format=\"f\", number significant digits otherwise. ... arguments passed formatC() labels.cardinal Add four cardinal directions (N, E, S, W) labels, instead using negative coordinates west south (assumes coordinates positive north-east direction). labels.margin.x Margin tick labels x axis frame. Note labels.inside.frame = FALSE ticks = TRUE, ticks adjusted accordingly. labels.margin.y Margin tick labels y axis frame. Note labels.inside.frame = FALSE ticks = TRUE, ticks adjusted accordingly. labels.space.x Space used labels ticks x-axis labels.inside.frame = FALSE. default, determined automatically using widths heights tick labels. unit parameter text line height. labels.space.y Space used labels ticks y-axis labels.inside.frame = FALSE. default, determined automatically using widths heights tick labels. unit parameter text line height. labels.inside.frame Show labels inside frame? default FALSE. ticks labels.inside.frame = FALSE, ticks can drawn labels frame? Either one value x y axis, vector two: first x latter y. lines labels.inside.frame = FALSE, grid lines can drawn? ndiscr Number points discretize parallel meridian (applicable curved grid lines) zindex zindex pane view mode. default, set layer number plus 400. default, tmap layers therefore placed custom panes \"tmap401\", \"tmap402\", etc., except base tile layers, placed standard \"tile\". parameter determines name pane z-index, determines pane order bottom top. instance, zindex set 500, pane named \"tmap500\". group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). ... Used catch deprecated arguments tmap v3.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_grid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coordinate grid / graticule lines — tm_grid","text":"","code":"current.mode <- tmap_mode(\"plot\") #> tmap mode set to 'plot' tm_shape(NLD_muni) + tm_polygons() + tm_grid() tm_shape(NLD_muni) + tm_polygons() + tm_grid(crs = 4326) tm_shape(NLD_muni) + tm_polygons() + tm_grid(crs = 3035, labels.inside.frame = TRUE) tm_shape(World) + tm_polygons() + tm_facets(by = \"continent\") + tm_grid(labels.inside.frame = TRUE) tm_shape(NLD_muni) + tm_polygons() + tm_graticules() tm_shape(NLD_muni) + tm_polygons() + tm_graticules(labels.pos = c(\"right\", \"top\")) data(NLD_muni, World) tmap_arrange( qtm(NLD_muni, borders = NULL) + tm_grid(), qtm(NLD_muni, borders = NULL) + tm_graticules() ) #> -- tmap v3 code detected -- #> [v3->v4] qtm(): use 'col = NA' instead of 'borders = NULL' #> [v3->v4] qtm(): use 'col = NA' instead of 'borders = NULL' qtm(World, shape.crs = \"+proj=robin\", style = \"natural\") + tm_graticules(ticks = FALSE) + tm_layout(frame=FALSE) #> -- tmap v3 code detected -- tmap_mode(current.mode) #> tmap mode set to 'plot'"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_layout.html","id":null,"dir":"Reference","previous_headings":"","what":"Layout options — tm_style","title":"Layout options — tm_style","text":"Set tmap options directly related layout.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_layout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Layout options — tm_style","text":"","code":"tm_style(style, ...) tm_format(format, ...) tm_layout( modes, crs, facet.max, facet.flip, raster.max.cells, show.messages, show.warnings, output.format, output.size, output.dpi, output.dpi.animation, value.const, value.na, value.null, value.blank, values.var, values.range, value.neutral, scales.var, scale.misc.args, label.format, label.na, scale, asp, bg.color, outer.bg.color, frame, frame.lwd, frame.r, frame.double.line, outer.margins, inner.margins, inner.margins.extra, meta.margins, meta.auto.margins, between.margin, component.offset, component.stack.margin, grid.mark.height, xylab.height, coords.height, xlab.show, xlab.text, xlab.size, xlab.color, xlab.rotation, xlab.space, xlab.fontface, xlab.fontfamily, xlab.side, ylab.show, ylab.text, ylab.size, ylab.color, ylab.rotation, ylab.space, ylab.fontface, ylab.fontfamily, ylab.side, panel.type, panel.wrap.pos, panel.xtab.pos, unit, color.sepia.intensity, color.saturation, color.vision.deficiency.sim, text.fontface, text.fontfamily, legend.show, legend.design, legend.orientation, legend.position, legend.width, legend.height, legend.stack, legend.group.frame, legend.resize.as.group, legend.reverse, legend.na.show, legend.title.color, legend.title.size, legend.title.fontface, legend.title.fontfamily, legend.xlab.color, legend.xlab.size, legend.xlab.fontface, legend.xlab.fontfamily, legend.ylab.color, legend.ylab.size, legend.ylab.fontface, legend.ylab.fontfamily, legend.text.color, legend.text.size, legend.text.fontface, legend.text.fontfamily, legend.frame, legend.frame.lwd, legend.frame.r, legend.bg.color, legend.bg.alpha, legend.settings.standard.portrait, legend.settings.standard.landscape, title.show, title.size, title.color, title.fontface, title.fontfamily, title.bg.color, title.bg.alpha, title.padding, title.frame, title.frame.lwd, title.frame.r, title.stack, title.position, title.group.frame, title.resize.as.group, credits.show, credits.size, credits.color, credits.fontface, credits.fontfamily, credits.bg.color, credits.bg.alpha, credits.padding, credits.frame, credits.frame.lwd, credits.frame.r, credits.stack, credits.position, credits.width, credits.heigth, credits.group.frame, credits.resize.as.group, compass.north, compass.type, compass.text.size, compass.size, compass.show.labels, compass.cardinal.directions, compass.text.color, compass.color.dark, compass.color.light, compass.lwd, compass.bg.color, compass.bg.alpha, compass.margins, compass.show, compass.stack, compass.position, compass.frame, compass.frame.lwd, compass.frame.r, compass.group.frame, compass.resize.as.group, scalebar.show, scalebar.breaks, scalebar.width, scalebar.text.size, scalebar.text.color, scalebar.color.dark, scalebar.color.light, scalebar.lwd, scalebar.position, scalebar.bg.color, scalebar.bg.alpha, scalebar.size, scalebar.margins, scalebar.stack, scalebar.frame, scalebar.frame.lwd, scalebar.frame.r, scalebar.group.frame, scalebar.resize.as.group, grid.show, grid.labels.pos, grid.x, grid.y, grid.n.x, grid.n.y, grid.crs, grid.col, grid.lwd, grid.alpha, grid.labels.show, grid.labels.size, grid.labels.col, grid.labels.rot, grid.labels.format, grid.labels.cardinal, grid.labels.margin.x, grid.labels.margin.y, grid.labels.space.x, grid.labels.space.y, grid.labels.inside.frame, grid.ticks, grid.lines, grid.ndiscr, mouse_coordinates.stack, mouse_coordinates.position, mouse_coordinates.show, panel.show, panel.labels, panel.label.size, panel.label.color, panel.label.fontface, panel.label.fontfamily, panel.label.bg.color, panel.label.height, panel.label.rot, qtm.scalebar, qtm.minimap, qtm.mouse.coordinates, earth.boundary, earth.boundary.color, earth.boundary.lwd, earth.datum, space.color, attr.color, max.categories, legend.hist.bg.color, legend.hist.bg.alpha, legend.hist.size, legend.hist.height, legend.hist.width, attr.outside, attr.outside.position, attr.outside.size, attr.position, attr.just, basemap.server, basemap.alpha, basemap.zoom, overlays, overlays.alpha, alpha, colorNA, symbol.size.fixed, dot.size.fixed, text.size.variable, bbox, check.and.fix, set.bounds, set.view, set.zoom.limits, name, basemap.show, title = NULL, main.title = NULL, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_layout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Layout options — tm_style","text":"style name style ... used catch deprecated arguments format name format modes, crs, facet.max, facet.flip, raster.max.cells, show.messages, show.warnings, output.format, output.size, output.dpi, output.dpi.animation, value.const, value.na, value.null, value.blank, values.var, values.range, value.neutral, scales.var, scale.misc.args See tmap_options() label.format, label.na, scale, asp, bg.color, outer.bg.color, frame, frame.lwd, frame.r, frame.double.line, outer.margins, inner.margins, inner.margins.extra, meta.margins, meta.auto.margins, .margin, component.offset, component.stack.margin See tmap_options() grid.mark.height, xylab.height, coords.height, xlab.show, xlab.text, xlab.size, xlab.color, xlab.rotation, xlab.space, xlab.fontface, xlab.fontfamily, xlab.side, ylab.show, ylab.text, ylab.size, ylab.color, ylab.rotation, ylab.space, ylab.fontface, ylab.fontfamily, ylab.side See tmap_options() panel.type, panel.wrap.pos, panel.xtab.pos, unit, color.sepia.intensity, color.saturation, color.vision.deficiency.sim, text.fontface, text.fontfamily See tmap_options() legend.show, legend.design, legend.orientation, legend.position, legend.width, legend.height, legend.stack, legend.group.frame, legend.resize..group, legend.reverse, legend.na.show, legend.title.color, legend.title.size, legend.title.fontface, legend.title.fontfamily, legend.xlab.color, legend.xlab.size, legend.xlab.fontface, legend.xlab.fontfamily, legend.ylab.color, legend.ylab.size, legend.ylab.fontface, legend.ylab.fontfamily, legend.text.color, legend.text.size, legend.text.fontface, legend.text.fontfamily, legend.frame, legend.frame.lwd, legend.frame.r, legend.bg.color, legend.bg.alpha, legend.settings.standard.portrait, legend.settings.standard.landscape See tmap_options() title.show, title.size, title.color, title.fontface, title.fontfamily, title.bg.color, title.bg.alpha, title.padding, title.frame, title.frame.lwd, title.frame.r, title.stack, title.position, title.group.frame, title.resize..group See tmap_options() credits.show, credits.size, credits.color, credits.fontface, credits.fontfamily, credits.bg.color, credits.bg.alpha, credits.padding, credits.frame, credits.frame.lwd, credits.frame.r, credits.stack, credits.position, credits.width, credits.heigth, credits.group.frame, credits.resize..group See tmap_options() compass.north, compass.type, compass.text.size, compass.size, compass.show.labels, compass.cardinal.directions, compass.text.color, compass.color.dark, compass.color.light, compass.lwd, compass.bg.color, compass.bg.alpha, compass.margins, compass.show, compass.stack, compass.position, compass.frame, compass.frame.lwd, compass.frame.r, compass.group.frame, compass.resize..group See tmap_options() scalebar.show, scalebar.breaks, scalebar.width, scalebar.text.size, scalebar.text.color, scalebar.color.dark, scalebar.color.light, scalebar.lwd, scalebar.position, scalebar.bg.color, scalebar.bg.alpha, scalebar.size, scalebar.margins, scalebar.stack, scalebar.frame, scalebar.frame.lwd, scalebar.frame.r, scalebar.group.frame, scalebar.resize..group See tmap_options() grid.show, grid.labels.pos, grid.x, grid.y, grid.n.x, grid.n.y, grid.crs, grid.col, grid.lwd, grid.alpha, grid.labels.show, grid.labels.size, grid.labels.col, grid.labels.rot, grid.labels.format, grid.labels.cardinal, grid.labels.margin.x, grid.labels.margin.y, grid.labels.space.x, grid.labels.space.y, grid.labels.inside.frame, grid.ticks, grid.lines, grid.ndiscr See tmap_options() mouse_coordinates.stack, mouse_coordinates.position, mouse_coordinates.show, panel.show, panel.labels, panel.label.size, panel.label.color, panel.label.fontface, panel.label.fontfamily, panel.label.bg.color, panel.label.height, panel.label.rot, qtm.scalebar, qtm.minimap, qtm.mouse.coordinates See tmap_options() earth.boundary, earth.boundary.color, earth.boundary.lwd, earth.datum, space.color, attr.color, max.categories, legend.hist.bg.color, legend.hist.bg.alpha, legend.hist.size, legend.hist.height, legend.hist.width, attr.outside, attr.outside.position, attr.outside.size, attr.position, attr.just, basemap.server, basemap.alpha, basemap.zoom, overlays, overlays.alpha, alpha, colorNA, symbol.size.fixed, dot.size.fixed, text.size.variable, bbox, check..fix, set.bounds, set.view, set.zoom.limits, name, basemap.show See tmap_options() title, main.title deprecated","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_layout.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Layout options — tm_style","text":"","code":"data(land, World) # Error unable to warp stars (argument not yet added to tm_shape) # On Windows if (FALSE) { tm_shape(land, raster.wrap = FALSE) + tm_raster( \"elevation\", col.scale = tm_scale_intervals( breaks = c(-Inf, 250, 500, 1000, 1500, 2000, 2500, 3000, 4000, Inf), values = terrain.colors(9), midpoint = NA ), col.legend = tm_legend( title = \"Elevation\", position = tm_pos_in(\"left\", \"bottom\"), frame = TRUE, bg.color = \"lightblue\" ) ) + tm_shape(World, is.main = TRUE, crs = \"+proj=eck4\") + tm_borders(\"grey20\") + tm_graticules(labels.size = .5) + tm_text(\"name\", size = \"AREA\") + # tm_compass(position = c(.65, .15), color.light = \"grey90\") + # tm_credits(\"Eckert IV projection\", position = c(\"right\", \"BOTTOM\")) + tm_style(\"classic_v3\") + tm_layout(bg.color = \"lightblue\", inner.margins = c(0, 0, .02, 0)) } data(land, World) tm_shape(World) + tm_fill(\"pop_est_dens\", fill.scale = tm_scale_intervals(style = \"kmeans\"), fill.legend = tm_legend(title = \"Population density\")) + tm_style(\"albatross_v3\", frame.lwd = 10) + tm_format(\"World\") + tm_title(\"The World\", position = tm_pos_in(\"left\", \"top\")) ################################ # not working yet: ################################ if (FALSE) { tm_shape(land) + tm_raster(\"elevation\", breaks=c(-Inf, 250, 500, 1000, 1500, 2000, 2500, 3000, 4000, Inf), palette = terrain.colors(9), title=\"Elevation\", midpoint = NA) + tm_shape(World, is.master=TRUE, projection = \"+proj=eck4\") + tm_borders(\"grey20\") + tm_graticules(labels.size = .5) + tm_text(\"name\", size=\"AREA\") + tm_compass(position = c(.65, .15), color.light = \"grey90\") + tm_credits(\"Eckert IV projection\", position = c(\"right\", \"BOTTOM\")) + tm_style(\"classic\") + tm_layout(bg.color=\"lightblue\", inner.margins=c(.04,.03, .02, .01), earth.boundary = TRUE, space.color=\"grey90\") + tm_legend(position = c(\"left\", \"bottom\"), frame = TRUE, bg.color=\"lightblue\") } tm_shape(World, projection=\"+proj=robin\") + tm_polygons(\"HPI\", palette=\"div\", n=7, title = \"Happy Planet Index\") + tm_credits(\"Robinson projection\", position = c(\"right\", \"BOTTOM\")) + tm_style(\"natural\", earth.boundary = c(-180, -87, 180, 87), inner.margins = .05) + tm_legend(position=c(\"left\", \"bottom\"), bg.color=\"grey95\", frame=TRUE) #> -- tmap v3 code detected -- #> [v3->v4] tm_shape(): use 'crs' instead of 'projection' #> [v3->v4] tm_legend(): use 'tm_legend()' inside a layer function, e.g. 'tm_polygons(..., fill.legend = tm_legend())' # Not working yet if (FALSE) { # Example to illustrate the type of titles tm_shape(World) + tm_polygons(c(\"income_grp\", \"economy\"), title = c(\"Legend Title 1\", \"Legend Title 2\")) + tm_layout(main.title = \"Main Title\", main.title.position = \"center\", main.title.color = \"blue\", title = c(\"Title 1\", \"Title 2\"), title.color = \"red\", panel.labels = c(\"Panel Label 1\", \"Panel Label 2\"), panel.label.color = \"purple\", legend.text.color = \"brown\") } if (FALSE) { # global option tmap.style demo # get current style current.style <- tmap_style() qtm(World, fill = \"economy\", format = \"World\") tmap_style(\"col_blind\") qtm(World, fill = \"economy\", format = \"World\") tmap_style(\"cobalt\") qtm(World, fill = \"economy\", format = \"World\") # set to current style tmap_style(current.style) } # TIP: check out these examples in view mode, enabled with tmap_mode(\"view\")"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_legend.html","id":null,"dir":"Reference","previous_headings":"","what":"Legend — tm_legend","title":"Legend — tm_legend","text":"Legend specification","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_legend.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Legend — tm_legend","text":"","code":"tm_legend( title, show, orientation, design, reverse, na.show, position, width, height, stack, z, group.frame, resize.as.group, title.color, title.size, title.fontface, title.fontfamily, title.padding, text.color, text.size, text.fontface, text.fontfamily, format, frame, frame.lwd, frame.r, bg.color, bg.alpha, item.height, item.width, item.space, item.na.height, item.na.width, item.na.space, item.shape, ticks, ticks.disable.na, ticks.col, ticks.lwd, title.align, margins, margin.item.text, ... ) tm_legend_hide() tm_legend_combine(variable)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_legend.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Legend — tm_legend","text":"title PARAM_DESCRIPTION show PARAM_DESCRIPTION orientation PARAM_DESCRIPTION design PARAM_DESCRIPTION reverse PARAM_DESCRIPTION na.show PARAM_DESCRIPTION position PARAM_DESCRIPTION width PARAM_DESCRIPTION height PARAM_DESCRIPTION stack PARAM_DESCRIPTION z PARAM_DESCRIPTION group.frame PARAM_DESCRIPTION resize..group PARAM_DESCRIPTION title.color PARAM_DESCRIPTION title.size PARAM_DESCRIPTION title.fontface PARAM_DESCRIPTION title.fontfamily PARAM_DESCRIPTION title.padding PARAM_DESCRIPTION text.color PARAM_DESCRIPTION text.size PARAM_DESCRIPTION text.fontface PARAM_DESCRIPTION text.fontfamily PARAM_DESCRIPTION format PARAM_DESCRIPTION frame PARAM_DESCRIPTION frame.lwd PARAM_DESCRIPTION frame.r PARAM_DESCRIPTION bg.color PARAM_DESCRIPTION bg.alpha PARAM_DESCRIPTION item.height PARAM_DESCRIPTION item.width PARAM_DESCRIPTION item.space PARAM_DESCRIPTION item.na.height PARAM_DESCRIPTION item.na.width PARAM_DESCRIPTION item.na.space PARAM_DESCRIPTION item.shape PARAM_DESCRIPTION ticks PARAM_DESCRIPTION ticks.disable.na PARAM_DESCRIPTION ticks.col PARAM_DESCRIPTION ticks.lwd PARAM_DESCRIPTION title.align PARAM_DESCRIPTION margins PARAM_DESCRIPTION margin.item.text PARAM_DESCRIPTION ... passed (?) variable visual (transformation) variable combine legend : e.g. \"fill\" \"size\"","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_legend.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Legend — tm_legend","text":"OUTPUT_DESCRIPTION","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_lines.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: lines — opt_tm_lines","title":"Map layer: lines — opt_tm_lines","text":"Map layer draws symbols Supported visual variables : col (color), lwd (line width), lty (line type), col_alpha (color alpha transparency).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_lines.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: lines — opt_tm_lines","text":"","code":"opt_tm_lines(lines.only = \"ifany\") tm_lines( col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.chart = tm_chart_none(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.chart = tm_chart_none(), lty.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, linejoin = \"round\", lineend = \"round\", plot.order = tm_plot_order(\"lwd\", reverse = TRUE, na.order = \"bottom\"), zindex = NA, group = NA, group.control = \"check\", popup.vars = NA, popup.format = list(), hover = \"\", id = \"\", options = opt_tm_lines(), ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_lines.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: lines — opt_tm_lines","text":"lines.line geometries shape object (defined tm_shape()) plotted, also geometry types (like polygons)? default \"ifany\", means TRUE case geometry collection specified. col, col.scale, col.legend, col.chart, col.free Visual variable determines col color. See details. lwd, lwd.scale, lwd.legend, lwd.chart, lwd.free Visual variable determines line width. See details. lty, lty.scale, lty.legend, lty.chart, lty.free Visual variable determines line type. See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.chart, col_alpha.free Visual variable determines border color alpha transparency. See details. linejoin, lineend line join line end. See gpar() details. plot.order Specification order spatial features drawn. See tm_plot_order() details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). popup.vars names data variables shown popups \"view\" mode. Set popup.vars TRUE show variables shape object. Set popup.vars FALSE disable popups. Set popup.vars character vector variable names variables popups. default (NA) depends whether visual variables (e.g.col) used. , shown. variables shape object shown. popup.format list formatting options popup values. See argument legend.format options. applicable numeric data variables. one list formatting options provided, applied numeric variables popup.vars. Also, (named) list lists can provided. case, list formatting options applied named variable. hover name data variable specifies hover labels id name data variable specifies indices spatial features. used \"view\" mode. options options passed corresponding opt_ function ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_lines.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: lines — opt_tm_lines","text":"visual variable arguments (e.g. col) can specified either data variable name (e.g., spatial vector attribute raster layer object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). *.scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_*() functions. default specified tmap option (tm_options()) scales.var. *.legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options (tm_options()) legend. . *.chart arguments specify additional charts, specified tm_chart_, e.g. tm_chart_histogram() *.free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, *.free argument requires one logical value.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_lines.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: lines — opt_tm_lines","text":"","code":"tm_shape(rivers) + tm_lines(lwd = \"strokelwd\", lwd.scale = tm_scale_asis(values.scale = 0.2, value.neutral = 2), col = \"scalerank\", col.scale = tm_scale_categorical(values = \"seaborn.dark\")) tm_shape(World) + tm_lines(col = \"continent\", col.scale = tm_scale_categorical(values = \"seaborn.dark\"), lty = \"continent\", lwd = 1.5, lty.legend = tm_legend_combine(\"col\"))"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mouse_coordinates.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: mouse coordinates — tm_mouse_coordinates","title":"Map component: mouse coordinates — tm_mouse_coordinates","text":"Map component adds mouse coordinates","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mouse_coordinates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: mouse coordinates — tm_mouse_coordinates","text":"","code":"tm_mouse_coordinates(stack, position, z)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mouse_coordinates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: mouse coordinates — tm_mouse_coordinates","text":"stack stack position position z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv.html","id":null,"dir":"Reference","previous_headings":"","what":"define multivariate variable — tm_mv","title":"define multivariate variable — tm_mv","text":"define multivariate variable","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"define multivariate variable — tm_mv","text":"","code":"tm_mv(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"define multivariate variable — tm_mv","text":"... variable names","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv_dim.html","id":null,"dir":"Reference","previous_headings":"","what":"define multivariate variable based on stars dimension — tm_mv_dim","title":"define multivariate variable based on stars dimension — tm_mv_dim","text":"define multivariate variable based stars dimension","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv_dim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"define multivariate variable based on stars dimension — tm_mv_dim","text":"","code":"tm_mv_dim(x, values)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv_dim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"define multivariate variable based on stars dimension — tm_mv_dim","text":"x dimension name values values used","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot mode options — tm_plot","title":"Plot mode options — tm_plot","text":"Plot mode options. option specific plot mode.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot mode options — tm_plot","text":"","code":"tm_plot(use.gradient)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot mode options — tm_plot","text":"use.gradient Use gradient fill using linearGradient()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot_order.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine plotting order of features — tm_plot_order","title":"Determine plotting order of features — tm_plot_order","text":"Determine plotting order features.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot_order.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine plotting order of features — tm_plot_order","text":"","code":"tm_plot_order( aes, reverse = TRUE, na.order = c(\"mix\", \"bottom\", \"top\"), null.order = c(\"bottom\", \"mix\", \"top\"), null.below.na = TRUE )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot_order.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine plotting order of features — tm_plot_order","text":"aes Visual variable values determine plotting order. Example: bubble map \"size\" aesthetic used. data variable (say population) mapped via continuous scale (tm_scale_continuous()) bubble sizes. bubbles plotted order size. determined arguments. Use \"DATA\" keep order data. Another special value \"AREA\" \"LENGTH\" preserved polygons lines respectively: rather data variable polygon area / line lengths determines plotting order. reverse Logical determines whether visual values plotted reversed order. visual values (specified tmap option \"values.var\") default reversed, plotted starting last value. bubble map example, means large bubbles plotted first, hence bottom. na.order features plotted NA value (least) one aesthetic variable? (order) \"mix\", \"bottom\", \"top\"? bubble map example: fill color missing bubble, bubbles plotted? null.order non-selected (aka null) features plotted? null..na null features plotted NA features?","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_polygons.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: polygons — opt_tm_polygons","title":"Map layer: polygons — opt_tm_polygons","text":"Map layer draws polygons. Supported visual variables : fill (fill color), col (border color), lwd (line width), lty (line type), fill_alpha (fill color alpha transparency) col_alpha (border color alpha transparency).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_polygons.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: polygons — opt_tm_polygons","text":"","code":"opt_tm_polygons(polygons.only = \"ifany\") tm_polygons( fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.chart = tm_chart_none(), fill.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.chart = tm_chart_none(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.chart = tm_chart_none(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.chart = tm_chart_none(), fill_alpha.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, linejoin = \"round\", lineend = \"round\", plot.order = tm_plot_order(\"lwd\", reverse = TRUE, na.order = \"bottom\"), zindex = NA, group = NA, group.control = \"check\", popup.vars = NA, popup.format = list(), hover = \"\", id = \"\", options = opt_tm_polygons(), ... ) tm_fill(...) tm_borders(col = tm_const(), ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_polygons.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: polygons — opt_tm_polygons","text":"polygons.polygon geometries shape object (defined tm_shape()) plotted? default \"ifany\", means TRUE case geometry collection specified. fill, fill.scale, fill.legend, fill.chart, fill.free Visual variable determines fill color. See details. col, col.scale, col.legend, col.chart, col.free Visual variable determines border color. See details. lwd, lwd.scale, lwd.legend, lwd.chart, lwd.free Visual variable determines line width. See details. lty, lty.scale, lty.legend, lty.chart, lty.free Visual variable determines line type. See details. fill_alpha, fill_alpha.scale, fill_alpha.chart, fill_alpha.legend, fill_alpha.free Visual variable determines fill color alpha transparency See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.chart, col_alpha.free Visual variable determines border color alpha transparency. See details. linejoin, lineend Line join line end. See gpar() details. plot.order Specification order spatial features drawn. See tm_plot_order() details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). popup.vars names data variables shown popups \"view\" mode. Set popup.vars TRUE show variables shape object. Set popup.vars FALSE disable popups. Set popup.vars character vector variable names variables popups. default (NA) depends whether visual variables (e.g.fill) used. , shown. variables shape object shown. popup.format list formatting options popup values. See argument legend.format options. applicable numeric data variables. one list formatting options provided, applied numeric variables popup.vars. Also, (named) list lists can provided. case, list formatting options applied named variable. hover name data variable specifies hover labels id name data variable specifies indices spatial features. used \"view\" mode. options options passed corresponding opt_ function ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_polygons.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: polygons — opt_tm_polygons","text":"visual variable arguments (e.g. col) can specified either data variable name (e.g., spatial vector attribute raster layer object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). *.scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_*() functions. default specified tmap option (tm_options()) scales.var. *.legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options (tm_options()) legend. . *.chart arguments specify additional charts, specified tm_chart_, e.g. tm_chart_histogram() *.free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, *.free argument requires one logical value.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_polygons.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: polygons — opt_tm_polygons","text":"","code":"# load Africa country data data(World) Africa = World[World$continent == \"Africa\", ] Africa_border = sf::st_make_valid(sf::st_union(sf::st_buffer(Africa, 0.001))) # slow and ugly # without specifications tm_shape(Africa_border) + tm_polygons() tm_shape(Africa_border) + tm_fill() tm_shape(Africa_border) + tm_borders() # specification with visual variable values tm_shape(Africa) + tm_polygons(fill = \"limegreen\", col = \"purple\", lwd = 2, lty = \"solid\", col_alpha = 0.3) + tm_text(\"name\", options = opt_tm_text(remove.overlap = TRUE)) + tm_shape(Africa_border) + tm_borders(\"darkred\", lwd = 3) # specification with a data variable tm_shape(Africa) + tm_polygons(fill = \"income_grp\", fill.scale = tm_scale_categorical(values = \"-tol.muted\")) # continuous color scale with landscape legend tm_shape(Africa) + tm_polygons(fill = \"inequality\", fill.scale = tm_scale_continuous(values = \"-scico.roma\"), fill.legend = tm_legend( title = \"\", orientation = \"landscape\", position = tm_pos_out(\"center\", \"bottom\"), frame = FALSE )) + tm_shape(Africa_border) + tm_borders(lwd = 2) + tm_title(\"Inequality index\", position = tm_pos_in(\"right\", \"TOP\"), frame = FALSE) + tm_layout(frame = FALSE) # bivariate scale tm_shape(World) + tm_polygons(tm_mv(\"inequality\", \"well_being\")) #> Labels abbreviated by the first letters, e.g.: \"2 to 3\" => \"2\""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_pos.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the position of map components — tm_pos","title":"Set the position of map components — tm_pos","text":"Set position map components, legends, title, compass, scale bar, etc. tm_pos() function position components: tm_pos_out() places components outside map area tm_pos_in() inside map area. position argument map layer component specified one functions. functions tm_pos_auto_out() tm_pos_auto_in() used set components automatically, recommended use globally, via tmap_options(). See Details positioning works.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_pos.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the position of map components — tm_pos","text":"","code":"tm_pos(cell.h, cell.v, pos.h, pos.v, align.h, align.v, just.h, just.v) tm_pos_in(pos.h, pos.v, align.h, align.v, just.h, just.v) tm_pos_out(cell.h, cell.v, pos.h, pos.v, align.h, align.v, just.h, just.v) tm_pos_auto_out(cell.h, cell.v, pos.h, pos.v, align.h, align.v, just.h, just.v) tm_pos_auto_in(align.h, align.v, just.h, just.v)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_pos.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the position of map components — tm_pos","text":"cell.h, cell.v plotting area overlaid 3x3 grid, middle grid cell map area. Components can drawn cell. cell.h specifies horizontal position (column) can take values \"left\", \"center\", \"right\". cell.v specifies vertical position (row) can take values \"top\", \"center\", \"bottom\". See details graphical explanation. pos.h, pos.v position component within cell. main options pos.h \"left\", \"center\", \"right\". cell.v \"top\", \"center\", \"bottom\". options can also provided upper case; case offset (see tmap option component.offset). Also numbers 0 1 can provided, determine position component inside cell ((0,0) left bottom). arguments just.h just.v determine justification point. align.h, align.v alignment component case multiple components stacked. stacked horizontally, align.v determines components smaller height available height (determined outer.margins specified otherwise highest component) justified: \"top\", \"center\", \"bottom\". Similarly, align.h determines components justified horizontally stacked vertically: \"left\", \"center\", \"right\". just.h, just.v justification components. used case pos.h pos.v numbers.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_pos.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set the position of map components — tm_pos","text":"tm_pos_in() sets position component(s) inside maps area, equivalent center-center cell (case facets, drawn center-center cell). tm_pos_out() sets position component(s) outside map. amount space top bottom rows, left right columns occupy determined tm_layout() arguments meta.margins meta.auto.margins. former sets relative space bottom, left, top, right side. case set NA, space set automatically based 1) maximum relative space specified meta.auto.margins 2) presence size components cell. instance, one landscape oriented legend center-bottom cell, relative space bottom row set height legend (given smaller corresponding value meta.auto.margins), four sides set 0. tm_pos_auto_out() complex: cell.h cell.v arguments set one four corners. mean components drawn corner. corner represents sides map components drawn. default, legends drawn either bottom right-side map default (see tmap_options(\"legend.position\")). row- column-wise legends general legend (using tm_facets_grid()), general legend drawn corner, practice case rare. arguments pos.h pos.v determine components drawn within cell. , \"left\", \"center\", \"right\" pos.h \"top\", \"center\", \"bottom\" pos.v. values can also specified upper-case, influences offset cell borders, determined tmap option component.offset. default, small offset components drawn inside offset drawn outside upper-case. tm_pos_auto_in() automatically determines pos.h pos.v given available space inside map. similar default positioning tmap3. case multiple components draw cell position inside cell, stacked (determined stack argument legend component function). align.h align.v arguments determine components justified . Note legends components may different facet row column. case tm_facets_grid() tm_facets_stack() applied scales set free (.free argument map layer functions). case legends components draw row- column wise, position legends (components) right next maps, legends (components) aligned maps.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_raster.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: raster — opt_tm_raster","title":"Map layer: raster — opt_tm_raster","text":"Map layer draws rasters. Supported visual variable : col ( color).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_raster.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: raster — opt_tm_raster","text":"","code":"opt_tm_raster() tm_raster( col = tm_shape_vars(), col.scale = tm_scale(value.na = \"#00000000\"), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, zindex = NA, group = NA, group.control = \"check\", options = opt_tm_raster(), ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_raster.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: raster — opt_tm_raster","text":"col, col.scale, col.legend, col.chart, col.free Visual variable determines color. See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.chart, col_alpha.free Visual variable determines alpha transparency. See details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). options options passed corresponding opt_ function ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_raster.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: raster — opt_tm_raster","text":"visual variable arguments (e.g. col) can specified either data variable name (e.g., spatial vector attribute raster layer object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). *.scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_*() functions. default specified tmap option (tm_options()) scales.var. *.legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options (tm_options()) legend. . *.chart arguments specify additional charts, specified tm_chart_, e.g. tm_chart_histogram() *.free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, *.free argument requires one logical value.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_raster.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: raster — opt_tm_raster","text":"","code":"# load land data data(land, World) tm_shape(land) + tm_raster() + tm_facets_hstack() #> stars object downsampled to 540 by 270 cells. #> [scale] tm_raster:() the data variable assigned to 'col' contains positive and negative values, so midpoint is set to 0. Set 'midpoint = NA' in 'fill.scale = tm_scale_intervals()' to use all visual values (e.g. colors) #> Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE #> Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE tm_shape(land) + tm_raster(\"elevation\", col.scale = tm_scale_continuous(values = terrain.colors(9))) + tm_shape(World) + tm_borders() #> Some legend items or map compoments do not fit well (e.g. due to the specified font size). They are rescaled Set the tmap option component.autoscale to FALSE to disable this.FALSE"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_rgb.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: RGB — tm_rgb","title":"Map layer: RGB — tm_rgb","text":"Map layer: RGB","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_rgb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: RGB — tm_rgb","text":"","code":"tm_rgb( col = tm_mv(1:3), col.scale = tm_scale_rgb(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_rgb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: RGB — tm_rgb","text":"col, col.scale, col.legend, col.chart, col.free Visual variable determines col color.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: automatic scale — tm_scale","title":"Scales: automatic scale — tm_scale","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale() scale set automatically given data type (factor, numeric, integer) visual variable. tmap option scales.var contains information scale applied .","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: automatic scale — tm_scale","text":"","code":"tm_scale(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: automatic scale — tm_scale","text":"... arguments passed applied scale function tm_scale_*()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_asis.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: as is — tm_scale_asis","title":"Scales: as is — tm_scale_asis","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_asis() used take data values use visual variable.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_asis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: as is — tm_scale_asis","text":"","code":"tm_scale_asis(values.scale = NA, value.neutral = NA, ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_asis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: as is — tm_scale_asis","text":"values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. ... Arguments caught (used) automatic function tm_scale()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bar.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: scale bar — tm_scale_bar","title":"Map component: scale bar — tm_scale_bar","text":"function renamed tm_scalebar() tmap v4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: scale bar — tm_scale_bar","text":"","code":"tm_scale_bar(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: scale bar — tm_scale_bar","text":"... Arguments passed tm_scalebar breaks breaks width width text.size text.size text.color text.color color.dark color.dark color.light color.light lwd lwd position position bg.color bg.color bg.alpha bg.alpha size size stack stack frame frame frame.lwd frame.lwd frame.r frame.r margins margins z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bivariate.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: bivariate scale — tm_scale_bivariate","title":"Scales: bivariate scale — tm_scale_bivariate","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_bivariate() used bivariate.scales.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bivariate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: bivariate scale — tm_scale_bivariate","text":"","code":"tm_scale_bivariate( scale1 = tm_scale(), scale2 = tm_scale(), values = NA, values.repeat = FALSE, values.range = NA, values.scale = 1, value.na = NA, value.null = NA, value.neutral = NA, labels = NULL, label.na = NA, label.null = NA )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bivariate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: bivariate scale — tm_scale_bivariate","text":"scale1, scale2 two tm_scale objects. Currently, tm_scale_*() functions supported except tm_scale_continous(). values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols()) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols()) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, grey scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark grey light grey used (precisely \"grey25\" \"grey75\"), 0, 0.5 means colors used black middle grey (\"grey50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_categorical.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: categorical and ordinal scale — tm_scale_ordinal","title":"Scales: categorical and ordinal scale — tm_scale_ordinal","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). functions tm_scale_categorical() tm_scale_ordinal() used categorical data. difference functions former assumes unordered categories whereas latter assumes ordered categories. colors (visual variable fill col), different default color palettes used (see tmap option values.var).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_categorical.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: categorical and ordinal scale — tm_scale_ordinal","text":"","code":"tm_scale_ordinal( n.max = 30, values = NA, values.repeat = FALSE, values.range = 1, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, levels = NULL, levels.drop = FALSE, labels = NULL, label.na = NA, label.null = NA, label.format = list() ) tm_scale_categorical( n.max = 30, values = NA, values.repeat = TRUE, values.range = NA, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, levels = NULL, levels.drop = FALSE, labels = NULL, label.na = NA, label.null = NA, label.format = list() )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_categorical.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: categorical and ordinal scale — tm_scale_ordinal","text":"n.max Maximum number categories (factor levels). case , grouped n.max groups. values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols()) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols()) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, gray scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark gray light gray used (precisely \"grey25\" \"grey75\"), 0, 0.5 means colors used black middle gray (\"gray50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. levels Levels show. values treated missing. levels.drop unused levels dropped (therefore assigned visual value shown legend)? labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values label.format (generic scale argument) Label formatting (similar legend.format tmap3)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_continuous.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: continuous scale — tm_scale_continuous","title":"Scales: continuous scale — tm_scale_continuous","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_continuous() used continuous data. functions tm_scale_continuous_() use transformation functions x.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_continuous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: continuous scale — tm_scale_continuous","text":"","code":"tm_scale_continuous( n = NULL, limits = NULL, outliers.trunc = NULL, ticks = NULL, trans = NULL, midpoint = NULL, values = NA, values.repeat = FALSE, values.range = NA, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, labels = NULL, label.na = NA, label.null = NA, label.format = list() ) tm_scale_continuous_log(...) tm_scale_continuous_log1p(...) tm_scale_continuous_sqrt(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_continuous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: continuous scale — tm_scale_continuous","text":"n Preferred number tick labels. used ticks specified limits Limits data values mapped continuous scale outliers.trunc outliers truncated? outlier data value respectively lower upper limit. logical vector two values expected. first second value determines whether values lower lower limit respectively higher upper limit truncated lower respectively upper limit. FALSE (default), considered missing values. ticks Tick values. specified, determined automatically n trans Transformation function. One \"identity\" (default), \"log\", \"log1p\". Note: base log scale irrelevant, since log transformed values normalized mapping visual values. midpoint data value interpreted midpoint. default set 0 negative positive values present. Useful values diverging colors. case, two sides color palette assigned negative respectively positive values. values positive values negative, midpoint set NA, means value corresponds middle color class (see style) mapped middle color. specified sequential color palettes (e.g. \"Blues\"), color palette treated diverging color palette. values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols()) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols()) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values, especially useful color palettes. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, gray scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark gray light gray used (precisely \"grey25\" \"grey75\"), 0, 0.5 means colors used black middle gray (\"grey50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values label.format (generic scale argument) Label formatting (similar legend.format tmap3) ... passed tm_scale_continuous","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_discrete.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: discrete scale — tm_scale_discrete","title":"Scales: discrete scale — tm_scale_discrete","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_discrete() used discrete numerical data, integers.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_discrete.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: discrete scale — tm_scale_discrete","text":"","code":"tm_scale_discrete( ticks = NA, midpoint = NULL, values = NA, values.repeat = FALSE, values.range = NA, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, labels = NULL, label.na = NA, label.null = NA, label.format = list() )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_discrete.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: discrete scale — tm_scale_discrete","text":"ticks Discrete values. specified, determined automatically: unique values put discrete scale. midpoint data value interpreted midpoint. default set 0 negative positive values present. Useful values diverging colors. case, two sides color palette assigned negative respectively positive values. values positive values negative, midpoint set NA, means value corresponds middle color class (see style) mapped middle color. specified sequential color palettes (e.g. \"Blues\"), color palette treated diverging color palette. values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols()) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, gray scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark gray light gray used (precisely \"grey25\" \"grey75\"), 0, 0.5 means colors used black middle grey (\"grey50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values label.format (generic scale argument) Label formatting (similar legend.format tmap3)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_intervals.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: interval scale — tm_scale_intervals","title":"Scales: interval scale — tm_scale_intervals","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_interval() used numerical data.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_intervals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: interval scale — tm_scale_intervals","text":"","code":"tm_scale_intervals( n = 5, style = ifelse(is.null(breaks), \"pretty\", \"fixed\"), style.args = list(), breaks = NULL, interval.closure = \"left\", midpoint = NULL, as.count = NA, values = NA, values.repeat = FALSE, values.range = NA, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, labels = NULL, label.na = NA, label.null = NA, label.format = list() )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_intervals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: interval scale — tm_scale_intervals","text":"n Number intervals. styles (see argument style ) preferred number rather exact number. style Method create intervals. Options \"cat\", \"fixed\", \"sd\", \"equal\", \"pretty\", \"quantile\", \"kmeans\", \"hclust\", \"bclust\", \"fisher\", \"jenks\", \"dpih\", \"headtails\", \"log10_pretty\". See details classInt::classIntervals() (extra arguments can passed via style.args). style.args List extra arguments passed classInt::classIntervals(). breaks Interval breaks (used required style==\"fixed\") interval.closure value determines whether intervals closed: \"left\" \"right\". .count = TRUE, inverval.closure always set \"left\". midpoint data value interpreted midpoint. default set 0 negative positive values present. Useful values diverging colors. case, two sides color palette assigned negative respectively positive values. values positive values negative, midpoint set NA, means value corresponds middle color class (see style) mapped middle color. specified sequential color palettes (e.g. \"Blues\"), color palette treated diverging color palette. .count data variable processed count variable? instance, style = \"pretty\", n = 2, value range variable 0 10, column classes .count = TRUE 0; 1 5; 6 10 (note 0 regarded category) whereas .count = FALSE 0 5; 5 10. applicable style \"pretty\", \"fixed\", \"log10_pretty\". default, TRUE style one , variable integer. values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, gray scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark gray light gray used (precisely \"gray25\" \"gray75\"), 0, 0.5 means colors used black middle grey (\"grey50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values label.format (generic scale argument) Label formatting (similar legend.format tmap3)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rank.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: rank scale — tm_scale_rank","title":"Scales: rank scale — tm_scale_rank","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_rank() used rank numeric data.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rank.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: rank scale — tm_scale_rank","text":"","code":"tm_scale_rank( n = NULL, ticks = NULL, values = NA, values.repeat = FALSE, values.range = NA, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, labels = NULL, label.na = NA, label.null = NA, label.format = list(), unit = \"rank\" )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rank.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: rank scale — tm_scale_rank","text":"n Preferred number tick labels. used ticks specified ticks Tick values. specified, determined automatically n values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols()) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols()) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values, especially useful color palettes. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, gray scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark gray light gray used (precisely \"grey25\" \"grey75\"), 0, 0.5 means colors used black middle gray (\"grey50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values label.format (generic scale argument) Label formatting (similar legend.format tmap3) unit unit unit name values. default \"rank\".","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rgb.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: RGB — tm_scale_rgb","title":"Scales: RGB — tm_scale_rgb","text":"Scales: RGB","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rgb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: RGB — tm_scale_rgb","text":"","code":"tm_scale_rgb(value.na = NA, maxValue = 255)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rgb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: RGB — tm_scale_rgb","text":"value.na value missing values maxValue maximum value","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scalebar.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: scale bar — tm_scalebar","title":"Map component: scale bar — tm_scalebar","text":"Map component adds scale bar. version 4.0, tm_scalebar() used instead tm_scale_bar() (now deprecated), potential confusion tm_scale_*() scaling functions (like tm_scale_continuous()).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scalebar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: scale bar — tm_scalebar","text":"","code":"tm_scalebar( breaks, width, text.size, text.color, color.dark, color.light, lwd, position, bg.color, bg.alpha, size = \"deprecated\", stack, frame, frame.lwd, frame.r, margins, z )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scalebar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: scale bar — tm_scalebar","text":"breaks breaks width width text.size text.size text.color text.color color.dark color.dark color.light color.light lwd lwd position position bg.color bg.color bg.alpha bg.alpha size size stack stack frame frame frame.lwd frame.lwd frame.r frame.r margins margins z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: simple features — opt_tm_sf","title":"Map layer: simple features — opt_tm_sf","text":"Map layer draws simple features . Supported visual variables : fill (fill color), col (border color), size point size, shape symbol shape, lwd (line width), lty (line type), fill_alpha (fill color alpha transparency) col_alpha (border color alpha transparency).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: simple features — opt_tm_sf","text":"","code":"opt_tm_sf( polygons.only = \"yes\", lines.only = \"yes\", points.only = \"yes\", points.icon.scale = 3, points.just = NA, points.grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) tm_sf( fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.free = NA, size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.free = NA, shape = tm_const(), shape.scale = tm_scale(), shape.legend = tm_legend(), shape.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.free = NA, linejoin = \"round\", lineend = \"round\", plot.order.list = list(polygons = tm_plot_order(\"AREA\"), lines = tm_plot_order(\"LENGTH\"), points = tm_plot_order(\"size\")), options = opt_tm_sf(), zindex = NA, group = NA, group.control = \"check\", ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: simple features — opt_tm_sf","text":"polygons., lines., points., points.icon.scale, points.just, points.grob.dim See opt_tm_polygons(), opt_tm_lines() opt_tm_symbols() fill, fill.scale, fill.legend, fill.free Visual variable determines fill color. See details. col, col.scale, col.legend, col.free Visual variable determines col color. See details. size, size.scale, size.legend, size.free Visual variable determines size. See details. shape, shape.scale, shape.legend, shape.free Visual variable determines shape. See details. lwd, lwd.scale, lwd.legend, lwd.free Visual variable determines line width. See details. lty, lty.scale, lty.legend, lty.free Visual variable determines line type. See details. fill_alpha, fill_alpha.scale, fill_alpha.legend, fill_alpha.free Visual variable determines fill color alpha transparency See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.free Visual variable determines border color alpha transparency. See details. linejoin, lineend line join line end. See gpar() details. plot.order.list Specification order spatial features drawn. consists list three elementary geometry types: polygons, lines , points. types, drawn order, tm_plot_order() required. options options passed corresponding opt_ function zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control). group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). ... passed tm_polygons(), tm_lines(), tm_dots()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_sf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: simple features — opt_tm_sf","text":"visual variable arguments (e.g. col) can specified either data variable name (object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). .scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_() functions. default scale used specified tmap option scales.var. .legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options legend.. .free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, .free argument requires one logical value.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_sf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: simple features — opt_tm_sf","text":"","code":"data(World) World$geometry[World$continent == \"Africa\"] <- sf::st_centroid(World$geometry[World$continent == \"Africa\"]) World$geometry[World$continent == \"South America\"] <- sf::st_cast(World$geometry[World$continent == \"South America\"], \"MULTILINESTRING\", group_or_split = FALSE) tm_shape(World, crs = \"+proj=robin\") + tm_sf()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape.html","id":null,"dir":"Reference","previous_headings":"","what":"Shape (spatial object) specification — tm_shape","title":"Shape (spatial object) specification — tm_shape","text":"Specify shape, spatial object one spatial object class packages: sf, stars, terra.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shape (spatial object) specification — tm_shape","text":"","code":"tm_shape( shp, bbox = NULL, crs = NULL, is.main = NA, name = NULL, unit = NULL, filter = NULL, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shape (spatial object) specification — tm_shape","text":"shp Spatial object bbox Bounding box map (used .main = TRUE) crs CRS shp reprojected (used .main = TRUE) .main shp main shape, determines crs bounding box map? name Name shape unit Unit coordinates filter Filter features ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shape (spatial object) specification — tm_shape","text":"","code":"tm_shape(World, crs = \"+proj=robin\", filter = World$continent==\"Africa\") + tm_polygons()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"tmap function to specify all variables in the shape object — tm_shape_vars","title":"tmap function to specify all variables in the shape object — tm_shape_vars","text":"tmap function specify variables shape object","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"tmap function to specify all variables in the shape object — tm_shape_vars","text":"","code":"tm_shape_vars()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_symbols.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: symbols — opt_tm_symbols","title":"Map layer: symbols — opt_tm_symbols","text":"Map layer draws symbols Supported visual variables : fill (fill color), col (border color), size symbol size, shape symbol shape, lwd (line width), lty (line type), fill_alpha (fill color alpha transparency) col_alpha (border color alpha transparency).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_symbols.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: symbols — opt_tm_symbols","text":"","code":"opt_tm_symbols( points.only = \"ifany\", icon.scale = 3, just = NA, grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) opt_tm_dots( points.only = \"ifany\", icon.scale = 3, just = NA, grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) opt_tm_bubbles( points.only = \"ifany\", icon.scale = 3, just = NA, grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) opt_tm_squares( points.only = \"ifany\", icon.scale = 3, just = NA, grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) tm_symbols( size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.chart = tm_chart_none(), size.free = NA, fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.chart = tm_chart_none(), fill.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, shape = tm_const(), shape.scale = tm_scale(), shape.legend = tm_legend(), shape.chart = tm_chart_none(), shape.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.chart = tm_chart_none(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.chart = tm_chart_none(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.chart = tm_chart_none(), fill_alpha.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, plot.order = tm_plot_order(\"size\"), zindex = NA, group = NA, group.control = \"check\", popup.vars = NA, popup.format = list(), hover = \"\", id = \"\", options = opt_tm_symbols(), ... ) tm_dots( fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.free = NA, size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.free = NA, plot.order = tm_plot_order(\"size\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_dots(), ... ) tm_bubbles( size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.free = NA, fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.free = NA, plot.order = tm_plot_order(\"size\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_bubbles(), ... ) tm_squares( size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.free = NA, fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.free = NA, plot.order = tm_plot_order(\"size\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_squares(), ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_symbols.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: symbols — opt_tm_symbols","text":"points.point geometries shape object (defined tm_shape()) plotted? default \"ifany\", means TRUE case geometry collection specified. icon.scale scaling number determines large icons (grobs) plot mode comparison proportional symbols (bubbles). view mode, use argument grob.dim just justification text relative point coordinates. Either one following values: \"left\" , \"right\", \"center\", \"bottom\", \"top\", vector two values first value specifies horizontal second value vertical justification. Besides mentioned values, also numeric values 0 1 can used. 0 means left justification first value bottom justification second value. Note view mode, one value used. grob.dim vector four values determine grob objects (see details) shown view mode. first second value width height displayed icon. third fourth value width height rendered png image used icon. Generally, third fourth value large enough render ggplot2 graphic successfully. needed view mode. size, size.scale, size.legend, size.chart, size.free Visual variable determines size. See details. fill, fill.scale, fill.legend, fill.chart, fill.free Visual variable determines fill color. See details. col, col.scale, col.legend, col.chart, col.free Visual variable determines col color. See details. shape, shape.scale, shape.legend, shape.chart, shape.free Visual variable determines shape. See details. lwd, lwd.scale, lwd.legend, lwd.chart, lwd.free Visual variable determines line width. See details. lty, lty.scale, lty.legend, lty.chart, lty.free Visual variable determines line type. See details. fill_alpha, fill_alpha.scale, fill_alpha.legend, fill_alpha.chart, fill_alpha.free Visual variable determines fill color alpha transparency See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.chart, col_alpha.free Visual variable determines border color alpha transparency. See details. plot.order Specification order spatial features drawn. See tm_plot_order() details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). popup.vars names data variables shown popups \"view\" mode. Set popup.vars TRUE show variables shape object. Set popup.vars FALSE disable popups. Set popup.vars character vector variable names variables popups. default (NA) depends whether visual variables (e.g.col) used. , shown. variables shape object shown. popup.format list formatting options popup values. See argument legend.format options. applicable numeric data variables. one list formatting options provided, applied numeric variables popup.vars. Also, (named) list lists can provided. case, list formatting options applied named variable. hover name data variable specifies hover labels id name data variable specifies indices spatial features. used \"view\" mode. options options passed corresponding opt_ function ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_symbols.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: symbols — opt_tm_symbols","text":"visual variable arguments (e.g. col) can specified either data variable name (e.g., spatial vector attribute raster layer object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). *.scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_*() functions. default specified tmap option (tm_options()) scales.var. *.legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options (tm_options()) legend. . *.chart arguments specify additional charts, specified tm_chart_, e.g. tm_chart_histogram() *.free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, *.free argument requires one logical value. symbol shape specification one following three options. numeric value specifies plotting character symbol. See parameter pch points last example create plot options. Note supported \"view\" mode. grob object, can ggplot2 plot object created ggplotGrob. specify multiple shapes, list grob objects required. See example proportional symbol map ggplot2 plots. icon specification, can created tmap_icons. specify multiple shapes (needed shapes argument), vector list shape specification required. shape specification options can also mixed. shapes argument, possible use named vector list, names correspond value variable specified shape argument. small multiples, list shape specification(s) provided.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_symbols.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: symbols — opt_tm_symbols","text":"","code":"metroAfrica = sf::st_intersection(metro, World[World$continent == \"Africa\", ]) #> Warning: attribute variables are assumed to be spatially constant throughout all geometries Africa = World[World$continent == \"Africa\", ] tm_shape(land) + tm_raster(\"cover_cls\", col.scale = tm_scale( values = cols4all::c4a(\"brewer.pastel1\")[c(3,7,7,2,6,1,2,2)] ), col.legend = tm_legend_hide()) + tm_shape(rivers) + tm_lines(lwd = \"strokelwd\", lwd.scale = tm_scale_asis(values.scale = .3), col = cols4all::c4a(\"brewer.pastel1\")[2]) + tm_shape(Africa, is.main = TRUE) + tm_borders() + tm_shape(metroAfrica) + tm_symbols(fill = \"red\", shape = \"pop2020\", size = \"pop2020\", size.scale = tm_scale_intervals( breaks = c(1, 2, 5, 10, 15, 20, 25) * 1e6, values.range = c(0.2,2) ), size.legend = tm_legend(\"Population in 2020\"), shape.scale = tm_scale_intervals( breaks = c(1, 2, 5, 10, 15, 20, 25) * 1e6, values = c(21, 23, 22, 21, 23, 22) ), shape.legend = tm_legend_combine(\"size\")) + tm_labels(\"name\", options = opt_tm_labels(remove.overlap = FALSE)) ######################## ## plot symbol shapes ######################## # create grid of 25 points in the Athlantic library(sf) #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE x = st_as_sf(cbind(expand.grid(x = -51:-47, y = 20:24), id = seq_len(25)), coords = c(\"x\", \"y\"), crs = 4326) tm_shape(x, bbox = bb(x, ext = 1.2)) + tm_symbols(shape = \"id\", size = 2, lwd = 2, fill = \"orange\", col = \"black\", shape.scale = tm_scale_asis()) + tm_text(\"id\", ymod = -2) #> Error in bb(x, ext = 1.2): could not find function \"bb\" # also supported in view mode :-)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_text.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: text — opt_tm_text","title":"Map layer: text — opt_tm_text","text":"Map layer draws symbols Supported visual variables : text (text ) col (color), size (font size), fontface (font face).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_text.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: text — opt_tm_text","text":"","code":"opt_tm_text( points.only = \"ifany\", shadow = FALSE, shadow.offset.x = 0.1, shadow.offset.y = 0.1, just = \"center\", along.lines = FALSE, bg.padding = 0.4, clustering = FALSE, point.label = FALSE, point.label.gap = 0, point.label.method = \"SANN\", remove.overlap = FALSE ) opt_tm_labels( points.only = \"ifany\", shadow = FALSE, shadow.offset.x = 0.1, shadow.offset.y = 0.1, just = \"center\", along.lines = TRUE, bg.padding = 0.4, clustering = TRUE, point.label = TRUE, point.label.gap = 0.4, point.label.method = \"SANN\", remove.overlap = FALSE ) opt_tm_markers( markers.on.top.of.text = FALSE, points.only = \"ifany\", shadow = FALSE, just = \"center\", along.lines = TRUE, bg.padding = 0.4, clustering = TRUE, point.label = TRUE, point.label.gap = 0.4, point.label.method = \"SANN\", remove.overlap = FALSE, dots.just = NA, dots.icon.scale = 3, dots.grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) tm_text( text = tm_const(), text.scale = tm_scale(), text.legend = tm_legend(), text.chart = tm_chart_none(), text.free = NA, size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.chart = tm_chart_none(), size.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, fontface = tm_const(), fontface.scale = tm_scale(), fontface.legend = tm_legend(), fontface.chart = tm_chart_none(), fontface.free = NA, fontfamily = \"\", bgcol = tm_const(), bgcol.scale = tm_scale(), bgcol.legend = tm_legend(), bgcol.chart = tm_chart_none(), bgcol.free = NA, bgcol_alpha = tm_const(), bgcol_alpha.scale = tm_scale(), bgcol_alpha.legend = tm_legend(), bgcol_alpha.chart = tm_chart_none(), bgcol_alpha.free = NA, xmod = 0, xmod.scale = tm_scale(), xmod.legend = tm_legend_hide(), xmod.chart = tm_chart_none(), xmod.free = NA, ymod = 0, ymod.scale = tm_scale(), ymod.legend = tm_legend_hide(), ymod.chart = tm_chart_none(), ymod.free = NA, angle = 0, angle.scale = tm_scale(), angle.legend = tm_legend_hide(), angle.chart = tm_chart_none(), angle.free = NA, plot.order = tm_plot_order(\"AREA\", reverse = FALSE, na.order = \"bottom\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_text(), ... ) tm_labels( text = tm_const(), text.scale = tm_scale(), text.legend = tm_legend(), text.chart = tm_chart_none(), text.free = NA, size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.chart = tm_chart_none(), size.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, fontface = tm_const(), fontface.scale = tm_scale(), fontface.legend = tm_legend(), fontface.chart = tm_chart_none(), fontface.free = NA, fontfamily = \"\", bgcol = tm_const(), bgcol.scale = tm_scale(), bgcol.legend = tm_legend(), bgcol.chart = tm_chart_none(), bgcol.free = NA, bgcol_alpha = tm_const(), bgcol_alpha.scale = tm_scale(), bgcol_alpha.legend = tm_legend(), bgcol_alpha.chart = tm_chart_none(), bgcol_alpha.free = NA, xmod = 0, xmod.scale = tm_scale(), xmod.legend = tm_legend_hide(), xmod.chart = tm_chart_none(), xmod.free = NA, ymod = 0, ymod.scale = tm_scale(), ymod.legend = tm_legend_hide(), ymod.chart = tm_chart_none(), ymod.free = NA, angle = 0, angle.scale = tm_scale(), angle.legend = tm_legend_hide(), angle.chart = tm_chart_none(), angle.free = NA, plot.order = tm_plot_order(\"AREA\", reverse = FALSE, na.order = \"bottom\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_labels(), ... ) tm_markers( text = tm_const(), text.scale = tm_scale(), text.legend = tm_legend(), text.chart = tm_chart_none(), text.free = NA, size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.chart = tm_chart_none(), size.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, fontface = tm_const(), fontface.scale = tm_scale(), fontface.legend = tm_legend(), fontface.chart = tm_chart_none(), fontface.free = NA, fontfamily = \"\", bgcol = tm_const(), bgcol.scale = tm_scale(), bgcol.legend = tm_legend(), bgcol.chart = tm_chart_none(), bgcol.free = NA, bgcol_alpha = tm_const(), bgcol_alpha.scale = tm_scale(), bgcol_alpha.legend = tm_legend(), bgcol_alpha.chart = tm_chart_none(), bgcol_alpha.free = NA, xmod = 0, xmod.scale = tm_scale(), xmod.legend = tm_legend_hide(), xmod.chart = tm_chart_none(), xmod.free = NA, ymod = 0, ymod.scale = tm_scale(), ymod.legend = tm_legend_hide(), ymod.chart = tm_chart_none(), ymod.free = NA, angle = 0, angle.scale = tm_scale(), angle.legend = tm_legend_hide(), angle.chart = tm_chart_none(), angle.free = NA, plot.order = tm_plot_order(\"AREA\", reverse = FALSE, na.order = \"bottom\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_markers(), ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_text.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: text — opt_tm_text","text":"points.point geometries shape object (defined tm_shape()) plotted? default \"ifany\", means TRUE case geometry collection specified. shadow Shadow behind text. Logical color. shadow.offset.x, shadow.offset.y Shadow offset line heights just justification text relative point coordinates. Either one following values: \"left\" , \"right\", \"center\", \"bottom\", \"top\", vector two values first value specifies horizontal second value vertical justification. Besides mentioned values, also numeric values 0 1 can used. 0 means left justification first value bottom justification second value. Note view mode, one value used. along.lines logical determines whether labels rotated along spatial lines. applicable spatial lines shape used. bg.padding padding background terms line heights. clustering value determines whether text labels clustered \"view\" mode. One : TRUE, FALSE, output markerClusterOptions. point.label logical determines whether labels placed automatically. point.label.gap numeric determines gap point label point.label.method optimization method, either \"SANN\" simulated annealing (default) \"GA\" genetic algorithm. remove.overlap logical determines whether overlapping labels removed markers..top..text markers plot top text (default FALSE) dots.just justification text relative point coordinates. Either one following values: \"left\" , \"right\", \"center\", \"bottom\", \"top\", vector two values first value specifies horizontal second value vertical justification. Besides mentioned values, also numeric values 0 1 can used. 0 means left justification first value bottom justification second value. Note view mode, one value used. dots.icon.scale scaling number determines large icons (grobs) plot mode comparison proportional symbols (bubbles). view mode, size determined icon specification (see tmap_icons) , grobs specified grob.width grob.heigth dots.grob.dim vector four values determine grob objects (see details) shown view mode. first second value width height displayed icon. third fourth value width height rendered png image used icon. Generally, third fourth value large enough render ggplot2 graphic successfully. needed view mode. text, text.scale, text.legend, text.chart, text.free Visual variable determines text. See details. size, size.scale, size.legend, size.chart, size.free Visual variable determines font size. See details. col, col.scale, col.legend, col.chart, col.free Visual variable determines col color. See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.chart, col_alpha.free Visual variable determines border color alpha transparency. See Details. fontface, fontface.scale, fontface.legend, fontface.chart, fontface.free Visual variable determines font face. See Details. fontfamily font family. See gpar() details. bgcol, bgcol.scale, bgcol.legend, bgcol.chart, bgcol.free Visual variable determines background color. See Details. bgcol_alpha, bgcol_alpha.scale, bgcol_alpha.legend, bgcol_alpha.chart, bgcol_alpha.free Visual variable determines background color transparency. See Details. xmod, xmod.scale, xmod.legend, xmod.chart, xmod.free Transformation variable determines x offset. See details. ymod, ymod.scale, ymod.legend, ymod.chart, ymod.free Transformation variable determines y offset. See details. text. See details. angle, angle.scale, angle.legend, angle.chart, angle.free Rotation angle plot.order Specification order spatial features drawn. See tm_plot_order() details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). options options passed corresponding opt_ function ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_text.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: text — opt_tm_text","text":"visual variable arguments (e.g. col) can specified either data variable name (object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). .scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_() functions. default scale used specified tmap option scales.var. .legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options legend.. .free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, .free argument requires one logical value.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_text.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: text — opt_tm_text","text":"","code":"tm_shape(World, bbox = World) + tm_text(\"name\", size=\"pop_est\", col=\"continent\", col.scale = tm_scale_categorical(values = \"seaborn.dark\"), col.legend = tm_legend_hide(), size.scale = tm_scale_continuous(values.scale = 4), size.legend = tm_legend_hide()) metro$upside_down = ifelse(sf::st_coordinates(metro)[,2] < 0, 180, 0) tm_shape(metro) + tm_text(text = \"name\", size = \"pop2020\", angle = \"upside_down\", size.legend = tm_legend_hide(), col = \"upside_down\", col.scale = tm_scale_categorical(values = c(\"#9900BB\", \"#228822\")), col.legend = tm_legend_hide()) + tm_title_out(\"Which Hemisphere?\", position = tm_pos_out(\"center\", \"top\", pos.v = \"bottom\")) metroAfrica = sf::st_intersection(metro, World[World$continent == \"Africa\", ]) #> Warning: attribute variables are assumed to be spatially constant throughout all geometries Africa = World[World$continent == \"Africa\", ] tm_shape(land) + tm_raster(\"cover_cls\", col.scale = tm_scale( values = cols4all::c4a(\"brewer.pastel1\")[c(3,7,7,2,6,1,2,2)] ), col.legend = tm_legend_hide()) + tm_shape(rivers) + tm_lines(lwd = \"strokelwd\", lwd.scale = tm_scale_asis(values.scale = .3), col = cols4all::c4a(\"brewer.pastel1\")[2]) + tm_shape(Africa, is.main = TRUE) + tm_borders() + tm_shape(metroAfrica) + tm_symbols(fill = \"red\", shape = \"pop2020\", size = \"pop2020\", size.scale = tm_scale_intervals( breaks = c(1, 2, 5, 10, 15, 20, 25) * 1e6, values.range = c(0.2,2) ), size.legend = tm_legend(\"Population in 2020\"), shape.scale = tm_scale_intervals( breaks = c(1, 2, 5, 10, 15, 20, 25) * 1e6, values = c(21, 23, 22, 21, 23, 22) ), shape.legend = tm_legend_combine(\"size\")) + tm_labels(\"name\") tm_shape(metroAfrica) + tm_markers(text = \"name\", dots_fill = \"red\", dots_size = 0.3) tm_shape(metroAfrica) + tm_markers(text = \"name\", dots_shape = marker_icon(), dots_col = NA, dots_fill = \"red\", dots_size = 2, ymod = -0.25, options = opt_tm_markers(point.label = FALSE, remove.overlap = TRUE))"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_title.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: title — tm_title","title":"Map component: title — tm_title","text":"Map component adds title","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_title.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: title — tm_title","text":"","code":"tm_title( text, size, color, padding, fontface, fontfamily, stack, just, frame, frame.lwd, frame.r, bg.color, bg.alpha, position, width, height, group.frame, resize.as.group, z ) tm_title_in(text, ..., position = tm_pos_in(\"left\", \"top\")) tm_title_out(text, ..., position = tm_pos_out(\"center\", \"top\"))"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_title.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: title — tm_title","text":"text text title size font size title color font color title padding padding fontface font face, bold, italic fontfamily font family stack stack just just frame frame frame.lwd frame line width frame.r frame.r bg.color Background color bg.alpha Background transparency position position width, height width height title box. group.frame group.frame resize..group resize..group z z ... passed tm_title()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_view.html","id":null,"dir":"Reference","previous_headings":"","what":"View mode options — tm_view","title":"View mode options — tm_view","text":"View mode options. options specific view mode.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_view.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"View mode options — tm_view","text":"","code":"tm_view( use.WebGL, control.position, control.bases, control.overlays, set.bounds, set.view, set.zoom.limits, leaflet.options )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_view.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"View mode options — tm_view","text":"use.WebGL use webGL layers leafgl control.position position control attribute control.bases base layers control.overlays overlay layers set.bounds logical determines whether maximum bounds set, bounding box. applicable plot mode. view mode, passed setMaxBounds() set.view numeric vector determines view. Either vector three: lng, lat, zoom, single value: zoom. See setView(). applicable bbox specified set.zoom.limits numeric vector two set minimum maximum zoom levels (see tileOptions()). leaflet.options options passed leafletOptions()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_xlab.html","id":null,"dir":"Reference","previous_headings":"","what":"Map: x and y labels — tm_xlab","title":"Map: x and y labels — tm_xlab","text":"x y labels maps","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_xlab.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map: x and y labels — tm_xlab","text":"","code":"tm_xlab(text, size, color, rotation, space, fontface, fontfamily, side) tm_ylab(text, size, color, rotation, space, fontface, fontfamily, side)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_xlab.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map: x and y labels — tm_xlab","text":"text text title size font size title color color rotation rotation degrees space space label map number line heights fontface font face fontfamily font family side side: \"top\" \"bottom\" tm_xlab \"left\" \"right\" tm_ylab","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-element.html","id":null,"dir":"Reference","previous_headings":"","what":"Stacking of tmap elements — tmap-element","title":"Stacking of tmap elements — tmap-element","text":"plus operator allows stack tmap elements (functions prefix tm_)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-element.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stacking of tmap elements — tmap-element","text":"","code":"# S3 method for tmap +(e1, e2)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-element.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stacking of tmap elements — tmap-element","text":"e1 first tmap element e2 second tmap element","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Thematic Map Visualization — tmap-package","title":"Thematic Map Visualization — tmap-package","text":"Thematic maps geographical maps spatial data distributions visualized. package offers flexible, layer-based, easy use approach create thematic maps, choropleths bubble maps. based grammar graphics, resembles syntax ggplot2.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Thematic Map Visualization — tmap-package","text":"page provides brief overview package functions. See vignette(\"tmap_sneak_peek\") short introduction examples.","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-package.html","id":"main-plotting-method","dir":"Reference","previous_headings":"","what":"Main plotting method","title":"Thematic Map Visualization — tmap-package","text":"Shape specification: Aesthetics base layers: Aesthetics derived layers: Faceting (small multiples) Attributes: Layout element: Change options: Create icons:","code":""},{"path":[]},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Thematic Map Visualization — tmap-package","text":"Tennekes, M., 2018, tmap: Thematic Maps R, Journal Statistical Software, 84(6), 1-39, doi:10.18637/jss.v084.i06","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Thematic Map Visualization — tmap-package","text":"Martijn Tennekes mtennekes@gmail.com","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapAddLayerOptions.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal tmap function to add a default value for the layer functions — tmapAddLayerOptions","title":"Internal tmap function to add a default value for the layer functions — tmapAddLayerOptions","text":"Internal tmap function add default value layer functions","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapAddLayerOptions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal tmap function to add a default value for the layer functions — tmapAddLayerOptions","text":"","code":"tmapAddLayerOptions(option, id, value)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapAddLayerOptions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal tmap function to add a default value for the layer functions — tmapAddLayerOptions","text":"option, one : \"value.const\", \"value.na\", \"value.blank\", \"values.var\", 'values.range', \"value.neutral\", \"scales.var\" id name visual variable layer, format \"x.y\", x visual variable y layer. also possible set x ; applies layer functions. value value","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta1.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method that extracts meta data from shape objects — tmapGetShapeMeta1","title":"Internal method that extracts meta data from shape objects — tmapGetShapeMeta1","text":"Internal method extracts meta data shape objects","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method that extracts meta data from shape objects — tmapGetShapeMeta1","text":"","code":"tmapGetShapeMeta1(shp, o)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method that extracts meta data from shape objects — tmapGetShapeMeta1","text":"shp shape object o list options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta2.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method that extracts more meta data from shape objects — tmapGetShapeMeta2","title":"Internal method that extracts more meta data from shape objects — tmapGetShapeMeta2","text":"Internal method extracts meta data shape objects","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method that extracts more meta data from shape objects — tmapGetShapeMeta2","text":"","code":"tmapGetShapeMeta2(shp, smeta, o)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method that extracts more meta data from shape objects — tmapGetShapeMeta2","text":"shp shape smeta meta (tmapGetShapeMeta1) o list options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapMode.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method for submitting a new mode — tmapMode","title":"Internal method for submitting a new mode — tmapMode","text":"Internal method submitting new mode","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapMode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method for submitting a new mode — tmapMode","text":"","code":"tmapMode(id, name, ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapMode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method for submitting a new mode — tmapMode","text":"id id mode: please use lowercase one-word. used tmap_mode(). name name mode: please use title case. used recognize internal functions, e.g. tmapLeafletInit ... mode specific options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapShape.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method that processed shape objects — tmapShape","title":"Internal method that processed shape objects — tmapShape","text":"Internal method processed shape objects","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapShape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method that processed shape objects — tmapShape","text":"","code":"tmapShape(shp, is.main, crs, bbox, unit, filter, shp_name, smeta, o, tmf)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapShape.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method that processed shape objects — tmapShape","text":"shp shp .main .main crs crs bbox bbox unit unit filter filter shp_name shp_name smeta smeta o o tmf tmf","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSplitShp.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method that split shape objects — tmapSplitShp","title":"Internal method that split shape objects — tmapSplitShp","text":"Internal method split shape objects. far, used split stars object (dimension attributes)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSplitShp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method that split shape objects — tmapSplitShp","text":"","code":"tmapSplitShp(shp, split_stars_dim)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSplitShp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method that split shape objects — tmapSplitShp","text":"shp shape split_stars_dim name dimension split (\"\" skip)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSubsetShp.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method that subsets data from shape objects — tmapSubsetShp","title":"Internal method that subsets data from shape objects — tmapSubsetShp","text":"Internal method subsets data shape objects","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSubsetShp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method that subsets data from shape objects — tmapSubsetShp","text":"","code":"tmapSubsetShp(shp, vars)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSubsetShp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method that subsets data from shape objects — tmapSubsetShp","text":"shp shape vars vector variable names","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_animation.html","id":null,"dir":"Reference","previous_headings":"","what":"Create animation — tmap_animation","title":"Create animation — tmap_animation","text":"Create gif animation video tmap plot.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_animation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create animation — tmap_animation","text":"","code":"tmap_animation( tm, filename = NULL, width = NA, height = NA, dpi = NA, delay = 40, fps = NA, loop = TRUE, outer.margins = NA, asp = NULL, scale = NA, restart.delay = NULL, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_animation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create animation — tmap_animation","text":"tm tmap list tmap objects. tm tmap object, facets created, nrow ncol tm_facets() set 1 order create one map per frame. filename filename. omitted (default), animation shown viewer browser. specified, gif file video file (.e. mp4). package gifski required create gif animation. package av (uses FFmpeg library) required video formats. mp4 format recommended many video formats supported, wmv, avi, mkv. width, height Dimensions animation file (pixels). Required tm list, recommended specify advance tm tmap object. specified latter case, determined aspect ratio map. dpi dots per inch. default 100, can set option output.dpi.animation tmap_options(). delay delay time images (1/100th second). See also fps fps frames per second, calculated 100 / delay. fps specified, delay set 100/fps. loop logical determined whether animation looped, integer value determines many times animation looped. outer.margins (passed tmap_save()) overrides outer.margins argument tm_layout() (unless set NA) asp (passed tmap_save()) specified, overrides asp argument tm_layout(). Tip: set 0 map frame placed edges image. scale (passed tmap_save()) overrides scale argument tm_layout() (unless set NA) restart.delay used anymore. ... arguments passed av::av_encode_video()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_animation.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create animation — tmap_animation","text":"tmap plots supported, series R plots.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_animation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create animation — tmap_animation","text":"","code":"if (FALSE) { data(NLD_prov) m1 <- tm_shape(NLD_prov) + tm_polygons(\"yellow\") + tm_facets(along = \"name\") tmap_animation(m1, delay=40) data(World, metro) m2 <- tm_shape(World, projection = \"+proj=eck4\", simplify = 0.5) + tm_fill() + tm_shape(metro) + tm_bubbles(size = paste0(\"pop\", seq(1970, 2030, by=10)), col = \"purple\", border.col = \"black\", border.alpha = .5, scale = 2) + tm_facets(free.scales.symbol.size = FALSE, nrow=1,ncol=1) + tm_format(\"World\") tmap_animation(m2, delay=100, outer.margins = 0) m3 <- lapply(seq(50, 85, by = 5), function(age) { World$at_most <- World$life_exp <= age World_sel <- World[which((World$life_exp <= age) & (World$life_exp > (age - 5))), ] tm_shape(World) + tm_polygons(\"at_most\", palette = c(\"gray95\", \"gold\"), legend.show = FALSE) + tm_shape(World_sel) + tm_text(\"name\", size = \"AREA\", root = 5, remove.overlap = TRUE) + tm_layout(main.title = paste0(\"Life expectency at most \", age), frame = FALSE) }) tmap_animation(m3, width = 1200, height = 600, delay = 100) m4 <- tm_shape(World) + tm_polygons() + tm_shape(metro) + tm_bubbles(col = \"red\") + tm_text(\"name\", ymod = -1) + tm_facets(by = \"name\", free.coords = F, nrow = 1, ncol = 1) + tm_layout(panel.show = FALSE, frame = FALSE) tmap_animation(m4, filename = \"World_cities.mp4\", width=1200, height = 600, fps = 2, outer.margins = 0) }"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_arrange.html","id":null,"dir":"Reference","previous_headings":"","what":"Arrange small multiples in grid layout — tmap_arrange","title":"Arrange small multiples in grid layout — tmap_arrange","text":"Arrange small multiples grid layout. Normally, small multiples created specifying multiple variables one aesthetic specifying argument (see tm_facets()). function can used arrange custom small multiples grid layout.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_arrange.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Arrange small multiples in grid layout — tmap_arrange","text":"","code":"tmap_arrange( ..., ncol = NA, nrow = NA, widths = NA, heights = NA, sync = FALSE, asp = 0, outer.margins = 0.02 ) knit_print.tmap_arrange(x, ..., options = NULL) # S3 method for tmap_arrange print(x, knit = FALSE, ..., options = NULL)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_arrange.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Arrange small multiples in grid layout — tmap_arrange","text":"... tmap objects one list tmap objects. number multiples can plot limited (see details). ncol number columns nrow number rows widths vector column widths. add 1 length equal ncol. heights vector row heights. add 1 length equal nrow. sync logical. navigation view mode (zooming panning) synchronized? default FALSE. asp aspect ratio. aspect ratio map. Normally, controlled asp argument tm_layout() (also tmap option). argument overwrite , unless set NULL. default value asp 0, means aspect ratio adjusted size device divided number columns rows. asp set NA, also default value tm_layout(), aspect ratio adjusted used shapes. outer.margins outer.margins, numeric vector four single value. defines outer margins multiple. overwrite outer.margins argument tm_layout(), unless set NULL. x tmap_arrange object (returned tmap_arrange()). options options passed knitr::knit_print() knit knitr::knit_print() enabled, normal base::print() function?","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_arrange.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Arrange small multiples in grid layout — tmap_arrange","text":"global option tmap.limits controls limit number facets plotted. default, tmap_options(tmap.limits = c(facets.view=4, facets.plot=64)). maximum number interactive facets set four since otherwise may become slow.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_arrange.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Arrange small multiples in grid layout — tmap_arrange","text":"","code":"tm1 = tm_shape(World) + tm_polygons(\"HPI\") tm2 = tm_shape(metro) + tm_bubbles(size = \"pop2020\") tmap_arrange(tm1, tm2)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_design_mode.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the design mode — tmap_design_mode","title":"Set the design mode — tmap_design_mode","text":"-called \"design mode\" enabled, inner outer margins, legend position, aspect ratio shown explicitly plot mode. Also, information aspect ratios printed console. function sets global option tmap.design.mode. can used toggle function without arguments.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_design_mode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the design mode — tmap_design_mode","text":"","code":"tmap_design_mode(design.mode)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_design_mode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the design mode — tmap_design_mode","text":"design.mode Logical value determines design mode. omitted design mode toggled.","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_devel_mode.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the development mode — tmap_devel_mode","title":"Set the development mode — tmap_devel_mode","text":"-called \"development mode\" enabled, helpful messages timings printed console","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_devel_mode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the development mode — tmap_devel_mode","text":"","code":"tmap_devel_mode(devel.mode)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_devel_mode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the development mode — tmap_devel_mode","text":"devel.mode logical value determines development mode. omitted development mode toggled.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_format.html","id":null,"dir":"Reference","previous_headings":"","what":"Get or add format options — tmap_format","title":"Get or add format options — tmap_format","text":"Format options tmap options shape dependent. tmap_format() predefined formats can retrieved. values specific format can retrieved tmap_format(format), format name format. function tmap_format_add() used add format.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_format.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get or add format options — tmap_format","text":"","code":"tmap_format(format) tmap_format_add(..., name)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_format.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get or add format options — tmap_format","text":"format Name format. Run tmap_format() see choices. ... Options tm_layout() tm_view(). Can also list options. name Name new format.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_format.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get or add format options — tmap_format","text":"function tmap_format() returns names available formats. format defined, returns option list corresponding format.","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_format.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get or add format options — tmap_format","text":"","code":"# available formats tmap_format() #> available formats are: \"World\", \"World_wide\", \"NLD\", \"NLD_wide\" # create option list to be used as a new format World_small = tmap_format(\"World\") World_small$scale = 2 # add format tmap_format_add(World_small, name = \"World_small\") #> format World_small succesfully added. Use this format with tm_format(\"World_small\") # observe that World_small is successfully added: tmap_format() #> available formats are: \"World\", \"World_wide\", \"NLD\", \"NLD_wide\", \"World_small\" data(World) #qtm(World, fill=\"HPI\", format=\"World_small\")"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_icons.html","id":null,"dir":"Reference","previous_headings":"","what":"Specify icons — tmap_icons","title":"Specify icons — tmap_icons","text":"Specifies icons png images, can used markers thematic maps. function marker_icon() specification default marker.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_icons.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Specify icons — tmap_icons","text":"","code":"tmap_icons( file, width = 48, height = 48, keep.asp = TRUE, just = c(\"center\", \"center\"), as.local = TRUE, ... ) marker_icon()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_icons.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Specify icons — tmap_icons","text":"file character value/vector containing file path(s) url(s). width width icon. keep.asp, interpreted maximum width. height height icon. keep.asp, interpreted maximum height. keep.asp keep aspect ratio png image. TRUE aspect ratio differs width/height, either width height adjusted accordingly. just justification icons relative point coordinates. first value specifies horizontal second value vertical justification. Possible values : \"left\" , \"right\", \"center\", \"bottom\", \"top\". Numeric values 0 specify left alignment 1 right alignment. default value just c(\"center\", \"center\"). .local file url, saved local temporary file? ... arguments passed leaflet::icons(). iconWidth, iconHeight, iconAnchorX, iconAnchorY specified, override width height, just.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_icons.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Specify icons — tmap_icons","text":"icon data (see leaflet::icons())","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_last.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the last map to be modified or created — tmap_last","title":"Retrieve the last map to be modified or created — tmap_last","text":"Retrieve last map modified created. Works way ggplot2::last_plot(), although difference: tmap_last() returns last call instead stacked tmap-elements.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_last.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the last map to be modified or created — tmap_last","text":"","code":"tmap_last()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_last.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve the last map to be modified or created — tmap_last","text":"call","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_leaflet.html","id":null,"dir":"Reference","previous_headings":"","what":"Export tmap to the format of the used graphics mode — tmap_leaflet","title":"Export tmap to the format of the used graphics mode — tmap_leaflet","text":"tmap_grid() returns grob object (\"plot\" mode) tmap_leaflet() leaflet object (\"view\" mode).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_leaflet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export tmap to the format of the used graphics mode — tmap_leaflet","text":"","code":"tmap_leaflet(x, show = FALSE, ...) tmap_grid(x, show = FALSE, ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_leaflet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export tmap to the format of the used graphics mode — tmap_leaflet","text":"x tmap object. show show map? ... Arguments passed print.tmap return.asp aspect ratio returned? vp viewport (\"plot\" mode) knit logical, knit? options vector options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_leaflet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export tmap to the format of the used graphics mode — tmap_leaflet","text":"tmap_grid() returns grob object (\"plot\" mode) tmap_leaflet() leaflet object (\"view\" mode). case small multiples shown, list returned.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_leaflet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export tmap to the format of the used graphics mode — tmap_leaflet","text":"","code":"map = tm_shape(World) + tm_polygons() tmap_leaflet(map, show = TRUE)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":null,"dir":"Reference","previous_headings":"","what":"Set tmap mode to static plotting or interactive viewing — tmap_mode","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"Set tmap mode static plotting interactive viewing. global option tmap.mode determines whether thematic maps plot graphics device, shown interactive leaflet map (see also tmap_options(). function tmap_mode() wrapper set global option. convenient function ttm(), stands toggle thematic map, toggle switch two modes. function ttmp() stands toggle thematic map print last map: ttm() followed tmap_last(); order words, shows last map mode. recommended use tmap_mode() scripts ttm()/ttmp() console.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"","code":"tmap_mode(mode = NULL) ttm() ttmp()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"mode One \"plot\" \"view\". See Details info.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"previous tmap mode switching.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"mode-plot-","dir":"Reference","previous_headings":"","what":"mode = \"plot\"","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"Thematic maps shown graphics device. default mode, supports tmap's features, small multiples (see tm_facets()) extensive layout settings (see tm_layout()). recommended use tmap_save() saving static maps.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"mode-view-","dir":"Reference","previous_headings":"","what":"mode = \"view\"","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"Thematic maps viewed interactively web browser RStudio's Viewer pane. Maps fully interactive tiles OpenStreetMap map providers (see tm_tiles()). See also tm_view() options related \"view\" mode. mode generates leaflet::leaflet() widget, can also directly obtained tmap_leaflet(). R Markdown, possible publish HTML page. However, couple constraints comparison \"plot\": map always projected according Web Mercator projection. Although projection de facto standard interactive web-based mapping, lacks equal-area property, important many thematic maps, especially choropleths (see examples tm_shape()). Small multiples supported legend made aesthetics regarding size, symbol size line width. Text labels supported (yet) layout options set tm_layout()) regarding map format used. However, styling options still apply.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"Tennekes, M., 2018, tmap: Thematic Maps R, Journal Statistical Software, 84(6), 1-39, doi:10.18637/jss.v084.i06","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"","code":"tmap_mode() #> current tmap mode is \"plot\" tmap_mode(\"plot\") #> tmap mode set to 'plot' tm_shape(World) + tm_polygons(\"HPI\") tmap_mode(\"view\") #> tmap mode set to 'view' tm_shape(World) + tm_polygons(\"HPI\") ttm() #> tmap mode set to 'plot' tm_shape(World) + tm_polygons(\"HPI\")"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_options.html","id":null,"dir":"Reference","previous_headings":"","what":"tmap options — tmap_options","title":"tmap options — tmap_options","text":"tmap options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"tmap options — tmap_options","text":"","code":"tmap_options(...) tmap_options_mode(mode = NA, default.options = FALSE) tm_options(...) tmap_options_diff() tmap_options_reset() tmap_options_save(style)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_options.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"tmap options — tmap_options","text":"... See details mode mode, e.g. \"plot\" \"view\" default.options return default options current options? style style, see tmap_style() available styles","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_save.html","id":null,"dir":"Reference","previous_headings":"","what":"Save tmap — tmap_save","title":"Save tmap — tmap_save","text":"Save tmap file. can either static plot (e.g. png) interactive map (html).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_save.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save tmap — tmap_save","text":"","code":"tmap_save( tm = NULL, filename = NA, device = NULL, width = NA, height = NA, units = NA, dpi = NA, outer.margins = NA, asp = NULL, scale = NA, insets_tm = NULL, insets_vp = NULL, add.titles = TRUE, in.iframe = FALSE, selfcontained = !in.iframe, verbose = NULL, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_save.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save tmap — tmap_save","text":"tm tmap object filename filename including extension, optionally path. extensions pdf, eps, svg, wmf (Windows ), png, jpg, bmp, tiff, html supported. extension missing, file saved static plot \"plot\" mode interactive map (html) \"view\" mode (see details). default format static plots png, can changed using option \"output.format\" tmap_options(). NA (default), file saved \"tmap01\" default format, number incremented file already exists. device graphic device use. Either device function (e.g., png cairo_pdf) text indicating selected graphic device: \"pdf\", \"eps\", \"svg\", \"wmf\" (Windows ), \"png\", \"jpg\", \"bmp\", \"tiff\". NULL, graphic device guessed based filename argument. height, width dimensions plot (applicable html files). Units set argument units. one specified, calculated using formula asp = width / height, asp estimated aspect ratio map. missing, set width * height equal option \"output.size\" tmap_options(). default 49, meaning map square (aspect ratio 1) width height set 7. units units width height (\"\", \"cm\", \"mm\"). default, pixels (\"px\") used either width height set value greater 50. Else, units inches (\"\"). dpi dots per inch. applicable raster graphics. default set 300, can changed using option \"output.dpi\" tmap_options(). outer.margins overrides outer.margins argument tm_layout() (unless set NA) asp specified, overrides asp argument tm_layout(). Tip: set 0 map frame placed edges image. scale overrides scale argument tm_layout() (unless set NA) insets_tm tmap object inset map, list tmap objects multiple inset maps. number tmap objects equal number viewports specified insets_vp. insets_vp viewport inset map, list viewports multiple inset maps. number viewports equal number tmap objects specified insets_tm. add.titles add titles leaflet object. .iframe interactive map saved iframe? , two HTML files saved; one small parent HTML file iframe container, one large child HTML file actual widget. See widgetframe::saveWidgetframe() details. default FALSE, means one large HTML file saved (see saveWidget()). selfcontained interactive map saved, resources (e.g. JavaScript libraries) contained HTML file? FALSE, placed adjacent directory (see also htmlwidgets::saveWidget()). Note HTML file often still large selfcontained = FALSE, since map data (polygons popups), also contained HTML file, usually take space map resources. verbose Deprecated. now controlled tmap option show.messages (see tmap_options()) ... Arguments passed htmlwidgets::saveWidget, widgetframe::saveWidgetframe widget Widget save file File save HTML libdir Directory copy HTML dependencies (defaults filename_files). background Text string giving html background color widget. Defaults white. title Text use title generated page. knitrOptions list knitr chunk options.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_save.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Save tmap — tmap_save","text":"filename, invisibly, export successful.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_save.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Save tmap — tmap_save","text":"","code":"if (FALSE) { data(NLD_muni, NLD_prov) m <- tm_shape(NLD_muni) + tm_fill(col=\"population\", convert2density=TRUE, style=\"kmeans\", title=expression(\"Population (per \" * km^2 * \")\")) + tm_borders(\"black\", alpha=.5) + tm_shape(NLD_prov) + tm_borders(\"grey25\", lwd=2) + tm_style(\"classic\") + tm_format(\"NLD\", inner.margins = c(.02, .15, .06, .15)) + tm_scale_bar(position = c(\"left\", \"bottom\")) + tm_compass(position=c(\"right\", \"bottom\")) tmap_save(m, \"choropleth.png\", height = 7) # height interpreted in inches tmap_save(m, \"choropleth_icon.png\", height = 100, scale = .1) # height interpreted in pixels data(World) m2 <- tm_shape(World) + tm_fill(\"well_being\", id=\"name\", title=\"Well-being\") + tm_format(\"World\") # save image tmap_save(m2, \"World_map.png\", width=1920, height=1080, asp=0) # cut left inner margin to make sure Antarctica is snapped to frame tmap_save(m2 + tm_layout(inner.margins = c(0, -.1, 0.05, 0.01)), \"World_map2.png\", width=1920, height=1080, asp=0) # save interactive plot tmap_save(m2, \"World_map.html\") }"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":null,"dir":"Reference","previous_headings":"","what":"Set or get the default tmap style — tmap_style","title":"Set or get the default tmap style — tmap_style","text":"Set get default tmap style. Without arguments, current style returned. Also available styles displayed. style set, corresponding tmap options (see tmap_options()) set accordingly. default style (.e. loading package) \"white\".","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set or get the default tmap style — tmap_style","text":"","code":"tmap_style(style)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set or get the default tmap style — tmap_style","text":"style Name style. omitted, tmap_style() returns current style also shows available styles. style specified,tmap_style() sets style accordingly. Note case, tmap options (see tmap_options()) reset according style definition. See tm_layout() predefined styles, tmap_style_catalogue (migrated v4 yet) creating catalogue.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set or get the default tmap style — tmap_style","text":"style changing","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set or get the default tmap style — tmap_style","text":"Note tm_style() used within plot call (affects plot), whereas tmap_style() sets style globally. loading style, options defined style (.e. difference default \"white\" style) can obtained tmap_options_diff(). documentation tmap_options() (details examples) shows create new style.","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set or get the default tmap style — tmap_style","text":"","code":"tmap_style() #> current tmap style is \"white (modified)\" #> other available styles are: \"white\", \"gray\", \"natural\", \"cobalt\", \"albatross\", \"classic\", \"v3\", \"gray_v3\", \"grey_v3\", \"natural_v3\", \"cobalt_v3\", \"albatross_v3\", \"classic_v3\" tm_shape(World) + tm_polygons(\"HPI\") tmap_style(\"cobalt\") #> tmap style set to \"cobalt\" #> other available styles are: \"white\", \"gray\", \"natural\", \"albatross\", \"classic\", \"v3\", \"gray_v3\", \"grey_v3\", \"natural_v3\", \"cobalt_v3\", \"albatross_v3\", \"classic_v3\" tm_shape(World) + tm_polygons(\"HPI\") # for backwards compatibility, the styles of tmap versions 1-3 are also included: tmap_style(\"v3\") #> tmap style set to \"v3\" #> other available styles are: \"white\", \"gray\", \"natural\", \"cobalt\", \"albatross\", \"classic\", \"gray_v3\", \"grey_v3\", \"natural_v3\", \"cobalt_v3\", \"albatross_v3\", \"classic_v3\" tm_shape(World) + tm_polygons(\"HPI\") tmap_style(\"cobalt_v3\") #> tmap style set to \"cobalt_v3\" #> other available styles are: \"white\", \"gray\", \"natural\", \"cobalt\", \"albatross\", \"classic\", \"v3\", \"gray_v3\", \"grey_v3\", \"natural_v3\", \"albatross_v3\", \"classic_v3\" tm_shape(World) + tm_polygons(\"HPI\")"},{"path":"https://r-tmap.github.io/tmap/dev/reference/v4-not-yet.html","id":null,"dir":"Reference","previous_headings":"","what":"Features not yet implemented in tmap4 — v4-not-yet","title":"Features not yet implemented in tmap4 — v4-not-yet","text":"Features yet implemented tmap4","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/v4-not-yet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Features not yet implemented in tmap4 — v4-not-yet","text":"","code":"tm_iso(...) tm_logo(...) tm_minimap(...) tmap_grob(...) tmapOutput(...) tmapProxy(...) renderTmap(...) tm_remove_layer(...) tm_rgba(...) tmap_tip(...) tmap_style_catalog(...) tmap_style_catalogue(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/v4-not-yet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Features not yet implemented in tmap4 — v4-not-yet","text":"... Arguments","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-40-development-version","dir":"Changelog","previous_headings":"","what":"tmap 4.0 (development version)","title":"tmap 4.0 (development version)","text":"consistency ggplot2, tm_polygons() now recognizes fill argument instead col.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-33-4","dir":"Changelog","previous_headings":"","what":"tmap 3.3-4","title":"tmap 3.3-4","text":"CRAN release: 2023-09-12 (!) last version tmap 3.x. Next CRAN version tmap 4.x (release planned end 2023) fixed bug (stars appeared upside plot mode) fixed newly introduced shiny bug (#767)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-33-3","dir":"Changelog","previous_headings":"","what":"tmap 3.3-3","title":"tmap 3.3-3","text":"CRAN release: 2022-03-02 added device tmap_save() fixed many small bugs (see GitHub issue list)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-33-2","dir":"Changelog","previous_headings":"","what":"tmap 3.3-2","title":"tmap 3.3-2","text":"CRAN release: 2021-06-16 Worlds fixed (now ‘s2’ proof, see GitHub issue #564)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-33-1","dir":"Changelog","previous_headings":"","what":"tmap 3.3-1","title":"tmap 3.3-1","text":"CRAN release: 2021-03-15 fixed view titles added html.escape popup.format control whether html code escaped view popups fixed many small bugs (see GitHub issue list)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-33","dir":"Changelog","previous_headings":"","what":"tmap 3.3","title":"tmap 3.3","text":"CRAN release: 2021-01-19 tmap_grob() added, exports tmap plots grob objects (grid package) SpatRaster objects (terra package) supported fixed many small bugs (see GitHub issue list)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-32","dir":"Changelog","previous_headings":"","what":"tmap 3.2","title":"tmap 3.2","text":"CRAN release: 2020-09-15 tmap_animation() improved: now using av gifski hood; added progress bar; lists tmap objects supported; improved default settings improved tmapOutput(); now works reactive shiny objects improved internally used margins; also small exported maps look good (see example tmap_save()) improved tmap_design_mode(); tmap.design.mode now global option (tmap option anymore) reexported providers leafet added show.warnings tmap_options() added width argument tm_credits() tm_text() improved: added “id” argument, tm_remove_layer() can applied ","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-31","dir":"Changelog","previous_headings":"","what":"tmap 3.1","title":"tmap 3.1","text":"CRAN release: 2020-07-09 interactive maps origin CRS working: tmap_options(projection = 0, basemaps = NULL) added tm_mouse_coordinates() show mouse coordinates view mode added tmap_design_mode() toggle design mode. made backgrond symbol grob shapes transparent added .iframe selfcontained tmap_save() improved tm_add_legend(): added type = \"title\" title legend elements added ttmp() shows last map mode. fixed many small bugs (see GitHub issue list)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-30","dir":"Changelog","previous_headings":"","what":"tmap 3.0","title":"tmap 3.0","text":"CRAN release: 2020-04-09 [!] spatial rasters/arrays now implemented using stars package (instead raster package) .count argument added layer functions; numeric variables can treated count variables (integers) drop.levels argument added layer functions allows drop unused levels new style added color classes: “dpih” “headtails”; also added style.args pass arguments classInt::classIntervals() grid labels specification per axis fixed bug geometry collection","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-23-2","dir":"Changelog","previous_headings":"","what":"tmap 2.3-2","title":"tmap 2.3-2","text":"CRAN release: 2020-01-19 probably last version release tmap 3.0 many small improvements bug fixes (see GitHub) first stars supported (full support expected tmap 3.0) replaced projection shortcuts \"epsg/proj4strings\" examples","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-23-1","dir":"Changelog","previous_headings":"","what":"tmap 2.3-1","title":"tmap 2.3-1","text":"CRAN release: 2019-09-17 improved popups view mode added validity checks sf objects minor bugs fixed: see GitHub issue list","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-23","dir":"Changelog","previous_headings":"","what":"tmap 2.3","title":"tmap 2.3","text":"CRAN release: 2019-07-18 [!] shiny integration: added tmapOutput(), renderTmap(), tmapProxy(), , tm_remove_layer() improved tmap_save() (regarding default values) improved tm_rgb() (added r g b max.value arguments) added tm_graticules() supported TMS servers view mode, layers can hidden legend group = NULL replaced mapview leafsync minor bugs fixed: see GitHub issue list","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-22","dir":"Changelog","previous_headings":"","what":"tmap 2.2","title":"tmap 2.2","text":"CRAN release: 2019-01-05 improved tm_rgb() improved breaks interactive maps added bbox argument qtm() improved projection shortcut codes (using EPSG database) fixed several bugs (see GitHub)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-21-1","dir":"Changelog","previous_headings":"","what":"tmap 2.1-1","title":"tmap 2.1-1","text":"CRAN release: 2018-08-09 fixed two small bugs","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-21","dir":"Changelog","previous_headings":"","what":"tmap 2.1","title":"tmap 2.1","text":"CRAN release: 2018-08-06 added option max.raster (maximum raster size) made rasters view mode faster bug fixed geometry collection objects without data view mode improved handling manual palettes tmap_arrange() can take list tmap objects","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-20","dir":"Changelog","previous_headings":"","what":"tmap 2.0","title":"tmap 2.0","text":"CRAN release: 2018-07-15 [!] tmap migrated sp sf. sp objects still supported, internal functions based sf [!] added tm_sf() draws sf objects [!] renamed *_tmap() functions (e.g. save_tmap()) tmap_*() consistency [!] added tm_basemap() tm_tiles(): now, multiple (overlay) tiled maps can shown [!] rearranged tmap options, styles formats. See tmap_options(), tmap_style(), tmap_format(), tm_style() tm_format() [!] added filter argument tm_shape() added colorNULL layer functions added tm_minimap() added remove.NA.facets tm_facets() units data columns supported tmap_animation() enhanced loop options added tmap_tips() changes backwards compatible 1.11-2 vignettes rewritten, including vignette describes changes 2.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-111-2","dir":"Changelog","previous_headings":"","what":"tmap 1.11-2","title":"tmap 1.11-2","text":"CRAN release: 2018-04-10 added references JSS paper (including citation)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-111-1","dir":"Changelog","previous_headings":"","what":"tmap 1.11-1","title":"tmap 1.11-1","text":"CRAN release: 2018-02-13 fixed bug labels argument tm_fill() fixed bug regarding legend symbols facets free scales fixed bug rasters view mode improved popup width view mode","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-111","dir":"Changelog","previous_headings":"","what":"tmap 1.11","title":"tmap 1.11","text":"CRAN release: 2017-11-24 added text.align text..columns legend.format legend.(aes).reverse added layer functions symbol shapes can put list small multiples, named according values variable specified shape argument grid labels can now rotated formatted changed default values free.coords drop.units tm_facets() fixed bug NAs view mode fixed bug dismo::gmap() raster shapes fixed bug ambiguous values aesthetics (e.g. “blue” also variable name) NOTE: last version major update (sf fully replaces sp)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-110","dir":"Changelog","previous_headings":"","what":"tmap 1.10","title":"tmap 1.10","text":"CRAN release: 2017-05-11 [!] tm_scale_bar(), tm_text(), tm_grid() now supported view mode (requires leaflet 1.1.0) added along argument tm_facets(), enables faceting along multiple pages (animation frames) added main.title argument tm_layout added tmap_options(), including new option tmap.unit (“metric” “imperial”“) improved automatic labelling breaks improved legend view mode: missing values shown default (like plot mode) improved bubble scaling view mode fixed bug aspect ratio bug","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-18-1","dir":"Changelog","previous_headings":"","what":"tmap 1.8-1","title":"tmap 1.8-1","text":"CRAN release: 2017-01-29 added tm_rgb() (shortcut rgb rasters) fixed interactive maps R Markdown fixed bug qtm() called without arguments","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-18","dir":"Changelog","previous_headings":"","what":"tmap 1.8","title":"tmap 1.8","text":"CRAN release: 2017-01-03 [!] package split: non-plotting functions migrated tmaptools added tmap_arrange() arranging custom small multiples added simplify argument tm_shape() added error message NA-projected shapes view mode improved unit handling, now can set metric imperial NA values allowed direct color variables sf (simple features) objects supported","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-16-1","dir":"Changelog","previous_headings":"","what":"tmap 1.6-1","title":"tmap 1.6-1","text":"CRAN release: 2016-10-29 improved projections: code efficient now shortcuts renewed. Also, CRS objects now supported project arguments (e.g. tm_shape(), set_projection), .CRS added get_projection get_proj4. Rscript works: methods moved imports depends","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-16","dir":"Changelog","previous_headings":"","what":"tmap 1.6","title":"tmap 1.6","text":"CRAN release: 2016-10-21 [!] tm_symbols() added, create proportional symbol maps: besides bubbles, also supports symbol shapes, png icons, small ggplot2 plots [!] imported cartogram function cartogram package (thanks Sebastian!) [!] reverse geocoding function tmaptools::rev_geocode_OSM() added [!] tm_logo() added added popup.vars base layer functions bounding box (argument bbox tm_shape()) working view mode tmaptools::geocode_OSM() improved: SpatialPointsDataFrame can now returned last_tmap() added, retrieves last produced map crop_shape can also handle polygons cropping area append_data improved; coverage information can retrieved under_coverage over_coverage interpolate parameter added tm_raster() added support custom legend formatting functions legend items can now stacked horizontally legend width height can determined fully manually (negative values legend.height legend.width) argument interval.closure added layer functions determine intervals closed added warnings non-supported elements view mode fixed raster brick bug fixed save_tmap/get_asp_ratifo bug","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-14-1","dir":"Changelog","previous_headings":"","what":"tmap 1.4-1","title":"tmap 1.4-1","text":"CRAN release: 2016-05-07 add just argument anchor text labels, legend attributes position map attributes (scale bar) can placed outside frame added tm_xlab() tm_ylab() RGB raster support, see tm_raster static text (.e titles, credits, legend titles, labels) support expressions updated Europe shape: projection bounding box now consistent Eurostat publications added crop_shape, convenient wrapper around raster::crop()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-14","dir":"Changelog","previous_headings":"","what":"tmap 1.4","title":"tmap 1.4","text":"CRAN release: 2016-03-18 [!] interactive mapping added. Now, tmap two modes: “plot” (graphics device) “view” (interactive viewer, leaflet widget) [!] facets (small multiples) improved: group two variables possible, panel layout added, missing data can shown separately added geocode_OSM(), function find coordinates (now tmaptools::geocode_OSM()) improved set_projection raster objects added double_line offset_line added insets option save_tmap improved default settings contrast argument regarding seq div palettes improved automatic positions legend map attributes (specifically, legend snaps right-hand side without need adjust legend.width, legend attributes position improved double frame enabled) improved tm_layouts()’s design.mode output lwd parameter added tm_scale_bar() tm_compass() fixed bb bug","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-12-1","dir":"Changelog","previous_headings":"","what":"tmap 1.2-1","title":"tmap 1.2-1","text":"fixed bug PROJ.4 version < 4.9.1 improved error messages rd projection reset \"+init=epsg:28992\", since latter now \"+towgs\" item fixed bug print.tmap() returned object","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-12","dir":"Changelog","previous_headings":"","what":"tmap 1.2","title":"tmap 1.2","text":"CRAN release: 2015-12-11 added read_osm(), function read Open Street Map data (now tmaptools::read_osm()) added bb, handy bounding box function added layout themes tm_style tm_format added automatic text labeling added interactive SVG, can opened RStudio (see itmap) added map compass (tm_compass()) added text aesthetics size col added automatic map coloring added earth boundary, useful projected world maps World added warped grid lines (e.g. long-lat lines can shown projected maps) added new color scale modes (enabled style=\"cat\", “cont”, “order”) added save_tmap() added smooth_map, smooth_raster_cover, sample_dots, points_to_raster poly_to_raster added read_GPX improved automatic layout regarding title, legend, map attributes layer arguments, e.g. palette, can take multiple values small multiples improved grid lines (labels can also placed outside frame) arguments free.coords drop.shapes tm_facets() working updated examples vignette fixed viewport bug see ?tmap structured overview tmap functions","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-10","dir":"Changelog","previous_headings":"","what":"tmap 1.0","title":"tmap 1.0","text":"CRAN release: 2015-05-28 added tm_credits() tm_scale_bar() added .master argument tm_shape(), determines shape master added unit unit.size arguments tm_shape() correlates coordinates desired units added tm_polygons(), combination tm_fill() tm_borders() fixed several small bugs","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-08","dir":"Changelog","previous_headings":"","what":"tmap 0.8","title":"tmap 0.8","text":"added tm_raster() improved legend behavior: legend titles set layer functions (instead tm_layout()) removed crop_shape(), since raster::crop() job, , faster --scope functions migrated spatialToolbox package, available https://github.com/mtennekes/spatialToolbox","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-071","dir":"Changelog","previous_headings":"","what":"tmap 0.7.1","title":"tmap 0.7.1","text":"fixed bug scale parameter (global scale set tm_layout())","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-07","dir":"Changelog","previous_headings":"","what":"tmap 0.7","title":"tmap 0.7","text":"CRAN release: 2015-03-27 enhanced small multiples (tm_facets()) respect scaling free coordinate scales added alpha argument tm_layers() transparency added text shadow argument added function split() split shape object sbind() combine shape objects. added automatic legend positioning legend.position = NULL improved number formatting legend improved inner.margins outer.margins. can take one value (e.g. outer.margins=0 rather outer.margins=c(0,0,0,0)) improved qtm(): tm_facets() parameters working, also fixed scale parameter bug improved examples approx_areas, calc_densities fixed bug regarding drawing frame outer.margins=0. fixed bug plotting bubbles improved temp file handling animation_tmap() added functions get set polygon directions, calculate intersection ratios polygons (intersection_shapes)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-06","dir":"Changelog","previous_headings":"","what":"tmap 0.6","title":"tmap 0.6","text":"CRAN release: 2014-07-30 first CRAN version newer version may available https://github.com/r-tmap/tmap get started, see package vignette ‘tmap nutshell’ help files questions suggestions, please contact (mtennekes gmail dot com)","code":""}] +[{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"extendability","dir":"Articles","previous_headings":"","what":"Extendability","title":"tmap v4: a sneak peek","text":"First foremost, tmap v4 fully extendable. precisely, following aspects can extended: Map layers: limited anymore fixed set tm_polygons(), tm_lines(), tm_symbols(), tm_raster() (derivatives tm_borders() tm_dots()), layer interest can developed extension tmap. illustrate tm_cartogram(). layers worthwhile implement tm_donuts(), tm_hexagons(), tm_network(), tm_hillshade(), etc. Aesthetics: many visual variables available. illustrate next section, already implemented 5 new aesthetics tm_polygons(). Moreover, much easier developers add new visual variables map layer functions. Graphics Engine: tmap v3 contains two modes: plot view (based grid graphics leaflet respectively) framework makes possible add modes well. Spatial data classes: tmap v3 build sf stars. also case tmap v4, developers, easier incorporate classes well, like SpatRaster SpatVector terra.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"aesthetics","dir":"Articles","previous_headings":"","what":"Aesthetics","title":"tmap v4: a sneak peek","text":"mentioned , added aesthetics (visual variables), easier developers add new aesthetics. reordered arguments specify configure aesthetics illustrated . arguments specify aesthetics remain . E.g., main aesthetic tm_polygons() fill, defines fill color polygons. However, arguments layer functions organized differently. Thus, aesthetic four arguments: aesthetic (fill) scale (fill.scale) legend (fill.legend) argument decides whether scales applied freely across facets (fill.free) scales legends discussed next sections. can see basic comparison tmap version 3 4 syntax: tmap v4, tm_polygons() aesthetics fill, col, fill_alpha, col_alpha, lwd, lty, eventually also pattern. standard map layers also additional aesthetics. data variable can mapped , using different scales (see next section overview). next example uses fill, lwd (line width), lty (line type) aesthetics: Besides visual mapping aesthetics, map data variables visual variables, also another group aesthetics, namely (data-driven) transformation aesthetics. used transform spatial objects. call data-driven, content data used input spatial transformation. example cartogram, shown next section. polygons distorted size (approximately) proportional data variable.","code":"# tmap v3 tm_shape(World) + tm_polygons(fill = \"HPI\", palette = \"Earth\", title = \"Happy Planet Index\") # tmap v4 tm_shape(World) + tm_polygons(fill = \"HPI\", fill.scale = tm_scale_intervals(values = \"purple_green\"), fill.legend = tm_legend(title = \"Happy Planet Index\")) # tmap v3 # ... not possible :( # tmap v4 World$life_exp_class = cut(World$life_exp, breaks = seq(40, 85, by = 15)) tm_shape(World, crs = \"+proj=eck4\") + tm_polygons(fill = \"HPI\", fill.scale = tm_scale_continuous(values = \"purple_green\"), fill.legend = tm_legend(title = \"Happy Planet Index\"), lwd = \"well_being\", lwd.scale = tm_scale_continuous(value.neutral = 1, values = c(0, 5), label.na = \"\"), lwd.legend = tm_legend(title = \"Well Being\"), lty = \"life_exp_class\", lty.scale = tm_scale_ordinal(values = c(\"dotted\", \"dashed\", \"solid\"), value.na = \"blank\", value.neutral = \"solid\", label.na = \"\"), lty.legend = tm_legend(title = \"Life Expectancy\") ) ## [plot mode] legend/component: Some components or legends are too high and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this."},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"map-layers-e-g--cartogram","dir":"Articles","previous_headings":"","what":"Map layers (e.g. cartogram)","title":"tmap v4: a sneak peek","text":"easy developers add new map layers extension. illustrate new map layer, tm_cartogram(). Cartograms already made tmap v3, explicitly required transforming data using cartogram package mapping. tmap v4, direct function tm_cartogram() (using cartogram package hood), uses transformation aesthetic size inherits visual aesthetics tm_polygons(): nice benefit cartograms directly tmap makes possible use available scaling functions. example, suppose want apply log 10 scale order make cartogram bit “balanced”:","code":"# tmap v3 library(cartogram) World_carto = World |> sf::st_transform(World, crs = \"+proj=eck4\") |> cartogram_cont(weight = \"pop_est\") tm_shape(World_carto, crs = \"+proj=eck4\") + tm_polygons(fill, palette = \"Earth\", title = \"Happy Planet Index\") # tmap v4 if (requireNamespace(\"cartogram\")) { tm_shape(World, crs = \"+proj=eck4\") + tm_cartogram(size = \"pop_est\", fill = \"HPI\", fill.scale = tm_scale_intervals(values = \"purple_green\"), fill.legend = tm_legend(title = \"Happy Planet Index\")) + tm_place_legends_right(width = 0.2) } # tmap v3 library(cartogram) World_carto = World |> sf::st_transform(World, crs = \"+proj=eck4\") |> dplyr::mutate(pop_est_log10 = log10(pop_est)) |> cartogram_cont(weight = \"pop_est_log10\") tm_shape(World_carto) + tm_polygons(fill, palette = \"Earth\", title = \"Happy Planet Index\") # tmap v4 if (requireNamespace(\"cartogram\")) { tm_shape(World, crs = \"+proj=eck4\") + tm_cartogram(size = \"pop_est\", size.scale = tm_scale_continuous_log1p(), fill = \"HPI\", fill.scale = tm_scale_intervals(values = \"purple_green\"), fill.legend = tm_legend(title = \"Happy Planet Index\")) + tm_place_legends_right(width = 0.2) }"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"scales","dir":"Articles","previous_headings":"","what":"Scales","title":"tmap v4: a sneak peek","text":"Scales used map data variables visual variables. Scales new map v4, used explicitly. following table shows scales currently available: main data type (second column) data type scale supposed applied. scale can applied data type (even though might make sense), one exception: continuous (log10) scales applied visual variables can take finite set values. Examples symbol shape line type. default, tm_scale_categorical(), tm_scale_ordinal(), tm_scale_intervals() used data class factor, ordered numeric respectively. Scales date/time variables included well. main argument scale function values, values visual variables. following table shows type values required visual variable: default values depend visual variable, also scale whether data values diverging. instance, tm_scale_intervals() applied numeric variable negative positive values visual variable fill, diverging color palette used. following map illustrates happens six scale functions applied data variable. use variable life expectancy (round order make sure number unique values limited): Scales existed tmap v3, applied implicitly via several arguments:","code":"data(World) Africa = World[World$continent == \"Africa\", ] Africa$life_exp = round(Africa$life_exp) # tmap v3 tm_shape(Africa) + tm_polygons(rep(\"life_exp\", 5), style = c(\"cat\", \"cat\", \"pretty\", \"cont\", \"log10\"), palette = list(\"Set2\", \"YlOrBr\", \"YlOrBr\", \"YlOrBr\", \"YlOrBr\"), title = \"\") + tm_layout(panel.labels = c(\"categorical scale\", \"ordinal scale\", \"intervals scale\", \"continuous scale\", \"log10 scale\"), inner.margins = c(0.05, 0.2, 0.1, 0.05), legend.text.size = 0.5) # discrete scale is not possible directly, but only via interval breaks: tm_shape(Africa) + tm_polygons(\"life_exp\", style = \"fixed\", palette = \"YlOrBr\", breaks = 49:76, as.count = TRUE, title = \"\") + tm_layout(panel.labels = \"discrete scale\", inner.margins = c(0.05, 0.2, 0.1, 0.05), legend.text.size = 0.5) # tmap v4 tm_shape(Africa) + tm_polygons(rep(\"life_exp\", 6), fill.scale = list(tm_scale_categorical(), tm_scale_ordinal(), tm_scale_intervals(), tm_scale_continuous(), tm_scale_continuous_log(), tm_scale_discrete()), fill.legend = tm_legend(title = \"\", position = tm_pos_in(\"left\", \"top\"))) + tm_layout(panel.labels = c(\"tm_scale_categorical\", \"tm_scale_ordinal\", \"tm_scale_intervals\", \"tm_scale_continuous\", \"tm_scale_continuous_log\", \"tm_scale_discrete\"), inner.margins = c(0.05, 0.2, 0.1, 0.05), legend.text.size = 0.5)"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"multivariate-scales","dir":"Articles","previous_headings":"","what":"Multivariate Scales","title":"tmap v4: a sneak peek","text":"possible assign multiple variables one aesthetic. can done function tm_mv() (stands multivariate). example bivariate choropleth, yet implemented, definitely . Another example multivariate aesthetics glpys, small charts used symbols. following example donut map. current implementation ‘one-trick-pony’ (see https://github.com/mtennekes/donutmaps) tmap v4 much easier:","code":"# tmap v4 tm_shape(World) + tm_symbols( fill = tm_mv(\"well_being\", \"footprint\"), fill.scale = tm_scale_bivariate(scale1 = tm_scale_intervals(breaks = c(2, 5, 6, 8)), scale2 = tm_scale_intervals(breaks = c(0, 3, 6, 20)), values = \"brewer.qualseq\") ) ## Labels abbreviated by the first letters, e.g.: \"0 to 3\" => \"0\" # tmap v4 (not implemented yet) library(tmap) library(tmapGlyps) # which include tm_donuts library(sfnetworks) # for origin-destination data methods tm_mode(\"view\") tm_shape(edges) + tm_halflines(lwd = \"flow\", col = \"dest\", start = 0.5, end = 1.0) + tm_shape(nodes) + tm_donuts(size = \"emplyoees\", parts = tm_mv(\"Amsterdam\", \"Rotterdam\", \"The Hague\", \"Utrecht\", \"Other_municipality\", \"Home_municipality\"))"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"legends","dir":"Articles","previous_headings":"","what":"Legends","title":"tmap v4: a sneak peek","text":"may noticed previous examples, legends look bit differently default.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"positioning","dir":"Articles","previous_headings":"Legends","what":"Positioning","title":"tmap v4: a sneak peek","text":"Legends currently placed outside map default tmap v4. ? Simply often space inside map. Furthermore, possible place legends different locations across map: tmap v3 contains many (often complicated) options rather simple things. options set globally via tmap_options() within single plot tm_layout(). tmap v4, directly related layout accessible via tm_layout(). However, ease use, bunch handy shortcut functions, tm_place_legends_left():","code":"# tmap v3 # ... not possible :( # tmap v4 tm_shape(World) + tm_symbols(fill = \"HPI\", size = \"pop_est\", shape = \"income_grp\", size.scale = tm_scale(value.neutral = 0.5), fill.legend = tm_legend(\"Happy Planet Index\", position = tm_pos_in(\"left\", \"top\")), size.legend = tm_legend(\"Population\", position = tm_pos_out(\"left\", \"center\")), shape.legend = tm_legend(\"Income Group\", position = tm_pos_out(\"center\", \"bottom\"))) # tmap v3 tm_shape(World) + tm_symbols(fill = \"HPI\", size = \"pop_est\", shape = \"income_grp\") + tm_layout(legend.outside.position = \"left\", legend.outside.size = 0.2) # tmap v4 tm_shape(World) + tm_symbols(fill = \"HPI\", size = \"pop_est\", shape = \"income_grp\", size.scale = tm_scale(value.neutral = 0.5)) + tm_place_legends_left(0.2) ## [plot mode] legend/component: Some components or legends are too high and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this."},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"combined-legends","dir":"Articles","previous_headings":"Legends","what":"Combined legends","title":"tmap v4: a sneak peek","text":"Another new feature possibility combine legends directly, quite hassle tmap v3.","code":"# tmap v3 tm_shape(metro) + tm_symbols(col = \"pop2020\", n = 4, size = \"pop2020\", legend.size.show = FALSE, legend.col.show = FALSE) + tm_add_legend(\"symbol\", col = RColorBrewer::brewer.pal(4, \"YlOrRd\"), border.col = \"grey40\", size = ((c(10, 20, 30, 40) * 1e6) / 40e6) ^ 0.5 * 2, labels = c(\"0 mln to 10 mln\", \"10 mln to 20 mln\", \"20 mln to 30 mln\", \"30 mln to 40 mln\"), title = \"Population in 2020\") + tm_layout(legend.outside = TRUE, legend.outside.position = \"bottom\") # tmap v4 tm_shape(metro) + tm_symbols(fill = \"pop2020\", fill.legend = tm_legend(\"Population in 2020\"), size = \"pop2020\", size.scale = tm_scale_intervals(), size.legend = tm_legend_combine(\"fill\"))"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"spacing-between-items","dir":"Articles","previous_headings":"Legends","what":"Spacing between items","title":"tmap v4: a sneak peek","text":"design legends () improved. prominently, space argument determines height legend item. specifically, legend item 1 + space line-height. also useful make continuous legends better.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"facets","dir":"Articles","previous_headings":"","what":"Facets","title":"tmap v4: a sneak peek","text":"tmap v4, convenient wrappers tm_facet_wrap() tm_facet_grid(), former wraps facets, latter places facets grid layout. Furthermore, visual variable free argument, determines whether scales free (TRUE) shared (FALSE) across facets. tmap v3 free argument set via tm_facets(), whereas tmap v4 argument moved layer functions: New tmap v4 facet grid, free argument can specified differently rows columns, show next complex (sorry ) example: see map life expectancy shown polygon fill green, GDP per capita red bubbles. maps grouped income group (rows) economy (columns). scale life expectancy set free columns. means scale applied column separately, legend per column. scale GDP per capita applied separately row.","code":"# tmap v3 tm_shape(World) + tm_borders() + tm_shape(World) + tm_polygons(\"life_exp\") + tm_facets(\"continent\", nrow = 1, free.scales.fill = FALSE, free.coords = FALSE) # tmap v4 tm_shape(World, crs = \"+proj=robin\") + tm_borders() + tm_shape(World) + tm_polygons(\"life_exp\", fill.free = FALSE) + tm_facets_wrap(\"continent\") ## [plot mode] fit legend/component: Some legend items or map compoments do not fit well, and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this. # tmap v3 tm_shape(World) + tm_borders() + tm_shape(World) + tm_polygons(\"life_exp\") + tm_facets(\"continent\", nrow = 1, free.scales.fill = TRUE, free.coords = FALSE) tm_shape(World, crs = \"+proj=robin\") + tm_borders() + tm_shape(World) + tm_polygons(\"life_exp\", fill.free = TRUE) + tm_facets_stack(\"continent\") # tmap v3 # ... not possible :( # tmap v4 tm_shape(World, crs = \"+proj=robin\") + tm_borders() + tm_shape(World) + tm_polygons(fill = \"life_exp\", fill.scale = tm_scale_intervals(values = \"brewer.greens\"), fill.free = c(rows = FALSE, columns = TRUE)) + tm_symbols(size = \"gdp_cap_est\", size.free = c(rows = TRUE, columns = FALSE), fill = \"red\") + tm_facets_grid(\"income_grp\", \"economy\") + tm_layout(meta.margins = c(.2, 0, 0,.1)) ## [plot mode] fit legend/component: Some legend items or map compoments do not fit well, and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this."},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"graphic-engines-modes","dir":"Articles","previous_headings":"","what":"Graphic Engines (modes)","title":"tmap v4: a sneak peek","text":"Just like tmap v3, \"plot\" \"view\" mode. However, framework used tmap v4 also facilitates developers write plotting methods modes. instance, CesiumJS great JavaScript library 3d globe visualizations. awesome include R. low-level interface CesiumJS R (similar R package leaflet interface JS library leaflet R), relatively easy developers add new mode 3d visualizations tmap v4.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"backward-compatibility","dir":"Articles","previous_headings":"","what":"Backward compatibility","title":"tmap v4: a sneak peek","text":"early development stage, tmap v3 code work tmap v4. However, tmap v4 stable, backwards compatible. Layer function arguments longer used, breaks palette deprecated, internally redirected new scale functions. Furthermore, options options tmap v4. instance, legends placed outside maps default, small space legend items shown . order keep layout close possible tmap v3, style set options back settings used default tmap v3. can set just one command: tmap_style(\"tmap_v3\")","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"color-palettes","dir":"Articles","previous_headings":"","what":"Color palettes","title":"tmap v4: a sneak peek","text":"huge number directly available color palettes. settled exact details, e.g. palettes include, can obtained. Ideas welcome (https://github.com/r-tmap/tmap/issues/566). current development version, function similar tmaptools::palette_explorer(), renders long png viewer pane RStudio browser: (click image see full png) also possible render color blindness simulation, e.g.: tmap_show_palettes(color_vision_deficiency = \"deutan\"). default palettes use usable color blind people.","code":"# tmap v4 tmap_show_palettes()"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_sneak_peek.html","id":"suggestions","dir":"Articles","previous_headings":"","what":"Suggestions","title":"tmap v4: a sneak peek","text":"suggestions? Please let us know! Via https://github.com/r-tmap/tmap/issues, please use tmap_v4 tag.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"introduction","dir":"Articles","previous_headings":"","what":"Introduction","title":"tmap: charts","text":"tmap R package spatial data visualization. vignette describes alpha version major update (version 4), CRAN course 2024.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"tmap-4---tmap-3-x","dir":"Articles","previous_headings":"Introduction","what":"tmap 4 - tmap 3.x","title":"tmap: charts","text":"tmap 3.x supports several map layer variables, example \"col\", \"size\", \"shape\" tm_symbols() map layer function. many variables tmap 4. Besides visual variables, -called transformation variables also available. transformation variable role change spatial coordinates (instance, create cartogram). visual variable changes appearance spatial object, e.g. fill color line width. can find examples variables . Map layer arguments (e.g. arguments tm_polygons()) much better organized: visual/transformation variable, four arguments. case fill visual variable, : fill, fill.scale, fill.legend fill.free, respectively specify data variable visual value defines polygon fill color, used scaling function, legend layout, whether scales applied freely across facets. input visual/transformation variable can multivariate, sense multiple data variables scaled one transformation visual variable. example bivariate choropleth, cross tabulation two data variables mapped one (bivariate) color palette. User-defined map layer functions can written (e.g. extension package). Like tmap 3.x, tmap 4.0 comes two modes, \"plot\" \"view\" mode. However, modes can added well, may expect extension package tmap.rayshader point (start writing one ). Legends map components (scale bars) can drawn anywhere outside map. layout legends improved made much flexible. possible combine legends, useful data variable applied multiple visual variables using scaling function.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"tmap-4---ggplot2","dir":"Articles","previous_headings":"Introduction","what":"tmap 4 - ggplot2","title":"tmap: charts","text":"tmap package similar ggplot2 Grammar Graphics, tailored spatial data visualization, whereas ggplot2 much general. specifically: tmap, visual/transformation variables always specifies map layer functions, whereas ggplot2 aesthetics usually specified plot level. ggplot2, scales determined plot level, whereas tmap, determined map layer level. tmap, spatial data (e.g. sf object) specified tm_shape(). spatial coordinates (x y) considered part data (can changed transformation variables). principle, map layer function can used spatial class. E.g. tm_dots() renders dots sf points data, also works spatial classes: e.g. centroids sf polygons/lines raster data (stars / terra packages). However, ggplot2::ggplot(), spatial class requires custom map layer function, e.g. ggplot2::geom_sf() sf objects. tmap static plot mode interactive mode. …","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"tmap-4---other-r-packages","dir":"Articles","previous_headings":"Introduction","what":"tmap 4 - other R packages","title":"tmap: charts","text":"several great R packages spatial data visualization, including: ggplot2, mapview, leaflet, mapsf, generic plot function. interactive \"view\" mode tmap similar mapview sense uses building blocks (packages like leaflet, leafsync, leafgl). Colors important data visualization. purpose, tmap uses cols4all, new R package analyse color palettes, check color-blind-friendliness properties.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"map-layers","dir":"Articles","previous_headings":"","what":"Map layers","title":"tmap: charts","text":"(thematic) map consists one map layers. map layer specific set variables determine objects layer drawn. distinguish two type variables: transformation variables visual variables. transformation variable used change spatial coordinates (instance, cartogram distorts polygons). visual variable changes appearance spatial object, e.g. fill color line width. Transformation variables used specific map layers cartogram, whereas visual variables used almost map layers.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"visual-variables","dir":"Articles","previous_headings":"","what":"Visual variables","title":"tmap: charts","text":"visual variable describes certain visual property drawn object, color, size, shape, line width, line stroke, transparency, fill pattern (ggplot2 called aesthetics). visual variable can specified using constant value (e.g. fill = \"blue\") data-driven (later). can specified constant value, called visual constant. following table shows visual variables used standard map layers. New tmap 4.0 users can write custom map layer functions; another vignette. Important now map layers visual variables can extended needed.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"constant-visual-values","dir":"Articles","previous_headings":"Visual variables","what":"Constant visual values","title":"tmap: charts","text":"following code draws gold country polygons. visual variables mentioned previous table used, constant values. instance, polygon borders drawn width lwd colored col. visual variables default value, case border width color respectively 1 \"black\". visual variable specified different value fill, set \"gold\". completely new tmap: function tm_shape() specifies spatial data object, can spatial data object packages sf, stars, terra, sp, raster. subsequent map layer functions (stacked + operator) specify spatial data visualized. next example three layers: basemap OpenTopoMap, country polygon boundaries, dots metropolitan areas: visual variable argument can also specified data variable (e.g., column name). happens case values data variable mapped values corresponding visual variable. example, life expectancy per country shown, put precisely: data variable life expectancy mapped visual variable polygon fill. understand data mapping, consider following schematic dataset: first column contains spatial geometries (case polygons, can also points, lines, raster tiles). second column data variable like show. third column contains visual values, case colors. Important note many ways scale data values visual values. example data values put 5 year intervals sequential discrete blue scale used show . tm_scale_*() family functions, users free create scales. map uses continuous color scale colors CARTO. scales later.","code":"tm_shape(World) + tm_polygons(\"gold\") if (requireNamespace(\"maptiles\")) { tm_basemap(server = \"OpenTopoMap\", zoom = 2, alpha = 0.5) + tm_shape(World, bbox = sf::st_bbox(c(xmin = -180, xmax = 180, ymin = -86, ymax = 86))) + tm_polygons(fill = NA, col = \"black\") + tm_shape(metro) + tm_symbols(size = 0.1, col = \"red\") + tm_layout(inner.margins = rep(0, 4)) } ## Loading required namespace: maptiles tm_shape(World) + tm_polygons(\"life_exp\") ## geom x1 vv1 ## 1 polygon1 72 blue6 ## 2 polygon2 58 blue3 ## 3 polygon3 52 blue2 ## 4 polygon4 73 blue7 ## 5 ... ... ... tm_shape(World) + tm_polygons(\"life_exp\", fill.scale = tm_scale_continuous(values = \"-carto.earth\"), fill.legend = tm_legend(\"Life\\nExpectancy\"))"},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"transformation-variables","dir":"Articles","previous_headings":"","what":"Transformation variables","title":"tmap: charts","text":"Besides visual variables, map layer may use spatial transformation variables. used two variables: size deform polygons using continuous cartogram fill color polygons. former example transformation variable. example schematic dataset: data variable x1, example pop_est (population estimation), scaled x1_scaled case normalization using continuous scale. Next, geometries distorted areas proportional x1_scaled (much cartogram algorithm able achieve).","code":"if (requireNamespace(\"cartogram\")) { tm_shape(World, crs = 8857) + tm_cartogram(size = \"pop_est\", fill = \"income_grp\") } ## Loading required namespace: cartogram ## Cartogram in progress... ## geom x1 x_scaled geom_transformed ## 1 polygon1 491,775 0.0007 polygon1' ## 2 polygon2 2,231,503 0.0033 polygon2' ## 3 polygon3 34,859,364 0.0554 polygon3' ## 4 polygon4 4,320,748 0.0067 polygon4' ## 5 ... ... ... ..."},{"path":"https://r-tmap.github.io/tmap/dev/articles/tmap_vv.html","id":"scales","dir":"Articles","previous_headings":"","what":"Scales","title":"tmap: charts","text":"visual variable transformation variable can scaled one tm_scale_ functions. illustrate different options, show life expectancy across Africa, round order use categorical scales well. Like tmap 3.x, possible create facets specifying multiple data variable names scales one visual (transformation) variable, case \"fill\": tm_scale_categorical() tm_scale_ordinal() tread data categorical data, ignoring fact actually numbers. difference categorical assume order categories, whereas ordinal . similar factor R can ordered . shown scales can applied numeric data. Note example breaks tm_scale_intervals() similar tick marks tm_scale_continous(). However, using class intervals colors used (case 6 plus color missing values) whereas continuous scale gradient colors used. advantage using class intervals relatively easy read data values map, e.g. value South Africa 55 60, advantage using continuous color scale colors map accurate (unrounded). tm_scale_intervals() possible chose determine breaks (argument style). tm_scale_continous() possible use transformation function: case built-log transformation used (pretty useless particular example data range). Finally, tm_scale_discrete() uses discrete linear scale. Note different tm_scale_ordinal(), use colors values present (categories), instance 53. tm_scale_*() functions can (principle) applied visual transformation variable. Note different ggplot2 scales organized variable type (e.g. ggplot2::scale_fill_continuous()). related another difference ggplot2. tmap, scales set directly map layer function target visual/transformation variable, instance tm_polygons(fill = \"x\", fill.scale = tm_scale_continuous()). ggplot(), scales set outside layer functions. tm_scale_ function (least) following arguments: values, values.repeat, values.range, values.scale, value.na, value.null, value.neutral, labels, label.na, label.null, label.format. value* arguments determine visual values data values mapped. case scale applied visual variable represents color, takes color values color palette. However, instance scale applied line width, values numeric values represent line widths. illustrated following example: defaults value.* arguments stored tmap options. instance contains default color palettes visual variable \"fill\" different types data. instance, data values positive numbers, tm_scale_intervals() tm_scale_continuous() applied, default color palette \"hcl.blues3\", can seen examples . Regarding available color palettes: tmap uses new R package cols4all contains large number well-known color palettes. Please run cols4all::c4a_gui() starts interactive tool (successor tmaptools::palette_explorer()). course, also color palettes can loaded directly via vector color codes.","code":"data(World) Africa = World[World$continent == \"Africa\", ] Africa$life_exp = round(Africa$life_exp) tm_shape(Africa) + tm_polygons(rep(\"life_exp\", 6), fill.scale = list(tm_scale_categorical(), tm_scale_ordinal(), tm_scale_intervals(), tm_scale_continuous(), tm_scale_continuous_log(), tm_scale_discrete()), fill.legend = tm_legend(title = \"\", position = tm_pos_in(\"left\", \"top\"))) + tm_layout(panel.labels = c(\"tm_scale_categorical\", \"tm_scale_ordinal\", \"tm_scale_intervals\", \"tm_scale_continuous\", \"tm_scale_continuous_log\", \"tm_scale_discrete\"), inner.margins = c(0.05, 0.4, 0.1, 0.05), legend.text.size = 0.5) tm_shape(World) + tm_polygons(fill = \"HPI\", fill.scale = tm_scale_intervals(values = \"scico.roma\", value.na = \"grey95\", breaks = c(12,20,30,45))) + tm_symbols(size = \"HPI\", size.scale = tm_scale_intervals(values = c(0.3,0.5, 0.8), value.na = 0.1, breaks = c(12,20,30,45)), col = \"grey30\") tmap_options(\"values.var\")$values.var$fill ## $seq ## [1] \"hcl.blues3\" ## ## $div ## [1] \"pu_gn_div\" ## ## $unord ## [1] \"tol.muted\" ## ## $ord ## [1] \"hcl.blues3\" ## ## $cyc ## [1] \"tol.rainbow_pu_rd\" ## ## $biv ## [1] \"pu_gn_bivs\""},{"path":"https://r-tmap.github.io/tmap/dev/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Martijn Tennekes. Author, maintainer. Jakub Nowosad. Contributor. Joel Gombin. Contributor. Sebastian Jeworutzki. Contributor. Kent Russell. Contributor. Richard Zijdeman. Contributor. John Clouse. Contributor. Robin Lovelace. Contributor. Jannes Muenchow. Contributor. Olivier Roy. Contributor.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Tennekes M (2018). “tmap: Thematic Maps R.” Journal Statistical Software, 84(6), 1–39. doi:10.18637/jss.v084.i06.","code":"@Article{, title = {{tmap}: Thematic Maps in {R}}, author = {Martijn Tennekes}, journal = {Journal of Statistical Software}, year = {2018}, volume = {84}, number = {6}, pages = {1--39}, doi = {10.18637/jss.v084.i06}, }"},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"tmap-thematic-maps-in-r-","dir":"","previous_headings":"","what":"Thematic Maps","title":"Thematic Maps","text":"tmap actively maintained open-source R-library drawing thematic maps. API based Layered Grammar Graphics resembles syntax ggplot2, popular R-library drawing charts. See source code images.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"Thematic Maps","text":"tmap available . Installation straightforward: Linux macOS users new working spatial data R, may fail since additional (non-R) libraries required (automatically installed Windows users). Windows additional installation required. Linux (Ubuntu) See https://geocompx.org/post/2020/installing-r-spatial-packages-linux/. Please address installation issues issue. macOS See https://www.kyngchaos.com/. Please address installation issues issue.","code":"install.packages(\"tmap\")"},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"development","dir":"","previous_headings":"","what":"Development","title":"Thematic Maps","text":"latest development version can installed using remotes. order use development version tmap, recommended use development version tmaptools well: See NEWS latest features improvements issue list discussions enhancements bugs. want help development package? Please let us know! feedback, requests, tips, bug reports welcome!","code":"# install.packages(\"remotes\") install_github(\"r-tmap/tmap\") # On Linux, with pak # install.packages(\"pak\") pak::pak(\"r-tmap/tmap\") # Or from r-universe install.packages(\"tmap\", repos = c(\"https://r-tmap.r-universe.dev\", \"https://cloud.r-project.org\"))"},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"Thematic Maps","text":"","code":"library(tmap)"},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"reference","dir":"","previous_headings":"","what":"Reference","title":"Thematic Maps","text":"Tennekes, M., 2018, tmap: Thematic Maps R, Journal Statistical Software, 84(6), 1-39 paper written tmap 1.11-2. See reproducible code using tmap 2.x.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"vignettes","dir":"","previous_headings":"","what":"Vignettes","title":"Thematic Maps","text":"tmap v3: get started! tmap: changed recent versions?","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"tutorials","dir":"","previous_headings":"","what":"Tutorials","title":"Thematic Maps","text":"tmap RMarkdown","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"presentations","dir":"","previous_headings":"","what":"Presentations","title":"Thematic Maps","text":"Creating thematic maps R (OpenGeoHUB Summer School 2019) Plotting spatial data R (eRum 2018) Exploring presenting maps tmap (useR!2017) tmap: creating thematic maps flexible way (useR!2015)]","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"other-resources","dir":"","previous_headings":"","what":"Other resources","title":"Thematic Maps","text":"Geocomputation R; Making maps R, Robin Lovelace, Jakub Nowosad, Jannes Muenchow R tip: Create maps R Working Spatial Data using tmap, Samantha . Alger Computer World: Mapping R just got whole lot easier National Socio-Environmental Synthesis Center: Maps R Introduction visualizing spatial data R Blog post SpatialControl Blog post TWIAV Computer World: Create maps R 10 (fairly) easy steps Computer World: Great R packages data import, wrangling visualization Tutorial Visualizing spatial data: base shiny - workshop Stack Overflow questions (#tmap)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/index.html","id":"getting-help","dir":"","previous_headings":"","what":"Getting help","title":"Thematic Maps","text":"two main places get help tmap: stackoverflow great source answers common tmap questions. also great place get help, created reproducible example illustrates problem. Please tag questions tmap. request think problem caused bug, please open issue, preferably reproducible example.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/Shapes.html","id":null,"dir":"Reference","previous_headings":"","what":"World and Netherlands map — World","title":"World and Netherlands map — World","text":"Maps world Netherlands (province municipality level), class sf","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/Shapes.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"World and Netherlands map — World","text":"","code":"World NLD_prov NLD_muni"},{"path":"https://r-tmap.github.io/tmap/dev/reference/Shapes.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"World and Netherlands map — World","text":"https://www.naturalearthdata.com/ World https://happyplanetindex.org/ World https://www.cbs.nl/ NLD_prov NLD_muni.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/Shapes.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"World and Netherlands map — World","text":"default projections maps Eckhart IV (World) Rijksdriehoekstelsel (Netherlands). See . projection can changed temporarily plotting purposes using projection argument tm_shape(). World World map. default projection world map Eckhart IV since area sizes preserved, important property choropleths. NLD_prov NLD_muni, maps Netherlands province municipality level 2013. used projection Rijksdriehoekstelsel projection. Important: publication maps allowed citing Statistics Netherlands (CBS) Kadaster Nederland source.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/Shapes.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"World and Netherlands map — World","text":"Statistics Netherlands (2014), Hague/Heerlen, Netherlands, https://www.cbs.nl/. Kadaster, Netherlands' Cadastre, Land Registry, Mapping Agency (2014), Apeldoorn, Netherlands, https://www.kadaster.nl/.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/get_fact_levels_na.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal tmap function that gets factor levels with NA's — get_fact_levels_na","title":"Internal tmap function that gets factor levels with NA's — get_fact_levels_na","text":"Internal tmap function gets factor levels NA's","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/get_fact_levels_na.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal tmap function that gets factor levels with NA's — get_fact_levels_na","text":"","code":"get_fact_levels_na(x, o)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/get_fact_levels_na.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal tmap function that gets factor levels with NA's — get_fact_levels_na","text":"x vector o options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/land.html","id":null,"dir":"Reference","previous_headings":"","what":"Spatial data of global land cover — land","title":"Spatial data of global land cover — land","text":"Spatial data global land cover, percent tree cover, elevation class stars. Two attributes object relates global land cover. cover layer classifies status land cover whole globe 20 categories, cover_cls layer uses 8 simplified categories. Percent Tree Cover (trees) represents density trees ground, last attribute represents elevation.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/land.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spatial data of global land cover — land","text":"","code":"land"},{"path":"https://r-tmap.github.io/tmap/dev/reference/land.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Spatial data of global land cover — land","text":"object class stars 1080 rows 540 columns.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/land.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Spatial data of global land cover — land","text":"Important: publication maps allowed cited Tateishi et al. (2014), \"Geospatial Information Authority Japan, Chiba University collaborating organizations.\" shown.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/land.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Spatial data of global land cover — land","text":"Production Global Land Cover Data - GLCNMO2008, Tateishi, R., Thanh Hoan, N., Kobayashi, T., Alsaaideh, B., Tana, G., Xuan Phong, D. (2014), Journal Geography Geology, 6 (3).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/make_by_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal tmap function to create by variables (used for faceting) — make_by_vars","title":"Internal tmap function to create by variables (used for faceting) — make_by_vars","text":"Internal tmap function create variables (used faceting)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/make_by_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal tmap function to create by variables (used for faceting) — make_by_vars","text":"","code":"make_by_vars(dt, tmf, smeta)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/make_by_vars.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal tmap function to create by variables (used for faceting) — make_by_vars","text":"dt data.table tmf tmf object smeta smeta object","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/metro.html","id":null,"dir":"Reference","previous_headings":"","what":"Spatial data of metropolitan areas — metro","title":"Spatial data of metropolitan areas — metro","text":"metro includes population time series 1950 (forecasted) 2030. metro areas 1 million inhabitants 2010 included.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/metro.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spatial data of metropolitan areas — metro","text":"","code":"metro"},{"path":"https://r-tmap.github.io/tmap/dev/reference/metro.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Spatial data of metropolitan areas — metro","text":"object class sf (inherits data.frame) 436 rows 13 columns.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/metro.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Spatial data of metropolitan areas — metro","text":"https://population.un.org/wup/","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/metro.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Spatial data of metropolitan areas — metro","text":"United Nations, Department Economic Social Affairs, Population Division (2014). World Urbanization Prospects: 2014 Revision, CD-ROM Edition.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tm_element.html","id":null,"dir":"Reference","previous_headings":"","what":"Print tm_element — print.tm_element","title":"Print tm_element — print.tm_element","text":"Print tm_element","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tm_element.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Print tm_element — print.tm_element","text":"","code":"# S3 method for tm_element print(x, ...) # S3 method for tm_shape print(x, ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tm_element.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Print tm_element — print.tm_element","text":"x x ... passed ","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tmap.html","id":null,"dir":"Reference","previous_headings":"","what":"Draw thematic map — print.tmap","title":"Draw thematic map — print.tmap","text":"Draw thematic map","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tmap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Draw thematic map — print.tmap","text":"","code":"# S3 method for tmap print( x, return.asp = FALSE, show = TRUE, vp = NULL, knit = FALSE, options = NULL, ... ) knit_print.tmap(x, ..., options = NULL)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/print.tmap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Draw thematic map — print.tmap","text":"x tmap object. return.asp aspect ratio returned? show show map vp viewport (\"plot\" mode) knit logical, knit? options vector options ... used","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":null,"dir":"Reference","previous_headings":"","what":"Quick thematic map plot — qtm","title":"Quick thematic map plot — qtm","text":"Draw thematic map quickly. function convenient wrapper main plotting method stacking tmap-elements. Without arguments search term, functions draws interactive map.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Quick thematic map plot — qtm","text":"","code":"qtm( shp, fill = tm_const(), col = tm_const(), size = tm_const(), shape = tm_const(), lwd = tm_const(), lty = tm_const(), fill_alpha = tm_const(), col_alpha = tm_const(), text = tm_const(), text_col = tm_const(), text_size = tm_const(), by = NULL, scale = NULL, title = NULL, crs = NULL, bbox = NULL, basemaps = NULL, overlays = NULL, zindex = NA, group = NA, group.control = \"check\", style = NULL, format = NULL, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Quick thematic map plot — qtm","text":"shp One : shape object, object class defined sf stars package. Objects packages sp raster also supported, discouraged. specified, .e. qtm() executed. case plain interactive map shown. OpenStreetMap search string, e.g. qtm(\"Amsterdam\"). case plain interactive map shown positioned according results search query (OpenStreetMap nominatim) fill, col, size, shape, lwd, lty, fill_alpha, col_alpha Visual variables. data variable name data split, vector two variable names split data two variables (first used rows second columns). See also tm_facets(). scale numeric value serves global scale parameter. font sizes, symbol sizes, border widths, line widths controlled value. parameters symbols.size, text.size, lines.lwd can scaled separately respectively symbols.scale, text.scale, lines.scale. See also .... title main title. legend titles, use X.style, X layer name (see ...). crs Either crs object character value (PROJ.4 character string). default, projection used defined shp object . bbox bounding box. Argument passed tm_shape() basemaps name(s) provider URL tiled basemap. shortcut tm_basemap(). Set NULL disable basemaps. default, set tmap option basemaps. overlays name(s) provider URL tiled overlay map. shortcut tm_tiles(). zindex zindex group group group.control group.control style Layout options (see tm_layout()) define style. See tmap_style() details. format Layout options (see tm_layout()) define format. See tmap_format() details. ... arguments passed tm_* functions. prefix arguments layer function name without \"tm_\" period. instance, palette polygon fill color called fill.palette. following prefixes supported: shape., fill., borders., polygons., symbols., dots., lines., raster., text., layout., grid., facets., view.. Arguments unique name, .e. exist layer function, e.g. convert2density, can also called without prefix.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Quick thematic map plot — qtm","text":"tmap-element","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Quick thematic map plot — qtm","text":"first argument shape object (normally specified tm_shape()). next arguments, fill raster, aesthetics main layers. remaining arguments related map layout. argument main layer function, tm_polygons(), can specified (see ...). also possible stack tmap-elements qtm plot. See examples. default, scale bar shown. option can set tmap_options() (argument qtm.scalebar). minimap shown default qtm called without arguments search term. option can set tmap_options() (argument qtm.minimap).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Quick thematic map plot — qtm","text":"Tennekes, M., 2018, tmap: Thematic Maps R, Journal Statistical Software, 84(6), 1-39, doi:10.18637/jss.v084.i06","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/qtm.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Quick thematic map plot — qtm","text":"","code":"data(World, rivers, metro) # just the map qtm(World) # choropleth qtm(World, fill = \"economy\", format = \"World\", style = \"col_blind\", projection = \"+proj=eck4\") #> -- tmap v3 code detected -- #> [v3->v4] qtm(): use 'crs' instead of 'projection' # choropleth with more specifications qtm(World, fill=\"HPI\", fill.n = 9, fill.palette = \"div\", fill.title = \"Happy Planet Index\", fill.id = \"name\", style = \"gray\", format = \"World\", projection = \"+proj=eck4\") #> -- tmap v3 code detected -- #> [v3->v4] qtm(): use 'crs' instead of 'projection' #> [v3->v4] tm_polygons(): migrate the argument(s) related to the scale of the visual variable 'fill', namely 'n', 'palette' (rename to 'values') to 'fill.scale = tm_scale()' #> [v3->v4] tm_polygons(): migrate the argument(s) related to the legend of the visual variable 'fill', namely 'title' to 'fill.legend = tm_legend()' #> [v3->v4] tm_lines(): migrate the argument(s) related to the scale of the visual variable 'col', namely 'n', 'palette' (rename to 'values') to 'col.scale = tm_scale()' #> Error in imp(\"lwd.legend\", NA): could not find function \"imp\" # this map can also be created with the main plotting method, # which is recommended in this case. if (FALSE) { tm_shape(World, projection = \"+proj=eck4\") + tm_polygons(\"HPI\", n = 9, palette = \"div\", title = \"Happy Planet Index\", id = \"name\") + tm_style(\"gray\") + tm_format(\"World\") } # bubble map if (FALSE) { qtm(World, borders = NULL) + qtm(metro, symbols.size = \"pop2010\", symbols.title.size= \"Metropolitan Areas\", symbols.id= \"name\", format = \"World\") } # dot map if (FALSE) { current.mode <- tmap_mode(\"view\") qtm(metro, bbox = \"China\") tmap_mode(current.mode) # restore mode } if (FALSE) { # without arguments, a plain interactive map is shown (the mode is set to view) qtm() # search query for OpenStreetMap nominatim qtm(\"Amsterdam\") }"},{"path":"https://r-tmap.github.io/tmap/dev/reference/reexports.html","id":null,"dir":"Reference","previous_headings":"","what":"Objects exported from other packages — reexports","title":"Objects exported from other packages — reexports","text":"objects imported packages. Follow links see documentation. leaflet providers","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/rivers.html","id":null,"dir":"Reference","previous_headings":"","what":"Spatial data of rivers — rivers","title":"Spatial data of rivers — rivers","text":"Spatial data rivers","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/rivers.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Spatial data of rivers — rivers","text":"","code":"rivers"},{"path":"https://r-tmap.github.io/tmap/dev/reference/rivers.html","id":"format","dir":"Reference","previous_headings":"","what":"Format","title":"Spatial data of rivers — rivers","text":"object class sf (inherits data.frame) 1616 rows 5 columns.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/rivers.html","id":"source","dir":"Reference","previous_headings":"","what":"Source","title":"Spatial data of rivers — rivers","text":"https://www.naturalearthdata.com","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/shapeTM.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal tmap function to create a tmap shape — shapeTM","title":"Internal tmap function to create a tmap shape — shapeTM","text":"Internal tmap function create tmap shape","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/shapeTM.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal tmap function to create a tmap shape — shapeTM","text":"","code":"shapeTM(shp, tmapID = NULL, bbox = NULL, ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/shapeTM.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal tmap function to create a tmap shape — shapeTM","text":"shp Shape file tmapID tmap Identifier bbox bounding box","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/theme_ps.html","id":null,"dir":"Reference","previous_headings":"","what":"ggplot2 theme for proportional symbols — theme_ps","title":"ggplot2 theme for proportional symbols — theme_ps","text":"ggplot2 theme proportional symbols. default, theme shows plotting area, without titles, axes, legend.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/theme_ps.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"ggplot2 theme for proportional symbols — theme_ps","text":"","code":"theme_ps( base_size = 12, base_family = \"\", plot.axes = FALSE, plot.legend = FALSE )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/theme_ps.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"ggplot2 theme for proportional symbols — theme_ps","text":"base_size base size base_family base family plot.axes axes shown? plot.legend legend(s) shown?","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_add_legend.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: manual legend — tm_add_legend","title":"Map component: manual legend — tm_add_legend","text":"Map component adds manual legend","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_add_legend.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: manual legend — tm_add_legend","text":"","code":"tm_add_legend( ..., labels, type = \"symbols\", title = \"\", design = NULL, orientation = NULL, group = NA, group.control = \"check\", resize.as.group = FALSE, z = as.integer(NA) )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_add_legend.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: manual legend — tm_add_legend","text":"... visual variables arguments passed tm_legend(). default, argument type set \"Symbols\", means supported visual variables : \"fill\", \"col\", \"shape\", \"size\", \"fill_alpha\", \"col_alpha\", \"lty\", \"lwd\", \"linejoin\", \"lineend\". labels labels type layer type visual variables (see ...) taken. Options: \"symbols\" (default), \"lines\", \"polygons\", \"text\". title text title design legend design orientation legend orientation group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). resize..group resize..group z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_basemap.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: basemap / overlay tiles — tm_basemap","title":"Map layer: basemap / overlay tiles — tm_basemap","text":"Map layer draws tiles tile server. tm_basemap() draws tile layer basemap, .e. bottom layer. contrast, tm_tiles() draws tile layer overlay layer, stacking order corresponds order layer called, just like map layers.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_basemap.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: basemap / overlay tiles — tm_basemap","text":"","code":"tm_basemap( server = NULL, alpha = NULL, zoom = NULL, zindex = 0, group = NA, group.control = \"radio\" ) tm_tiles( server = NULL, alpha = NULL, zoom = NULL, zindex = NA, group = NA, group.control = \"check\" )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_basemap.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: basemap / overlay tiles — tm_basemap","text":"server Name provider URL. list available providers can obtained providers (tip: RStudio, type providers$ see options). See https://leaflet-extras.github.io/leaflet-providers/preview/ preview . URL provided, template format, e.g. \"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png\". Use NULL tm_basemap() disable basemaps. alpha Transparency level zoom Zoom level (used plot mode) zindex zindex pane view mode. default, set layer number plus 400. default, tmap layers therefore placed custom panes \"tmap401\", \"tmap402\", etc., except base tile layers, placed standard \"tile\". parameter determines name pane z-index, determines pane order bottom top. instance, zindex set 500, pane named \"tmap500\". group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_basemap.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: basemap / overlay tiles — tm_basemap","text":"","code":"if (requireNamespace(\"maptiles\")) { tm_basemap() + tm_shape(World) + tm_polygons(\"HPI\") tm_basemap(\"OpenTopoMap\") + tm_shape(World) + tm_polygons(fill = NA, col = \"black\") tm_basemap(\"CartoDB.PositronNoLabels\") + tm_shape(NLD_prov, crs = 4236) + tm_borders() + tm_facets_wrap(\"name\") + tm_tiles(\"CartoDB.PositronOnlyLabels\") } #> Loading required namespace: maptiles #> SpatRaster object downsampled to 224 by 373 cells. #> SpatRaster object downsampled to 194 by 431 cells. #> SpatRaster object downsampled to 183 by 456 cells. #> SpatRaster object downsampled to 261 by 321 cells. #> SpatRaster object downsampled to 226 by 371 cells. #> SpatRaster object downsampled to 262 by 319 cells. #> SpatRaster object downsampled to 227 by 369 cells. #> SpatRaster object downsampled to 195 by 428 cells. #> SpatRaster object downsampled to 262 by 319 cells. #> SpatRaster object downsampled to 229 by 366 cells. #> SpatRaster object downsampled to 186 by 449 cells. #> SpatRaster object downsampled to 264 by 316 cells. #> SpatRaster object downsampled to 220 by 380 cells. #> SpatRaster object downsampled to 198 by 423 cells. #> SpatRaster object downsampled to 182 by 459 cells. #> SpatRaster object downsampled to 261 by 321 cells. #> SpatRaster object downsampled to 226 by 369 cells. #> SpatRaster object downsampled to 260 by 321 cells. #> SpatRaster object downsampled to 224 by 373 cells. #> SpatRaster object downsampled to 224 by 373 cells. #> SpatRaster object downsampled to 261 by 320 cells. #> SpatRaster object downsampled to 226 by 371 cells. #> SpatRaster object downsampled to 188 by 446 cells. #> SpatRaster object downsampled to 264 by 317 cells."},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_cartogram.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: cartogram — opt_tm_cartogram","title":"Map layer: cartogram — opt_tm_cartogram","text":"Map layer draws cartogram","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_cartogram.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: cartogram — opt_tm_cartogram","text":"","code":"opt_tm_cartogram(type = \"cont\", itermax = 15, ...) opt_tm_cartogram_ncont(type = \"ncont\", expansion = 1, inplace = FALSE, ...) opt_tm_cartogram_dorling(type = \"dorling\", share = 5, itermax = 1000, ...) tm_cartogram( size = 1, size.scale = tm_scale(), size.legend = tm_legend_hide(), size.chart = tm_chart_none(), size.free = NA, plot.order = tm_plot_order(\"size\", reverse = FALSE), options = opt_tm_cartogram(), ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_cartogram.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: cartogram — opt_tm_cartogram","text":"type cartogram type, one : \"cont\" contiguous cartogram, \"ncont\" non-contiguous cartogram \"dorling\" Dorling cartograms itermax, maximum number iterations (see cartogram::cartogram_cont()) ... Arguments passed tm_polygons fill,fill.scale,fill.legend,fill.chart,fill.free Visual variable determines fill color. See details. col,col.scale,col.legend,col.chart,col.free Visual variable determines border color. See details. lwd,lwd.scale,lwd.legend,lwd.chart,lwd.free Visual variable determines line width. See details. lty,lty.scale,lty.legend,lty.chart,lty.free Visual variable determines line type. See details. fill_alpha,fill_alpha.scale,fill_alpha.chart,fill_alpha.legend,fill_alpha.free Visual variable determines fill color alpha transparency See details. col_alpha,col_alpha.scale,col_alpha.legend,col_alpha.chart,col_alpha.free Visual variable determines border color alpha transparency. See details. linejoin,lineend Line join line end. See gpar() details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). popup.vars names data variables shown popups \"view\" mode. Set popup.vars TRUE show variables shape object. Set popup.vars FALSE disable popups. Set popup.vars character vector variable names variables popups. default (NA) depends whether visual variables (e.g.fill) used. , shown. variables shape object shown. popup.format list formatting options popup values. See argument legend.format options. applicable numeric data variables. one list formatting options provided, applied numeric variables popup.vars. Also, (named) list lists can provided. case, list formatting options applied named variable. hover name data variable specifies hover labels id name data variable specifies indices spatial features. used \"view\" mode. expansion factor expansion, see cartogram::cartogram_ncont() (argument k) inplace polygon modified original place? (TRUE default) share share bounding box filled larger circle (see cartogram::cartogram_dorling() argument k) size, size.scale, size.legend, size.chart, size.free Transformation variable determines size polygons. plot.order Specification order spatial features drawn. See tm_plot_order() details. options options passed corresponding opt_ function","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_chart.html","id":null,"dir":"Reference","previous_headings":"","what":"Legend charts — tm_chart_histogram","title":"Legend charts — tm_chart_histogram","text":"Legend charts small charts added map, usually addition legends.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_chart.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Legend charts — tm_chart_histogram","text":"","code":"tm_chart_histogram( breaks, plot.axis.x, plot.axis.y, extra.ggplot2, position, width, height, stack, z, group.frame, resize.as.group ) tm_chart_bar( plot.axis.x, plot.axis.y, extra.ggplot2, position, width, height, stack, z, group.frame, resize.as.group ) tm_chart_donut(position, width, height, stack, z, group.frame, resize.as.group) tm_chart_violin( position, width, height, stack, z, group.frame, resize.as.group ) tm_chart_box(position, width, height, stack, z, group.frame, resize.as.group) tm_chart_none() tm_chart_heatmap( position, width, height, stack, z, group.frame, resize.as.group )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_chart.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Legend charts — tm_chart_histogram","text":"breaks breaks bins (histograms) plot.axis.x, plot.axis.y x axis y axis plot? extra.ggplot2 Extra ggplot2 code position Position chart. See tm_pos() details width number text lines (height ) height number text lines stack stack map components? z stacking order group.frame group.frame resize..group resize..group","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_chart.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Legend charts — tm_chart_histogram","text":"Note charts different charts drawn inside map. called glyphs (implemented).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_chart.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Legend charts — tm_chart_histogram","text":"","code":"## numerical variable tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_intervals(), fill.chart = tm_chart_histogram()) tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_continuous(), fill.chart = tm_chart_histogram( position = tm_pos_out(\"center\", \"bottom\"), width = 30) ) tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_intervals(), fill.chart = tm_chart_donut()) tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_intervals(), fill.chart = tm_chart_box()) tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_intervals(), fill.chart = tm_chart_violin()) # with additional ggplot2 code require(ggplot2) #> Loading required package: ggplot2 tm_shape(World) + tm_polygons(\"HPI\", fill.scale = tm_scale_intervals(), fill.chart = tm_chart_bar( extra.ggplot2 = theme( panel.grid.major.y = element_line(colour = \"red\") )) ) tm_shape(land) + tm_raster(\"trees\", col.chart = tm_chart_histogram()) ## categorical variable tm_shape(World) + tm_polygons(\"economy\", fill.scale = tm_scale_categorical(), fill.chart = tm_chart_bar()) tm_shape(World) + tm_polygons(\"economy\", fill.scale = tm_scale_categorical(), fill.chart = tm_chart_donut()) # bivariate (in development) tm_shape(World) + tm_polygons(tm_mv(\"HPI\", \"well_being\"), fill.chart = tm_chart_heatmap()) #> Labels abbreviated by the first letters, e.g.: \"2 to 3\" => \"2\""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_compass.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: compass — tm_compass","title":"Map component: compass — tm_compass","text":"Map component adds compass","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_compass.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: compass — tm_compass","text":"","code":"tm_compass( north, type, text.size, size, show.labels, cardinal.directions, text.color, color.dark, color.light, lwd, position, bg.color, bg.alpha, stack, just, frame, frame.lwd, frame.r, margins, z )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_compass.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: compass — tm_compass","text":"north north type type text.size text.size size size show.labels show.labels cardinal.directions cardinal.directions text.color text.color color.dark color.dark color.light color.light lwd lwd position position bg.color bg.color bg.alpha bg.alpha stack stack just just frame frame frame.lwd frame.lwd frame.r frame.r margins margins z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_const.html","id":null,"dir":"Reference","previous_headings":"","what":"tmap function to define a constant visual value — tm_const","title":"tmap function to define a constant visual value — tm_const","text":"tmap function define constant visual value","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_const.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"tmap function to define a constant visual value — tm_const","text":"","code":"tm_const()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_credits.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: (credits) text — tm_credits","title":"Map component: (credits) text — tm_credits","text":"Map component adds text, typically used credits","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_credits.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: (credits) text — tm_credits","text":"","code":"tm_credits( text, size, color, padding, fontface, fontfamily, stack, just, frame, frame.lwd, frame.r, bg.color, bg.alpha, position, width, height, group.frame, resize.as.group, z )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_credits.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: (credits) text — tm_credits","text":"text text title size font size title color color padding padding fontface font face fontfamily font family stack stack just just frame frame frame.lwd frame.lwd frame.r frame.r bg.color bg.color bg.alpha bg.alpha position position width width height height group.frame group.frame resize..group resize..group z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_extra_innner_margin.html","id":null,"dir":"Reference","previous_headings":"","what":"tmap layout: helper functions — tm_place_legends_right","title":"tmap layout: helper functions — tm_place_legends_right","text":"tmap layout: helper functions","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_extra_innner_margin.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"tmap layout: helper functions — tm_place_legends_right","text":"","code":"tm_place_legends_right(width = NA) tm_place_legends_left(width = NA) tm_place_legends_bottom(height = NA) tm_place_legends_top(height = NA) tm_place_legends_inside(pos.h = NULL, pos.v = NULL) tm_extra_innner_margin(left = 0, right = 0, top = 0, bottom = 0)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_extra_innner_margin.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"tmap layout: helper functions — tm_place_legends_right","text":"width width height height pos.h, pos.v position (horizontal vertical) left, right, top, bottom extra margins","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_facets.html","id":null,"dir":"Reference","previous_headings":"","what":"Facets — tm_facets","title":"Facets — tm_facets","text":"Specify facets. tm_facets() core function, recommended use tm_facets_wrap(), tm_facets_stack() tm_facets_grid(). former two specify facets one grouping variable (one faceting dimension). difference wrap may place facets multiple rows columns whereas tm_facets_stack() stacks facets either horizontally vertically. tm_facets_grid() supports three faceting dimensions.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_facets.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Facets — tm_facets","text":"","code":"tm_facets( by = NULL, rows = NULL, columns = NULL, pages = NULL, as.layers = FALSE, nrows = NA, ncols = NA, byrow = TRUE, orientation = NA, free.coords = NA, drop.units = TRUE, drop.empty.facets = TRUE, drop.NA.facets = FALSE, sync = TRUE, showNA = NA, textNA = \"Mssing\", scale.factor = 2, type = NA, along = NULL, free.scales = NULL ) tm_facets_grid(rows = NULL, columns = NULL, pages = NULL, ...) tm_facets_wrap(by = \"VARS__\", nrows = NA, ncols = NA, byrow = TRUE, ...) tm_facets_pagewise(by = \"VARS__\", nrows = 1, ncols = 1, byrow = TRUE, ...) tm_facets_stack(by = \"VARS__\", orientation = NA, ...) tm_facets_hstack(by = \"VARS__\", ...) tm_facets_vstack(by = \"VARS__\", ...) tm_facets_flip(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_facets.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Facets — tm_facets","text":"Group variable (facet wrap facet stack) rows Variable specifies rows (facet grid) columns Variable specifies columns (facet grid) pages Variable specifies pages (facet grid) .layers show facets layers? nrows Number rows ncols Number columns byrow facets wrapped row? orientation facet stack: horizontal vertical? free.coords Logical. argument specified, map coordinate ranges? default TRUE, unless facets shown different layers (.layers = TRUE) drop.units Logical. argument specified, non-selected spatial units dropped? FALSE, plotted mapped aesthetics regarded missing values. applicable raster shapes. default TRUE. drop.empty.facets Logical. argument specified, empty facets dropped? Empty facets occur -variable contains unused levels. TRUE two -variables specified, empty rows columns dropped. drop.NA.facets Logical. argument specified, data values specific facets missing, facets dropped? FALSE default. sync Logical. navigation view mode (zooming panning) synchronized? default TRUE facets bounding box. generally case rasters plotted, free.coords FALSE. showNA argument specified, missing values -variable shown facet? two -variables specified, missing values shown additional row column? NA, missing values shown exist. Similar useNA argument table(), TRUE, FALSE, NA correspond \"always\", \"\", \"ifany\" respectively. textNA Text used facets missing values. scale.factor Number determines elements (e.g. font sizes, symbol sizes, line widths) small multiples scaled relation scaling factor shapes. elements scaled scale.factorth root scaling factor shapes. , scale.factor=1, scaled proportional scaling shapes. Since elements, especially text, often small read, higher value recommended. default, scale.factor=2. type \"grid\", \"wrap\" \"stack\" along deprecated Please use tm_facets_page() free.scales deprecated. Please use .free arguments layer functions, e.g. fill.free tm_polygons. ... passed tm_facets()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_graticules.html","id":null,"dir":"Reference","previous_headings":"","what":"Coordinate grid / graticule lines — tm_graticules","title":"Coordinate grid / graticule lines — tm_graticules","text":"Draw latitude longitude graticules. creates tmap-element draws coordinate grid lines. serves layer can drawn anywhere layers. See tm_grid() drawing horizontal lines.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_graticules.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coordinate grid / graticule lines — tm_graticules","text":"","code":"tm_graticules( x = NA, y = NA, n.x = NA, n.y = NA, crs = 4326, labels.format = list(suffix = intToUtf8(176)), labels.cardinal = TRUE, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_graticules.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coordinate grid / graticule lines — tm_graticules","text":"x X coordinates vertical grid lines. NA, specified pretty scale n.x. y Y coordinates horizontal grid lines. NA, specified pretty scale n.y. n.x Preferred number grid lines x axis. labels, pretty() sequence used, number actual labels may different n.x. n.y Preferred number grid lines y axis. labels, pretty() sequence used, number actual labels may different n.y. crs Projection character. specified, grid lines projected accordingly. Many world maps projected, still latitude longitude (EPSG 4326) grid lines. labels.format List formatting options grid labels. Parameters : fun Function specify labels. take numeric vector, return character vector size. default specified. specified, list items scientific, format, digits (see ) used. scientific labels formatted scientifically? , square brackets used, format numbers \"g\". Otherwise, format=\"f\", text.separator, text.less., text..used. Also, numbers automatically rounded millions billions applicable. format default, \"f\", .e. standard notation xxx.xxx, used. scientific=TRUE \"g\", means numbers formatted scientifically, .e. n.dddE+nn needed save space. digits Number digits decimal point format=\"f\", number significant digits otherwise. ... arguments passed formatC() labels.cardinal Add four cardinal directions (N, E, S, W) labels, instead using negative coordinates west south (assumes coordinates positive north-east direction). ... Arguments passed tm_grid col Color grid lines. lwd Line width grid lines alpha Alpha transparency grid lines. Number 0 1. default, alpha transparency col taken. labels.show Show tick labels. Either one value x y axis, vector two: first x latter y. labels.pos position labels. Vector two: horizontal (\"left\" \"right\") vertical (\"top\" \"bottom\") position. labels.size Font size tick labels labels.col Font color tick labels labels.rot Rotation angles labels. Vector two values: first rotation angle (degrees) tick labels x axis second rotation angle tick labels y axis. 0, 90, 180, 270 valid values. labels.margin.x Margin tick labels x axis frame. Note labels.inside.frame = FALSE ticks = TRUE, ticks adjusted accordingly. labels.margin.y Margin tick labels y axis frame. Note labels.inside.frame = FALSE ticks = TRUE, ticks adjusted accordingly. labels.space.x Space used labels ticks x-axis labels.inside.frame = FALSE. default, determined automatically using widths heights tick labels. unit parameter text line height. labels.space.y Space used labels ticks y-axis labels.inside.frame = FALSE. default, determined automatically using widths heights tick labels. unit parameter text line height. labels.inside.frame Show labels inside frame? default FALSE. ticks labels.inside.frame = FALSE, ticks can drawn labels frame? Either one value x y axis, vector two: first x latter y. lines labels.inside.frame = FALSE, grid lines can drawn? ndiscr Number points discretize parallel meridian (applicable curved grid lines) zindex zindex pane view mode. default, set layer number plus 400. default, tmap layers therefore placed custom panes \"tmap401\", \"tmap402\", etc., except base tile layers, placed standard \"tile\". parameter determines name pane z-index, determines pane order bottom top. instance, zindex set 500, pane named \"tmap500\". group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_graticules.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coordinate grid / graticule lines — tm_graticules","text":"","code":"current.mode <- tmap_mode(\"plot\") #> tmap mode set to 'plot' tm_shape(NLD_muni) + tm_polygons() + tm_grid() tm_shape(NLD_muni) + tm_polygons() + tm_grid(crs = 4326) tm_shape(NLD_muni) + tm_polygons() + tm_grid(crs = 3035, labels.inside.frame = TRUE) tm_shape(World) + tm_polygons() + tm_facets(by = \"continent\") + tm_grid(labels.inside.frame = TRUE) tm_shape(NLD_muni) + tm_polygons() + tm_graticules() tm_shape(NLD_muni) + tm_polygons() + tm_graticules(labels.pos = c(\"right\", \"top\")) data(NLD_muni, World) tmap_arrange( qtm(NLD_muni, borders = NULL) + tm_grid(), qtm(NLD_muni, borders = NULL) + tm_graticules() ) #> -- tmap v3 code detected -- #> [v3->v4] qtm(): use 'col = NA' instead of 'borders = NULL' #> [v3->v4] qtm(): use 'col = NA' instead of 'borders = NULL' qtm(World, shape.crs = \"+proj=robin\", style = \"natural\") + tm_graticules(ticks = FALSE) + tm_layout(frame=FALSE) #> -- tmap v3 code detected -- tmap_mode(current.mode) #> tmap mode set to 'plot'"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_grid.html","id":null,"dir":"Reference","previous_headings":"","what":"Coordinate grid / graticule lines — tm_grid","title":"Coordinate grid / graticule lines — tm_grid","text":"tm_grid() draws horizontal vertical lines according coordinate system (master) shape object. Creates tmap-element draws coordinate grid lines. serves layer can drawn anywhere layers. See tm_graticules() draw latitude longitude graticules.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_grid.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Coordinate grid / graticule lines — tm_grid","text":"","code":"tm_grid( x = NA, y = NA, n.x = NA, n.y = NA, crs = NA, col = NA, lwd = 1, alpha = NA, labels.show = TRUE, labels.pos = c(\"left\", \"bottom\"), labels.size = 0.6, labels.col = NA, labels.rot = c(0, 0), labels.format = list(big.mark = \",\"), labels.cardinal = FALSE, labels.margin.x = 0, labels.margin.y = 0, labels.space.x = NA, labels.space.y = NA, labels.inside.frame = FALSE, ticks = labels.show & !labels.inside.frame, lines = TRUE, ndiscr = 100, zindex = NA, group = NA, group.control = \"none\", ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_grid.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Coordinate grid / graticule lines — tm_grid","text":"x X coordinates vertical grid lines. NA, specified pretty scale n.x. y Y coordinates horizontal grid lines. NA, specified pretty scale n.y. n.x Preferred number grid lines x axis. labels, pretty() sequence used, number actual labels may different n.x. n.y Preferred number grid lines y axis. labels, pretty() sequence used, number actual labels may different n.y. crs Projection character. specified, grid lines projected accordingly. Many world maps projected, still latitude longitude (EPSG 4326) grid lines. col Color grid lines. lwd Line width grid lines alpha Alpha transparency grid lines. Number 0 1. default, alpha transparency col taken. labels.show Show tick labels. Either one value x y axis, vector two: first x latter y. labels.pos position labels. Vector two: horizontal (\"left\" \"right\") vertical (\"top\" \"bottom\") position. labels.size Font size tick labels labels.col Font color tick labels labels.rot Rotation angles labels. Vector two values: first rotation angle (degrees) tick labels x axis second rotation angle tick labels y axis. 0, 90, 180, 270 valid values. labels.format List formatting options grid labels. Parameters : fun Function specify labels. take numeric vector, return character vector size. default specified. specified, list items scientific, format, digits (see ) used. scientific labels formatted scientifically? , square brackets used, format numbers \"g\". Otherwise, format=\"f\", text.separator, text.less., text..used. Also, numbers automatically rounded millions billions applicable. format default, \"f\", .e. standard notation xxx.xxx, used. scientific=TRUE \"g\", means numbers formatted scientifically, .e. n.dddE+nn needed save space. digits Number digits decimal point format=\"f\", number significant digits otherwise. ... arguments passed formatC() labels.cardinal Add four cardinal directions (N, E, S, W) labels, instead using negative coordinates west south (assumes coordinates positive north-east direction). labels.margin.x Margin tick labels x axis frame. Note labels.inside.frame = FALSE ticks = TRUE, ticks adjusted accordingly. labels.margin.y Margin tick labels y axis frame. Note labels.inside.frame = FALSE ticks = TRUE, ticks adjusted accordingly. labels.space.x Space used labels ticks x-axis labels.inside.frame = FALSE. default, determined automatically using widths heights tick labels. unit parameter text line height. labels.space.y Space used labels ticks y-axis labels.inside.frame = FALSE. default, determined automatically using widths heights tick labels. unit parameter text line height. labels.inside.frame Show labels inside frame? default FALSE. ticks labels.inside.frame = FALSE, ticks can drawn labels frame? Either one value x y axis, vector two: first x latter y. lines labels.inside.frame = FALSE, grid lines can drawn? ndiscr Number points discretize parallel meridian (applicable curved grid lines) zindex zindex pane view mode. default, set layer number plus 400. default, tmap layers therefore placed custom panes \"tmap401\", \"tmap402\", etc., except base tile layers, placed standard \"tile\". parameter determines name pane z-index, determines pane order bottom top. instance, zindex set 500, pane named \"tmap500\". group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). ... Used catch deprecated arguments tmap v3.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_grid.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Coordinate grid / graticule lines — tm_grid","text":"","code":"current.mode <- tmap_mode(\"plot\") #> tmap mode set to 'plot' tm_shape(NLD_muni) + tm_polygons() + tm_grid() tm_shape(NLD_muni) + tm_polygons() + tm_grid(crs = 4326) tm_shape(NLD_muni) + tm_polygons() + tm_grid(crs = 3035, labels.inside.frame = TRUE) tm_shape(World) + tm_polygons() + tm_facets(by = \"continent\") + tm_grid(labels.inside.frame = TRUE) tm_shape(NLD_muni) + tm_polygons() + tm_graticules() tm_shape(NLD_muni) + tm_polygons() + tm_graticules(labels.pos = c(\"right\", \"top\")) data(NLD_muni, World) tmap_arrange( qtm(NLD_muni, borders = NULL) + tm_grid(), qtm(NLD_muni, borders = NULL) + tm_graticules() ) #> -- tmap v3 code detected -- #> [v3->v4] qtm(): use 'col = NA' instead of 'borders = NULL' #> [v3->v4] qtm(): use 'col = NA' instead of 'borders = NULL' qtm(World, shape.crs = \"+proj=robin\", style = \"natural\") + tm_graticules(ticks = FALSE) + tm_layout(frame=FALSE) #> -- tmap v3 code detected -- tmap_mode(current.mode) #> tmap mode set to 'plot'"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_layout.html","id":null,"dir":"Reference","previous_headings":"","what":"Layout options — tm_style","title":"Layout options — tm_style","text":"Set tmap options directly related layout.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_layout.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Layout options — tm_style","text":"","code":"tm_style(style, ...) tm_format(format, ...) tm_layout( modes, crs, facet.max, facet.flip, raster.max.cells, show.messages, show.warnings, output.format, output.size, output.dpi, output.dpi.animation, value.const, value.na, value.null, value.blank, values.var, values.range, value.neutral, scales.var, scale.misc.args, label.format, label.na, scale, asp, bg.color, outer.bg.color, frame, frame.lwd, frame.r, frame.double.line, outer.margins, inner.margins, inner.margins.extra, meta.margins, meta.auto.margins, between.margin, component.offset, component.stack.margin, grid.mark.height, xylab.height, coords.height, xlab.show, xlab.text, xlab.size, xlab.color, xlab.rotation, xlab.space, xlab.fontface, xlab.fontfamily, xlab.side, ylab.show, ylab.text, ylab.size, ylab.color, ylab.rotation, ylab.space, ylab.fontface, ylab.fontfamily, ylab.side, panel.type, panel.wrap.pos, panel.xtab.pos, unit, color.sepia.intensity, color.saturation, color.vision.deficiency.sim, text.fontface, text.fontfamily, legend.show, legend.design, legend.orientation, legend.position, legend.width, legend.height, legend.stack, legend.group.frame, legend.resize.as.group, legend.reverse, legend.na.show, legend.title.color, legend.title.size, legend.title.fontface, legend.title.fontfamily, legend.xlab.color, legend.xlab.size, legend.xlab.fontface, legend.xlab.fontfamily, legend.ylab.color, legend.ylab.size, legend.ylab.fontface, legend.ylab.fontfamily, legend.text.color, legend.text.size, legend.text.fontface, legend.text.fontfamily, legend.frame, legend.frame.lwd, legend.frame.r, legend.bg.color, legend.bg.alpha, legend.settings.standard.portrait, legend.settings.standard.landscape, title.show, title.size, title.color, title.fontface, title.fontfamily, title.bg.color, title.bg.alpha, title.padding, title.frame, title.frame.lwd, title.frame.r, title.stack, title.position, title.group.frame, title.resize.as.group, credits.show, credits.size, credits.color, credits.fontface, credits.fontfamily, credits.bg.color, credits.bg.alpha, credits.padding, credits.frame, credits.frame.lwd, credits.frame.r, credits.stack, credits.position, credits.width, credits.heigth, credits.group.frame, credits.resize.as.group, compass.north, compass.type, compass.text.size, compass.size, compass.show.labels, compass.cardinal.directions, compass.text.color, compass.color.dark, compass.color.light, compass.lwd, compass.bg.color, compass.bg.alpha, compass.margins, compass.show, compass.stack, compass.position, compass.frame, compass.frame.lwd, compass.frame.r, compass.group.frame, compass.resize.as.group, scalebar.show, scalebar.breaks, scalebar.width, scalebar.text.size, scalebar.text.color, scalebar.color.dark, scalebar.color.light, scalebar.lwd, scalebar.position, scalebar.bg.color, scalebar.bg.alpha, scalebar.size, scalebar.margins, scalebar.stack, scalebar.frame, scalebar.frame.lwd, scalebar.frame.r, scalebar.group.frame, scalebar.resize.as.group, grid.show, grid.labels.pos, grid.x, grid.y, grid.n.x, grid.n.y, grid.crs, grid.col, grid.lwd, grid.alpha, grid.labels.show, grid.labels.size, grid.labels.col, grid.labels.rot, grid.labels.format, grid.labels.cardinal, grid.labels.margin.x, grid.labels.margin.y, grid.labels.space.x, grid.labels.space.y, grid.labels.inside.frame, grid.ticks, grid.lines, grid.ndiscr, mouse_coordinates.stack, mouse_coordinates.position, mouse_coordinates.show, panel.show, panel.labels, panel.label.size, panel.label.color, panel.label.fontface, panel.label.fontfamily, panel.label.bg.color, panel.label.height, panel.label.rot, qtm.scalebar, qtm.minimap, qtm.mouse.coordinates, earth.boundary, earth.boundary.color, earth.boundary.lwd, earth.datum, space.color, attr.color, max.categories, legend.hist.bg.color, legend.hist.bg.alpha, legend.hist.size, legend.hist.height, legend.hist.width, attr.outside, attr.outside.position, attr.outside.size, attr.position, attr.just, basemap.server, basemap.alpha, basemap.zoom, overlays, overlays.alpha, alpha, colorNA, symbol.size.fixed, dot.size.fixed, text.size.variable, bbox, check.and.fix, set.bounds, set.view, set.zoom.limits, name, basemap.show, title = NULL, main.title = NULL, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_layout.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Layout options — tm_style","text":"style name style ... used catch deprecated arguments format name format modes, crs, facet.max, facet.flip, raster.max.cells, show.messages, show.warnings, output.format, output.size, output.dpi, output.dpi.animation, value.const, value.na, value.null, value.blank, values.var, values.range, value.neutral, scales.var, scale.misc.args See tmap_options() label.format, label.na, scale, asp, bg.color, outer.bg.color, frame, frame.lwd, frame.r, frame.double.line, outer.margins, inner.margins, inner.margins.extra, meta.margins, meta.auto.margins, .margin, component.offset, component.stack.margin See tmap_options() grid.mark.height, xylab.height, coords.height, xlab.show, xlab.text, xlab.size, xlab.color, xlab.rotation, xlab.space, xlab.fontface, xlab.fontfamily, xlab.side, ylab.show, ylab.text, ylab.size, ylab.color, ylab.rotation, ylab.space, ylab.fontface, ylab.fontfamily, ylab.side See tmap_options() panel.type, panel.wrap.pos, panel.xtab.pos, unit, color.sepia.intensity, color.saturation, color.vision.deficiency.sim, text.fontface, text.fontfamily See tmap_options() legend.show, legend.design, legend.orientation, legend.position, legend.width, legend.height, legend.stack, legend.group.frame, legend.resize..group, legend.reverse, legend.na.show, legend.title.color, legend.title.size, legend.title.fontface, legend.title.fontfamily, legend.xlab.color, legend.xlab.size, legend.xlab.fontface, legend.xlab.fontfamily, legend.ylab.color, legend.ylab.size, legend.ylab.fontface, legend.ylab.fontfamily, legend.text.color, legend.text.size, legend.text.fontface, legend.text.fontfamily, legend.frame, legend.frame.lwd, legend.frame.r, legend.bg.color, legend.bg.alpha, legend.settings.standard.portrait, legend.settings.standard.landscape See tmap_options() title.show, title.size, title.color, title.fontface, title.fontfamily, title.bg.color, title.bg.alpha, title.padding, title.frame, title.frame.lwd, title.frame.r, title.stack, title.position, title.group.frame, title.resize..group See tmap_options() credits.show, credits.size, credits.color, credits.fontface, credits.fontfamily, credits.bg.color, credits.bg.alpha, credits.padding, credits.frame, credits.frame.lwd, credits.frame.r, credits.stack, credits.position, credits.width, credits.heigth, credits.group.frame, credits.resize..group See tmap_options() compass.north, compass.type, compass.text.size, compass.size, compass.show.labels, compass.cardinal.directions, compass.text.color, compass.color.dark, compass.color.light, compass.lwd, compass.bg.color, compass.bg.alpha, compass.margins, compass.show, compass.stack, compass.position, compass.frame, compass.frame.lwd, compass.frame.r, compass.group.frame, compass.resize..group See tmap_options() scalebar.show, scalebar.breaks, scalebar.width, scalebar.text.size, scalebar.text.color, scalebar.color.dark, scalebar.color.light, scalebar.lwd, scalebar.position, scalebar.bg.color, scalebar.bg.alpha, scalebar.size, scalebar.margins, scalebar.stack, scalebar.frame, scalebar.frame.lwd, scalebar.frame.r, scalebar.group.frame, scalebar.resize..group See tmap_options() grid.show, grid.labels.pos, grid.x, grid.y, grid.n.x, grid.n.y, grid.crs, grid.col, grid.lwd, grid.alpha, grid.labels.show, grid.labels.size, grid.labels.col, grid.labels.rot, grid.labels.format, grid.labels.cardinal, grid.labels.margin.x, grid.labels.margin.y, grid.labels.space.x, grid.labels.space.y, grid.labels.inside.frame, grid.ticks, grid.lines, grid.ndiscr See tmap_options() mouse_coordinates.stack, mouse_coordinates.position, mouse_coordinates.show, panel.show, panel.labels, panel.label.size, panel.label.color, panel.label.fontface, panel.label.fontfamily, panel.label.bg.color, panel.label.height, panel.label.rot, qtm.scalebar, qtm.minimap, qtm.mouse.coordinates See tmap_options() earth.boundary, earth.boundary.color, earth.boundary.lwd, earth.datum, space.color, attr.color, max.categories, legend.hist.bg.color, legend.hist.bg.alpha, legend.hist.size, legend.hist.height, legend.hist.width, attr.outside, attr.outside.position, attr.outside.size, attr.position, attr.just, basemap.server, basemap.alpha, basemap.zoom, overlays, overlays.alpha, alpha, colorNA, symbol.size.fixed, dot.size.fixed, text.size.variable, bbox, check..fix, set.bounds, set.view, set.zoom.limits, name, basemap.show See tmap_options() title, main.title deprecated","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_layout.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Layout options — tm_style","text":"","code":"data(land, World) # Error unable to warp stars (argument not yet added to tm_shape) # On Windows if (FALSE) { tm_shape(land, raster.wrap = FALSE) + tm_raster( \"elevation\", col.scale = tm_scale_intervals( breaks = c(-Inf, 250, 500, 1000, 1500, 2000, 2500, 3000, 4000, Inf), values = terrain.colors(9), midpoint = NA ), col.legend = tm_legend( title = \"Elevation\", position = tm_pos_in(\"left\", \"bottom\"), frame = TRUE, bg.color = \"lightblue\" ) ) + tm_shape(World, is.main = TRUE, crs = \"+proj=eck4\") + tm_borders(\"grey20\") + tm_graticules(labels.size = .5) + tm_text(\"name\", size = \"AREA\") + # tm_compass(position = c(.65, .15), color.light = \"grey90\") + # tm_credits(\"Eckert IV projection\", position = c(\"right\", \"BOTTOM\")) + tm_style(\"classic_v3\") + tm_layout(bg.color = \"lightblue\", inner.margins = c(0, 0, .02, 0)) } data(land, World) tm_shape(World) + tm_fill(\"pop_est_dens\", fill.scale = tm_scale_intervals(style = \"kmeans\"), fill.legend = tm_legend(title = \"Population density\")) + tm_style(\"albatross_v3\", frame.lwd = 10) + tm_format(\"World\") + tm_title(\"The World\", position = tm_pos_in(\"left\", \"top\")) ################################ # not working yet: ################################ if (FALSE) { tm_shape(land) + tm_raster(\"elevation\", breaks=c(-Inf, 250, 500, 1000, 1500, 2000, 2500, 3000, 4000, Inf), palette = terrain.colors(9), title=\"Elevation\", midpoint = NA) + tm_shape(World, is.master=TRUE, projection = \"+proj=eck4\") + tm_borders(\"grey20\") + tm_graticules(labels.size = .5) + tm_text(\"name\", size=\"AREA\") + tm_compass(position = c(.65, .15), color.light = \"grey90\") + tm_credits(\"Eckert IV projection\", position = c(\"right\", \"BOTTOM\")) + tm_style(\"classic\") + tm_layout(bg.color=\"lightblue\", inner.margins=c(.04,.03, .02, .01), earth.boundary = TRUE, space.color=\"grey90\") + tm_legend(position = c(\"left\", \"bottom\"), frame = TRUE, bg.color=\"lightblue\") } tm_shape(World, projection=\"+proj=robin\") + tm_polygons(\"HPI\", palette=\"div\", n=7, title = \"Happy Planet Index\") + tm_credits(\"Robinson projection\", position = c(\"right\", \"BOTTOM\")) + tm_style(\"natural\", earth.boundary = c(-180, -87, 180, 87), inner.margins = .05) + tm_legend(position=c(\"left\", \"bottom\"), bg.color=\"grey95\", frame=TRUE) #> -- tmap v3 code detected -- #> [v3->v4] tm_shape(): use 'crs' instead of 'projection' #> [v3->v4] tm_polygons(): migrate the argument(s) related to the scale of the visual variable 'fill', namely 'n', 'palette' (rename to 'values') to 'fill.scale = tm_scale()' #> [v3->v4] tm_polygons(): migrate the argument(s) related to the legend of the visual variable 'fill', namely 'title' to 'fill.legend = tm_legend()' #> [v3->v4] tm_legend(): use 'tm_legend()' inside a layer function, e.g. 'tm_polygons(..., fill.legend = tm_legend())' # Not working yet if (FALSE) { # Example to illustrate the type of titles tm_shape(World) + tm_polygons(c(\"income_grp\", \"economy\"), title = c(\"Legend Title 1\", \"Legend Title 2\")) + tm_layout(main.title = \"Main Title\", main.title.position = \"center\", main.title.color = \"blue\", title = c(\"Title 1\", \"Title 2\"), title.color = \"red\", panel.labels = c(\"Panel Label 1\", \"Panel Label 2\"), panel.label.color = \"purple\", legend.text.color = \"brown\") } if (FALSE) { # global option tmap.style demo # get current style current.style <- tmap_style() qtm(World, fill = \"economy\", format = \"World\") tmap_style(\"col_blind\") qtm(World, fill = \"economy\", format = \"World\") tmap_style(\"cobalt\") qtm(World, fill = \"economy\", format = \"World\") # set to current style tmap_style(current.style) } # TIP: check out these examples in view mode, enabled with tmap_mode(\"view\")"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_legend.html","id":null,"dir":"Reference","previous_headings":"","what":"Legend — tm_legend","title":"Legend — tm_legend","text":"Legend specification","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_legend.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Legend — tm_legend","text":"","code":"tm_legend( title, show, orientation, design, reverse, na.show, position, width, height, stack, z, group.frame, resize.as.group, title.color, title.size, title.fontface, title.fontfamily, title.padding, text.color, text.size, text.fontface, text.fontfamily, format, frame, frame.lwd, frame.r, bg.color, bg.alpha, item.height, item.width, item.space, item.na.height, item.na.width, item.na.space, item.shape, ticks, ticks.disable.na, ticks.col, ticks.lwd, title.align, margins, margin.item.text, ... ) tm_legend_hide() tm_legend_combine(variable)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_legend.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Legend — tm_legend","text":"title PARAM_DESCRIPTION show PARAM_DESCRIPTION orientation PARAM_DESCRIPTION design PARAM_DESCRIPTION reverse PARAM_DESCRIPTION na.show PARAM_DESCRIPTION position PARAM_DESCRIPTION width PARAM_DESCRIPTION height PARAM_DESCRIPTION stack PARAM_DESCRIPTION z PARAM_DESCRIPTION group.frame PARAM_DESCRIPTION resize..group PARAM_DESCRIPTION title.color PARAM_DESCRIPTION title.size PARAM_DESCRIPTION title.fontface PARAM_DESCRIPTION title.fontfamily PARAM_DESCRIPTION title.padding PARAM_DESCRIPTION text.color PARAM_DESCRIPTION text.size PARAM_DESCRIPTION text.fontface PARAM_DESCRIPTION text.fontfamily PARAM_DESCRIPTION format PARAM_DESCRIPTION frame PARAM_DESCRIPTION frame.lwd PARAM_DESCRIPTION frame.r PARAM_DESCRIPTION bg.color PARAM_DESCRIPTION bg.alpha PARAM_DESCRIPTION item.height PARAM_DESCRIPTION item.width PARAM_DESCRIPTION item.space PARAM_DESCRIPTION item.na.height PARAM_DESCRIPTION item.na.width PARAM_DESCRIPTION item.na.space PARAM_DESCRIPTION item.shape PARAM_DESCRIPTION ticks PARAM_DESCRIPTION ticks.disable.na PARAM_DESCRIPTION ticks.col PARAM_DESCRIPTION ticks.lwd PARAM_DESCRIPTION title.align PARAM_DESCRIPTION margins PARAM_DESCRIPTION margin.item.text PARAM_DESCRIPTION ... passed (?) variable visual (transformation) variable combine legend : e.g. \"fill\" \"size\"","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_legend.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Legend — tm_legend","text":"OUTPUT_DESCRIPTION","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_lines.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: lines — opt_tm_lines","title":"Map layer: lines — opt_tm_lines","text":"Map layer draws symbols Supported visual variables : col (color), lwd (line width), lty (line type), col_alpha (color alpha transparency).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_lines.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: lines — opt_tm_lines","text":"","code":"opt_tm_lines(lines.only = \"ifany\") tm_lines( col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.chart = tm_chart_none(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.chart = tm_chart_none(), lty.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, linejoin = \"round\", lineend = \"round\", plot.order = tm_plot_order(\"lwd\", reverse = TRUE, na.order = \"bottom\"), zindex = NA, group = NA, group.control = \"check\", popup.vars = NA, popup.format = list(), hover = \"\", id = \"\", options = opt_tm_lines(), ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_lines.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: lines — opt_tm_lines","text":"lines.line geometries shape object (defined tm_shape()) plotted, also geometry types (like polygons)? default \"ifany\", means TRUE case geometry collection specified. col, col.scale, col.legend, col.chart, col.free Visual variable determines col color. See details. lwd, lwd.scale, lwd.legend, lwd.chart, lwd.free Visual variable determines line width. See details. lty, lty.scale, lty.legend, lty.chart, lty.free Visual variable determines line type. See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.chart, col_alpha.free Visual variable determines border color alpha transparency. See details. linejoin, lineend line join line end. See gpar() details. plot.order Specification order spatial features drawn. See tm_plot_order() details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). popup.vars names data variables shown popups \"view\" mode. Set popup.vars TRUE show variables shape object. Set popup.vars FALSE disable popups. Set popup.vars character vector variable names variables popups. default (NA) depends whether visual variables (e.g.col) used. , shown. variables shape object shown. popup.format list formatting options popup values. See argument legend.format options. applicable numeric data variables. one list formatting options provided, applied numeric variables popup.vars. Also, (named) list lists can provided. case, list formatting options applied named variable. hover name data variable specifies hover labels id name data variable specifies indices spatial features. used \"view\" mode. options options passed corresponding opt_ function ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_lines.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: lines — opt_tm_lines","text":"visual variable arguments (e.g. col) can specified either data variable name (e.g., spatial vector attribute raster layer object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). *.scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_*() functions. default specified tmap option (tm_options()) scales.var. *.legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options (tm_options()) legend. . *.chart arguments specify additional charts, specified tm_chart_, e.g. tm_chart_histogram() *.free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, *.free argument requires one logical value.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_lines.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: lines — opt_tm_lines","text":"","code":"tm_shape(rivers) + tm_lines(lwd = \"strokelwd\", lwd.scale = tm_scale_asis(values.scale = 0.2, value.neutral = 2), col = \"scalerank\", col.scale = tm_scale_categorical(values = \"seaborn.dark\")) tm_shape(World) + tm_lines(col = \"continent\", col.scale = tm_scale_categorical(values = \"seaborn.dark\"), lty = \"continent\", lwd = 1.5, lty.legend = tm_legend_combine(\"col\"))"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mouse_coordinates.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: mouse coordinates — tm_mouse_coordinates","title":"Map component: mouse coordinates — tm_mouse_coordinates","text":"Map component adds mouse coordinates","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mouse_coordinates.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: mouse coordinates — tm_mouse_coordinates","text":"","code":"tm_mouse_coordinates(stack, position, z)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mouse_coordinates.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: mouse coordinates — tm_mouse_coordinates","text":"stack stack position position z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv.html","id":null,"dir":"Reference","previous_headings":"","what":"define multivariate variable — tm_mv","title":"define multivariate variable — tm_mv","text":"define multivariate variable","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"define multivariate variable — tm_mv","text":"","code":"tm_mv(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"define multivariate variable — tm_mv","text":"... variable names","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv_dim.html","id":null,"dir":"Reference","previous_headings":"","what":"define multivariate variable based on stars dimension — tm_mv_dim","title":"define multivariate variable based on stars dimension — tm_mv_dim","text":"define multivariate variable based stars dimension","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv_dim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"define multivariate variable based on stars dimension — tm_mv_dim","text":"","code":"tm_mv_dim(x, values)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_mv_dim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"define multivariate variable based on stars dimension — tm_mv_dim","text":"x dimension name values values used","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot.html","id":null,"dir":"Reference","previous_headings":"","what":"Plot mode options — tm_plot","title":"Plot mode options — tm_plot","text":"Plot mode options. option specific plot mode.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Plot mode options — tm_plot","text":"","code":"tm_plot(use.gradient)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Plot mode options — tm_plot","text":"use.gradient Use gradient fill using linearGradient()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot_order.html","id":null,"dir":"Reference","previous_headings":"","what":"Determine plotting order of features — tm_plot_order","title":"Determine plotting order of features — tm_plot_order","text":"Determine plotting order features.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot_order.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Determine plotting order of features — tm_plot_order","text":"","code":"tm_plot_order( aes, reverse = TRUE, na.order = c(\"mix\", \"bottom\", \"top\"), null.order = c(\"bottom\", \"mix\", \"top\"), null.below.na = TRUE )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_plot_order.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Determine plotting order of features — tm_plot_order","text":"aes Visual variable values determine plotting order. Example: bubble map \"size\" aesthetic used. data variable (say population) mapped via continuous scale (tm_scale_continuous()) bubble sizes. bubbles plotted order size. determined arguments. Use \"DATA\" keep order data. Another special value \"AREA\" \"LENGTH\" preserved polygons lines respectively: rather data variable polygon area / line lengths determines plotting order. reverse Logical determines whether visual values plotted reversed order. visual values (specified tmap option \"values.var\") default reversed, plotted starting last value. bubble map example, means large bubbles plotted first, hence bottom. na.order features plotted NA value (least) one aesthetic variable? (order) \"mix\", \"bottom\", \"top\"? bubble map example: fill color missing bubble, bubbles plotted? null.order non-selected (aka null) features plotted? null..na null features plotted NA features?","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_polygons.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: polygons — opt_tm_polygons","title":"Map layer: polygons — opt_tm_polygons","text":"Map layer draws polygons. Supported visual variables : fill (fill color), col (border color), lwd (line width), lty (line type), fill_alpha (fill color alpha transparency) col_alpha (border color alpha transparency).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_polygons.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: polygons — opt_tm_polygons","text":"","code":"opt_tm_polygons(polygons.only = \"ifany\") tm_polygons( fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.chart = tm_chart_none(), fill.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.chart = tm_chart_none(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.chart = tm_chart_none(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.chart = tm_chart_none(), fill_alpha.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, linejoin = \"round\", lineend = \"round\", plot.order = tm_plot_order(\"lwd\", reverse = TRUE, na.order = \"bottom\"), zindex = NA, group = NA, group.control = \"check\", popup.vars = NA, popup.format = list(), hover = \"\", id = \"\", options = opt_tm_polygons(), ... ) tm_fill(...) tm_borders(col = tm_const(), ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_polygons.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: polygons — opt_tm_polygons","text":"polygons.polygon geometries shape object (defined tm_shape()) plotted? default \"ifany\", means TRUE case geometry collection specified. fill, fill.scale, fill.legend, fill.chart, fill.free Visual variable determines fill color. See details. col, col.scale, col.legend, col.chart, col.free Visual variable determines border color. See details. lwd, lwd.scale, lwd.legend, lwd.chart, lwd.free Visual variable determines line width. See details. lty, lty.scale, lty.legend, lty.chart, lty.free Visual variable determines line type. See details. fill_alpha, fill_alpha.scale, fill_alpha.chart, fill_alpha.legend, fill_alpha.free Visual variable determines fill color alpha transparency See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.chart, col_alpha.free Visual variable determines border color alpha transparency. See details. linejoin, lineend Line join line end. See gpar() details. plot.order Specification order spatial features drawn. See tm_plot_order() details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). popup.vars names data variables shown popups \"view\" mode. Set popup.vars TRUE show variables shape object. Set popup.vars FALSE disable popups. Set popup.vars character vector variable names variables popups. default (NA) depends whether visual variables (e.g.fill) used. , shown. variables shape object shown. popup.format list formatting options popup values. See argument legend.format options. applicable numeric data variables. one list formatting options provided, applied numeric variables popup.vars. Also, (named) list lists can provided. case, list formatting options applied named variable. hover name data variable specifies hover labels id name data variable specifies indices spatial features. used \"view\" mode. options options passed corresponding opt_ function ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_polygons.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: polygons — opt_tm_polygons","text":"visual variable arguments (e.g. col) can specified either data variable name (e.g., spatial vector attribute raster layer object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). *.scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_*() functions. default specified tmap option (tm_options()) scales.var. *.legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options (tm_options()) legend. . *.chart arguments specify additional charts, specified tm_chart_, e.g. tm_chart_histogram() *.free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, *.free argument requires one logical value.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_polygons.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: polygons — opt_tm_polygons","text":"","code":"# load Africa country data data(World) Africa = World[World$continent == \"Africa\", ] Africa_border = sf::st_make_valid(sf::st_union(sf::st_buffer(Africa, 0.001))) # slow and ugly # without specifications tm_shape(Africa_border) + tm_polygons() tm_shape(Africa_border) + tm_fill() tm_shape(Africa_border) + tm_borders() # specification with visual variable values tm_shape(Africa) + tm_polygons(fill = \"limegreen\", col = \"purple\", lwd = 2, lty = \"solid\", col_alpha = 0.3) + tm_text(\"name\", options = opt_tm_text(remove.overlap = TRUE)) + tm_shape(Africa_border) + tm_borders(\"darkred\", lwd = 3) # specification with a data variable tm_shape(Africa) + tm_polygons(fill = \"income_grp\", fill.scale = tm_scale_categorical(values = \"-tol.muted\")) # continuous color scale with landscape legend tm_shape(Africa) + tm_polygons(fill = \"inequality\", fill.scale = tm_scale_continuous(values = \"-scico.roma\"), fill.legend = tm_legend( title = \"\", orientation = \"landscape\", position = tm_pos_out(\"center\", \"bottom\"), frame = FALSE )) + tm_shape(Africa_border) + tm_borders(lwd = 2) + tm_title(\"Inequality index\", position = tm_pos_in(\"right\", \"TOP\"), frame = FALSE) + tm_layout(frame = FALSE) # bivariate scale tm_shape(World) + tm_polygons(tm_mv(\"inequality\", \"well_being\")) #> Labels abbreviated by the first letters, e.g.: \"2 to 3\" => \"2\""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_pos.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the position of map components — tm_pos","title":"Set the position of map components — tm_pos","text":"Set position map components, legends, title, compass, scale bar, etc. tm_pos() function position components: tm_pos_out() places components outside map area tm_pos_in() inside map area. position argument map layer component specified one functions. functions tm_pos_auto_out() tm_pos_auto_in() used set components automatically, recommended use globally, via tmap_options(). See Details positioning works.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_pos.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the position of map components — tm_pos","text":"","code":"tm_pos(cell.h, cell.v, pos.h, pos.v, align.h, align.v, just.h, just.v) tm_pos_in(pos.h, pos.v, align.h, align.v, just.h, just.v) tm_pos_out(cell.h, cell.v, pos.h, pos.v, align.h, align.v, just.h, just.v) tm_pos_auto_out(cell.h, cell.v, pos.h, pos.v, align.h, align.v, just.h, just.v) tm_pos_auto_in(align.h, align.v, just.h, just.v)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_pos.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the position of map components — tm_pos","text":"cell.h, cell.v plotting area overlaid 3x3 grid, middle grid cell map area. Components can drawn cell. cell.h specifies horizontal position (column) can take values \"left\", \"center\", \"right\". cell.v specifies vertical position (row) can take values \"top\", \"center\", \"bottom\". See details graphical explanation. pos.h, pos.v position component within cell. main options pos.h \"left\", \"center\", \"right\". cell.v \"top\", \"center\", \"bottom\". options can also provided upper case; case offset (see tmap option component.offset). Also numbers 0 1 can provided, determine position component inside cell ((0,0) left bottom). arguments just.h just.v determine justification point. align.h, align.v alignment component case multiple components stacked. stacked horizontally, align.v determines components smaller height available height (determined outer.margins specified otherwise highest component) justified: \"top\", \"center\", \"bottom\". Similarly, align.h determines components justified horizontally stacked vertically: \"left\", \"center\", \"right\". just.h, just.v justification components. used case pos.h pos.v numbers.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_pos.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set the position of map components — tm_pos","text":"tm_pos_in() sets position component(s) inside maps area, equivalent center-center cell (case facets, drawn center-center cell). tm_pos_out() sets position component(s) outside map. amount space top bottom rows, left right columns occupy determined tm_layout() arguments meta.margins meta.auto.margins. former sets relative space bottom, left, top, right side. case set NA, space set automatically based 1) maximum relative space specified meta.auto.margins 2) presence size components cell. instance, one landscape oriented legend center-bottom cell, relative space bottom row set height legend (given smaller corresponding value meta.auto.margins), four sides set 0. tm_pos_auto_out() complex: cell.h cell.v arguments set one four corners. mean components drawn corner. corner represents sides map components drawn. default, legends drawn either bottom right-side map default (see tmap_options(\"legend.position\")). row- column-wise legends general legend (using tm_facets_grid()), general legend drawn corner, practice case rare. arguments pos.h pos.v determine components drawn within cell. , \"left\", \"center\", \"right\" pos.h \"top\", \"center\", \"bottom\" pos.v. values can also specified upper-case, influences offset cell borders, determined tmap option component.offset. default, small offset components drawn inside offset drawn outside upper-case. tm_pos_auto_in() automatically determines pos.h pos.v given available space inside map. similar default positioning tmap3. case multiple components draw cell position inside cell, stacked (determined stack argument legend component function). align.h align.v arguments determine components justified . Note legends components may different facet row column. case tm_facets_grid() tm_facets_stack() applied scales set free (.free argument map layer functions). case legends components draw row- column wise, position legends (components) right next maps, legends (components) aligned maps.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_raster.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: raster — opt_tm_raster","title":"Map layer: raster — opt_tm_raster","text":"Map layer draws rasters. Supported visual variable : col ( color).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_raster.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: raster — opt_tm_raster","text":"","code":"opt_tm_raster() tm_raster( col = tm_shape_vars(), col.scale = tm_scale(value.na = \"#00000000\"), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, zindex = NA, group = NA, group.control = \"check\", options = opt_tm_raster(), ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_raster.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: raster — opt_tm_raster","text":"col, col.scale, col.legend, col.chart, col.free Visual variable determines color. See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.chart, col_alpha.free Visual variable determines alpha transparency. See details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). options options passed corresponding opt_ function ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_raster.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: raster — opt_tm_raster","text":"visual variable arguments (e.g. col) can specified either data variable name (e.g., spatial vector attribute raster layer object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). *.scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_*() functions. default specified tmap option (tm_options()) scales.var. *.legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options (tm_options()) legend. . *.chart arguments specify additional charts, specified tm_chart_, e.g. tm_chart_histogram() *.free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, *.free argument requires one logical value.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_raster.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: raster — opt_tm_raster","text":"","code":"# load land data data(land, World) tm_shape(land) + tm_raster() + tm_facets_hstack() #> stars object downsampled to 540 by 270 cells. #> [scale] tm_raster:() the data variable assigned to 'col' contains positive and negative values, so midpoint is set to 0. Set 'midpoint = NA' in 'fill.scale = tm_scale_intervals()' to use all visual values (e.g. colors) #> [plot mode] fit legend/component: Some legend items or map compoments do not fit well, and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this. tm_shape(land) + tm_raster(\"elevation\", col.scale = tm_scale_continuous(values = terrain.colors(9))) + tm_shape(World) + tm_borders() #> [plot mode] fit legend/component: Some legend items or map compoments do not fit well, and are therefore rescaled. Set the tmap option 'component.autoscale' to FALSE to disable this."},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_rgb.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: RGB — tm_rgb","title":"Map layer: RGB — tm_rgb","text":"Map layer: RGB","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_rgb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: RGB — tm_rgb","text":"","code":"tm_rgb( col = tm_mv(1:3), col.scale = tm_scale_rgb(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_rgb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: RGB — tm_rgb","text":"col, col.scale, col.legend, col.chart, col.free Visual variable determines col color.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: automatic scale — tm_scale","title":"Scales: automatic scale — tm_scale","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale() scale set automatically given data type (factor, numeric, integer) visual variable. tmap option scales.var contains information scale applied .","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: automatic scale — tm_scale","text":"","code":"tm_scale(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: automatic scale — tm_scale","text":"... arguments passed applied scale function tm_scale_*()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_asis.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: as is — tm_scale_asis","title":"Scales: as is — tm_scale_asis","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_asis() used take data values use visual variable.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_asis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: as is — tm_scale_asis","text":"","code":"tm_scale_asis(values.scale = NA, value.neutral = NA, ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_asis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: as is — tm_scale_asis","text":"values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. ... Arguments caught (used) automatic function tm_scale()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bar.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: scale bar — tm_scale_bar","title":"Map component: scale bar — tm_scale_bar","text":"function renamed tm_scalebar() tmap v4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: scale bar — tm_scale_bar","text":"","code":"tm_scale_bar(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: scale bar — tm_scale_bar","text":"... Arguments passed tm_scalebar breaks breaks width width text.size text.size text.color text.color color.dark color.dark color.light color.light lwd lwd position position bg.color bg.color bg.alpha bg.alpha size size stack stack frame frame frame.lwd frame.lwd frame.r frame.r margins margins z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bivariate.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: bivariate scale — tm_scale_bivariate","title":"Scales: bivariate scale — tm_scale_bivariate","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_bivariate() used bivariate.scales.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bivariate.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: bivariate scale — tm_scale_bivariate","text":"","code":"tm_scale_bivariate( scale1 = tm_scale(), scale2 = tm_scale(), values = NA, values.repeat = FALSE, values.range = NA, values.scale = 1, value.na = NA, value.null = NA, value.neutral = NA, labels = NULL, label.na = NA, label.null = NA )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_bivariate.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: bivariate scale — tm_scale_bivariate","text":"scale1, scale2 two tm_scale objects. Currently, tm_scale_*() functions supported except tm_scale_continous(). values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols()) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols()) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, grey scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark grey light grey used (precisely \"grey25\" \"grey75\"), 0, 0.5 means colors used black middle grey (\"grey50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_categorical.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: categorical and ordinal scale — tm_scale_ordinal","title":"Scales: categorical and ordinal scale — tm_scale_ordinal","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). functions tm_scale_categorical() tm_scale_ordinal() used categorical data. difference functions former assumes unordered categories whereas latter assumes ordered categories. colors (visual variable fill col), different default color palettes used (see tmap option values.var).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_categorical.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: categorical and ordinal scale — tm_scale_ordinal","text":"","code":"tm_scale_ordinal( n.max = 30, values = NA, values.repeat = FALSE, values.range = 1, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, levels = NULL, levels.drop = FALSE, labels = NULL, label.na = NA, label.null = NA, label.format = list() ) tm_scale_categorical( n.max = 30, values = NA, values.repeat = TRUE, values.range = NA, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, levels = NULL, levels.drop = FALSE, labels = NULL, label.na = NA, label.null = NA, label.format = list() )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_categorical.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: categorical and ordinal scale — tm_scale_ordinal","text":"n.max Maximum number categories (factor levels). case , grouped n.max groups. values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols()) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols()) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, gray scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark gray light gray used (precisely \"grey25\" \"grey75\"), 0, 0.5 means colors used black middle gray (\"gray50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. levels Levels show. values treated missing. levels.drop unused levels dropped (therefore assigned visual value shown legend)? labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values label.format (generic scale argument) Label formatting (similar legend.format tmap3)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_continuous.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: continuous scale — tm_scale_continuous","title":"Scales: continuous scale — tm_scale_continuous","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_continuous() used continuous data. functions tm_scale_continuous_() use transformation functions x.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_continuous.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: continuous scale — tm_scale_continuous","text":"","code":"tm_scale_continuous( n = NULL, limits = NULL, outliers.trunc = NULL, ticks = NULL, trans = NULL, midpoint = NULL, values = NA, values.repeat = FALSE, values.range = NA, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, labels = NULL, label.na = NA, label.null = NA, label.format = list() ) tm_scale_continuous_log(...) tm_scale_continuous_log1p(...) tm_scale_continuous_sqrt(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_continuous.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: continuous scale — tm_scale_continuous","text":"n Preferred number tick labels. used ticks specified limits Limits data values mapped continuous scale outliers.trunc outliers truncated? outlier data value respectively lower upper limit. logical vector two values expected. first second value determines whether values lower lower limit respectively higher upper limit truncated lower respectively upper limit. FALSE (default), considered missing values. ticks Tick values. specified, determined automatically n trans Transformation function. One \"identity\" (default), \"log\", \"log1p\". Note: base log scale irrelevant, since log transformed values normalized mapping visual values. midpoint data value interpreted midpoint. default set 0 negative positive values present. Useful values diverging colors. case, two sides color palette assigned negative respectively positive values. values positive values negative, midpoint set NA, means value corresponds middle color class (see style) mapped middle color. specified sequential color palettes (e.g. \"Blues\"), color palette treated diverging color palette. values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols()) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols()) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values, especially useful color palettes. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, gray scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark gray light gray used (precisely \"grey25\" \"grey75\"), 0, 0.5 means colors used black middle gray (\"grey50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values label.format (generic scale argument) Label formatting (similar legend.format tmap3) ... passed tm_scale_continuous","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_discrete.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: discrete scale — tm_scale_discrete","title":"Scales: discrete scale — tm_scale_discrete","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_discrete() used discrete numerical data, integers.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_discrete.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: discrete scale — tm_scale_discrete","text":"","code":"tm_scale_discrete( ticks = NA, midpoint = NULL, values = NA, values.repeat = FALSE, values.range = NA, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, labels = NULL, label.na = NA, label.null = NA, label.format = list() )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_discrete.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: discrete scale — tm_scale_discrete","text":"ticks Discrete values. specified, determined automatically: unique values put discrete scale. midpoint data value interpreted midpoint. default set 0 negative positive values present. Useful values diverging colors. case, two sides color palette assigned negative respectively positive values. values positive values negative, midpoint set NA, means value corresponds middle color class (see style) mapped middle color. specified sequential color palettes (e.g. \"Blues\"), color palette treated diverging color palette. values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols()) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, gray scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark gray light gray used (precisely \"grey25\" \"grey75\"), 0, 0.5 means colors used black middle grey (\"grey50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values label.format (generic scale argument) Label formatting (similar legend.format tmap3)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_intervals.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: interval scale — tm_scale_intervals","title":"Scales: interval scale — tm_scale_intervals","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_interval() used numerical data.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_intervals.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: interval scale — tm_scale_intervals","text":"","code":"tm_scale_intervals( n = 5, style = ifelse(is.null(breaks), \"pretty\", \"fixed\"), style.args = list(), breaks = NULL, interval.closure = \"left\", midpoint = NULL, as.count = NA, values = NA, values.repeat = FALSE, values.range = NA, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, labels = NULL, label.na = NA, label.null = NA, label.format = list() )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_intervals.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: interval scale — tm_scale_intervals","text":"n Number intervals. styles (see argument style ) preferred number rather exact number. style Method create intervals. Options \"cat\", \"fixed\", \"sd\", \"equal\", \"pretty\", \"quantile\", \"kmeans\", \"hclust\", \"bclust\", \"fisher\", \"jenks\", \"dpih\", \"headtails\", \"log10_pretty\". See details classInt::classIntervals() (extra arguments can passed via style.args). style.args List extra arguments passed classInt::classIntervals(). breaks Interval breaks (used required style==\"fixed\") interval.closure value determines whether intervals closed: \"left\" \"right\". .count = TRUE, inverval.closure always set \"left\". midpoint data value interpreted midpoint. default set 0 negative positive values present. Useful values diverging colors. case, two sides color palette assigned negative respectively positive values. values positive values negative, midpoint set NA, means value corresponds middle color class (see style) mapped middle color. specified sequential color palettes (e.g. \"Blues\"), color palette treated diverging color palette. .count data variable processed count variable? instance, style = \"pretty\", n = 2, value range variable 0 10, column classes .count = TRUE 0; 1 5; 6 10 (note 0 regarded category) whereas .count = FALSE 0 5; 5 10. applicable style \"pretty\", \"fixed\", \"log10_pretty\". default, TRUE style one , variable integer. values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, gray scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark gray light gray used (precisely \"gray25\" \"gray75\"), 0, 0.5 means colors used black middle grey (\"grey50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values label.format (generic scale argument) Label formatting (similar legend.format tmap3)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rank.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: rank scale — tm_scale_rank","title":"Scales: rank scale — tm_scale_rank","text":"Scales tmap configured family functions prefix tm_scale. function used input .scale arguments layer functions (e.g. fill.scale tm_polygons()). function tm_scale_rank() used rank numeric data.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rank.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: rank scale — tm_scale_rank","text":"","code":"tm_scale_rank( n = NULL, ticks = NULL, values = NA, values.repeat = FALSE, values.range = NA, values.scale = NA, value.na = NA, value.null = NA, value.neutral = NA, labels = NULL, label.na = NA, label.null = NA, label.format = list(), unit = \"rank\" )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rank.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: rank scale — tm_scale_rank","text":"n Preferred number tick labels. used ticks specified ticks Tick values. specified, determined automatically n values (generic scale argument) visual values. colors (e.g. fill col tm_polygons()) palette name cols4all package (see cols4all::c4a()) vector colors, size (e.g. size tm_symbols()) set sizes (two values specified interpret range), symbol shapes (e.g. shape tm_symbols()) set symbols, etc. tmap option values.var contains default values per visual variable cases also per data type. values.repeat (generic scale argument) values repeated case categories? values.range (generic scale argument) Range values, especially useful color palettes. Vector two numbers (0 1) first determines minimum second maximum. Full range, means values used, encoded c(0, 1). instance, gray scale used color (black white), c(0,1) means colors used, 0.25, 0.75 means colors dark gray light gray used (precisely \"grey25\" \"grey75\"), 0, 0.5 means colors used black middle gray (\"grey50\"). one number specified, interpreted second number (first set 0). Default values can set via tmap option values.range. values.scale (generic scale argument) Scaling values. useful size-related visual variables, size tm_symbols() lwd tm_lines(). value.na (generic scale argument) Value used missing values. See tmap option \"value.na\" defaults per visual variable. value.null (generic scale argument) Value used NULL values. See tmap option \"value.null\" defaults per visual variable. Null data values occur --scope features shown (e.g. map Europe showing data variable per country, null values applied countries outside Europe). value.neutral (generic scale argument) Value can considered neutral. used legends visual variables map layer. E.g. fill size used tm_symbols() (using filled circles), size legend items filled value.neutral color fill.scale scale, fill legend items bubbles size value.neutral size.scale scale. labels (generic scale argument) Labels label.na (generic scale argument) Label missing values label.null (generic scale argument) Label null (--scope) values label.format (generic scale argument) Label formatting (similar legend.format tmap3) unit unit unit name values. default \"rank\".","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rgb.html","id":null,"dir":"Reference","previous_headings":"","what":"Scales: RGB — tm_scale_rgb","title":"Scales: RGB — tm_scale_rgb","text":"Scales: RGB","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rgb.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scales: RGB — tm_scale_rgb","text":"","code":"tm_scale_rgb(value.na = NA, maxValue = 255)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scale_rgb.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scales: RGB — tm_scale_rgb","text":"value.na value missing values maxValue maximum value","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scalebar.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: scale bar — tm_scalebar","title":"Map component: scale bar — tm_scalebar","text":"Map component adds scale bar. version 4.0, tm_scalebar() used instead tm_scale_bar() (now deprecated), potential confusion tm_scale_*() scaling functions (like tm_scale_continuous()).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scalebar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: scale bar — tm_scalebar","text":"","code":"tm_scalebar( breaks, width, text.size, text.color, color.dark, color.light, lwd, position, bg.color, bg.alpha, size = \"deprecated\", stack, frame, frame.lwd, frame.r, margins, z )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_scalebar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: scale bar — tm_scalebar","text":"breaks breaks width width text.size text.size text.color text.color color.dark color.dark color.light color.light lwd lwd position position bg.color bg.color bg.alpha bg.alpha size size stack stack frame frame frame.lwd frame.lwd frame.r frame.r margins margins z z","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_sf.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: simple features — opt_tm_sf","title":"Map layer: simple features — opt_tm_sf","text":"Map layer draws simple features . Supported visual variables : fill (fill color), col (border color), size point size, shape symbol shape, lwd (line width), lty (line type), fill_alpha (fill color alpha transparency) col_alpha (border color alpha transparency).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_sf.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: simple features — opt_tm_sf","text":"","code":"opt_tm_sf( polygons.only = \"yes\", lines.only = \"yes\", points.only = \"yes\", points.icon.scale = 3, points.just = NA, points.grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) tm_sf( fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.free = NA, size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.free = NA, shape = tm_const(), shape.scale = tm_scale(), shape.legend = tm_legend(), shape.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.free = NA, linejoin = \"round\", lineend = \"round\", plot.order.list = list(polygons = tm_plot_order(\"AREA\"), lines = tm_plot_order(\"LENGTH\"), points = tm_plot_order(\"size\")), options = opt_tm_sf(), zindex = NA, group = NA, group.control = \"check\", ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_sf.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: simple features — opt_tm_sf","text":"polygons., lines., points., points.icon.scale, points.just, points.grob.dim See opt_tm_polygons(), opt_tm_lines() opt_tm_symbols() fill, fill.scale, fill.legend, fill.free Visual variable determines fill color. See details. col, col.scale, col.legend, col.free Visual variable determines col color. See details. size, size.scale, size.legend, size.free Visual variable determines size. See details. shape, shape.scale, shape.legend, shape.free Visual variable determines shape. See details. lwd, lwd.scale, lwd.legend, lwd.free Visual variable determines line width. See details. lty, lty.scale, lty.legend, lty.free Visual variable determines line type. See details. fill_alpha, fill_alpha.scale, fill_alpha.legend, fill_alpha.free Visual variable determines fill color alpha transparency See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.free Visual variable determines border color alpha transparency. See details. linejoin, lineend line join line end. See gpar() details. plot.order.list Specification order spatial features drawn. consists list three elementary geometry types: polygons, lines , points. types, drawn order, tm_plot_order() required. options options passed corresponding opt_ function zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control). group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). ... passed tm_polygons(), tm_lines(), tm_dots()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_sf.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: simple features — opt_tm_sf","text":"visual variable arguments (e.g. col) can specified either data variable name (object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). .scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_() functions. default scale used specified tmap option scales.var. .legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options legend.. .free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, .free argument requires one logical value.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_sf.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: simple features — opt_tm_sf","text":"","code":"data(World) World$geometry[World$continent == \"Africa\"] <- sf::st_centroid(World$geometry[World$continent == \"Africa\"]) World$geometry[World$continent == \"South America\"] <- sf::st_cast(World$geometry[World$continent == \"South America\"], \"MULTILINESTRING\", group_or_split = FALSE) tm_shape(World, crs = \"+proj=robin\") + tm_sf()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape.html","id":null,"dir":"Reference","previous_headings":"","what":"Shape (spatial object) specification — tm_shape","title":"Shape (spatial object) specification — tm_shape","text":"Specify shape, spatial object one spatial object class packages: sf, stars, terra.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Shape (spatial object) specification — tm_shape","text":"","code":"tm_shape( shp, bbox = NULL, crs = NULL, is.main = NA, name = NULL, unit = NULL, filter = NULL, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Shape (spatial object) specification — tm_shape","text":"shp Spatial object bbox Bounding box map (used .main = TRUE) crs CRS shp reprojected (used .main = TRUE) .main shp main shape, determines crs bounding box map? name Name shape unit Unit coordinates filter Filter features ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Shape (spatial object) specification — tm_shape","text":"","code":"tm_shape(World, crs = \"+proj=robin\", filter = World$continent==\"Africa\") + tm_polygons()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape_vars.html","id":null,"dir":"Reference","previous_headings":"","what":"tmap function to specify all variables in the shape object — tm_shape_vars","title":"tmap function to specify all variables in the shape object — tm_shape_vars","text":"tmap function specify variables shape object","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_shape_vars.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"tmap function to specify all variables in the shape object — tm_shape_vars","text":"","code":"tm_shape_vars()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_symbols.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: symbols — opt_tm_symbols","title":"Map layer: symbols — opt_tm_symbols","text":"Map layer draws symbols Supported visual variables : fill (fill color), col (border color), size symbol size, shape symbol shape, lwd (line width), lty (line type), fill_alpha (fill color alpha transparency) col_alpha (border color alpha transparency).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_symbols.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: symbols — opt_tm_symbols","text":"","code":"opt_tm_symbols( points.only = \"ifany\", icon.scale = 3, just = NA, grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) opt_tm_dots( points.only = \"ifany\", icon.scale = 3, just = NA, grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) opt_tm_bubbles( points.only = \"ifany\", icon.scale = 3, just = NA, grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) opt_tm_squares( points.only = \"ifany\", icon.scale = 3, just = NA, grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) tm_symbols( size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.chart = tm_chart_none(), size.free = NA, fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.chart = tm_chart_none(), fill.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, shape = tm_const(), shape.scale = tm_scale(), shape.legend = tm_legend(), shape.chart = tm_chart_none(), shape.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.chart = tm_chart_none(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.chart = tm_chart_none(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.chart = tm_chart_none(), fill_alpha.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, plot.order = tm_plot_order(\"size\"), zindex = NA, group = NA, group.control = \"check\", popup.vars = NA, popup.format = list(), hover = \"\", id = \"\", options = opt_tm_symbols(), ... ) tm_dots( fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.free = NA, size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.free = NA, plot.order = tm_plot_order(\"size\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_dots(), ... ) tm_bubbles( size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.free = NA, fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.free = NA, plot.order = tm_plot_order(\"size\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_bubbles(), ... ) tm_squares( size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.free = NA, fill = tm_const(), fill.scale = tm_scale(), fill.legend = tm_legend(), fill.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.free = NA, lwd = tm_const(), lwd.scale = tm_scale(), lwd.legend = tm_legend(), lwd.free = NA, lty = tm_const(), lty.scale = tm_scale(), lty.legend = tm_legend(), lty.free = NA, fill_alpha = tm_const(), fill_alpha.scale = tm_scale(), fill_alpha.legend = tm_legend(), fill_alpha.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.free = NA, plot.order = tm_plot_order(\"size\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_squares(), ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_symbols.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: symbols — opt_tm_symbols","text":"points.point geometries shape object (defined tm_shape()) plotted? default \"ifany\", means TRUE case geometry collection specified. icon.scale scaling number determines large icons (grobs) plot mode comparison proportional symbols (bubbles). view mode, use argument grob.dim just justification text relative point coordinates. Either one following values: \"left\" , \"right\", \"center\", \"bottom\", \"top\", vector two values first value specifies horizontal second value vertical justification. Besides mentioned values, also numeric values 0 1 can used. 0 means left justification first value bottom justification second value. Note view mode, one value used. grob.dim vector four values determine grob objects (see details) shown view mode. first second value width height displayed icon. third fourth value width height rendered png image used icon. Generally, third fourth value large enough render ggplot2 graphic successfully. needed view mode. size, size.scale, size.legend, size.chart, size.free Visual variable determines size. See details. fill, fill.scale, fill.legend, fill.chart, fill.free Visual variable determines fill color. See details. col, col.scale, col.legend, col.chart, col.free Visual variable determines col color. See details. shape, shape.scale, shape.legend, shape.chart, shape.free Visual variable determines shape. See details. lwd, lwd.scale, lwd.legend, lwd.chart, lwd.free Visual variable determines line width. See details. lty, lty.scale, lty.legend, lty.chart, lty.free Visual variable determines line type. See details. fill_alpha, fill_alpha.scale, fill_alpha.legend, fill_alpha.chart, fill_alpha.free Visual variable determines fill color alpha transparency See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.chart, col_alpha.free Visual variable determines border color alpha transparency. See details. plot.order Specification order spatial features drawn. See tm_plot_order() details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). popup.vars names data variables shown popups \"view\" mode. Set popup.vars TRUE show variables shape object. Set popup.vars FALSE disable popups. Set popup.vars character vector variable names variables popups. default (NA) depends whether visual variables (e.g.col) used. , shown. variables shape object shown. popup.format list formatting options popup values. See argument legend.format options. applicable numeric data variables. one list formatting options provided, applied numeric variables popup.vars. Also, (named) list lists can provided. case, list formatting options applied named variable. hover name data variable specifies hover labels id name data variable specifies indices spatial features. used \"view\" mode. options options passed corresponding opt_ function ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_symbols.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: symbols — opt_tm_symbols","text":"visual variable arguments (e.g. col) can specified either data variable name (e.g., spatial vector attribute raster layer object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). *.scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_*() functions. default specified tmap option (tm_options()) scales.var. *.legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options (tm_options()) legend. . *.chart arguments specify additional charts, specified tm_chart_, e.g. tm_chart_histogram() *.free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, *.free argument requires one logical value. symbol shape specification one following three options. numeric value specifies plotting character symbol. See parameter pch points last example create plot options. Note supported \"view\" mode. grob object, can ggplot2 plot object created ggplotGrob. specify multiple shapes, list grob objects required. See example proportional symbol map ggplot2 plots. icon specification, can created tmap_icons. specify multiple shapes (needed shapes argument), vector list shape specification required. shape specification options can also mixed. shapes argument, possible use named vector list, names correspond value variable specified shape argument. small multiples, list shape specification(s) provided.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_symbols.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: symbols — opt_tm_symbols","text":"","code":"metroAfrica = sf::st_intersection(metro, World[World$continent == \"Africa\", ]) #> Warning: attribute variables are assumed to be spatially constant throughout all geometries Africa = World[World$continent == \"Africa\", ] tm_shape(land) + tm_raster(\"cover_cls\", col.scale = tm_scale( values = cols4all::c4a(\"brewer.pastel1\")[c(3,7,7,2,6,1,2,2)] ), col.legend = tm_legend_hide()) + tm_shape(rivers) + tm_lines(lwd = \"strokelwd\", lwd.scale = tm_scale_asis(values.scale = .3), col = cols4all::c4a(\"brewer.pastel1\")[2]) + tm_shape(Africa, is.main = TRUE) + tm_borders() + tm_shape(metroAfrica) + tm_symbols(fill = \"red\", shape = \"pop2020\", size = \"pop2020\", size.scale = tm_scale_intervals( breaks = c(1, 2, 5, 10, 15, 20, 25) * 1e6, values.range = c(0.2,2) ), size.legend = tm_legend(\"Population in 2020\"), shape.scale = tm_scale_intervals( breaks = c(1, 2, 5, 10, 15, 20, 25) * 1e6, values = c(21, 23, 22, 21, 23, 22) ), shape.legend = tm_legend_combine(\"size\")) + tm_labels(\"name\", options = opt_tm_labels(remove.overlap = FALSE)) ######################## ## plot symbol shapes ######################## # create grid of 25 points in the Athlantic library(sf) #> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE x = st_as_sf(cbind(expand.grid(x = -51:-47, y = 20:24), id = seq_len(25)), coords = c(\"x\", \"y\"), crs = 4326) tm_shape(x, bbox = bb(x, ext = 1.2)) + tm_symbols(shape = \"id\", size = 2, lwd = 2, fill = \"orange\", col = \"black\", shape.scale = tm_scale_asis()) + tm_text(\"id\", ymod = -2) #> Error in bb(x, ext = 1.2): could not find function \"bb\" # also supported in view mode :-)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_text.html","id":null,"dir":"Reference","previous_headings":"","what":"Map layer: text — opt_tm_text","title":"Map layer: text — opt_tm_text","text":"Map layer draws symbols Supported visual variables : text (text ) col (color), size (font size), fontface (font face).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_text.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map layer: text — opt_tm_text","text":"","code":"opt_tm_text( points.only = \"ifany\", shadow = FALSE, shadow.offset.x = 0.1, shadow.offset.y = 0.1, just = \"center\", along.lines = FALSE, bg.padding = 0.4, clustering = FALSE, point.label = FALSE, point.label.gap = 0, point.label.method = \"SANN\", remove.overlap = FALSE ) opt_tm_labels( points.only = \"ifany\", shadow = FALSE, shadow.offset.x = 0.1, shadow.offset.y = 0.1, just = \"center\", along.lines = TRUE, bg.padding = 0.4, clustering = TRUE, point.label = TRUE, point.label.gap = 0.4, point.label.method = \"SANN\", remove.overlap = FALSE ) opt_tm_markers( markers.on.top.of.text = FALSE, points.only = \"ifany\", shadow = FALSE, just = \"center\", along.lines = TRUE, bg.padding = 0.4, clustering = TRUE, point.label = TRUE, point.label.gap = 0.4, point.label.method = \"SANN\", remove.overlap = FALSE, dots.just = NA, dots.icon.scale = 3, dots.grob.dim = c(width = 48, height = 48, render.width = 256, render.height = 256) ) tm_text( text = tm_const(), text.scale = tm_scale(), text.legend = tm_legend(), text.chart = tm_chart_none(), text.free = NA, size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.chart = tm_chart_none(), size.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, fontface = tm_const(), fontface.scale = tm_scale(), fontface.legend = tm_legend(), fontface.chart = tm_chart_none(), fontface.free = NA, fontfamily = \"\", bgcol = tm_const(), bgcol.scale = tm_scale(), bgcol.legend = tm_legend(), bgcol.chart = tm_chart_none(), bgcol.free = NA, bgcol_alpha = tm_const(), bgcol_alpha.scale = tm_scale(), bgcol_alpha.legend = tm_legend(), bgcol_alpha.chart = tm_chart_none(), bgcol_alpha.free = NA, xmod = 0, xmod.scale = tm_scale(), xmod.legend = tm_legend_hide(), xmod.chart = tm_chart_none(), xmod.free = NA, ymod = 0, ymod.scale = tm_scale(), ymod.legend = tm_legend_hide(), ymod.chart = tm_chart_none(), ymod.free = NA, angle = 0, angle.scale = tm_scale(), angle.legend = tm_legend_hide(), angle.chart = tm_chart_none(), angle.free = NA, plot.order = tm_plot_order(\"AREA\", reverse = FALSE, na.order = \"bottom\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_text(), ... ) tm_labels( text = tm_const(), text.scale = tm_scale(), text.legend = tm_legend(), text.chart = tm_chart_none(), text.free = NA, size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.chart = tm_chart_none(), size.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, fontface = tm_const(), fontface.scale = tm_scale(), fontface.legend = tm_legend(), fontface.chart = tm_chart_none(), fontface.free = NA, fontfamily = \"\", bgcol = tm_const(), bgcol.scale = tm_scale(), bgcol.legend = tm_legend(), bgcol.chart = tm_chart_none(), bgcol.free = NA, bgcol_alpha = tm_const(), bgcol_alpha.scale = tm_scale(), bgcol_alpha.legend = tm_legend(), bgcol_alpha.chart = tm_chart_none(), bgcol_alpha.free = NA, xmod = 0, xmod.scale = tm_scale(), xmod.legend = tm_legend_hide(), xmod.chart = tm_chart_none(), xmod.free = NA, ymod = 0, ymod.scale = tm_scale(), ymod.legend = tm_legend_hide(), ymod.chart = tm_chart_none(), ymod.free = NA, angle = 0, angle.scale = tm_scale(), angle.legend = tm_legend_hide(), angle.chart = tm_chart_none(), angle.free = NA, plot.order = tm_plot_order(\"AREA\", reverse = FALSE, na.order = \"bottom\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_labels(), ... ) tm_markers( text = tm_const(), text.scale = tm_scale(), text.legend = tm_legend(), text.chart = tm_chart_none(), text.free = NA, size = tm_const(), size.scale = tm_scale(), size.legend = tm_legend(), size.chart = tm_chart_none(), size.free = NA, col = tm_const(), col.scale = tm_scale(), col.legend = tm_legend(), col.chart = tm_chart_none(), col.free = NA, col_alpha = tm_const(), col_alpha.scale = tm_scale(), col_alpha.legend = tm_legend(), col_alpha.chart = tm_chart_none(), col_alpha.free = NA, fontface = tm_const(), fontface.scale = tm_scale(), fontface.legend = tm_legend(), fontface.chart = tm_chart_none(), fontface.free = NA, fontfamily = \"\", bgcol = tm_const(), bgcol.scale = tm_scale(), bgcol.legend = tm_legend(), bgcol.chart = tm_chart_none(), bgcol.free = NA, bgcol_alpha = tm_const(), bgcol_alpha.scale = tm_scale(), bgcol_alpha.legend = tm_legend(), bgcol_alpha.chart = tm_chart_none(), bgcol_alpha.free = NA, xmod = 0, xmod.scale = tm_scale(), xmod.legend = tm_legend_hide(), xmod.chart = tm_chart_none(), xmod.free = NA, ymod = 0, ymod.scale = tm_scale(), ymod.legend = tm_legend_hide(), ymod.chart = tm_chart_none(), ymod.free = NA, angle = 0, angle.scale = tm_scale(), angle.legend = tm_legend_hide(), angle.chart = tm_chart_none(), angle.free = NA, plot.order = tm_plot_order(\"AREA\", reverse = FALSE, na.order = \"bottom\"), zindex = NA, group = NA, group.control = \"check\", options = opt_tm_markers(), ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_text.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map layer: text — opt_tm_text","text":"points.point geometries shape object (defined tm_shape()) plotted? default \"ifany\", means TRUE case geometry collection specified. shadow Shadow behind text. Logical color. shadow.offset.x, shadow.offset.y Shadow offset line heights just justification text relative point coordinates. Either one following values: \"left\" , \"right\", \"center\", \"bottom\", \"top\", vector two values first value specifies horizontal second value vertical justification. Besides mentioned values, also numeric values 0 1 can used. 0 means left justification first value bottom justification second value. Note view mode, one value used. along.lines logical determines whether labels rotated along spatial lines. applicable spatial lines shape used. bg.padding padding background terms line heights. clustering value determines whether text labels clustered \"view\" mode. One : TRUE, FALSE, output markerClusterOptions. point.label logical determines whether labels placed automatically. point.label.gap numeric determines gap point label point.label.method optimization method, either \"SANN\" simulated annealing (default) \"GA\" genetic algorithm. remove.overlap logical determines whether overlapping labels removed markers..top..text markers plot top text (default FALSE) dots.just justification text relative point coordinates. Either one following values: \"left\" , \"right\", \"center\", \"bottom\", \"top\", vector two values first value specifies horizontal second value vertical justification. Besides mentioned values, also numeric values 0 1 can used. 0 means left justification first value bottom justification second value. Note view mode, one value used. dots.icon.scale scaling number determines large icons (grobs) plot mode comparison proportional symbols (bubbles). view mode, size determined icon specification (see tmap_icons) , grobs specified grob.width grob.heigth dots.grob.dim vector four values determine grob objects (see details) shown view mode. first second value width height displayed icon. third fourth value width height rendered png image used icon. Generally, third fourth value large enough render ggplot2 graphic successfully. needed view mode. text, text.scale, text.legend, text.chart, text.free Visual variable determines text. See details. size, size.scale, size.legend, size.chart, size.free Visual variable determines font size. See details. col, col.scale, col.legend, col.chart, col.free Visual variable determines col color. See details. col_alpha, col_alpha.scale, col_alpha.legend, col_alpha.chart, col_alpha.free Visual variable determines border color alpha transparency. See Details. fontface, fontface.scale, fontface.legend, fontface.chart, fontface.free Visual variable determines font face. See Details. fontfamily font family. See gpar() details. bgcol, bgcol.scale, bgcol.legend, bgcol.chart, bgcol.free Visual variable determines background color. See Details. bgcol_alpha, bgcol_alpha.scale, bgcol_alpha.legend, bgcol_alpha.chart, bgcol_alpha.free Visual variable determines background color transparency. See Details. xmod, xmod.scale, xmod.legend, xmod.chart, xmod.free Transformation variable determines x offset. See details. ymod, ymod.scale, ymod.legend, ymod.chart, ymod.free Transformation variable determines y offset. See details. text. See details. angle, angle.scale, angle.legend, angle.chart, angle.free Rotation angle plot.order Specification order spatial features drawn. See tm_plot_order() details. zindex Map layers drawn top . zindex numbers (one map layer) determines stacking order. default map layers drawn order called. group Name group layer belongs. relevant view mode, layer groups can switched (see group.control) group.control view mode, group control determines layer groups can switched . Options: \"radio\" radio buttons (meaning one group can shown), \"check\" check boxes (multiple groups can shown), \"none\" control (group (de)selected). options options passed corresponding opt_ function ... catch deprecated arguments version < 4.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_text.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map layer: text — opt_tm_text","text":"visual variable arguments (e.g. col) can specified either data variable name (object specified tm_shape()), visual value (col, color expected). Multiple values can specified: case facets created. facets can combined faceting data variables, specified tm_facets(). .scale arguments determine used scale map data values visual variable values. can specified one available tm_scale_() functions. default scale used specified tmap option scales.var. .legend arguments determine used legend, specified tm_legend(). default legend settings determined tmap options legend.. .free arguments determine whether scales applied freely across facets, shared. logical value required. can also specified vector three logical values; determine whether scales applied freely per facet dimension. useful facets applied (see tm_facets()). maximally three facet dimensions: rows, columns, pages. applies facet grid (tm_facets_grid()). instance, col.free = c(TRUE, FALSE, FALSE) means visual variable col, row facets scale, therefore legend. facet wraps stacks (tm_facets_wrap() tm_facets_stack()) one facet dimension, .free argument requires one logical value.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_text.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Map layer: text — opt_tm_text","text":"","code":"tm_shape(World, bbox = World) + tm_text(\"name\", size=\"pop_est\", col=\"continent\", col.scale = tm_scale_categorical(values = \"seaborn.dark\"), col.legend = tm_legend_hide(), size.scale = tm_scale_continuous(values.scale = 4), size.legend = tm_legend_hide()) metro$upside_down = ifelse(sf::st_coordinates(metro)[,2] < 0, 180, 0) tm_shape(metro) + tm_text(text = \"name\", size = \"pop2020\", angle = \"upside_down\", size.legend = tm_legend_hide(), col = \"upside_down\", col.scale = tm_scale_categorical(values = c(\"#9900BB\", \"#228822\")), col.legend = tm_legend_hide()) + tm_title_out(\"Which Hemisphere?\", position = tm_pos_out(\"center\", \"top\", pos.v = \"bottom\")) metroAfrica = sf::st_intersection(metro, World[World$continent == \"Africa\", ]) #> Warning: attribute variables are assumed to be spatially constant throughout all geometries Africa = World[World$continent == \"Africa\", ] tm_shape(land) + tm_raster(\"cover_cls\", col.scale = tm_scale( values = cols4all::c4a(\"brewer.pastel1\")[c(3,7,7,2,6,1,2,2)] ), col.legend = tm_legend_hide()) + tm_shape(rivers) + tm_lines(lwd = \"strokelwd\", lwd.scale = tm_scale_asis(values.scale = .3), col = cols4all::c4a(\"brewer.pastel1\")[2]) + tm_shape(Africa, is.main = TRUE) + tm_borders() + tm_shape(metroAfrica) + tm_symbols(fill = \"red\", shape = \"pop2020\", size = \"pop2020\", size.scale = tm_scale_intervals( breaks = c(1, 2, 5, 10, 15, 20, 25) * 1e6, values.range = c(0.2,2) ), size.legend = tm_legend(\"Population in 2020\"), shape.scale = tm_scale_intervals( breaks = c(1, 2, 5, 10, 15, 20, 25) * 1e6, values = c(21, 23, 22, 21, 23, 22) ), shape.legend = tm_legend_combine(\"size\")) + tm_labels(\"name\") tm_shape(metroAfrica) + tm_markers(text = \"name\", dots_fill = \"red\", dots_size = 0.3) tm_shape(metroAfrica) + tm_markers(text = \"name\", dots_shape = marker_icon(), dots_col = NA, dots_fill = \"red\", dots_size = 2, ymod = -0.25, options = opt_tm_markers(point.label = FALSE, remove.overlap = TRUE))"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_title.html","id":null,"dir":"Reference","previous_headings":"","what":"Map component: title — tm_title","title":"Map component: title — tm_title","text":"Map component adds title","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_title.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map component: title — tm_title","text":"","code":"tm_title( text, size, color, padding, fontface, fontfamily, stack, just, frame, frame.lwd, frame.r, bg.color, bg.alpha, position, width, height, group.frame, resize.as.group, z ) tm_title_in(text, ..., position = tm_pos_in(\"left\", \"top\")) tm_title_out(text, ..., position = tm_pos_out(\"center\", \"top\"))"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_title.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map component: title — tm_title","text":"text text title size font size title color font color title padding padding fontface font face, bold, italic fontfamily font family stack stack just just frame frame frame.lwd frame line width frame.r frame.r bg.color Background color bg.alpha Background transparency position position width, height width height title box. group.frame group.frame resize..group resize..group z z ... passed tm_title()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_view.html","id":null,"dir":"Reference","previous_headings":"","what":"View mode options — tm_view","title":"View mode options — tm_view","text":"View mode options. options specific view mode.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_view.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"View mode options — tm_view","text":"","code":"tm_view( use.WebGL, control.position, control.bases, control.overlays, set.bounds, set.view, set.zoom.limits, leaflet.options )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_view.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"View mode options — tm_view","text":"use.WebGL use webGL layers leafgl control.position position control attribute control.bases base layers control.overlays overlay layers set.bounds logical determines whether maximum bounds set, bounding box. applicable plot mode. view mode, passed setMaxBounds() set.view numeric vector determines view. Either vector three: lng, lat, zoom, single value: zoom. See setView(). applicable bbox specified set.zoom.limits numeric vector two set minimum maximum zoom levels (see tileOptions()). leaflet.options options passed leafletOptions()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_xlab.html","id":null,"dir":"Reference","previous_headings":"","what":"Map: x and y labels — tm_xlab","title":"Map: x and y labels — tm_xlab","text":"x y labels maps","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_xlab.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map: x and y labels — tm_xlab","text":"","code":"tm_xlab(text, size, color, rotation, space, fontface, fontfamily, side) tm_ylab(text, size, color, rotation, space, fontface, fontfamily, side)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tm_xlab.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map: x and y labels — tm_xlab","text":"text text title size font size title color color rotation rotation degrees space space label map number line heights fontface font face fontfamily font family side side: \"top\" \"bottom\" tm_xlab \"left\" \"right\" tm_ylab","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-element.html","id":null,"dir":"Reference","previous_headings":"","what":"Stacking of tmap elements — tmap-element","title":"Stacking of tmap elements — tmap-element","text":"plus operator allows stack tmap elements (functions prefix tm_)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-element.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Stacking of tmap elements — tmap-element","text":"","code":"# S3 method for tmap +(e1, e2)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-element.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Stacking of tmap elements — tmap-element","text":"e1 first tmap element e2 second tmap element","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Thematic Map Visualization — tmap-package","title":"Thematic Map Visualization — tmap-package","text":"Thematic maps geographical maps spatial data distributions visualized. package offers flexible, layer-based, easy use approach create thematic maps, choropleths bubble maps. based grammar graphics, resembles syntax ggplot2.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Thematic Map Visualization — tmap-package","text":"page provides brief overview package functions. See vignette(\"tmap_sneak_peek\") short introduction examples.","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-package.html","id":"main-plotting-method","dir":"Reference","previous_headings":"","what":"Main plotting method","title":"Thematic Map Visualization — tmap-package","text":"Shape specification: Aesthetics base layers: Aesthetics derived layers: Faceting (small multiples) Attributes: Layout element: Change options: Create icons:","code":""},{"path":[]},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-package.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Thematic Map Visualization — tmap-package","text":"Tennekes, M., 2018, tmap: Thematic Maps R, Journal Statistical Software, 84(6), 1-39, doi:10.18637/jss.v084.i06","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Thematic Map Visualization — tmap-package","text":"Martijn Tennekes mtennekes@gmail.com","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapAddLayerOptions.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal tmap function to add a default value for the layer functions — tmapAddLayerOptions","title":"Internal tmap function to add a default value for the layer functions — tmapAddLayerOptions","text":"Internal tmap function add default value layer functions","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapAddLayerOptions.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal tmap function to add a default value for the layer functions — tmapAddLayerOptions","text":"","code":"tmapAddLayerOptions(option, id, value)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapAddLayerOptions.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal tmap function to add a default value for the layer functions — tmapAddLayerOptions","text":"option, one : \"value.const\", \"value.na\", \"value.blank\", \"values.var\", 'values.range', \"value.neutral\", \"scales.var\" id name visual variable layer, format \"x.y\", x visual variable y layer. also possible set x ; applies layer functions. value value","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta1.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method that extracts meta data from shape objects — tmapGetShapeMeta1","title":"Internal method that extracts meta data from shape objects — tmapGetShapeMeta1","text":"Internal method extracts meta data shape objects","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta1.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method that extracts meta data from shape objects — tmapGetShapeMeta1","text":"","code":"tmapGetShapeMeta1(shp, o)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta1.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method that extracts meta data from shape objects — tmapGetShapeMeta1","text":"shp shape object o list options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta2.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method that extracts more meta data from shape objects — tmapGetShapeMeta2","title":"Internal method that extracts more meta data from shape objects — tmapGetShapeMeta2","text":"Internal method extracts meta data shape objects","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method that extracts more meta data from shape objects — tmapGetShapeMeta2","text":"","code":"tmapGetShapeMeta2(shp, smeta, o)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapGetShapeMeta2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method that extracts more meta data from shape objects — tmapGetShapeMeta2","text":"shp shape smeta meta (tmapGetShapeMeta1) o list options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapMode.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method for submitting a new mode — tmapMode","title":"Internal method for submitting a new mode — tmapMode","text":"Internal method submitting new mode","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapMode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method for submitting a new mode — tmapMode","text":"","code":"tmapMode(id, name, ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapMode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method for submitting a new mode — tmapMode","text":"id id mode: please use lowercase one-word. used tmap_mode(). name name mode: please use title case. used recognize internal functions, e.g. tmapLeafletInit ... mode specific options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapShape.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method that processed shape objects — tmapShape","title":"Internal method that processed shape objects — tmapShape","text":"Internal method processed shape objects","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapShape.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method that processed shape objects — tmapShape","text":"","code":"tmapShape(shp, is.main, crs, bbox, unit, filter, shp_name, smeta, o, tmf)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapShape.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method that processed shape objects — tmapShape","text":"shp shp .main .main crs crs bbox bbox unit unit filter filter shp_name shp_name smeta smeta o o tmf tmf","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSplitShp.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method that split shape objects — tmapSplitShp","title":"Internal method that split shape objects — tmapSplitShp","text":"Internal method split shape objects. far, used split stars object (dimension attributes)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSplitShp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method that split shape objects — tmapSplitShp","text":"","code":"tmapSplitShp(shp, split_stars_dim)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSplitShp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method that split shape objects — tmapSplitShp","text":"shp shape split_stars_dim name dimension split (\"\" skip)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSubsetShp.html","id":null,"dir":"Reference","previous_headings":"","what":"Internal method that subsets data from shape objects — tmapSubsetShp","title":"Internal method that subsets data from shape objects — tmapSubsetShp","text":"Internal method subsets data shape objects","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSubsetShp.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Internal method that subsets data from shape objects — tmapSubsetShp","text":"","code":"tmapSubsetShp(shp, vars)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmapSubsetShp.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Internal method that subsets data from shape objects — tmapSubsetShp","text":"shp shape vars vector variable names","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_animation.html","id":null,"dir":"Reference","previous_headings":"","what":"Create animation — tmap_animation","title":"Create animation — tmap_animation","text":"Create gif animation video tmap plot.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_animation.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create animation — tmap_animation","text":"","code":"tmap_animation( tm, filename = NULL, width = NA, height = NA, dpi = NA, delay = 40, fps = NA, loop = TRUE, outer.margins = NA, asp = NULL, scale = NA, restart.delay = NULL, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_animation.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create animation — tmap_animation","text":"tm tmap list tmap objects. tm tmap object, facets created, nrow ncol tm_facets() set 1 order create one map per frame. filename filename. omitted (default), animation shown viewer browser. specified, gif file video file (.e. mp4). package gifski required create gif animation. package av (uses FFmpeg library) required video formats. mp4 format recommended many video formats supported, wmv, avi, mkv. width, height Dimensions animation file (pixels). Required tm list, recommended specify advance tm tmap object. specified latter case, determined aspect ratio map. dpi dots per inch. default 100, can set option output.dpi.animation tmap_options(). delay delay time images (1/100th second). See also fps fps frames per second, calculated 100 / delay. fps specified, delay set 100/fps. loop logical determined whether animation looped, integer value determines many times animation looped. outer.margins (passed tmap_save()) overrides outer.margins argument tm_layout() (unless set NA) asp (passed tmap_save()) specified, overrides asp argument tm_layout(). Tip: set 0 map frame placed edges image. scale (passed tmap_save()) overrides scale argument tm_layout() (unless set NA) restart.delay used anymore. ... arguments passed av::av_encode_video()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_animation.html","id":"note","dir":"Reference","previous_headings":"","what":"Note","title":"Create animation — tmap_animation","text":"tmap plots supported, series R plots.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_animation.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create animation — tmap_animation","text":"","code":"if (FALSE) { data(NLD_prov) m1 <- tm_shape(NLD_prov) + tm_polygons(\"yellow\") + tm_facets(along = \"name\") tmap_animation(m1, delay=40) data(World, metro) m2 <- tm_shape(World, projection = \"+proj=eck4\", simplify = 0.5) + tm_fill() + tm_shape(metro) + tm_bubbles(size = paste0(\"pop\", seq(1970, 2030, by=10)), col = \"purple\", border.col = \"black\", border.alpha = .5, scale = 2) + tm_facets(free.scales.symbol.size = FALSE, nrow=1,ncol=1) + tm_format(\"World\") tmap_animation(m2, delay=100, outer.margins = 0) m3 <- lapply(seq(50, 85, by = 5), function(age) { World$at_most <- World$life_exp <= age World_sel <- World[which((World$life_exp <= age) & (World$life_exp > (age - 5))), ] tm_shape(World) + tm_polygons(\"at_most\", palette = c(\"gray95\", \"gold\"), legend.show = FALSE) + tm_shape(World_sel) + tm_text(\"name\", size = \"AREA\", root = 5, remove.overlap = TRUE) + tm_layout(main.title = paste0(\"Life expectency at most \", age), frame = FALSE) }) tmap_animation(m3, width = 1200, height = 600, delay = 100) m4 <- tm_shape(World) + tm_polygons() + tm_shape(metro) + tm_bubbles(col = \"red\") + tm_text(\"name\", ymod = -1) + tm_facets(by = \"name\", free.coords = F, nrow = 1, ncol = 1) + tm_layout(panel.show = FALSE, frame = FALSE) tmap_animation(m4, filename = \"World_cities.mp4\", width=1200, height = 600, fps = 2, outer.margins = 0) }"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_arrange.html","id":null,"dir":"Reference","previous_headings":"","what":"Arrange small multiples in grid layout — tmap_arrange","title":"Arrange small multiples in grid layout — tmap_arrange","text":"Arrange small multiples grid layout. Normally, small multiples created specifying multiple variables one aesthetic specifying argument (see tm_facets()). function can used arrange custom small multiples grid layout.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_arrange.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Arrange small multiples in grid layout — tmap_arrange","text":"","code":"tmap_arrange( ..., ncol = NA, nrow = NA, widths = NA, heights = NA, sync = FALSE, asp = 0, outer.margins = 0.02 ) knit_print.tmap_arrange(x, ..., options = NULL) # S3 method for tmap_arrange print(x, knit = FALSE, ..., options = NULL)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_arrange.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Arrange small multiples in grid layout — tmap_arrange","text":"... tmap objects one list tmap objects. number multiples can plot limited (see details). ncol number columns nrow number rows widths vector column widths. add 1 length equal ncol. heights vector row heights. add 1 length equal nrow. sync logical. navigation view mode (zooming panning) synchronized? default FALSE. asp aspect ratio. aspect ratio map. Normally, controlled asp argument tm_layout() (also tmap option). argument overwrite , unless set NULL. default value asp 0, means aspect ratio adjusted size device divided number columns rows. asp set NA, also default value tm_layout(), aspect ratio adjusted used shapes. outer.margins outer.margins, numeric vector four single value. defines outer margins multiple. overwrite outer.margins argument tm_layout(), unless set NULL. x tmap_arrange object (returned tmap_arrange()). options options passed knitr::knit_print() knit knitr::knit_print() enabled, normal base::print() function?","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_arrange.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Arrange small multiples in grid layout — tmap_arrange","text":"global option tmap.limits controls limit number facets plotted. default, tmap_options(tmap.limits = c(facets.view=4, facets.plot=64)). maximum number interactive facets set four since otherwise may become slow.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_arrange.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Arrange small multiples in grid layout — tmap_arrange","text":"","code":"tm1 = tm_shape(World) + tm_polygons(\"HPI\") tm2 = tm_shape(metro) + tm_bubbles(size = \"pop2020\") tmap_arrange(tm1, tm2)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_design_mode.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the design mode — tmap_design_mode","title":"Set the design mode — tmap_design_mode","text":"-called \"design mode\" enabled, inner outer margins, legend position, aspect ratio shown explicitly plot mode. Also, information aspect ratios printed console. function sets global option tmap.design.mode. can used toggle function without arguments.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_design_mode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the design mode — tmap_design_mode","text":"","code":"tmap_design_mode(design.mode)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_design_mode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the design mode — tmap_design_mode","text":"design.mode Logical value determines design mode. omitted design mode toggled.","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_devel_mode.html","id":null,"dir":"Reference","previous_headings":"","what":"Set the development mode — tmap_devel_mode","title":"Set the development mode — tmap_devel_mode","text":"-called \"development mode\" enabled, helpful messages timings printed console","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_devel_mode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set the development mode — tmap_devel_mode","text":"","code":"tmap_devel_mode(devel.mode)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_devel_mode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set the development mode — tmap_devel_mode","text":"devel.mode logical value determines development mode. omitted development mode toggled.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_format.html","id":null,"dir":"Reference","previous_headings":"","what":"Get or add format options — tmap_format","title":"Get or add format options — tmap_format","text":"Format options tmap options shape dependent. tmap_format() predefined formats can retrieved. values specific format can retrieved tmap_format(format), format name format. function tmap_format_add() used add format.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_format.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get or add format options — tmap_format","text":"","code":"tmap_format(format) tmap_format_add(..., name)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_format.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get or add format options — tmap_format","text":"format Name format. Run tmap_format() see choices. ... Options tm_layout() tm_view(). Can also list options. name Name new format.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_format.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get or add format options — tmap_format","text":"function tmap_format() returns names available formats. format defined, returns option list corresponding format.","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_format.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get or add format options — tmap_format","text":"","code":"# available formats tmap_format() #> available formats are: \"World\", \"World_wide\", \"NLD\", \"NLD_wide\" # create option list to be used as a new format World_small = tmap_format(\"World\") World_small$scale = 2 # add format tmap_format_add(World_small, name = \"World_small\") #> format World_small succesfully added. Use this format with tm_format(\"World_small\") # observe that World_small is successfully added: tmap_format() #> available formats are: \"World\", \"World_wide\", \"NLD\", \"NLD_wide\", \"World_small\" data(World) #qtm(World, fill=\"HPI\", format=\"World_small\")"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_icons.html","id":null,"dir":"Reference","previous_headings":"","what":"Specify icons — tmap_icons","title":"Specify icons — tmap_icons","text":"Specifies icons png images, can used markers thematic maps. function marker_icon() specification default marker.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_icons.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Specify icons — tmap_icons","text":"","code":"tmap_icons( file, width = 48, height = 48, keep.asp = TRUE, just = c(\"center\", \"center\"), as.local = TRUE, ... ) marker_icon()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_icons.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Specify icons — tmap_icons","text":"file character value/vector containing file path(s) url(s). width width icon. keep.asp, interpreted maximum width. height height icon. keep.asp, interpreted maximum height. keep.asp keep aspect ratio png image. TRUE aspect ratio differs width/height, either width height adjusted accordingly. just justification icons relative point coordinates. first value specifies horizontal second value vertical justification. Possible values : \"left\" , \"right\", \"center\", \"bottom\", \"top\". Numeric values 0 specify left alignment 1 right alignment. default value just c(\"center\", \"center\"). .local file url, saved local temporary file? ... arguments passed leaflet::icons(). iconWidth, iconHeight, iconAnchorX, iconAnchorY specified, override width height, just.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_icons.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Specify icons — tmap_icons","text":"icon data (see leaflet::icons())","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_last.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieve the last map to be modified or created — tmap_last","title":"Retrieve the last map to be modified or created — tmap_last","text":"Retrieve last map modified created. Works way ggplot2::last_plot(), although difference: tmap_last() returns last call instead stacked tmap-elements.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_last.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieve the last map to be modified or created — tmap_last","text":"","code":"tmap_last()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_last.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieve the last map to be modified or created — tmap_last","text":"call","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_leaflet.html","id":null,"dir":"Reference","previous_headings":"","what":"Export tmap to the format of the used graphics mode — tmap_leaflet","title":"Export tmap to the format of the used graphics mode — tmap_leaflet","text":"tmap_grid() returns grob object (\"plot\" mode) tmap_leaflet() leaflet object (\"view\" mode).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_leaflet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Export tmap to the format of the used graphics mode — tmap_leaflet","text":"","code":"tmap_leaflet(x, show = FALSE, ...) tmap_grid(x, show = FALSE, ...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_leaflet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Export tmap to the format of the used graphics mode — tmap_leaflet","text":"x tmap object. show show map? ... Arguments passed print.tmap return.asp aspect ratio returned? vp viewport (\"plot\" mode) knit logical, knit? options vector options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_leaflet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Export tmap to the format of the used graphics mode — tmap_leaflet","text":"tmap_grid() returns grob object (\"plot\" mode) tmap_leaflet() leaflet object (\"view\" mode). case small multiples shown, list returned.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_leaflet.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Export tmap to the format of the used graphics mode — tmap_leaflet","text":"","code":"map = tm_shape(World) + tm_polygons() tmap_leaflet(map, show = TRUE)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":null,"dir":"Reference","previous_headings":"","what":"Set tmap mode to static plotting or interactive viewing — tmap_mode","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"Set tmap mode static plotting interactive viewing. global option tmap.mode determines whether thematic maps plot graphics device, shown interactive leaflet map (see also tmap_options(). function tmap_mode() wrapper set global option. convenient function ttm(), stands toggle thematic map, toggle switch two modes. function ttmp() stands toggle thematic map print last map: ttm() followed tmap_last(); order words, shows last map mode. recommended use tmap_mode() scripts ttm()/ttmp() console.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"","code":"tmap_mode(mode = NULL) ttm() ttmp()"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"mode One \"plot\" \"view\". See Details info.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"previous tmap mode switching.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"mode-plot-","dir":"Reference","previous_headings":"","what":"mode = \"plot\"","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"Thematic maps shown graphics device. default mode, supports tmap's features, small multiples (see tm_facets()) extensive layout settings (see tm_layout()). recommended use tmap_save() saving static maps.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"mode-view-","dir":"Reference","previous_headings":"","what":"mode = \"view\"","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"Thematic maps viewed interactively web browser RStudio's Viewer pane. Maps fully interactive tiles OpenStreetMap map providers (see tm_tiles()). See also tm_view() options related \"view\" mode. mode generates leaflet::leaflet() widget, can also directly obtained tmap_leaflet(). R Markdown, possible publish HTML page. However, couple constraints comparison \"plot\": map always projected according Web Mercator projection. Although projection de facto standard interactive web-based mapping, lacks equal-area property, important many thematic maps, especially choropleths (see examples tm_shape()). Small multiples supported legend made aesthetics regarding size, symbol size line width. Text labels supported (yet) layout options set tm_layout()) regarding map format used. However, styling options still apply.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"references","dir":"Reference","previous_headings":"","what":"References","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"Tennekes, M., 2018, tmap: Thematic Maps R, Journal Statistical Software, 84(6), 1-39, doi:10.18637/jss.v084.i06","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_mode.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set tmap mode to static plotting or interactive viewing — tmap_mode","text":"","code":"tmap_mode() #> current tmap mode is \"plot\" tmap_mode(\"plot\") #> tmap mode set to 'plot' tm_shape(World) + tm_polygons(\"HPI\") tmap_mode(\"view\") #> tmap mode set to 'view' tm_shape(World) + tm_polygons(\"HPI\") ttm() #> tmap mode set to 'plot' tm_shape(World) + tm_polygons(\"HPI\")"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_options.html","id":null,"dir":"Reference","previous_headings":"","what":"tmap options — tmap_options","title":"tmap options — tmap_options","text":"tmap options","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_options.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"tmap options — tmap_options","text":"","code":"tmap_options(...) tmap_options_mode(mode = NA, default.options = FALSE) tm_options(...) tmap_options_diff() tmap_options_reset() tmap_options_save(style)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_options.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"tmap options — tmap_options","text":"... See details mode mode, e.g. \"plot\" \"view\" default.options return default options current options? style style, see tmap_style() available styles","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_save.html","id":null,"dir":"Reference","previous_headings":"","what":"Save tmap — tmap_save","title":"Save tmap — tmap_save","text":"Save tmap file. can either static plot (e.g. png) interactive map (html).","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_save.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Save tmap — tmap_save","text":"","code":"tmap_save( tm = NULL, filename = NA, device = NULL, width = NA, height = NA, units = NA, dpi = NA, outer.margins = NA, asp = NULL, scale = NA, insets_tm = NULL, insets_vp = NULL, add.titles = TRUE, in.iframe = FALSE, selfcontained = !in.iframe, verbose = NULL, ... )"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_save.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Save tmap — tmap_save","text":"tm tmap object filename filename including extension, optionally path. extensions pdf, eps, svg, wmf (Windows ), png, jpg, bmp, tiff, html supported. extension missing, file saved static plot \"plot\" mode interactive map (html) \"view\" mode (see details). default format static plots png, can changed using option \"output.format\" tmap_options(). NA (default), file saved \"tmap01\" default format, number incremented file already exists. device graphic device use. Either device function (e.g., png cairo_pdf) text indicating selected graphic device: \"pdf\", \"eps\", \"svg\", \"wmf\" (Windows ), \"png\", \"jpg\", \"bmp\", \"tiff\". NULL, graphic device guessed based filename argument. height, width dimensions plot (applicable html files). Units set argument units. one specified, calculated using formula asp = width / height, asp estimated aspect ratio map. missing, set width * height equal option \"output.size\" tmap_options(). default 49, meaning map square (aspect ratio 1) width height set 7. units units width height (\"\", \"cm\", \"mm\"). default, pixels (\"px\") used either width height set value greater 50. Else, units inches (\"\"). dpi dots per inch. applicable raster graphics. default set 300, can changed using option \"output.dpi\" tmap_options(). outer.margins overrides outer.margins argument tm_layout() (unless set NA) asp specified, overrides asp argument tm_layout(). Tip: set 0 map frame placed edges image. scale overrides scale argument tm_layout() (unless set NA) insets_tm tmap object inset map, list tmap objects multiple inset maps. number tmap objects equal number viewports specified insets_vp. insets_vp viewport inset map, list viewports multiple inset maps. number viewports equal number tmap objects specified insets_tm. add.titles add titles leaflet object. .iframe interactive map saved iframe? , two HTML files saved; one small parent HTML file iframe container, one large child HTML file actual widget. See widgetframe::saveWidgetframe() details. default FALSE, means one large HTML file saved (see saveWidget()). selfcontained interactive map saved, resources (e.g. JavaScript libraries) contained HTML file? FALSE, placed adjacent directory (see also htmlwidgets::saveWidget()). Note HTML file often still large selfcontained = FALSE, since map data (polygons popups), also contained HTML file, usually take space map resources. verbose Deprecated. now controlled tmap option show.messages (see tmap_options()) ... Arguments passed htmlwidgets::saveWidget, widgetframe::saveWidgetframe widget Widget save file File save HTML libdir Directory copy HTML dependencies (defaults filename_files). background Text string giving html background color widget. Defaults white. title Text use title generated page. knitrOptions list knitr chunk options.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_save.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Save tmap — tmap_save","text":"filename, invisibly, export successful.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_save.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Save tmap — tmap_save","text":"","code":"if (FALSE) { data(NLD_muni, NLD_prov) m <- tm_shape(NLD_muni) + tm_fill(col=\"population\", convert2density=TRUE, style=\"kmeans\", title=expression(\"Population (per \" * km^2 * \")\")) + tm_borders(\"black\", alpha=.5) + tm_shape(NLD_prov) + tm_borders(\"grey25\", lwd=2) + tm_style(\"classic\") + tm_format(\"NLD\", inner.margins = c(.02, .15, .06, .15)) + tm_scale_bar(position = c(\"left\", \"bottom\")) + tm_compass(position=c(\"right\", \"bottom\")) tmap_save(m, \"choropleth.png\", height = 7) # height interpreted in inches tmap_save(m, \"choropleth_icon.png\", height = 100, scale = .1) # height interpreted in pixels data(World) m2 <- tm_shape(World) + tm_fill(\"well_being\", id=\"name\", title=\"Well-being\") + tm_format(\"World\") # save image tmap_save(m2, \"World_map.png\", width=1920, height=1080, asp=0) # cut left inner margin to make sure Antarctica is snapped to frame tmap_save(m2 + tm_layout(inner.margins = c(0, -.1, 0.05, 0.01)), \"World_map2.png\", width=1920, height=1080, asp=0) # save interactive plot tmap_save(m2, \"World_map.html\") }"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":null,"dir":"Reference","previous_headings":"","what":"Set or get the default tmap style — tmap_style","title":"Set or get the default tmap style — tmap_style","text":"Set get default tmap style. Without arguments, current style returned. Also available styles displayed. style set, corresponding tmap options (see tmap_options()) set accordingly. default style (.e. loading package) \"white\".","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set or get the default tmap style — tmap_style","text":"","code":"tmap_style(style)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set or get the default tmap style — tmap_style","text":"style Name style. omitted, tmap_style() returns current style also shows available styles. style specified,tmap_style() sets style accordingly. Note case, tmap options (see tmap_options()) reset according style definition. See tm_layout() predefined styles, tmap_style_catalogue (migrated v4 yet) creating catalogue.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set or get the default tmap style — tmap_style","text":"style changing","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set or get the default tmap style — tmap_style","text":"Note tm_style() used within plot call (affects plot), whereas tmap_style() sets style globally. loading style, options defined style (.e. difference default \"white\" style) can obtained tmap_options_diff(). documentation tmap_options() (details examples) shows create new style.","code":""},{"path":[]},{"path":"https://r-tmap.github.io/tmap/dev/reference/tmap_style.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set or get the default tmap style — tmap_style","text":"","code":"tmap_style() #> current tmap style is \"white (modified)\" #> other available styles are: \"white\", \"gray\", \"natural\", \"cobalt\", \"albatross\", \"classic\", \"v3\", \"gray_v3\", \"grey_v3\", \"natural_v3\", \"cobalt_v3\", \"albatross_v3\", \"classic_v3\" tm_shape(World) + tm_polygons(\"HPI\") tmap_style(\"cobalt\") #> tmap style set to \"cobalt\" #> other available styles are: \"white\", \"gray\", \"natural\", \"albatross\", \"classic\", \"v3\", \"gray_v3\", \"grey_v3\", \"natural_v3\", \"cobalt_v3\", \"albatross_v3\", \"classic_v3\" tm_shape(World) + tm_polygons(\"HPI\") # for backwards compatibility, the styles of tmap versions 1-3 are also included: tmap_style(\"v3\") #> tmap style set to \"v3\" #> other available styles are: \"white\", \"gray\", \"natural\", \"cobalt\", \"albatross\", \"classic\", \"gray_v3\", \"grey_v3\", \"natural_v3\", \"cobalt_v3\", \"albatross_v3\", \"classic_v3\" tm_shape(World) + tm_polygons(\"HPI\") tmap_style(\"cobalt_v3\") #> tmap style set to \"cobalt_v3\" #> other available styles are: \"white\", \"gray\", \"natural\", \"cobalt\", \"albatross\", \"classic\", \"v3\", \"gray_v3\", \"grey_v3\", \"natural_v3\", \"albatross_v3\", \"classic_v3\" tm_shape(World) + tm_polygons(\"HPI\")"},{"path":"https://r-tmap.github.io/tmap/dev/reference/v4-not-yet.html","id":null,"dir":"Reference","previous_headings":"","what":"Features not yet implemented in tmap4 — v4-not-yet","title":"Features not yet implemented in tmap4 — v4-not-yet","text":"Features yet implemented tmap4","code":""},{"path":"https://r-tmap.github.io/tmap/dev/reference/v4-not-yet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Features not yet implemented in tmap4 — v4-not-yet","text":"","code":"tm_iso(...) tm_logo(...) tm_minimap(...) tmap_grob(...) tmapOutput(...) tmapProxy(...) renderTmap(...) tm_remove_layer(...) tm_rgba(...) tmap_tip(...) tmap_style_catalog(...) tmap_style_catalogue(...)"},{"path":"https://r-tmap.github.io/tmap/dev/reference/v4-not-yet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Features not yet implemented in tmap4 — v4-not-yet","text":"... Arguments","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-40-development-version","dir":"Changelog","previous_headings":"","what":"tmap 4.0 (development version)","title":"tmap 4.0 (development version)","text":"consistency ggplot2, tm_polygons() now recognizes fill argument instead col.","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-33-4","dir":"Changelog","previous_headings":"","what":"tmap 3.3-4","title":"tmap 3.3-4","text":"CRAN release: 2023-09-12 (!) last version tmap 3.x. Next CRAN version tmap 4.x (release planned end 2023) fixed bug (stars appeared upside plot mode) fixed newly introduced shiny bug (#767)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-33-3","dir":"Changelog","previous_headings":"","what":"tmap 3.3-3","title":"tmap 3.3-3","text":"CRAN release: 2022-03-02 added device tmap_save() fixed many small bugs (see GitHub issue list)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-33-2","dir":"Changelog","previous_headings":"","what":"tmap 3.3-2","title":"tmap 3.3-2","text":"CRAN release: 2021-06-16 Worlds fixed (now ‘s2’ proof, see GitHub issue #564)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-33-1","dir":"Changelog","previous_headings":"","what":"tmap 3.3-1","title":"tmap 3.3-1","text":"CRAN release: 2021-03-15 fixed view titles added html.escape popup.format control whether html code escaped view popups fixed many small bugs (see GitHub issue list)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-33","dir":"Changelog","previous_headings":"","what":"tmap 3.3","title":"tmap 3.3","text":"CRAN release: 2021-01-19 tmap_grob() added, exports tmap plots grob objects (grid package) SpatRaster objects (terra package) supported fixed many small bugs (see GitHub issue list)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-32","dir":"Changelog","previous_headings":"","what":"tmap 3.2","title":"tmap 3.2","text":"CRAN release: 2020-09-15 tmap_animation() improved: now using av gifski hood; added progress bar; lists tmap objects supported; improved default settings improved tmapOutput(); now works reactive shiny objects improved internally used margins; also small exported maps look good (see example tmap_save()) improved tmap_design_mode(); tmap.design.mode now global option (tmap option anymore) reexported providers leafet added show.warnings tmap_options() added width argument tm_credits() tm_text() improved: added “id” argument, tm_remove_layer() can applied ","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-31","dir":"Changelog","previous_headings":"","what":"tmap 3.1","title":"tmap 3.1","text":"CRAN release: 2020-07-09 interactive maps origin CRS working: tmap_options(projection = 0, basemaps = NULL) added tm_mouse_coordinates() show mouse coordinates view mode added tmap_design_mode() toggle design mode. made backgrond symbol grob shapes transparent added .iframe selfcontained tmap_save() improved tm_add_legend(): added type = \"title\" title legend elements added ttmp() shows last map mode. fixed many small bugs (see GitHub issue list)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-30","dir":"Changelog","previous_headings":"","what":"tmap 3.0","title":"tmap 3.0","text":"CRAN release: 2020-04-09 [!] spatial rasters/arrays now implemented using stars package (instead raster package) .count argument added layer functions; numeric variables can treated count variables (integers) drop.levels argument added layer functions allows drop unused levels new style added color classes: “dpih” “headtails”; also added style.args pass arguments classInt::classIntervals() grid labels specification per axis fixed bug geometry collection","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-23-2","dir":"Changelog","previous_headings":"","what":"tmap 2.3-2","title":"tmap 2.3-2","text":"CRAN release: 2020-01-19 probably last version release tmap 3.0 many small improvements bug fixes (see GitHub) first stars supported (full support expected tmap 3.0) replaced projection shortcuts \"epsg/proj4strings\" examples","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-23-1","dir":"Changelog","previous_headings":"","what":"tmap 2.3-1","title":"tmap 2.3-1","text":"CRAN release: 2019-09-17 improved popups view mode added validity checks sf objects minor bugs fixed: see GitHub issue list","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-23","dir":"Changelog","previous_headings":"","what":"tmap 2.3","title":"tmap 2.3","text":"CRAN release: 2019-07-18 [!] shiny integration: added tmapOutput(), renderTmap(), tmapProxy(), , tm_remove_layer() improved tmap_save() (regarding default values) improved tm_rgb() (added r g b max.value arguments) added tm_graticules() supported TMS servers view mode, layers can hidden legend group = NULL replaced mapview leafsync minor bugs fixed: see GitHub issue list","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-22","dir":"Changelog","previous_headings":"","what":"tmap 2.2","title":"tmap 2.2","text":"CRAN release: 2019-01-05 improved tm_rgb() improved breaks interactive maps added bbox argument qtm() improved projection shortcut codes (using EPSG database) fixed several bugs (see GitHub)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-21-1","dir":"Changelog","previous_headings":"","what":"tmap 2.1-1","title":"tmap 2.1-1","text":"CRAN release: 2018-08-09 fixed two small bugs","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-21","dir":"Changelog","previous_headings":"","what":"tmap 2.1","title":"tmap 2.1","text":"CRAN release: 2018-08-06 added option max.raster (maximum raster size) made rasters view mode faster bug fixed geometry collection objects without data view mode improved handling manual palettes tmap_arrange() can take list tmap objects","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-20","dir":"Changelog","previous_headings":"","what":"tmap 2.0","title":"tmap 2.0","text":"CRAN release: 2018-07-15 [!] tmap migrated sp sf. sp objects still supported, internal functions based sf [!] added tm_sf() draws sf objects [!] renamed *_tmap() functions (e.g. save_tmap()) tmap_*() consistency [!] added tm_basemap() tm_tiles(): now, multiple (overlay) tiled maps can shown [!] rearranged tmap options, styles formats. See tmap_options(), tmap_style(), tmap_format(), tm_style() tm_format() [!] added filter argument tm_shape() added colorNULL layer functions added tm_minimap() added remove.NA.facets tm_facets() units data columns supported tmap_animation() enhanced loop options added tmap_tips() changes backwards compatible 1.11-2 vignettes rewritten, including vignette describes changes 2.0","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-111-2","dir":"Changelog","previous_headings":"","what":"tmap 1.11-2","title":"tmap 1.11-2","text":"CRAN release: 2018-04-10 added references JSS paper (including citation)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-111-1","dir":"Changelog","previous_headings":"","what":"tmap 1.11-1","title":"tmap 1.11-1","text":"CRAN release: 2018-02-13 fixed bug labels argument tm_fill() fixed bug regarding legend symbols facets free scales fixed bug rasters view mode improved popup width view mode","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-111","dir":"Changelog","previous_headings":"","what":"tmap 1.11","title":"tmap 1.11","text":"CRAN release: 2017-11-24 added text.align text..columns legend.format legend.(aes).reverse added layer functions symbol shapes can put list small multiples, named according values variable specified shape argument grid labels can now rotated formatted changed default values free.coords drop.units tm_facets() fixed bug NAs view mode fixed bug dismo::gmap() raster shapes fixed bug ambiguous values aesthetics (e.g. “blue” also variable name) NOTE: last version major update (sf fully replaces sp)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-110","dir":"Changelog","previous_headings":"","what":"tmap 1.10","title":"tmap 1.10","text":"CRAN release: 2017-05-11 [!] tm_scale_bar(), tm_text(), tm_grid() now supported view mode (requires leaflet 1.1.0) added along argument tm_facets(), enables faceting along multiple pages (animation frames) added main.title argument tm_layout added tmap_options(), including new option tmap.unit (“metric” “imperial”“) improved automatic labelling breaks improved legend view mode: missing values shown default (like plot mode) improved bubble scaling view mode fixed bug aspect ratio bug","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-18-1","dir":"Changelog","previous_headings":"","what":"tmap 1.8-1","title":"tmap 1.8-1","text":"CRAN release: 2017-01-29 added tm_rgb() (shortcut rgb rasters) fixed interactive maps R Markdown fixed bug qtm() called without arguments","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-18","dir":"Changelog","previous_headings":"","what":"tmap 1.8","title":"tmap 1.8","text":"CRAN release: 2017-01-03 [!] package split: non-plotting functions migrated tmaptools added tmap_arrange() arranging custom small multiples added simplify argument tm_shape() added error message NA-projected shapes view mode improved unit handling, now can set metric imperial NA values allowed direct color variables sf (simple features) objects supported","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-16-1","dir":"Changelog","previous_headings":"","what":"tmap 1.6-1","title":"tmap 1.6-1","text":"CRAN release: 2016-10-29 improved projections: code efficient now shortcuts renewed. Also, CRS objects now supported project arguments (e.g. tm_shape(), set_projection), .CRS added get_projection get_proj4. Rscript works: methods moved imports depends","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-16","dir":"Changelog","previous_headings":"","what":"tmap 1.6","title":"tmap 1.6","text":"CRAN release: 2016-10-21 [!] tm_symbols() added, create proportional symbol maps: besides bubbles, also supports symbol shapes, png icons, small ggplot2 plots [!] imported cartogram function cartogram package (thanks Sebastian!) [!] reverse geocoding function tmaptools::rev_geocode_OSM() added [!] tm_logo() added added popup.vars base layer functions bounding box (argument bbox tm_shape()) working view mode tmaptools::geocode_OSM() improved: SpatialPointsDataFrame can now returned last_tmap() added, retrieves last produced map crop_shape can also handle polygons cropping area append_data improved; coverage information can retrieved under_coverage over_coverage interpolate parameter added tm_raster() added support custom legend formatting functions legend items can now stacked horizontally legend width height can determined fully manually (negative values legend.height legend.width) argument interval.closure added layer functions determine intervals closed added warnings non-supported elements view mode fixed raster brick bug fixed save_tmap/get_asp_ratifo bug","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-14-1","dir":"Changelog","previous_headings":"","what":"tmap 1.4-1","title":"tmap 1.4-1","text":"CRAN release: 2016-05-07 add just argument anchor text labels, legend attributes position map attributes (scale bar) can placed outside frame added tm_xlab() tm_ylab() RGB raster support, see tm_raster static text (.e titles, credits, legend titles, labels) support expressions updated Europe shape: projection bounding box now consistent Eurostat publications added crop_shape, convenient wrapper around raster::crop()","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-14","dir":"Changelog","previous_headings":"","what":"tmap 1.4","title":"tmap 1.4","text":"CRAN release: 2016-03-18 [!] interactive mapping added. Now, tmap two modes: “plot” (graphics device) “view” (interactive viewer, leaflet widget) [!] facets (small multiples) improved: group two variables possible, panel layout added, missing data can shown separately added geocode_OSM(), function find coordinates (now tmaptools::geocode_OSM()) improved set_projection raster objects added double_line offset_line added insets option save_tmap improved default settings contrast argument regarding seq div palettes improved automatic positions legend map attributes (specifically, legend snaps right-hand side without need adjust legend.width, legend attributes position improved double frame enabled) improved tm_layouts()’s design.mode output lwd parameter added tm_scale_bar() tm_compass() fixed bb bug","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-12-1","dir":"Changelog","previous_headings":"","what":"tmap 1.2-1","title":"tmap 1.2-1","text":"fixed bug PROJ.4 version < 4.9.1 improved error messages rd projection reset \"+init=epsg:28992\", since latter now \"+towgs\" item fixed bug print.tmap() returned object","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-12","dir":"Changelog","previous_headings":"","what":"tmap 1.2","title":"tmap 1.2","text":"CRAN release: 2015-12-11 added read_osm(), function read Open Street Map data (now tmaptools::read_osm()) added bb, handy bounding box function added layout themes tm_style tm_format added automatic text labeling added interactive SVG, can opened RStudio (see itmap) added map compass (tm_compass()) added text aesthetics size col added automatic map coloring added earth boundary, useful projected world maps World added warped grid lines (e.g. long-lat lines can shown projected maps) added new color scale modes (enabled style=\"cat\", “cont”, “order”) added save_tmap() added smooth_map, smooth_raster_cover, sample_dots, points_to_raster poly_to_raster added read_GPX improved automatic layout regarding title, legend, map attributes layer arguments, e.g. palette, can take multiple values small multiples improved grid lines (labels can also placed outside frame) arguments free.coords drop.shapes tm_facets() working updated examples vignette fixed viewport bug see ?tmap structured overview tmap functions","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-10","dir":"Changelog","previous_headings":"","what":"tmap 1.0","title":"tmap 1.0","text":"CRAN release: 2015-05-28 added tm_credits() tm_scale_bar() added .master argument tm_shape(), determines shape master added unit unit.size arguments tm_shape() correlates coordinates desired units added tm_polygons(), combination tm_fill() tm_borders() fixed several small bugs","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-08","dir":"Changelog","previous_headings":"","what":"tmap 0.8","title":"tmap 0.8","text":"added tm_raster() improved legend behavior: legend titles set layer functions (instead tm_layout()) removed crop_shape(), since raster::crop() job, , faster --scope functions migrated spatialToolbox package, available https://github.com/mtennekes/spatialToolbox","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-071","dir":"Changelog","previous_headings":"","what":"tmap 0.7.1","title":"tmap 0.7.1","text":"fixed bug scale parameter (global scale set tm_layout())","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-07","dir":"Changelog","previous_headings":"","what":"tmap 0.7","title":"tmap 0.7","text":"CRAN release: 2015-03-27 enhanced small multiples (tm_facets()) respect scaling free coordinate scales added alpha argument tm_layers() transparency added text shadow argument added function split() split shape object sbind() combine shape objects. added automatic legend positioning legend.position = NULL improved number formatting legend improved inner.margins outer.margins. can take one value (e.g. outer.margins=0 rather outer.margins=c(0,0,0,0)) improved qtm(): tm_facets() parameters working, also fixed scale parameter bug improved examples approx_areas, calc_densities fixed bug regarding drawing frame outer.margins=0. fixed bug plotting bubbles improved temp file handling animation_tmap() added functions get set polygon directions, calculate intersection ratios polygons (intersection_shapes)","code":""},{"path":"https://r-tmap.github.io/tmap/dev/news/index.html","id":"tmap-06","dir":"Changelog","previous_headings":"","what":"tmap 0.6","title":"tmap 0.6","text":"CRAN release: 2014-07-30 first CRAN version newer version may available https://github.com/r-tmap/tmap get started, see package vignette ‘tmap nutshell’ help files questions suggestions, please contact (mtennekes gmail dot com)","code":""}]