ioos / BioData-Training-Workshop

IOOS Biological Data Training Workshop 2018 Materials
https://ioos.github.io/BioData-Training-Workshop/
8 stars 8 forks source link

sample, working jupyter notebooks and R code to host #19

Open emiliom opened 6 years ago

emiliom commented 6 years ago

We now have two code/script directories ready:

We already have 3 jupyter notebooks in the notebooks directory (thanks to @ocepaf for uploading his erddapy notebook!). I mentioned I loaded a relevant "R vignette" from Roy Mendelsohn and Scott Chamberlain into the rcodedirectory, but we'll need an R person to test it, or even tell us/me if that's something that's actually meant to be run as is (I have no clue).

I'm starting this issue to discuss and track the loading of additional samples, plus testing them to ensure they actually run with our setups.

Next steps:

lsetiawan commented 6 years ago
bbest commented 6 years ago

Hi @emiliom,

Thank you for getting this organized. I'll do a deep dive on these tomorrow.

emiliom commented 6 years ago

Thank you for getting this organized. I'll do a deep dive on these tomorrow.

Thanks @bbest. If you can focus on the non-notebook R scripts/vignettes/stuff, that'd be optimal. The rest of us are already handling the Jupyter-notebook sample code.

emiliom commented 6 years ago

@lsetiawan, with PR #20 merged, have you tried 2017-11-30-rerddap.ipynb again?

(Just checking while I wait for some other stuff to finish :smile_cat:)

lsetiawan commented 6 years ago

The kernel keeps dying on me now when I try to run 2017-11-30-rerddap.ipynb

emiliom commented 6 years ago

The kernel keeps dying on me now when I try to run 2017-11-30-rerddap.ipynb

Oh well. Maybe @ocefpaf can look into it on Wednesday once he's here in Seattle, since he had a role in creating the notebook. Right now I think he's up in the air somewhere.

Thanks for testing.

bbest commented 6 years ago

Per Roy Mendel's https://github.com/ioos/BioData-Training-Workshop/issues/13#issuecomment-363248885, these notebooks are worth checking out for using xtractomatic, rerddap and rerddapXtracto:

https://rmendels.github.io

emiliom commented 6 years ago

@bbest, can you clarify (for me at least!) what is a "notebook" in a non-Jupyter R context? I see in Roy's page he points to several "vignette RNotebooks", and see that the downloadable Rmd files look like mostly Markdown with a bit of magic thrown in. Are these "vignette RNotebooks" Rmd files executable (say, in Rstudio) the same way a Jupyter notebook ipynb file is in Jupyter?

bbest commented 6 years ago

Hi @emiliom, the R notebooks are newer than typical Rmarkdown documents and meant to be similar in functionality as Python notebooks which both contain the reproducible code and rendered output. To be honest, I haven't been using them yet, but here's the minor extra functionality I gleaned...

  1. Source Rmd is embedded. Notice in the notebooks at https://rmendels.github.io, in the upper right you can "Download Rmd" which is embedded inside the nb.html, so you don't need to distribute two seperate files as with typical Rmarkdown (ie source *.Rmd and rendered *.html). image
  2. Preview is instantaneously updated. There is also a slightly different workflow allowing for instant preview of html result in the Viewer pane as you execute lines (or chunks) of code, whereas with typical Rmarkdown you need to Knit (ie render()) the whole document in order to see the updated html result in the Viewer.

    image

Format Summary. Many other extremely useful Rmarkdown output formats (PDF, Word, beamer, Websites...) work in the more typical fashion of needing to Knit first and don't have the source embedded.

References:

emiliom commented 6 years ago

Wow, thanks for that rich background @bbest !

So, what I'm hearing (and also saw at http://rmarkdown.rstudio.com/r_notebooks.html) is that an *.Rmd document that was created as an R notebook can in fact be opened and executed in RStudio, much like an *.ipynb jupyter notebook document in Jupyter. Great.