Skip to content
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

qtm #864

Open
mtennekes opened this issue Apr 18, 2024 · 3 comments
Open

qtm #864

mtennekes opened this issue Apr 18, 2024 · 3 comments
Labels

Comments

@mtennekes
Copy link
Member

mtennekes commented Apr 18, 2024

qtm is quite hard to reimplement due to backward compatibility. In v3 there were trillions of arguments that could be passed on, and also in v4, so quite complex to get it right.

Related to #861 : I'm not aiming for exact code translation (which is hard) but low level learning tips, that I think is also more useful from an educational point of view.

This one from #851 is working well:

qtm(World, borders = NULL) + 
    qtm(metro, symbols.size = "pop2010", 
        symbols.title.size= "Metropolitan Areas", 
        symbols.id= "name",
        format = "World")

This to do's for qtm : facets and baseman's.

Please use this issue to post examples of qtm that don't work as expected or that give a different result than in v3.

@nickbearman
Copy link

nickbearman commented Jul 11, 2024

I'm not sure on the threshold for a "different result". I include an example below. If it's not "different" then please say so! This is for a point dataset with the qtm() defaults:

v3
image

v4
image

crimes <- read.csv("http://nickbearman.me.uk/data/r/police-uk-2020-04-merseyside-street.csv")
crimes_sf <- st_as_sf(crimes, coords = c('Longitude', 'Latitude'), crs = 4326)
qtm(crimes_sf)

@mtennekes
Copy link
Member Author

Thanks for bringing this up @nickbearman

Apparently, the spatial points are treated like bubbles (v4) instead of dots (v3) by qtm. Not sure what the reason was, and I can change it back.

Apart from backward compatibility, what do you like more / find more useful? In your example, the dots work better, but what if there are only a handful of points?

@nickbearman
Copy link

Thanks @mtennekes

Good question. I think ideally if there are a small number of items then use bubbles, where as if there are a large number of items use dots. This would probably provide the best user experience, but I appreciate it makes qtm() more complicated and you may not want this!

For info, my example above had 13,650 observations in it.

So perhaps <250 use bubbles, otherwise use dots might be a good approach?

Thanks for all the work your doing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants