Questions tagged [tmap]

tmap is an actively maintained open-source R-library for drawing thematic maps, written by Martijn Tennekes. The API is based on the Layered Grammar of Graphics, and resembles the syntax of ggplot2, a popular R-library for drawing charts.

tmap is an actively maintained open-source R-library for drawing thematic maps, written by Martijn Tennekes. The API is based on A Layered Grammar of Graphics by Hadley Wickham and resembles the syntax of , a popular R-library for drawing charts.

Repositories

Vignette

Presentation

Other resources

487 questions
2
votes
3 answers

Parameter error in tmaptools package read osm when using example data

Getting error with read_osm from the tmaptools package in R. Want to generate a static map with background layer. Error is present even when using the example NLD_muni data from tmap…
Andy
  • 21
  • 3
2
votes
1 answer

How to highlight locations on a tmap in R?

I am trying to use tm_text to add text to define locations on a map using the tmap package in R. This is the code i have used to produce my map: library(tmap) library(spData) tm_shape(nz) + tm_fill("Population") + …
T.2001
  • 147
  • 1
  • 6
2
votes
1 answer

tmap does not render in shiny

I have some code that renders a tmap in shiny, however, it does not show and no error messages are returned. It shows in the viewer alone, but not in shiny. I tried almost everything I could, but still no…
Bolun Cui
  • 31
  • 1
2
votes
2 answers

In "R" during plotting "tmap" library places labels outside plotting region (partially)

I am importing shapefile into R and try to plot it with labels. Unfortunately some labels overlap. That's why I have to use parameter "auto.placement = T" for the "tm_text" function. But this parameter places some labels outside plotting region…
Helios
  • 141
  • 1
  • 2
  • 10
2
votes
1 answer

How to get a shape of a searched map in tmap

I am using library(tmap) qtm("London") to get a map of London but can't find a way to get it in a shape? tm_shape Otherwise, I can only have it in view mode, not in plot mode.
2
votes
2 answers

R, tmap: Changing labels in view mode

I'm working on a map with tmap and i'm having some trouble changing labels in view mode as in here. I'm trying to change it to cities names column using name argument like: tm_shape(mymap, name = "city_name") + tm_polygons("Inad", palette =…
Alberson Miranda
  • 1,248
  • 7
  • 25
2
votes
1 answer

plot hillshade in tmap

I would like to plot a raster with hillshading and add layers with tmap. library(raster) alt = getData('alt', country='CHE') slope = terrain(alt, opt='slope') aspect = terrain(alt, opt='aspect') hill = hillShade(slope, aspect, 40, 270) plot(hill,…
Henk
  • 3,634
  • 5
  • 28
  • 54
2
votes
2 answers

Interactive map with tmap does not appear in Shiny app, but does show in Rstudio viewer

The interactive map I created with tmap does show up in the RStudio Viewer, however, if I try to include it in my Shiny application it does not appear. I've used the tmap_leaflet function, renderLeaflet and leafletOutput. Does anyone know how to…
2
votes
1 answer

How to use tmap with shiny

I am having issues getting a map using tmap to load in shiny. When I run the shiny code, the input sections show up, but not the output. The code doesn't crash, but it also never finishes running. My goal is to be able to have an interactive map…
Emma
  • 63
  • 1
  • 6
2
votes
1 answer

tmap: control frame around panel label

I'm trying to make two multiples of germany with no frames around the maps - this I managed to do. However, each multiple should have a label and I can't figure out how to control the frame around the panel labels. Is there any way to control the…
Robn
  • 67
  • 8
2
votes
0 answers

Combine multiple polygon layers in one interactive map with tmap

I am trying to draw one single interactive map in R using the tmap package. I have one polygon shape with data from various years. When I use tm_shape() + tm_fill() for each year it automatically makes a new, separate map for each year. I would like…
2
votes
1 answer

How can I drop the comma from a tmap legend output?

I have this code: tm_shape(usa, bbox = bbox, projection = map.crs)+ tm_borders(col = "grey", lwd = 1) + tm_fill(palette = "grey") + tm_grid(x = c(-77,-75,-73,-71), y = c(39,37,35), labels.inside.frame = F, labels.size = 1.1, …
dooogan
  • 67
  • 9
2
votes
1 answer

tmap pch shape and color tm_symbol

I am using tmap to make a map that will have both shape and color aesthetics. However, I am noticing strange behavior in my numeric scale for color (it is producing scales of 0 min to 10 min, 10 min to 20 min, etc.). Why is tmap returning this…
2
votes
0 answers

"caught segfault" when installing rgdal for tmap R package

My goal is to install tmap R package from CRAN. I have followed through this installation procedure prior to installing the tmap package: https://github.com/mtennekes/tmap/blob/master/ubuntu_17_installation.sh After install.packages("tmap") I…
larnsce
  • 103
  • 8
2
votes
1 answer

talend open studio create tmap

I want to select certain columns from 2 tables by coding the appropriate SQL code in the "query" zone of my tMySQLInput component. Then I've been told to use a "tMap" component in order to map each column from my tMySQLInput component to my…
sanchoniathon
  • 59
  • 2
  • 11