• Stars
    star
    148
  • Rank 249,983 (Top 5 %)
  • Language
    HTML
  • License
    Other
  • Created about 6 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A πŸ“– on data wrangling, exploration, & analysis with R - created by Jenny Bryan, made with bookdown

Creative Commons License

This bookdown book is a work in progress. We'll update this README and the repo status when ready! πŸš€

Requirements to preview the site locally

Install the required packages.

Option 1: Use renv for a project-specific library

This is how we work locally and on Travis-CI, where the public product is actually built and deployed.

The renv package uses a snapshot and restore strategy to create reproducible envvironments for R projects. A project that uses renv has its own project-specific library that is separate from your personal library of packages. This helps contributors ensure we're all using the same version of packages and that the public site is also being built from these versions.

  1. Get a local copy of the website source.
    • Users of devtools/usethis can do:
      usethis::create_from_github("rstudio-education/stat545")
      Note that usethis::create_from_github() works best when it can find a GitHub personal access token and usethis (git2r, really) is configured correctly for your preferred transport protocol (SSH vs HTTPS). Setup advice.
    • Otherwise, use your favorite method to fork and clone or download the repo as a ZIP file and unpack.
  2. Start R in your new stat545/ directory. Expect to see some renv startup along these lines:
    Failed to find installation of renv -- attempting to bootstrap...
    * Downloading renv 0.7.0-50 ... Done!
    * Installing renv 0.7.0-50 ... Done!
    Successfully installed and loaded renv 0.7.0-50.
    * Project '~/tmp/stat545' loaded. [renv 0.7.0-50]
    
  3. Run renv::restore(). This will print out "The following package(s) will be installed" followed by a long list of packages. Respond "yes". renv will build the project-specific library containing packages at the correct versions.
  4. You should now be able to render the site in all the usual ways for bookdown, such as bookdown::render_book() or Addins > Preview Book.

Option 2: Use pak or similar

If the renv infrastructure is confusing to you, use renv::deactivate() to remove it. You could then use your favorite method of package installation to make sure you've got the necessary packages (although there's no guarantee that you're using the same version as we are).

Here's one way to install the needed packages (only the ones that you don't already have) using the pak package.

pkg_list <- c("bookdown", "devtools", "dichromat", "DT", "fs", "gapminder",
              "gender", "geonames", "git2r", "glue", "gridExtra",  "htmltools",
              "httr", "knitr", "RColorBrewer", "rebird", "rmarkdown", "rplos", 
              "rvest", "testthat", "tidyverse", "usethis", "viridis", "xfun", 
              "xml2", "ropensci/genderdata", "rstudio/gt")

# install.packages("pak")
pak::pkg_install(pkg_list)

This is nice because it can install from CRAN and, in the case of packages like rstudio/gt, also from GitHub.

Note: the package list above is currently static, so consider that it may not be up to date.

OMDb API key

One file, 37_diy-web-data.Rmd, accesses the Open Movie Database API, which requires a key. The site will render without this, without rendering this file. Set up an OMDb key to render this file.

  1. Request an API key here.

  2. Check your email and follow the instructions to activate your key

  3. Add the API key to your .Renviron file. First, open your .Renviron file with the usethis package:

    library(usethis)
    edit_r_environ()

    Next, add OMDB_API_KEY=<your-key> on a new line, replacing <your-key> with your OMDb key. (Make sure to have your .Renviron file end on a new line!)

More Repositories

1

rstats-ed

List of courses teaching R
452
star
2

shiny.rstudio.com-tutorial

Slides and exercises for the video tutorial at https://shiny.rstudio.com/tutorial/
R
295
star
3

hopr

This is the development site for Hands-On Programming with R, a book that teaches how to program in R, with hands-on examples. Read the book at https://rstudio-education.github.io/hopr.
CSS
252
star
4

remaster-the-tidyverse

This is a planning repository where I develop Tidyverse-related workshops.
HTML
195
star
5

arm-workshop-rsc2019

Materials for the rstudio::conf 2019 Advanced R Markdown workshop
HTML
114
star
6

teach-the-tidyverse

Class materials for Teach the Tidyverse, a Train-the-trainer workshop.
96
star
7

master-the-tidyverse

Student downloads for the Master the Tidyverse Workshop
94
star
8

tidyverse-cookbook

Code recipes for doing data science with R's tidyverse
TeX
83
star
9

master-the-tidyverse-instructors

Instructor materials for teaching Master the Tidyverse
50
star
10

primers

The learnr tutorials in RStudio Cloud's primers
HTML
49
star
11

r4ds-instructors

Instructors' Guide to accompany "R for Data Science"
49
star
12

rmd4medicine

Introduction to R Markdown for Medicine
HTML
48
star
13

tidymodels-virtually

HTML
43
star
14

teach-shiny

Materials for the Shiny Train the Trainer workshop
HTML
40
star
15

sharing-short-notice

Repo for the RStudio webinar "Sharing on Short Notice: How to Get Your Teaching Materials Online with R Markdown"
HTML
37
star
16

deep-teaching

This one day workshop introduces education best practices to programmers and data scientists.
33
star
17

advanced-shiny-az

Materials for the "Advanced Shiny" course for Astra Zeneca
R
33
star
18

teach-tidy

Materials for the Tidyverse Train-the-trainer workshop
33
star
19

intro-shiny-rmarkdown

Materials for the "Intro to Shiny and R Markdown" 2-day workshop at rstudio::conf 2018
HTML
29
star
20

teaching-workshop-2019-01

Materials for "Teaching the Tidyverse" January 2019 edition
CSS
27
star
21

welcome-to-the-tidyverse

A gentle introduction to R and its Tidyverse that focuses on Exploratory Data Analysis (EDA).
26
star
22

teaching-in-production

Invited session for Day 3 of the RStudio Instructor Training and Certification Program.
JavaScript
24
star
23

ds4se

Data Science for Software Engineering
HTML
22
star
24

glossRy

A glossary of terms used in and around data science.
CSS
22
star
25

shiny-course

R
21
star
26

shiny-wsds18

Materials for the "Apps and Dashboards with Shiny " workshop at WSDS 2018
R
19
star
27

communicate-rmd-workshop

Communicating with R Markdown workshop
HTML
18
star
28

summer-of-blogdown-19

A week of blogdown for RStudio's summer 2019 interns
HTML
17
star
29

armcompanion

Companion materials for the rstudio::conf 2019 Advanced R Markdown workshop
HTML
14
star
30

advanced-shiny-sib

Materials for the "Advanced Shiny" course at Swiss Institute of Bioinformatics
HTML
13
star
31

teach-ds-latinR

Materials for the "Teaching Data Science" workshop at Latin R 2019
R
13
star
32

learner-personas

Learner personas for R training
HTML
12
star
33

workshop-troubleshooting-rsc2019

A place for instructors and TAs to log issues during rstudio::conf 2019 workshops
12
star
34

instructor-training

Materials for RStudio Instructor Training - Part 3: Teaching R and Data Science with RStudio
HTML
11
star
35

shiny-jsm18

Materials for the "Shiny Essentials" workshop at JSM 2018
R
10
star
36

bootcamper

Materials for the 2-day internal R bootcamp
HTML
8
star
37

data-wrangling-with-the-tidyverse

A gentle introduction to data wrangling in R with the Tidyverse.
8
star
38

connect-forecasting-demo

R
7
star
39

shiny-rmed18

Materials for the "Shiny Essentials" workshop at R/Medicine 2018
R
7
star
40

rstudio-toolchain-for-instructors

Materials for the RStudio Toolchain for Instructors workshop, which covers RStudio Cloud, learnr, and grader. This workshop was originally given at the 2018 Conference on Applied Statistics in Ireland (CASI) in Galway, Ireland.
6
star
41

shiny-sdss18

Materials for the "Shiny Essentials" workshop at SDSS 2018
R
5
star
42

coronavirus-sir-model

Carl's personal by-country SIR model of the Coronavirus spread
R
4
star
43

github-demo

This is a demo repo for training folks in how to use github
R
4
star
44

rstudio-conf-2020-workshop-docs

HTML
4
star
45

wtf-teach-rstudio-global

HTML
3
star
46

envtutorial

A small package to use in the RStudio Cloud tutorial Environments and Scoping Rules
R
3
star
47

taller-para-docentes

CSS
3
star
48

shiny-training-2017-05-genentech

Slides and demo materials for the 2-day Intermediate Shiny Workshop at Genentech, May 2017
R
2
star
49

rstudio-education.github.io

HTML
2
star
50

2019-03-01_SPCC_Reproducible-R

Class materials for Reproducible Research with RStudio, a workshop at the 2019 Statistical Practice in Cancer Conference
R
2
star
51

shiny-training-css-2017-08-10

Brief introduction to Shiny materials
R
2
star