525 questions
1
vote
1
answer
68
views
How to plot a map with points/locations with color and legend?
I'm trying to plot locations with colors. The locations are from different years which is why I want colors. Here are data and code.
library(terra)
library(tidyverse)
library(tidyterra)
library(tmap)
...
-3
votes
2
answers
168
views
Export tmap to docx
Given a tmap:
library(tmap)
plt <- tm_shape(World) +
tm_polygons(fill = "HPI")
How can I export the image directly into a docx file within R?
1
vote
1
answer
223
views
How to create tmap labels along lines with rotated crs?
In the following example, aligning the labels to the lines works in the default crs, but rotating the viewport caused inconsistent results. How could it be modified to work with the rotated viewport?
...
2
votes
1
answer
177
views
How to stretch a tmap wider in plot mode?
I have two questions about the sample tmap code below.
How would I make the tmap fill the entire page width?
How to avoid generating the blank 1st page?
I've tried grid.arrange and I was able to ...
1
vote
0
answers
113
views
Is there a way to increase the size of all symbols in tm_symbols or tm_dots (or any other options) when scaling by variable in tmap?
I am trying to make a map for a review paper with dots corresponding to the number of studies collected from each continent. I've created the basic map using the World map from tmap with tm_symbols(...
4
votes
1
answer
117
views
Column labels in tmap plot with facets grid
Consider the following example:
library(tmap)
mydf <- NLD_muni %>% filter(province %in% c("Drenthe", "Flevoland"))
tm_shape(mydf) +
tm_polygons(
fill = c("...
1
vote
0
answers
98
views
TMAP v4: group.control Radio not working with Basemap and Potential Bug with special characters (german Umlaute = mutated vowels: ä,ü,ö)
I am trying to create some interactive tmaps. I wanted to take advantage of the radio buttons in TMAP v4, to display different data inside the same .html-file.
My first question is around using group....
2
votes
1
answer
130
views
Fourth layer added to tmap view mode makes the third disappear
I'm creating an interactive map with tmap. I have layers from several different sources I want to combine in one map. I am able to add layers but after adding three, adding one more makes the third ...
3
votes
1
answer
125
views
tmap MAP_COLORS not coloring adjacent polygons distinctly
I am trying to use tmap with the MAP_COLOR argument which is supposed to plot the given shapefile with unique colors for adjacent polygons. However, it seems to be failing when I use it on two ...
2
votes
2
answers
154
views
tmap layout problem with blank space and overlapping legend using plot_grid
I would like to have a kind of standardized layout in {tamp} for making future maps:
In short, I want to have
the map on the left,
the legend on the right,
an optional short text and
a potential ...
1
vote
2
answers
165
views
Impossible to remove frame from added legend in tmap v4
I couldn't remove the legend frame when adding a legend through tm_add_legend() and even setting the tm_options with legend.frame=FALSE didn't work either.
I'm using the tmap v4:
packageVersion('tmap')...
0
votes
0
answers
68
views
Talend tMap how to get rejcted rows froms from both input tables
I have 2 input tables which I wanna join over an ID column. My wished output are 2 datasets, one with the matches (inner join) and one with the non-matched data.
My problem is, that I get only the ...
2
votes
1
answer
109
views
How do I get tmap legends to play nicely with subscripts, italics, etc.?
When I use expression() to add text formatting such as italics and subscripts to a tmap legend, I'm getting huge amounts of unnecessary white space, and I have no idea why.
Here's my reprex code;
...
0
votes
1
answer
129
views
How to change fill color for NAs in tmap::tmap_options()
I want to develop a tmap::tmap_style() that includes several options, such as "yellow" for the fill color for missing values. I want to produce the following graphics:
World <- tmap::...
0
votes
2
answers
252
views
Inset formatting in tmap
I would like to use the tmap package to create an extent indicator inset map to show a zoomed-out view of the area. However, I'm having trouble controlling the frame and size of the inset map. In the ...