-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
layer-specific arguments: how to specify them? #848
Comments
This looks like a tricky problem with various trade-offs. From a quick glance I like |
I like 4. because it is easier for autocomplete https://design.tidyverse.org/argument-clutter.html maybe |
+1 to 4 also. |
Great! Then we are on the same page. We could also combine 2 and 4 with something like I'll find out what is most convenient during implantation:-) |
Quoting myself #840
Still not happy with that solution, so I'm glad to hear your opinions @afolson-NOAA @Nowosad @olivroy @Robinlovelace
The question is: how should the user specify layer specific arguments?
Background: Each layer is specific with a transformation and a mapping function. E.g. tm_cartogram() has
tmapTransCartogram
as the transformation function andPolygons
as the mapping function id (which directs to tmapPolygons where is the graphics device (mode) currently only "Grid" or "Leaflet"). For those who followed the workshop last year, the transformation is "step 3" and the mapping "step 4" of the tmap pipeline.In case of the arguments of
tm_cartogram
:itermax
will be passed on to the transformation function. However for some arguments it is unclear whether they belong to the transformation or mapping phase. E.g. automatic text labeling: you can think of it as moving the coordinates in order to prevent overlap (which is essentially a transformation) or you can think of it as that the coordinates remain fixed, but the text is shown elsewhere, and that depends on how other map elements are plotted (which is determined in the mapping phase).I can think of four options how users could be able to specify layer arguments, which I illustrate with
tm_symbols
(because it has both transformation and mapping arguments). In this code examples I omit all visual variables except size:mapping.args
andtrans.args
:The text was updated successfully, but these errors were encountered: