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

error: proj_api.h not found in standard or given locations

I'm trying to install tmap package on R and it requires lwgeom But when it comes to install 'lwgeom' I get this error: configure: error: proj_api.h not found in standard or given locations. ERROR: configuration failed for package ‘lwgeom’ I've…
A Neto
  • 233
  • 2
  • 10
0
votes
1 answer

How to tweak the text angle in some counties with tmap?

I made the following map using tmap: My data source: lic_bed_sf.csv, and in .gpkg format .gpkg My code is as follows: tm_shape(lic_bed_sf) + tm_polygons("density", id = "county_name", palette = "Blues", …
celilati
  • 153
  • 7
0
votes
1 answer

tmap vs plotRGB

I'm trying to get the colours using tmap::tm_raster to be the same as when plotted using raster::plotRGB. my data set is here https://drive.google.com/drive/folders/1a5gOJ2S6lf_5nWu2ViU-6TRfi_gTMqi-?usp=sharing First I upload my…
Simon
  • 295
  • 1
  • 4
  • 12
0
votes
2 answers

Can I save a tmap file using names referenced within a list?

I'm trying to automatically name a jpg output using a character list. This is an Rmarkdown file I use for reporting. For each month I summarise groundwater statistics and produce a basic Rmardown html. I automatically save the maps to a folder I…
Simon
  • 295
  • 1
  • 4
  • 12
0
votes
1 answer

R: Heading/ Direction of Travel/ bearing from .gpx file - tmaptools

Using tmaptools package in R - How can I extract the 'Bearing' information from a .GPX track file. This appears in Garmin Basecamp but does not appear using tmaptools::read_GPX. Currently I use the below code. But surely there is a simpler way? Link…
Jock
  • 75
  • 1
  • 9
0
votes
1 answer

tmap coming up with blank map with one variable (but values are there)

I have two numeric variables I'm using to create two thematic maps using the tmap package. The same code works for one of the variables, but creates a blank map for the other. I created a small subset of the data to reproduce the error, here the…
Rekarrr
  • 356
  • 3
  • 11
0
votes
1 answer

R - tmap how to add datasets

I'm new in spatial graphics. I have to present the tmap package for an exam at university. So I was wondering is there a way to add general graphics such as those in the preloaded "World", "Rivers", "Land"... datasets? which are basically "ready to…
mandiatutti
  • 57
  • 1
  • 10
0
votes
3 answers

R tmap sf Error: arguments imply differing number of rows when viewing map

I am trying to create a map of all school districts in each state. The code below works for all states, except in Florida I get this error: Error in data.frame(..., check.names = FALSE) : arguments imply differing number of rows: 67,…
skhaji
  • 11
  • 4
0
votes
0 answers

tm_bubbles to display zero count data

I am trying to visulaise count data using tmap for the first time. Zero counts are informative and need to be displayed. I have the following code: Long<- c(149.942, 149.93583, 149.96217, 149.963, 149.96833, 149.97233) Lat <- c(-36.919, -36.8345,…
Tom
  • 199
  • 8
0
votes
1 answer

export GeoPDF when using tmap_save

When saving a plot as pdf with tmap the result file does not keep the Spatial information of the shapes or rasters used, is there a way to include it?. Command used: tmap_save(m_map,"result_map.pdf")
carlos
  • 45
  • 3
  • 7
0
votes
1 answer

Overlaying station locations as points on tmap

I have managed to plot a map of London using tmap in R: library(sf) library(tmap) library(dplyr) library(OpenStreetMap) qtm("London") tmap_mode("plot") tm_shape(lnd) + tm_polygons(alpha = 0.7, legend.show = FALSE) + …
JassiL
  • 432
  • 1
  • 7
  • 24
0
votes
1 answer

How to give every co-ordinate another color using tmap

I am trying to make a map with hotels in las vegas. I have all the coordinates. I also made a map with a dot at the 'hotel points'. But these dots are all black. I need every hotel (dot) to be another color. As you can see, all the dots (hotels) are…
Luuuuuuk
  • 43
  • 4
0
votes
0 answers

Unable to map a polygon layer and a points layer together due to unknown error

I've tried using tmap and ggplot's mapping functions, and also drew on a few utilities from the sf package. I have a dataset of land parcels that I'd like to visualize as points, and layer them onto a dataset of census tracts that I'd like to…
0
votes
0 answers

How to generate complete map of India in R?

I have the following dataset, now when i am plotting using ESRI India data set its showing Image1 as output and when i am using diva-gis India Data set its Showing Image 2 as dataset. I am using ggplot2, tmap. structure(list(NAME_1 =…
djMohit
  • 151
  • 1
  • 10
0
votes
0 answers

append_data deprecated in R (tmaptools package)

I want to use append_data (tmaptools package), but appears a message that show: "This function is deprecated and has been migrated to github.com/mtennekes/oldtmaptoolsError in append_data(World, wbData4, key.shp = "iso_a3", key.data = "iso3c", : …
scalamardo
  • 27
  • 3