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

Compute stat_sf() by panel instead of group #5170

Merged
merged 5 commits into from
Feb 21, 2023

Conversation

teunbrand
Copy link
Collaborator

This PR aims to fix #4340.

The most minimal solution I could come up with is to change the compute_group method to the compute_panel method. As far as I could tell, there is no summarising happening over groups, so I think this is safe. I'm not too familiar with {sf} though, so I'd appreciate a second pair of eyes here.

Copy link
Member

@thomasp85 thomasp85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - have you done testing to assure that no use cases of sf plotting are affected by this switch to panel based stat-calculations? I can't envision what should fail, but just want to make sure

@teunbrand
Copy link
Collaborator Author

I'm not a very regular user of the sf functionality, so I'm having a hard time anticipating unwanted side-effects and what I should test for. Of course, the wanted side-effect is that now drawing order is preserved from input, rather than by group, so some things are different on purpose. I imagine if people are drawing maps with polygons that touch, the draw order would influence which line colour would be visible at the shared border.

@teunbrand
Copy link
Collaborator Author

I'm going to make a judgement call here and suppose this wouldn't affect any legitimate use-cases. I hope that in the bad-case scenario that it does, people will find out on the dev branch before a release.

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

Successfully merging this pull request may close these issues.

Plotting order: geom_sf() vs geom_point()
2 participants