rstudio / pins-r

Pin, discover, and share resources
https://pins.rstudio.com
Other
305 stars 63 forks source link

Can't retrieve the gapminder dataset from the gapminder package #216

Closed dgrtwo closed 3 years ago

dgrtwo commented 4 years ago

The gapminder package on CRAN has a gapminder dataset, but pin_get() and pin_find() can't retrieve it.

library(pins)

# Getting the (different) gapminder dataset from dslabs package works
pin_get("dslabs/gapminder")
#> # A tibble: 10,545 x 9
#>    country  year infant_mortality life_expectancy fertility population      gdp
#>    <fct>   <int>            <dbl>           <dbl>     <dbl>      <dbl>    <dbl>
#>  1 Albania  1960            115.             62.9      6.19    1636054 NA      
#>  2 Algeria  1960            148.             47.5      7.65   11124892  1.38e10
#>  3 Angola   1960            208              36.0      7.32    5270844 NA      
#>  4 Antigu…  1960             NA              63.0      4.43      54681 NA      
#>  5 Argent…  1960             59.9            65.4      3.11   20619075  1.08e11
#>  6 Armenia  1960             NA              66.9      4.55    1867396 NA      
#>  7 Aruba    1960             NA              65.7      4.82      54208 NA      
#>  8 Austra…  1960             20.3            70.9      3.45   10292328  9.67e10
#>  9 Austria  1960             37.3            68.8      2.7     7065525  5.24e10
#> 10 Azerba…  1960             NA              61.3      5.57    3897889 NA      
#> # … with 10,535 more rows, and 2 more variables: continent <fct>, region <fct>

# This doesn't
pin_get("gapminder/gapminder")
#> Error in pin_get("gapminder/gapminder"): Failed to retrieve 'gapminder/gapminder' pin.

# We also can't find it with pin_find
pin_find("gapminder")
#> # A tibble: 3 x 4
#>   name            description                                       type  board 
#>   <chr>           <chr>                                             <chr> <chr> 
#> 1 anim.plots/gm_… Gapminder GDP, life expectancy and population da… table packa…
#> 2 dslabs/gapmind… Gapminder Data from dslabs package.               table packa…
#> 3 repurrrsive/ga… Gapminder data frame in various forms from repur… table packa…

Created on 2020-04-29 by the reprex package (v0.3.0)

Session info ``` r devtools::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 3.6.1 (2019-07-05) #> os macOS Catalina 10.15.4 #> system x86_64, darwin15.6.0 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/New_York #> date 2020-04-29 #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date lib source #> assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.6.0) #> backports 1.1.6 2020-04-05 [1] CRAN (R 3.6.2) #> callr 3.4.3 2020-03-28 [1] CRAN (R 3.6.2) #> cli 2.0.2 2020-02-28 [1] CRAN (R 3.6.0) #> crayon 1.3.4 2017-09-16 [1] CRAN (R 3.6.0) #> desc 1.2.0 2018-05-01 [1] CRAN (R 3.6.0) #> devtools 2.3.0 2020-04-10 [1] CRAN (R 3.6.1) #> digest 0.6.25 2020-02-23 [1] CRAN (R 3.6.0) #> ellipsis 0.3.0 2019-09-20 [1] CRAN (R 3.6.0) #> evaluate 0.14 2019-05-28 [1] CRAN (R 3.6.0) #> fansi 0.4.1 2020-01-08 [1] CRAN (R 3.6.0) #> filelock 1.0.2 2018-10-05 [1] CRAN (R 3.6.0) #> fs 1.3.1 2019-05-06 [1] CRAN (R 3.6.0) #> glue 1.4.0 2020-04-03 [1] CRAN (R 3.6.2) #> highr 0.8 2019-03-20 [1] CRAN (R 3.6.0) #> htmltools 0.4.0 2019-10-04 [1] CRAN (R 3.6.0) #> knitr 1.27 2020-01-16 [1] CRAN (R 3.6.0) #> lifecycle 0.2.0 2020-03-06 [1] CRAN (R 3.6.0) #> magrittr 1.5 2014-11-22 [1] CRAN (R 3.6.0) #> memoise 1.1.0 2017-04-21 [1] CRAN (R 3.6.0) #> pillar 1.4.3 2019-12-20 [1] CRAN (R 3.6.0) #> pins * 0.4.0.9001 2020-04-29 [1] Github (rstudio/pins@72d4177) #> pkgbuild 1.0.6 2019-10-09 [1] CRAN (R 3.6.0) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 3.6.0) #> pkgload 1.0.2 2018-10-29 [1] CRAN (R 3.6.0) #> prettyunits 1.0.2 2015-07-13 [1] CRAN (R 3.6.0) #> processx 3.4.1 2019-07-18 [1] CRAN (R 3.6.0) #> ps 1.3.0 2018-12-21 [1] CRAN (R 3.6.0) #> R6 2.4.1 2019-11-12 [1] CRAN (R 3.6.0) #> rappdirs 0.3.1 2016-03-28 [1] CRAN (R 3.6.0) #> Rcpp 1.0.4.6 2020-04-09 [1] CRAN (R 3.6.1) #> remotes 2.1.1 2020-02-15 [1] CRAN (R 3.6.0) #> rlang 0.4.5 2020-03-01 [1] CRAN (R 3.6.0) #> rmarkdown 2.1 2020-01-20 [1] CRAN (R 3.6.0) #> rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.6.0) #> sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 3.6.0) #> stringi 1.4.5 2020-01-11 [1] CRAN (R 3.6.0) #> stringr 1.4.0 2019-02-10 [1] CRAN (R 3.6.0) #> testthat 2.3.2 2020-03-02 [1] CRAN (R 3.6.0) #> tibble 3.0.1 2020-04-20 [1] CRAN (R 3.6.2) #> usethis 1.6.0 2020-04-09 [1] CRAN (R 3.6.1) #> utf8 1.1.4 2018-05-24 [1] CRAN (R 3.6.0) #> vctrs 0.2.4 2020-03-10 [1] CRAN (R 3.6.0) #> withr 2.2.0 2020-04-20 [1] CRAN (R 3.6.2) #> xfun 0.12 2020-01-13 [1] CRAN (R 3.6.0) #> yaml 2.2.1 2020-02-01 [1] CRAN (R 3.6.0) #> #> [1] /Library/Frameworks/R.framework/Versions/3.6/Resources/library ```
1beb commented 4 years ago

Don't see a gapminder/gapminder repo either on github. Private or name changed?

dgrtwo commented 4 years ago

I’m not referring to GitHub, I’m referring to CRAN: https://cran.r-project.org/web/packages/gapminder/index.html

My understanding is that pin_get can retrieve from packages (like anim.plots, dslabs, repurrsive above)

1beb commented 4 years ago

Ah, I see.

  1. The CRAN "board" hasn't been updated for a while. It's essentially a static data file that the author of pins creates using this script: https://github.com/rstudio/pins/blob/master/tools/process-cran.R#L25

  2. Our esteemed colleague Jenny has the file extensiions as rdata (lowercase), however, the script above only looks for file extensions: "rda" and "RData".

Given that it's posted to CRAN you I think simply adding "rdata" to that list would likely be enough to update it. But who knows when the cranfiles generation will be run again.

javierluraschi commented 3 years ago

Thanks for the fix!

github-actions[bot] commented 1 year ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.