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
0
votes
1 answer

R package tmap: unable to overlay points on line & unable to show points in view mode

I have developed code to identify where freeway ramps terminate on surface streets and I would like to show those points on a map which also shows the freeways and ramps to check whether my code is correct. I created an simple features (sf) object…
0
votes
3 answers

Mapping Europe with tmap package

I would like to map some raster data using tmap package. My geographical extent is Europe and R cannot find the map of Europe altough I got the latest version of R and all packages required. I am trying this: library(tmap) data(Europe) …
0
votes
2 answers

Remove polygon lines in trap - or possibly dissolve polygons?

I'm making a map of flood zones that ends up with additional lines I don't want. Here is the code: tmap_mode("view") tm_shape(floodplot) + tm_polygons( col = "Risk Level", alpha = 0.9, palette = colors) ) + tm_layout( title =…
taylorpot
  • 25
  • 4
0
votes
0 answers

could not find function "read_shape"

I have a problem with reading a shapefile. The code below returned the error of "could not find function "read_shape"." This used to work properly before upgrading my R/Rstudio to a newer version. Currently, I am using Version 1.1.463 of Rstudio,…
Nader Mehri
  • 514
  • 1
  • 5
  • 21
0
votes
1 answer

Error: package or namespace load failed for ‘tmap’

I am getting the error below when I am trying to run my shiny app which used to work properly; I did not get this error using the old version of my R/Rstudio. Currently, I am using Version 1.1.463 of Rstudio, and R version…
Nader Mehri
  • 514
  • 1
  • 5
  • 21
0
votes
0 answers

My geometries are not plotting correctly in r tmap?

I'm trying to plot a series of points onto a tmap however, the points are not being plotted at the correct long/lat. Here is the code: #loading data ne_110<-st_read(file.choose(),…
JoshuaAJones
  • 316
  • 1
  • 2
  • 7
0
votes
1 answer

tmap: remove white space to the right of the legend.outside

I got this plot using this script library(raster) library(tmap) library(classInt) download.file("https://github.com/mtennekes/tmap/files/5500015/Difference.tif.zip", "Difference.tif.zip") unzip("Difference.tif.zip",…
shiny
  • 3,380
  • 9
  • 42
  • 79
0
votes
2 answers

Tmap: increase space between plot and legend

I would like to increase the space between the plot and the legend in tmap. Using 'legend.outside.size' works, but also changes the ratio of the entire plot. Is there a way to just move down the legend? Ideally, the spacing between the lower panels…
webbe
  • 130
  • 8
0
votes
1 answer

Tmap: customize continuous legend values without changing scale

I would like to change the numbers of a legend without changing the scale in tmap. As an example: r <- raster::raster(matrix(runif(100), 10, 10)) tm_shape(r) + tm_raster(legend.is.portrait = FALSE, style = 'cont', title = '', palette = "-RdBu")…
webbe
  • 130
  • 8
0
votes
1 answer

Replicating shiny tmap with leaflet?

I've built the following app https://iseak.shinyapps.io/Mapa/ and I would like to switch from tmap to leaflet for the map portion of the app because I've run into some limitations (I'd like fancier popups and some other stuff). Currently the map is…
Ainhoa
  • 191
  • 7
0
votes
2 answers

Issue loading any package in R

I have successfully installed the tmap package in RStudio version 1.2.1335. However when I try to load it with the library(tmap) command I get this error message: Error: package or namespace load failed for ‘tmap’ in dyn.load(file, DLLpath =…
bellbyrne
  • 67
  • 7
0
votes
1 answer

tmap issue with Antarctica shape "Error in if (any(zeros)) {"

I've been working for many time with tmap tool in r and have been learning a lot with my country's shape with multipolygons with provinces boundaries, Argentina…
0
votes
1 answer

tmap/ tmaptools geocode_OSM function error

I have a dataframe of ~ 2050 addresses that I'd like to geocode using the geocode_OSM function. The dataframe (df) has an id column and an address column. library(tmaptools) library(tmap) library(geosphere) geocoded_addresses <-…
ra_learns
  • 51
  • 6
0
votes
1 answer

R - Remove Territories in shape file and aggregate to higher NUTS level

I am trying to create an EU shapefile. I want to remove all the oversea territories and then plot country borders. I downloaded NUTS1 Level Shapefiles from Eurostat…
0
votes
1 answer

Unable to install tmap

Tried to install the tmap package but encounter the below error install.packages("tmap") also installing the dependencies ‘tmaptools’, ‘sf’, ‘stars’, ‘classInt’ There are binary versions available but the source versions are later: …
user9510596
  • 41
  • 1
  • 5