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

Update binder #691

Closed
3 tasks done
Robinlovelace opened this issue Dec 17, 2021 · 7 comments
Closed
3 tasks done

Update binder #691

Robinlovelace opened this issue Dec 17, 2021 · 7 comments

Comments

@Robinlovelace
Copy link
Collaborator

Robinlovelace commented Dec 17, 2021

Thanks to @yuvipanda for https://github.com/yuvipanda/rstudio-binder-template I'm trying a new Binder set-up with, see changes here (apologies for just copy pasting at this stage, will give full credit if we keep this Yuvi): 13b9717

  • Test it works
  • Add more packages
  • Test full reproducibility by building the entire book in Binder

The new set-up has several advantages, not least using more up-to-date R version and being faster to load. One question: do the 'daily' releases of RStudio work with this?

@Robinlovelace
Copy link
Collaborator Author

Happy to report that the first task in this issue can be checked ✔️ and it loads in a fraction of the time of the previous one. Repro: click here https://mybinder.org/v2/gh/robinlovelace/geocompr/main?urlpath=rstudio and you should see something like this.

image

Robinlovelace added a commit to geocompx/docker that referenced this issue Dec 17, 2021
@Robinlovelace
Copy link
Collaborator Author

Update: with the latest version we're getting close. Fails on c. 2 with the following:

image

Message:

Quitting from lines 694-695 (02-spatial-data.Rmd) 
Error: $ operator is invalid for atomic vectors
In addition: Warning messages:
1: plotting the first 9 out of 10 attributes; use max.plot = 10 to plot all 
2: In st_centroid.sf(world_proj, of_largest_polygon = TRUE) :
  st_centroid assumes attributes are constant over geometries of x
3: In st_centroid.sf(indchi) :
  st_centroid assumes attributes are constant over geometries of x

Execution halted
Error in Rscript_render(f, render_args, render_meta, add1, add2) : 
  Failed to compile 02-spatial-data.Rmd

Not sure what's causing that but should be an easy fix.

@Nowosad
Copy link
Member

Nowosad commented Dec 17, 2021

I believe this is due to the new changes in stars->terra conversion that impact tmap. I think it should be fixed soon in dev stars -- r-spatial/stars#484 (comment). To be sure -- I plan to test if the problem is still there with dev versions of stars and terra....

@Robinlovelace
Copy link
Collaborator Author

Makes sense, hoping this will be fixed upstream 🤞

@Robinlovelace
Copy link
Collaborator Author

I think it's fixed on dev stars, this is the version on Binder currently:

> packageVersion("stars")
[1] ‘0.5.4’

Source: https://mybinder.org/v2/gh/robinlovelace/geocompr/main?urlpath=rstudio

@Nowosad
Copy link
Member

Nowosad commented Dec 17, 2021

Yep -- I can confirm -- this issue does not exist for the current dev version of terra and stars.

@Robinlovelace
Copy link
Collaborator Author

Happy to report that, other than a few minor issues in Chapter 5, related to 'values' not being set, the book is now fully reproducible in Binder 🎉

image

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