Git Product home page Git Product logo

carpentries-incubator / quarto-project-example Goto Github PK

View Code? Open in Web Editor NEW
6.0 4.0 55.0 2.31 MB

Project Example for the Lesson: Introduction to Reproducible Publications with Quarto

Home Page: https://github.com/carpentries-incubator/reproducible-publications-quarto

License: Other

TeX 3.90% R 14.10% HTML 38.36% JavaScript 43.65%
reproducible-paper open-science rstudio project-management r scientific-reproducibility english alpha carpentries-incubator quarto

quarto-project-example's Introduction

Project Example for the Workshop: Introduction to Reproducible Publications with Quarto Workshop

Attention! This is NOT the lesson repository. This is the GitHub repository for the project example used in the Introduction to Reproducible Publications with Quarto. Learners will be required to download the project example in order to follow along.

The project example folder is a simplified version of the original project available at: https://osf.io/6mvq7.

Our example uses an adapted version of the data paper:

Nitsch, F. J., Sellitto, M., & Kalenscher, T. (2021). Trier social stress test and food-choice: Behavioral, self-report & hormonal data. Data in Brief, 37, 107245. https://doi.org/10.1016/j.dib.2021.107245.

The data paper and its underlying data publicly available at https://osf.io/6mvq7 were adapted and used for educational purposes with the authors' permission.


README

This directory contains the data and analysis scripts required to computationally reproduce some of the results and plots reported in https://doi.org/10.1016/j.dib.2021.107245.

All provided code was written in R (R version 4.0.0 (2020-04-24) -- "Arbor Day") and should work with more recent versions. It requires the following packages to run the analysis code:

  • tidyverse - 1.3.2
  • stringi - 1.7.8
  • bayesFactor - 0.9.12-4.5
  • patchwork - 1.1.3
  • usethis - 2.2.2

The structure of the directory is:

root:

  • Reproducible-Publications-with-RStudio-Example.Rproj # RStudio Project File
  • code #Contains all runnable R script files
  • data
    • processed # Contains processed data
    • raw # Contains raw data
      • foodchoice_data # Contains raw data from food choice task
  • output # Contain all generated output
  • report
    • DataPaper-ReproducibilityWorkshop_files # Rendered files
    • fig # paper figures
  • LICENSE.md
  • CITATION.md
  • README.md
  • _quarto.yml

To repeat the analyses,

  1. Open the RStudio Project file.
  2. Open and run analysis scripts (in order)

Graphic output is saved to output/plots Data output is saved to output/data Analysis results are saved in the environment / printed to the console Paper output is saved to paper/output paper/bin contains external files/code necessary for the proper formatting of the R Markdown paper output.

Note: The renv branch has the same content as the main branch with the addition of having renv enabled for better reproducibility.

Please see citation.md for instructions on how to cite this workshop.

Please see License.md for instructions on how to re-use this material.

Enjoy!

PS: For questions, please email ucsbcarpentry (@) ucsb.edu.

Contributors:

  • Renata Curty (rcurty)
  • Torin White (torwhite)
  • Ian Lessing (ilessing)
  • Greg Janee (gjanee)
  • Julien Brun (brunj7)
  • kristi Liu (kristi-sara)

quarto-project-example's People

Contributors

brunj7 avatar ilessing avatar kristi-sara avatar rcurty avatar torwhite avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

quarto-project-example's Issues

Adjust file structure for Quarto

  • remove report output/source folders since we cannot change render output directory.
  • remove rendered Quarto files
  • remove Rmd file

Renv Branch

Add information about the renv branch to the workshop instructor notes

space missing for citation

under values of data:

"making the aggregation of evidence challenging@nitch202b"

add space after "challenging"

Just saving external code source options

source("./code/02_hormone_analysis.R", local = knitr::knit_global())
# or
#sys.source("./code/02_hormone_analysis.R", envir = knitr::knit_global())
#knitr::read_chunk('./code/05_CCEI_analysis.r')
# (in header {r, }) code = readLines("./code/05_CCEI_analysis.r"), - works, but needs path relative to document, not directory
plot

Remove Code Chunk Experiments

see line 153 on and right after yaml

Leave FIXMEs for instructions purposes

but remove code chunk (and global code chunk options ) from file for teaching after episode is outlined

Check - code/01_data_preprocessing.R

Are we using this code in any of the episodes? It looks like it was removed from the lesson.
Investigate if that is indeed an issue:

if (raw_data == "error")

"==" is a vector operation and "if" expects a single value. R might have become stricter about this in a recent version? I suggest using:

if (identical(raw_data, "error"))

adjust gitignore for JupyterHub environment

Since RStudio can be run in a Jupyter Hub environment like UCSB Library did for Nov 2022 workshop it would be nice to add the temporary files that come with running in that environment.

I think adding:

.ipynb_checkpoints/

to the .gitignore file would do the trick.

Rename pub directory to report

Probably just nitpicking but I like report better as a directory name.

May be too annoying to change at this point

Can decide later after development is finished.

remove knit language from rmd doc

with this is the yaml:

knit: (function(rmdFile, encoding) {
out_dir <- '../output';
rmarkdown::render(rmdFile,
encoding=encoding,
output_file=file.path(dirname(rmdFile),
out_dir,
'DataPaper-ReproducibilityWorkshop.html'))})

knit button options are grayed out:

this messed with knit working directory changes (but addressed in carpentries-incubator/reproducible-publications-quarto#125 and commit 141a1e9c)

However, it will still mess with one of the challenges in episode 2 or 3.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.