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
0 answers

I am using tmap library to make a plot of vector dataset. I am unable to add the latitude and longitude in degrees

I am trying to spatial plot from the attribute table of a vector file. I am unable to add latitude and longitude in degree minutes. Here is the code. Now kindly help me to add the latitude and longitude to the map with regular interval.
0
votes
1 answer

Combine shiny with tmap to display interactive map

I have the dataframe below for which I want to create a choropleth map. I downloaded the germany shapefile from here and now Im trying to display it via shiny app using tmap interactive version. Is this possible? Any other interactive solutions via…
firmo23
  • 7,490
  • 2
  • 38
  • 114
0
votes
2 answers

R - tmap_animation generates gif with green frames

I'm trying to create an animated GIF using tmap and display it in my Shiny app. When I use tm_shape() + tm_polygons() for a single date, the image produced is always OK. However, when I use tm_facets() and feed the result to tmap_animation, the…
Jay
  • 45
  • 1
  • 7
0
votes
1 answer

Animating RasterStack layers using tmap_animation

I have been attempting to animate a raster stack using tmap::tmap_animation(). Each layer covers the exact same geographic extent, but a different date. The output GIF animation is a single frame with multiple small plots. Is it possible to create a…
Jackson
  • 111
  • 5
0
votes
1 answer

How to apply custom limits to continuous color ramp in tmap

Let's say I want to plot the World map with countries colored by population estimate, but I want the color ramp to start and stop at specified values (for instance, maybe I want to use one legend for several maps). library(tmap) data(World) #…
Pascal
  • 1,590
  • 2
  • 16
  • 35
0
votes
1 answer

Unable to add a tmap title in interactive viewing mode

I am using tmap on RStudio 1.4.1103. When I try to add a title to my map using the tm_layout() function call, I am able to see the title in plotting mode, but when I switch to interactive viewing mode, the title disappears. Please find below a…
0
votes
2 answers

How to check column that contain letter and number in Talend

My columns must contains 2 letter and 4 number like this (AV1234) How can i check this ?
DY_BI
  • 3
  • 2
0
votes
1 answer

Can't install tmap R Package

I am having trouble installing the tmap R package. I am trying to install it using install.packages("tmap") and mn receiving this error: Error: package or namespace load failed for ‘tmap’ in namespaceExport(ns, exports): undefined exports:…
Nick H
  • 3
  • 1
0
votes
0 answers

R tmap: polygons plotted in tmap_mode("view") but with ("plot") only the first observation

I am trying to plot a polygon with tmap r package. My object comes from a shapefile, and looks like: geometry type: POLYGON dimension: XY bbox: xmin: 453850.6 ymin: 7168979 xmax: 513813.6 ymax: 7234603 CRS: +proj=utm…
bertagrau
  • 1
  • 2
0
votes
0 answers

Cropping a shapefile in R

How can I crop the map (shapefile) more or less as the red square, even just a good nord-est zoom would be good if its easier I need to merge the cropped map (shapefile) to my dataset afterwards I am using the tmap and sf packages in R map
andriy
  • 39
  • 3
0
votes
2 answers

Is it possible to create a map of the UK counties with the packages spData/tmap

I have recently used the package spData for plotting the London boroughs but I haven't found anything for plotting the counties in the UK. Is it possible the the package spData contains only a few countries in it? Thank you for your help, Andrea
Andre
  • 3
  • 4
0
votes
0 answers

unable to remove factors in tmap data

I'm starting to get acquainted with using R in mapping and I am currently working with the tmap package. I am running into problems when subsetting the data. I can select various subsets using the tidyverse syntax without problems, but I am unable…
Mario Niepel
  • 1,095
  • 4
  • 19
0
votes
1 answer

Combine plots of different classes in R

I am working with plots of different classes in r, namely tmap (main plots) and ggplot (represent minor information). library(raster) library(tmap) library(RStoolbox) library(gridExtra) library(ggplot2) data("World") r1 <- raster(ncol=2,…
JerryTheForester
  • 456
  • 1
  • 9
  • 26
0
votes
1 answer

tmap: add rectangular frame around keys in legend of raster map

I need to place a fill-legend for categorical raster data, where white is used to represent ice, on a raster map on white background. I would like to use tmap. Here is a minimum working example that is similar in spirit to my current…
0
votes
1 answer

Creating piecharts with tm_bubbles() from tmap package in R

I want to create a piechart using tm_bubbles(), or more generally, using the tmap package in R. Here is the code I have so far: library(tmap) library(spData) us_states_map = tm_shape(st_transform(us_states,2163)) + tm_polygons() + tm_layout(frame…