r-tmap / tmap-book

A book on elegant and informative maps with the tmap package
https://r-tmap.github.io
Other
32 stars 5 forks source link

Outline #3

Open mtennekes opened 4 years ago

mtennekes commented 4 years ago

I've updated the outline, see https://github.com/r-tmap/tmap-book/blob/master/meta/book-outline.Rmd

One difference with what we discussed yesterday, is that I've placed the chapter about other map types (cartogram, geogrid) as 6th. Why? Because it is a natural extension/use of the map layers, and belongs to the basic 'how to map data' part. So therefore also before layout and small multiples.

We can continue the discussion about the outline in this issue if needed.

Nowosad commented 4 years ago

Lately I've been thinking about adding one more chapter - "Extending tmap". It could explain users how to add new features to tmap or modify existing ones.

Of course, explaining all of the tmap code complexity, etc. could be a very hard thing to do - so I totally would understand if that is out of the book scope.

mtennekes commented 4 years ago

I totally agree with you that this chapter would be highly beneficial. Not just for the readers, but also for us.

In the current state, tmap is not so generic that extensions are easy. Mainly, this has to do with the fact that aesthetics are pre-specified, e.g. tm_polygons has col, tm_symbols has col, size and shape, and so on. The main problem is that the corresponding arguments, such as style, palette, labels etc are also hard-coded. It would be more elegant to specify those elements

tm_shape(x) +
   tm_polygons("pop_dens", setup = aes_col(style = "quantile", palette = "Purples"))
tm_shape(y) +
   tm_symbols(size = "count", size.setup = aes_size(sizes.legend = c(100, 200, 400), size.max = 1000))

Well, this should be an issue for tmap....

For the moment, yes, a chapter "Extending tmap" would be great, but I have the feeling that we'll have to wait a bit for tmap 4.0. In the meantime we can continue with the other chapters.

agila5 commented 3 years ago

Dear Martijn and Jakub, I hope you don't mind my message but I was wondering if you could add a new chapter/section to the book where you explain how to work with legends since, IMO, that's the most frustrating aspect of tmap.

Nowosad commented 3 years ago

@agila5 definitely! I looked at our (preliminary) outline, and I think we should add a legend section to the layout chapter. Do you have any specific questions/problems that we should cover there?