Skip to content

Conversation

@capnrefsmmat
Copy link
Contributor

Changes in response to #669. The commit messages explain each issue that had to be fixed to keep the upcoming ggplot2 happy.

I'll test this again, and then we can submit to CRAN to avoid covidcast being deleted after the new ggplot2 version is released.

It was a combination of POLYGON and LINESTRING, but geom_sf() filters
out non-MULTIPOLYGON shapes. This meant there were n-1 spatial features,
but any provided fill aesthetics had n features, meaning a mismatch.
Manually rewrite to be a MULTIPOLYGON containing only the POLYGON.
It now complains extensively about length-0 fill variables. When
geographic plots were subset to not include all regions, some of the
geom_sf() calls would have no data; for example, a plot without Hawaii
still called geom_sf() to show a translated but non-existent Hawaii.
This raised warnings. Instead, check if there is data to plot, and use
geom_blank() if there isn't.
@capnrefsmmat capnrefsmmat requested a review from nmdefries June 30, 2025 17:38
@capnrefsmmat capnrefsmmat requested a review from rzats as a code owner June 30, 2025 17:50
@capnrefsmmat
Copy link
Contributor Author

I'll need to check if the test failures are just rendering differences between Mac and Linux; I suspect they are. If so, I'll revert to the version that works on Linux.

Copy link
Collaborator

@dshemetov dshemetov left a comment

Choose a reason for hiding this comment

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

We should update codeowners, since Rostyaslav no longer works for Delphi. Overall this looks fine, though I haven't tested locally.

@capnrefsmmat
Copy link
Contributor Author

I think the failing tests are all just cross-platform differences in plot rendering. Given that we're not going to be adding any features to the package or doing any more than minimal maintenance, I don't think it's worth trying to fix that, so I'll go ahead and submit the release. (The plot tests are not run on CRAN.)

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.

3 participants