generated from r4ds/bookclub-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 043eada
Showing
15 changed files
with
289 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
on: | ||
push: | ||
branches: main | ||
paths-ignore: | ||
- 'README.md' | ||
workflow_dispatch: | ||
|
||
name: renderbook | ||
|
||
jobs: | ||
bookdown: | ||
name: Render-Book | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: '4.2.0' | ||
- uses: r-lib/actions/setup-pandoc@v2 | ||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
cache-version: 2 | ||
|
||
- name: Render Book | ||
run: Rscript -e 'bookdown::render_book("index.Rmd")' | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: _book | ||
path: _book/ | ||
|
||
# Need to first create an empty gh-pages branch | ||
# see https://pkgdown.r-lib.org/reference/deploy_site_github.html | ||
# and also add secrets for a GH_PAT and EMAIL to the repository | ||
# gh-action from Cecilapp/GitHub-Pages-deploy | ||
checkout-and-deploy: | ||
runs-on: ubuntu-latest | ||
needs: bookdown | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@main | ||
- name: Download artifact | ||
uses: actions/[email protected] | ||
with: | ||
# Artifact name | ||
name: _book # optional | ||
# Destination path | ||
path: _book # optional | ||
- name: Deploy to GitHub Pages | ||
uses: Cecilapp/GitHub-Pages-deploy@v2 | ||
env: | ||
EMAIL: ${{ secrets.EMAIL }} # must be a verified email | ||
GH_TOKEN: ${{ secrets.GH_PAT }} # https://github.com/settings/tokens | ||
BUILD_DIR: _book/ # "_site/" by default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: pr_check | ||
on: | ||
pull_request: | ||
branches: main | ||
paths-ignore: | ||
- 'README.md' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
bookdown: | ||
name: pr_check_book | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: '4.2.0' | ||
- uses: r-lib/actions/setup-pandoc@v2 | ||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
cache-version: 2 | ||
- name: Render Book | ||
run: Rscript -e 'bookdown::render_book("index.Rmd")' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: pr_check | ||
on: | ||
pull_request: | ||
branches: main | ||
paths: | ||
- 'README.md' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
bookdown: | ||
name: pr_check_book | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: 'echo "No build required" ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.Rproj.user | ||
.Rhistory | ||
.Rdata | ||
.httr-oauth | ||
.DS_Store | ||
_book | ||
_bookdown_files | ||
bookclub-BOOKABBR.Rmd | ||
bookclub-BOOKABBR.knit.md | ||
bookclub-BOOKABBR_files | ||
libs | ||
*.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# CHAPTER TITLE | ||
|
||
**Learning objectives:** | ||
|
||
- THESE ARE NICE TO HAVE BUT NOT ABSOLUTELY NECESSARY | ||
|
||
## SLIDE 1 | ||
|
||
- ADD SLIDES AS SECTIONS (`##`). | ||
- TRY TO KEEP THEM RELATIVELY SLIDE-LIKE; THESE ARE NOTES, NOT THE BOOK ITSELF. | ||
|
||
## Meeting Videos | ||
|
||
### Cohort 1 | ||
|
||
`r knitr::include_url("https://www.youtube.com/embed/URL")` | ||
|
||
<details> | ||
<summary> Meeting chat log </summary> | ||
|
||
``` | ||
LOG | ||
``` | ||
</details> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Package: bookclub-BOOKABBR | ||
Title: BOOKNAME Book Club | ||
Version: 0.0.1 | ||
Authors@R: c( | ||
person( | ||
"R4DS Online Learning Community", | ||
email = "[email protected]", | ||
role = c("aut", "cre", "cph") | ||
) | ||
) | ||
URL: https://r4ds.github.io/bookclub-BOOKABBR, https://github.com/r4ds/bookclub-BOOKABBR | ||
Depends: | ||
R (>= 3.1.0) | ||
Imports: | ||
bookdown, | ||
rmarkdown |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# R4DS BOOKNAME Book Club | ||
|
||
FIND/REPLACE BOOKABBR, BOOKNAME, BOOKURL, BOOKAUTHORS, BOOKPUBLISHER, BOOKCOPYRIGHT, BOOKISBN, BOOKDOI, BOOKDAYS, BOOKTIMECST, BOOKCHANNELID, SIGNUPSHEETURL, TIMEANDDATEURL, STARTDATE, and PLAYLISTLINK THEN DELETE THIS SENTENCE. | ||
|
||
ALSO CONFIRM THE MEETING TIME INFO BELOW AND DELETE THIS SENTENCE. | ||
|
||
ALSO ADD PLACEHOLDERS FOR ALL CHAPTERS BY COPYING 01.Rmd (IDEALLY ALSO UPDATE TITLES WITHIN THE FILES), THEN DELETE THIS SENTENCE. | ||
|
||
Welcome to the R4DS BOOKNAME Book Club! | ||
|
||
We are working together to read [_BOOKNAME_](BOOKURL) by BOOKAUTHORS (BOOKPUBLISHER, copyright BOOKCOPYRIGHT, [BOOKISBN](BOOKDOI)). | ||
Join the [#book_club-BOOKABBR](https://rfordatascience.slack.com/archives/BOOKCHANNELID) channel on the [R4DS Slack](https://r4ds.io/join) to participate. | ||
As we read, we are producing [notes about the book](https://r4ds.io/BOOKABBR). | ||
|
||
## Meeting Schedule | ||
|
||
If you would like to present, please see the sign-up sheet for your cohort (linked below, and pinned in the [#book_club-BOOKABBR](https://rfordatascience.slack.com/archives/BOOKCHANNELID) channel on Slack)! | ||
|
||
- [Cohort 1](SIGNUPSHEETURL) (started STARTDATE): [BOOKDAYS, BOOKTIMECST CST/CDT](TIMEANDDATEURL) | [meeting videos](PLAYLISTLINK) | ||
|
||
<hr> | ||
|
||
|
||
## How to Present | ||
|
||
This repository is structured as a [{bookdown}](https://CRAN.R-project.org/package=bookdown) site. | ||
To present, follow these instructions: | ||
|
||
Do these steps once: | ||
|
||
1. [Setup Github Locally](https://www.youtube.com/watch?v=hNUNPkoledI) (also see [_Happy Git and GitHub for the useR_](https://happygitwithr.com/github-acct.html)) | ||
2. Install {usethis} and {devtools} `install.packages(c("usethis", "devtools"))` | ||
3. Set up a default {usethis} directory: | ||
- `usethis::edit_r_profile()` to open your profile for editing. | ||
- Add this line: `options(usethis.destdir = "YOURDIR")` (replace `YOURDIR` with the root directory under which you want your R projects to appear; or you can skip these steps, and the project will be saved to your Desktop). | ||
- Restart your R session (Session/Restart R in Rstudio). | ||
4. `usethis::create_from_github("r4ds/bookclub-BOOKABBR")` (cleanly creates your own copy of this repository). | ||
|
||
Do these steps each time you present another chapter: | ||
|
||
1. Open your project for this book. | ||
2. `usethis::pr_init("my-chapter")` (creates a branch for your work, to avoid confusion, making sure that you have the latest changes from other contributors; replace `my-chapter` with a descriptive name, ideally). | ||
3. `devtools::install_dev_deps()` (installs any packages used by the book that you don't already have installed). | ||
4. Edit the appropriate chapter file, if necessary. Use `##` to indicate new slides (new sections). | ||
5. If you use any packages that are not already in the `DESCRIPTION`, add them. You can use `usethis::use_package("myCoolPackage")` to add them quickly! | ||
6. Build the book! ctrl-shift-b (or command-shift-b) will render the full book, or ctrl-shift-k (command-shift-k) to render just your slide. Please do this to make sure it works before you push your changes up to the main repo! | ||
7. Commit your changes (either through the command line or using Rstudio's Git tab). | ||
8. `usethis::pr_push()` (pushes the changes up to github, and opens a "pull request" (PR) to let us know your work is ready). | ||
9. (If we request changes, make them) | ||
10. When your PR has been accepted ("merged"), `usethis::pr_finish()` to close out your branch and prepare your local repository for future work. | ||
11. Now that your local copy is up-to-date with the main repo, you need to update your remote fork. Run `gert::git_push("origin")` or click the `Push` button on the `Git` tab of Rstudio. | ||
|
||
When your PR is checked into the main branch, the bookdown site will rebuild, adding your slides to [this site](https://r4ds.io/BOOKABBR). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
book_filename: "bookclub-BOOKABBR" | ||
repo: https://github.com/r4ds/bookclub-BOOKABBR | ||
edit: "https://github.com/r4ds/bookclub-BOOKABBR/edit/main/%s" | ||
output_dir: "_book" | ||
delete_merged_file: true | ||
language: | ||
ui: | ||
chapter_name: "Chapter " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
bookdown::gitbook: | ||
css: style.css | ||
split_by: section | ||
config: | ||
toc: | ||
collapse: section | ||
before: | | ||
<li><a href="./">BOOKNAME Book Club</a></li> | ||
after: | | ||
<li><a href="https://github.com/rstudio/bookdown" target="blank">Published with bookdown</a></li> | ||
edit: | ||
link: https://github.com/r4ds/bookclub-BOOKABBR/edit/main/%s | ||
text: "Edit" | ||
sharing: | ||
github: yes | ||
facebook: no | ||
twitter: no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
@Book{xie2015, | ||
title = {Dynamic Documents with {R} and knitr}, | ||
author = {Yihui Xie}, | ||
publisher = {Chapman and Hall/CRC}, | ||
address = {Boca Raton, Florida}, | ||
year = {2015}, | ||
edition = {2nd}, | ||
note = {ISBN 978-1498716963}, | ||
url = {http://yihui.org/knitr/}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Version: 1.0 | ||
|
||
RestoreWorkspace: Default | ||
SaveWorkspace: Default | ||
AlwaysSaveHistory: Default | ||
|
||
EnableCodeIndexing: Yes | ||
UseSpacesForTab: Yes | ||
NumSpacesForTab: 2 | ||
Encoding: UTF-8 | ||
|
||
RnwWeave: Sweave | ||
LaTeX: pdfLaTeX | ||
|
||
AutoAppendNewline: Yes | ||
StripTrailingWhitespace: Yes | ||
|
||
BuildType: Website |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: "BOOKNAME Book Club" | ||
author: "The R4DS Online Learning Community" | ||
date: "`r Sys.Date()`" | ||
site: bookdown::bookdown_site | ||
documentclass: book | ||
bibliography: book.bib | ||
biblio-style: apalike | ||
link-citations: yes | ||
github-repo: r4ds/bookclub-BOOKABBR | ||
description: "This is the product of the R4DS Online Learning Community's BOOKNAME Book Club." | ||
--- | ||
|
||
# Welcome {-} | ||
|
||
Welcome to the bookclub! | ||
|
||
This is a companion for the book [_BOOKNAME_](BOOKURL) by BOOKAUTHORS (BOOKPUBLISHER, copyright BOOKCOPYRIGHT, [BOOKISBN](BOOKDOI)). | ||
This companion is available at [r4ds.io/BOOKABBR](https://r4ds.io/BOOKABBR). | ||
|
||
This website is being developed by the [R4DS Online Learning Community](https://rfordatasci.com). Follow along, and [join the community](https://r4ds.io/join) to participate. | ||
|
||
This companion follows the [R4DS Online Learning Community Code of Conduct](https://r4ds.io/conduct). | ||
|
||
## Book club meetings {-} | ||
|
||
- Each week, a volunteer will present a chapter from the book (or part of a chapter). | ||
- **This is the best way to learn the material.** | ||
- Presentations will usually consist of a review of the material, a discussion, and/or a demonstration of the principles presented in that chapter. | ||
- More information about how to present is available in the [github repo](https://github.com/r4ds/bookclub-BOOKABBR). | ||
- Presentations will be recorded, and will be available on the [R4DS Online Learning Community YouTube Channel](https://r4ds.io/youtube). | ||
|
||
## Pace {-} | ||
|
||
- We'll _try_ to cover 1 chapter/week, but... | ||
- ...It's ok to split chapters when they feel like too much. | ||
- We will try to meet every week, but will likely take some breaks for holidays, etc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
\usepackage{booktabs} |