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

Some tests failing with the upcoming release of rnaturalearthdata #10

Closed
PMassicotte opened this issue Feb 4, 2024 · 7 comments
Closed

Comments

@PMassicotte
Copy link

Hi.

We are planing to release rnaturlearthdata v1.0.0 which ends support to sp in favour of sf.

It appears that these two tests are failing:

testthat::test_that("countryOutlieRs results TRUE/passed", {
testthat::expect_equal(sum(testOut$.countryOutlier == TRUE, na.rm = TRUE), 74)
})
testthat::test_that("countryOutlieRs results FALSE/failed", {
testthat::expect_equal(sum(testOut$.countryOutlier == FALSE, na.rm = TRUE), 3)
})
testthat::test_that("countryOutlieRs results NA/could not assess", {
testthat::expect_equal(sum(is.na(testOut$.countryOutlier)), 23)
})

Can you confirm on your side?

Regards,
Phil

@jbdorey
Copy link
Owner

jbdorey commented Feb 7, 2024 via email

@jbdorey
Copy link
Owner

jbdorey commented Feb 7, 2024 via email

@PMassicotte
Copy link
Author

Hi @jbdorey !

Do I understand that

countryMap <- rnaturalearth::ne_countries(
  returnclass = "sf",
  country = NULL,
  type = "countries",
  scale = 50
) %>%
  sf::st_make_valid() %>%
  dplyr::select(iso_a2, iso_a3, name, name_long, continent, geometry) %>%
  dplyr::mutate(iso_a3 = iso_a3 %>% stringr::str_replace_all(
    c(
      "ALA" = "FIN",
      "ASM" = "WSM",
      "HKG" = "CHN",
      "MAF" = "SXM"
    )
  ))

Would fix the issue?

And congratulation for your new job!

@PMassicotte
Copy link
Author

PMassicotte commented Feb 7, 2024

Looks like that in the new version of the data, iso_a3_eh contains the info:

library(rnaturalearthdata)
countries110[countries110$iso_a3_eh == "FRA"]
countries110[countries110$iso_a3_eh == "NOR"]

r$> setdiff(countries110$iso_a3_eh, countries110$iso_a3)
[1] "NOR" "FRA"

@PMassicotte
Copy link
Author

PMassicotte commented Feb 7, 2024

@jbdorey
Copy link
Owner

jbdorey commented Feb 9, 2024 via email

@PMassicotte
Copy link
Author

Thank you very much!

I will submit later today :)

PMassicotte added a commit to ropensci/rnaturalearthdata that referenced this issue Feb 9, 2024
… status and provide information about reverse dependency issue

The previous resubmission fixed reverse dependencies in the himach and BeeBCD packages. However, there is still 1 reverse dependency (BeeBDC) that failed. The maintainer of BeeBDC has been contacted and is ready to submit an update to CRAN as soon as rnaturealearthdata is accepted. More details can be found in this [GitHub issue](jbdorey/BeeBDC#10 (comment)).

Additionally, there were 19 reverse dependencies checked, comparing R CMD check results across CRAN and dev versions of this package. There was 1 new problem identified with the BeeBDC package. No other issues were found.

This commit also updates the cran-comments.md file to reflect the current status of the package.
@jbdorey jbdorey closed this as completed Feb 14, 2024
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

No branches or pull requests

2 participants