Skip to content
A 📖 on data wrangling, exploration, & analysis with R - created by Jenny Bryan, made with bookdown
HTML Other
  1. HTML 98.6%
  2. Other 1.4%
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
admin Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
assets allows italics in normal text but not the subtitle or authors on cove… Sep 4, 2019
img Cleanup (#12) Aug 6, 2019
renv Upgrade renv Sep 20, 2019
supporting-docs Cleanup (#12) Aug 6, 2019
.Rprofile Commit .Rprofile Sep 13, 2019
.gitignore Ongoing struggle to NOT inform Netlify about GitHub repo Sep 16, 2019
.travis.yml Remove gratuitous printing Sep 19, 2019
01_install.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
02_r-basics.Rmd Add backticks (mostly I just want to build & deploy on travis) Sep 15, 2019
03_version-control-r-markdown.Rmd Fixes Part II chapter names and numbering (#49) Sep 19, 2019
05_data-care-feeding.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
06_dplyr-intro.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
07_dplyr-single-table.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
08_tidy-data.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
09_import-export.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
10_factors.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
11_character-vectors.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
12_character-encoding.Rmd Cleanup (#12) Aug 6, 2019
13_date-times.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
14_multiple-tibbles.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
15_join-tibbles.Rmd Make text match current result Sep 20, 2019
16_table-lookup.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
17_r-objects-indexing.Rmd make all original content links https (#39) Sep 12, 2019
18_functions-part1.Rmd Link to tidyverse style guide re: error messages Sep 25, 2019
19_functions-part2.Rmd Remove explicit returns() Sep 25, 2019
20_functions-part3.Rmd Link to the ellipsis package and "Data, dots, details" Sep 25, 2019
21_functions-practicum.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
22_r-graphics.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
23_ggplot2.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
24_effective-graphs.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
25_colors.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
26_qualitative-colors.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
27_secrets-happy-graphics.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
28_saving-figures.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
29_multiple-plots.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
30_package-overview.Rmd Trim down package material to reduce link rot and general decay Sep 19, 2019
31_write-package.Rmd Netlify redirects (#33) Sep 8, 2019
32_system-prep-packages.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
33_create-package.Rmd Remove this and link out to Whole Game / R Packages Sep 19, 2019
34_workflows.Rmd for #54, fix broken automation slides link; point to .md file for now. Oct 14, 2019
35_get-data-from-web.Rmd Netlify redirects (#33) Sep 8, 2019
36_api-wrappers.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
37_diy-web-data.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
38_shiny.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
39_appendix.Rmd Follow style guide: no backticks around package names, parens after f… Sep 19, 2019
40_references.Rmd adding API chapter materials (#2) Jun 27, 2019
DESCRIPTION Remove this and link out to Whole Game / R Packages Sep 19, 2019
LICENSE cc-by-sa 4.0 license Aug 30, 2019
README.md Formatting Sep 20, 2019
_bookdown.yml changes repo name to stat545 Sep 1, 2019
_output.yml Add new logos and style (#21) Sep 1, 2019
_redirects Remake redirects Sep 19, 2019
anchor-links.js Cleanup (#12) Aug 6, 2019
book.bib Cleanup (#12) Aug 6, 2019
common.R add common.R script from R-pkgs book Mar 13, 2019
header.html Put this in existing header.html Sep 19, 2019
index.Rmd Work on index.Rmd Sep 17, 2019
links.md change documentation links from rdocumentation.org -> rdrr.io (#32) Sep 7, 2019
packages.bib Update renv itself and then the whole project library Sep 13, 2019
preamble.tex
renv.lock Upgrade renv Sep 20, 2019
stat545.Rproj changes repo name to stat545 Sep 1, 2019

README.md

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!)

You can’t perform that action at this time.