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

R tmap multiple layers with only one (same) legend

I would like to map some data on residues of pesticides in surface water. I have a dataset with different pesticides, and for each pesticide, different monitoring stations with multiple residues for some years. something like this: PARAM station…
0
votes
1 answer

Creating a geographic file for use with tmap and coming up with error when coding shapefile

I am trying to reproduce a map I found here: http://zevross.com/blog/2018/10/02/creating-beautiful-demographic-maps-in-r-with-the-tidycensus-and-tmap-packages/ I am using RStudio and am running the following code: library(ggplot2) # For…
rfl026
  • 1
  • 1
0
votes
2 answers

Records a series of maps with a loop using tmap and sf

I would like to record a series of maps using the sf and tmap packages in R. My data is an sf object with different attributes linked to square polygons. The breaks for the maps are the same for each attribute that I want to map, that's why I…
ePoQ
  • 434
  • 3
  • 18
0
votes
1 answer

Make graphics the same size (width & height) when side by side in Rmarkdown html document

I know how to put a number of plots side by side within a html output using Rmarkdown {r maps, fig.cap = "Fig. Z - Maps", fig.show="hold", out.width="25%", fig.align = "center", echo =…
Drew
  • 131
  • 8
0
votes
0 answers

How do I associate numbers to string labels on R using the tmap package?

I am trying to create a map showing the neighborhoods of Manhattan with a number referring to each neighborhood. I want to associate a number for each of the 29 neighborhoods and display that number at the centroid of each polygon. I then want the…
Karen
  • 1
  • 2
0
votes
1 answer

Custom arranging tmap plots in R

I am trying to arrange maps I created using tmap as shown below. I tried with the code below but didn't work. photo showing preferred arrange map_plpot <-tmap_arrange(NULL,plot_1,NULL,plot_2,plot_2,plot_3,nrow = 2,ncol= 3)
ccc
  • 21
  • 2
0
votes
1 answer

Creating R shiny interactive map

I have been trying to create an interactive map with sliders and drop down menu's for the NLD_muni dataset from the spData package. I am new to shiny, how can i change this code to make my interactive app show these variables in a more useful…
Sean
  • 47
  • 6
0
votes
1 answer

Is there a way to provide a relationship between many variables displayed in facets in tmap? E.g. showing multiple variables on one interactive map

I am trying to show the population of all different age groups in a map. Is there a way to show this information NOT in facets. But instead group together on a single interactive map? Below is a reproducible example with the NLD_muni dataset on…
Sean
  • 47
  • 6
0
votes
1 answer

plot road network of two cities over each other (in the same scale) to compare the sprawl of cities

Inspired from this website (https://thetruesize.com) to compare countries How do I plot road_orlando and roads_miami over each other (SAME SCALE) to visually compare the road network sprawl. Edit - I had earlier asked to plot side by side in small…
SiH
  • 1,378
  • 4
  • 18
0
votes
1 answer

I'm trying to change date formats from yyyy-mm-dd to dd-mm-yyyy in talend tmap please help me?

I'm trying to change date formats in Talend from yyyy-mm-dd to dd-mm-yyyy I'm trying to parsing but it is not working.
0
votes
0 answers

UE4 C++ SpawnParams.Template->GetOwner() keeps returning null

I'm using Unreal Engine 4.26 C++ project. I'm trying to store the Actor FActorSpawnParameters inside of a TMap, this will help me later in the widget to get which element of the inventory is my actor, however when storing the inside the TMap and…
0
votes
1 answer

How to create full scale colorbar for single value data using tmap?

I need to generate different maps using tmap. To create a continous colorbar I use style = "cont" together with defined breaks (breaks = seq(0, 100, 25))). This works well if my data shows some variation (see map 1 below). However, I also have data…
mgrund
  • 1,415
  • 8
  • 10
0
votes
1 answer

Remove border from charts inside a map R

I am trying to add some pie charts inside a map in the following way: library(tmaptools) library(ggplot2) library(dplyr) library(tidyr) library(tmap) library(sf) data(NLD_prov) origin_data <- NLD_prov %>% …
user2246905
  • 1,029
  • 1
  • 12
  • 31
0
votes
1 answer

Error in do.call(rbind, x) with qtm() and openstreetmaps

I am trying to build a map of a federate state in germany with special borders (voting…
BanffBoss122
  • 149
  • 9
0
votes
1 answer

How to change the breaks in the legend of my t_map object

I have created a map in tmap of all London Green space access points, with the amount of crimes counted in close proximity of the access point showing on the map via colour. However, with the final output as shown in this image. map of green space…
hussain
  • 11
  • 1