Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 02-planning-ahead.Rmd #306

Open
wants to merge 619 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
619 commits
Select commit Hold shift + click to select a range
4ed6ac8
cervan bio
ColinFay Apr 30, 2020
0ccb942
img and datasets
ColinFay Apr 30, 2020
04ec340
Merge pull request #155 from aronolof/master
ColinFay Apr 30, 2020
d461d9c
fixed broken link in the README
ColinFay Apr 30, 2020
f6b2882
close #149
ColinFay Apr 30, 2020
6a58d09
rm crayon options and swtiched to GA options
ColinFay Apr 30, 2020
ad47e14
Merge pull request #156 from ThinkR-open/wip
ColinFay Apr 30, 2020
458b6f4
testing spelling job
ColinFay Apr 30, 2020
814231e
series of updates after re-reading
ColinFay May 1, 2020
26d1e16
Merge branch 'master' into wip
ColinFay May 1, 2020
245245f
Merge pull request #163 from ThinkR-open/wip
ColinFay May 1, 2020
b8332a6
Delete EVpFT51WoAQalHl.jpeg
ColinFay May 1, 2020
5c2cd68
last re-reading, sent for technical review
ColinFay May 1, 2020
9afb313
Merge branch 'master' into wip
ColinFay May 1, 2020
16cca6a
Merge pull request #164 from ThinkR-open/wip
ColinFay May 1, 2020
d48eef0
chunck renaming + trying action on wip only
ColinFay May 1, 2020
64ed271
Merge branch 'wip' of https://github.com/ThinkR-open/building-shiny-a…
ColinFay May 1, 2020
a91297a
new workflows
ColinFay May 1, 2020
e684675
Merge pull request #165 from ThinkR-open/wip
ColinFay May 1, 2020
851990c
trying to cache package
ColinFay May 1, 2020
0a0292e
Merge pull request #167 from ThinkR-open/wip
ColinFay May 1, 2020
99aed5d
indentation
ColinFay May 1, 2020
dd697ae
small corrections in chapter 1
etiennebacher May 2, 2020
d12bef2
added quote
ColinFay May 4, 2020
1bf05f5
test deploy wip
ColinFay May 4, 2020
4f382e3
_book/wip in GA yaml
ColinFay May 4, 2020
4a2682c
test wip artifact
ColinFay May 4, 2020
5f9bdcb
render book in "_book/wip"
ColinFay May 4, 2020
4e59b74
correction in artifact name
ColinFay May 4, 2020
1ddbbca
Merge pull request #170 from ThinkR-open/wip
ColinFay May 4, 2020
fe97c43
restore yaml
ColinFay May 4, 2020
0701121
Correct arguments of shinyApp() function
FrieseWoudloper May 5, 2020
1cf3e7b
Merge pull request #173 from FrieseWoudloper/master
ColinFay May 5, 2020
5fca1e6
Merge pull request #169 from etiennebacher/patch-2
ColinFay May 7, 2020
06915d9
Added some example of extracting lighthouse results
ColinFay May 7, 2020
edccbec
Small paragraph about how to chose a DB backend
ColinFay May 7, 2020
7db32b1
added content about deployment
ColinFay May 7, 2020
a5ade1e
manual bib
ColinFay May 7, 2020
4e7138c
Rename chunks
ColinFay May 7, 2020
b0374e7
typo on bib name
ColinFay May 8, 2020
d046c8b
More content on workflow
ColinFay May 8, 2020
d46c364
small typos and rephrasing
ColinFay May 8, 2020
ec2b92c
content about minification
ColinFay May 8, 2020
42c7752
Consistency on RStudio, GitHub and GitLab names.
jcrodriguez1989 May 10, 2020
f1b5baa
Chapter 01 suggestions.
jcrodriguez1989 May 10, 2020
78b4723
Chapter 02 suggestions.
jcrodriguez1989 May 10, 2020
01ff115
Chapter 03 suggestions, plus pkg quote for {golem}.
jcrodriguez1989 May 10, 2020
1d9d4a6
Chapter 04 suggestions.
jcrodriguez1989 May 10, 2020
41832e0
Chapter 05 suggestions.
jcrodriguez1989 May 10, 2020
c3dfaa4
POC ~> PoC.
jcrodriguez1989 May 10, 2020
663b0f0
change to chromote installation
ColinFay May 11, 2020
3511186
minifyr is no longer called
ColinFay May 11, 2020
07777b1
Doing API calls from JavaScript
ColinFay May 11, 2020
e64846b
chunk renaming
ColinFay May 11, 2020
e575e23
Merge pull request #176 from jcrodriguez1989/names_consistency
ColinFay May 12, 2020
c9ba314
Merge branch 'master' into chapter_1_suggestions
ColinFay May 12, 2020
daa8373
Merge pull request #177 from jcrodriguez1989/chapter_1_suggestions
ColinFay May 12, 2020
5e4e638
Added some example of extracting lighthouse results
ColinFay May 7, 2020
fccda28
Small paragraph about how to chose a DB backend
ColinFay May 7, 2020
565f2b7
added content about deployment
ColinFay May 7, 2020
3ed7dd8
manual bib
ColinFay May 7, 2020
599a04d
Rename chunks
ColinFay May 7, 2020
9b956f2
typo on bib name
ColinFay May 8, 2020
d4c562c
More content on workflow
ColinFay May 8, 2020
4104b2f
small typos and rephrasing
ColinFay May 8, 2020
fdfff1d
content about minification
ColinFay May 8, 2020
2a3fd6a
change to chromote installation
ColinFay May 11, 2020
052b831
minifyr is no longer called
ColinFay May 11, 2020
7f3e9a5
Doing API calls from JavaScript
ColinFay May 11, 2020
d96e44c
chunk renaming
ColinFay May 11, 2020
3780018
wip
ColinFay May 12, 2020
7e5c820
Merge branch 'wip' of https://github.com/ThinkR-open/building-shiny-a…
ColinFay May 12, 2020
360379e
chromote removed
ColinFay May 12, 2020
7051272
Merge pull request #179 from ThinkR-open/wip
ColinFay May 12, 2020
c311751
Chapter 06 suggestions.
jcrodriguez1989 May 13, 2020
3eaf842
Chapter 07 suggestions.
jcrodriguez1989 May 13, 2020
2f091e8
Chapter 08 suggestions.
jcrodriguez1989 May 13, 2020
15abdf6
typo.
jcrodriguez1989 May 13, 2020
fbfa876
Chapter 07 suggestions.
jcrodriguez1989 May 13, 2020
757c1f4
Chapter 08 suggestions.
jcrodriguez1989 May 13, 2020
b922feb
Chapter 09 suggestions.
jcrodriguez1989 May 13, 2020
aa1aa7f
Chapter 10 suggestions.
jcrodriguez1989 May 13, 2020
2d3a410
Chapter 11 suggestions.
jcrodriguez1989 May 13, 2020
1c340be
some corrections for part 4
etiennebacher May 18, 2020
3411e19
Merge pull request #181 from jcrodriguez1989/part_2_suggestions
ColinFay May 19, 2020
130e773
Merge pull request #182 from jcrodriguez1989/part_3_suggestions
ColinFay May 19, 2020
8ecf864
Merge pull request #186 from etiennebacher/patch-3
ColinFay May 19, 2020
889468b
Merge branch 'master' into part_4_suggestions
jcrodriguez1989 May 23, 2020
10ce96a
Suggests for Chapter 12
jcrodriguez1989 May 23, 2020
82a047d
Suggests for Chapter 13
jcrodriguez1989 May 23, 2020
203bdb0
Suggests for Chapter 14
jcrodriguez1989 May 23, 2020
809d827
Some more suggests
jcrodriguez1989 May 23, 2020
029a61b
Some more suggests
jcrodriguez1989 May 23, 2020
50a296d
Suggests for Chapter 15
jcrodriguez1989 May 23, 2020
f229eb1
Suggests for Chapter 16
jcrodriguez1989 May 23, 2020
8612d7d
Suggests for Chapter 17
jcrodriguez1989 May 23, 2020
c094c5e
Suggests for Chapter 18
jcrodriguez1989 May 23, 2020
db19136
Some more suggests
jcrodriguez1989 May 23, 2020
1c3d99b
Some more suggests
jcrodriguez1989 May 23, 2020
322945e
Correct grammar mistakes and fluency
naomistrandberg May 25, 2020
c2d9de8
fix typo
sowla Jun 6, 2020
c44cf35
fix typo
sowla Jun 6, 2020
b7d5774
add missing link
sowla Jun 7, 2020
31c3f16
Merge pull request #196 from sowla/patch-2
ColinFay Jun 10, 2020
51d952b
Merge pull request #195 from sowla/patch-1
ColinFay Jun 10, 2020
0648ba7
install from github
ColinFay Jun 10, 2020
195e0c8
fix typos chapter 6
BenjaminLouis Jun 23, 2020
51a20ab
fix typo chapter 7
BenjaminLouis Jun 23, 2020
0ec0258
fix typo chapter 11
BenjaminLouis Jun 23, 2020
e3aea87
fix typo chapter 12
BenjaminLouis Jun 23, 2020
2576b92
fix typo chapter 13
BenjaminLouis Jun 23, 2020
3ac71dd
fix typo chapter 14
BenjaminLouis Jun 23, 2020
a92fdd7
fix wrong h5 title
BenjaminLouis Jun 23, 2020
178226c
add forgotten "
BenjaminLouis Jun 23, 2020
6d68858
Fixed some typos in Cchapter 1
davidpb90 Jun 24, 2020
30c3b3d
Fix minor code typo
Jul 4, 2020
677e502
Merge pull request #188 from jcrodriguez1989/part_4_suggestions
ColinFay Jul 6, 2020
16fb810
Merge pull request #189 from jcrodriguez1989/part_5_suggestions
ColinFay Jul 6, 2020
83b39da
Merge pull request #190 from jcrodriguez1989/part_6_suggestions
ColinFay Jul 6, 2020
5bba3d6
Merge pull request #191 from jcrodriguez1989/part_7_suggestions
ColinFay Jul 6, 2020
6c30242
Merge pull request #193 from naomistrandberg/patch-2
ColinFay Jul 6, 2020
1112369
Merge branch 'master' into spotted-typos
ColinFay Jul 6, 2020
339cbeb
Merge pull request #201 from BenjaminLouis/spotted-typos
ColinFay Jul 6, 2020
85f70ca
Merge pull request #202 from davidpb90/chapter-1
ColinFay Jul 6, 2020
384bc83
Merge pull request #205 from jamespooley/patch-1
ColinFay Jul 6, 2020
4079df5
rstudio/websocket
ColinFay Jul 6, 2020
a764e37
Minor proofreading
julianstanley Jul 7, 2020
d9964a6
Merge pull request #208 from julianstanley/julian-patch-proof18
ColinFay Jul 7, 2020
28dcad1
Book update after feedback
ColinFay Oct 1, 2020
f8168e6
rename chunks
ColinFay Oct 1, 2020
896eeae
safe file deletion
ColinFay Oct 2, 2020
27584be
use RSPM public repo
ColinFay Oct 2, 2020
276e18d
added app examples
ColinFay Oct 2, 2020
88d6b0d
upload cache
ColinFay Oct 2, 2020
7676cd1
better naming
ColinFay Oct 2, 2020
09ba1e1
eval = true
ColinFay Oct 2, 2020
2989156
eval = TRUE
ColinFay Oct 2, 2020
af376d7
link update
ColinFay Oct 5, 2020
9045a00
ref and reformating
ColinFay Oct 5, 2020
8eca114
pdf book
ColinFay Oct 5, 2020
11f846c
width option
ColinFay Oct 6, 2020
ce20d6b
correct name for tibble
ColinFay Oct 6, 2020
318018e
Added {tufte}
ColinFay Oct 6, 2020
55262ab
Delete preamble.tex
ColinFay Nov 17, 2020
68b4a4c
added steps to appendix
ColinFay Nov 18, 2020
1673269
Merge branch 'master' of https://github.com/ThinkR-open/building-shin…
ColinFay Nov 18, 2020
727e054
Correct ref
ColinFay Nov 18, 2020
ecf2aa4
all links are open in a new tab
ColinFay Nov 18, 2020
1188f47
typos and rephrasing
ColinFay Nov 18, 2020
e650267
strict version of packages
ColinFay Nov 18, 2020
dfcbecc
colors
ColinFay Nov 18, 2020
77285fd
with renv
ColinFay Nov 19, 2020
53107b8
renv add
ColinFay Nov 19, 2020
1cf382a
prep.R
ColinFay Nov 19, 2020
7e995a4
Update chunks
ColinFay Nov 20, 2020
dec5cf9
reformating because why not
ColinFay Nov 20, 2020
c007cf8
blankgolem
ColinFay Nov 23, 2020
5e84704
quote reformating
ColinFay Nov 23, 2020
45d9d83
container
ColinFay Nov 23, 2020
fd82a50
try
ColinFay Nov 23, 2020
ecde519
colored pdf
ColinFay Nov 24, 2020
6f5da50
last reformating
ColinFay Nov 24, 2020
ff128fb
dev bench
ColinFay Nov 24, 2020
c87e621
update of bench
ColinFay Nov 24, 2020
6570b27
`{shiny}`
ColinFay Nov 26, 2020
846965d
`{shiny}`
ColinFay Nov 26, 2020
71fb1fd
{shiny}
ColinFay Nov 26, 2020
ccc3e8b
ref correction
ColinFay Nov 26, 2020
4d61d4a
ize
ColinFay Nov 26, 2020
5f57d4d
updated
ColinFay Nov 26, 2020
e94c28e
updates
ColinFay Nov 26, 2020
1c9662f
abstracts
ColinFay Nov 27, 2020
8d640e7
test redirect
ColinFay Jan 29, 2021
03bf176
adding redirect
ColinFay Feb 4, 2021
39520ec
tried with renaming to _site
ColinFay Feb 4, 2021
dd71d86
tried with the new Cecilapp/GitHub-Pages-deploy@v3
ColinFay Feb 4, 2021
a621f61
correct redirect
ColinFay Feb 4, 2021
4bef810
true redirect
ColinFay Feb 4, 2021
5bf5ddb
redirects
ColinFay Feb 5, 2021
5058495
new redirects
ColinFay Feb 24, 2021
91b6b6a
trying with - uses: nanasess/setup-chromedriver@master
ColinFay Mar 10, 2021
cc103dd
new redirect test
ColinFay Mar 10, 2021
c37546b
Fix #278 regarding stratégie du petit r example
josePliego Mar 24, 2021
85b331a
Merge pull request #281 from josbop/petit_r
ColinFay Apr 2, 2021
46c4d0d
Index.Rmd pr
ColinFay Apr 21, 2021
6d88910
PR 00
ColinFay Apr 21, 2021
aec84f6
PR chapt 1
ColinFay Apr 21, 2021
c21bd85
PR chap 02
ColinFay Apr 22, 2021
ec57ea5
PR chapt 03
ColinFay Apr 22, 2021
966b589
PR chapt 04
ColinFay Apr 22, 2021
69e1835
PR chapt 05
ColinFay Apr 22, 2021
6ad10f2
Image golemconfigactive
ColinFay Apr 22, 2021
bcadb66
PR chpt 06
ColinFay Apr 23, 2021
5e38a13
PR chapt 07
ColinFay Apr 23, 2021
23f4cdf
PR chapt 8
ColinFay Apr 26, 2021
74fdefd
PR chapt 09
ColinFay Apr 26, 2021
8522f81
PR chap 10
ColinFay Apr 26, 2021
6057ca8
PR Chapt 11
ColinFay Apr 27, 2021
d095166
PR chapt 12
ColinFay Apr 27, 2021
1c73cec
PR chapt 13
ColinFay Apr 27, 2021
507255c
PR chapt 14
ColinFay Apr 27, 2021
44f2c54
Pr chapt 15
ColinFay Apr 28, 2021
9eb71bf
PR chapt 16
ColinFay Apr 29, 2021
fccb1f3
PR chapt 17
ColinFay Apr 29, 2021
dec3bdf
PR chapt 18
ColinFay Apr 29, 2021
fd8919e
PR appendix
ColinFay Apr 29, 2021
1d83d65
“an handler” should be changed to “a handler” throughout the book.
ColinFay May 3, 2021
8945ff5
“an header” should be changed to “a header” throughout the book.
ColinFay May 3, 2021
de39555
Both “web page(s)” and “webpage(s)” are used in the book.
ColinFay May 3, 2021
ff5a7d8
Replace “can not” with “cannot” throughout the book.
ColinFay May 3, 2021
fb4aa18
The proper rendering of this abbreviation is “i.e.
ColinFay May 3, 2021
27697f8
The usage of “code base” is inconsistent.
ColinFay May 3, 2021
4d715ab
Capitalize “chapter” when followed by a number
ColinFay May 3, 2021
03f83e2
“Git” is the proper name of a piece of software and should thus be ca…
ColinFay May 3, 2021
7210471
Add a period at the end of all figure captions where missing.
ColinFay May 3, 2021
7662bd3
Restructure footnotes
ColinFay May 10, 2021
cf205e9
em dash
ColinFay May 11, 2021
c0a0886
Footnote numbers should appear after punctuation and without extra sp…
ColinFay May 11, 2021
f716e29
Footnote numbers should appear after punctuation and without extra sp…
ColinFay May 11, 2021
af312e2
expand acronyms
ColinFay May 11, 2021
f03fd1c
all figures are to be called out in text
ColinFay May 11, 2021
697cf3d
Added a biblio
ColinFay May 11, 2021
449b4a0
Merge pull request #288 from ThinkR-open/rc_pe
ColinFay May 25, 2021
133f68d
new pages
ColinFay Jun 4, 2021
206cf0d
no tictoc
ColinFay Jun 4, 2021
a6084e1
Merge branch 'master' into rc_pe
ColinFay Jun 4, 2021
9f8ddaa
Merge pull request #292 from ThinkR-open/rc_pe
ColinFay Jun 4, 2021
6cfc0a8
r-version: '3.6.1'
ColinFay Jun 4, 2021
4673ef7
Added license, close #13
ColinFay Jul 15, 2021
fd96a53
Merge pull request #295 from ThinkR-open/issue-13
ColinFay Jul 15, 2021
b0acc9e
Capitalization
ColinFay Jul 15, 2021
825170e
lighthouse & dash
ColinFay Jul 15, 2021
25b2126
capitalization
ColinFay Jul 15, 2021
d629bf1
Some rephrasing
ColinFay Jul 15, 2021
6921139
removed capital
ColinFay Jul 15, 2021
c0a0091
rephrasing
ColinFay Jul 15, 2021
e8d2a4d
renv.lock changes and I don't know why
ColinFay Jul 15, 2021
11c6cf8
Correct font for Git
ColinFay Jul 15, 2021
cf728ba
typo
ColinFay Jul 15, 2021
81fba13
Typos, capitalisation and hyphens
ColinFay Jul 15, 2021
c46b2f4
Correct thanks
ColinFay Jul 15, 2021
5fef628
cache and data update
ColinFay Jul 16, 2021
3965cc9
bib
ColinFay Jul 16, 2021
11ade91
code chunk checks
ColinFay Jul 16, 2021
6410e89
added bank
ColinFay Jul 16, 2021
c9c20f6
Delete comments
ColinFay Jul 19, 2021
7c1ee03
Delete shinyminifed.css
ColinFay Jul 19, 2021
0c49230
Delete shinyloadtest_report.html
ColinFay Jul 19, 2021
ac5eda7
Delete pdfbuilder.R
ColinFay Jul 19, 2021
1bb1d66
Update 02-planning-ahead.Rmd
Taborski Sep 16, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 10 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
^renv$
^renv\.lock$
^data-raw$
^dev_history\.R$
^load_server_docker\.R$
^library$
^rstudio_prefs$
^LICENSE\.md$
^\.github$
^Dockerfile$
1 change: 1 addition & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source("renv/activate.R")
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
94 changes: 94 additions & 0 deletions .github/workflows/deploy_bookdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
on:
push:
branches:
- master

name: renderbook

jobs:
bookdown:

name: Render-Book

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- uses: r-lib/actions/setup-r@v1
with:
crayon.enabled: 'FALSE'
r-version: '3.6.1'

- uses: actions/cache@v1
with:
path: ~/.local/share/renv
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-

- uses: r-lib/actions/setup-pandoc@v1

- name: Install tinytex
uses: r-lib/actions/setup-tinytex@master

- name: Install sysreq
run: sudo apt update && sudo apt install -y gdal-bin git-core libcairo2-dev libgdal-dev libgeos-dev libgeos++-dev libgit2-dev libpng-dev libssh2-1-dev libssl-dev libudunits2-dev libxml2-dev make pandoc pandoc-citeproc zlib1g-dev libmagick++-dev libssl-dev libsasl2-dev

- name: Pulling hexmake
run: docker pull colinfay/hexmake

- uses: nanasess/setup-chromedriver@master

- name: Install rmarkdown, bookdown and sysfonts
run: Rscript -e 'install.packages(c("sysfonts", "rmarkdown","bookdown"), Ncpus = 4)'

- name: Spell check
run: Rscript before-build-spellcheck.R
env:
EMAIL: ${{ secrets.EMAIL }} # must be a verified email
GH_TOKEN: ${{ secrets.TOKEN }} # https://github.com/settings/tokens

- name: Before build
run: Rscript prep.R

- name: Render Book
run: docker pull colinfay/hexmake && Rscript -e 'bookdown::render_book("index.Rmd")'

- name: Build redirect
run: Rscript redirect.R

- uses: actions/upload-artifact@v1
with:
name: _site
path: _site/

# 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 GITHUB_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@master
- name: Download artifact
uses: actions/[email protected]
with:
# Artifact name
name: _site # optional
# Destination path
path: _site # optional
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
email: ${{ secrets.EMAIL }}
build_dir: _site # optional
cname: engineering-shiny.org # optional
jekyll: no # optional



61 changes: 61 additions & 0 deletions .github/workflows/deploy_bookdown_wip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
on:
push:
branches:
- wip

name: renderbook

jobs:
bookdown:

name: Render-Book

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- uses: r-lib/actions/setup-r@v1
with:
crayon.enabled: 'FALSE'

- uses: actions/cache@v1
with:
path: ~/.local/share/renv
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-

- uses: r-lib/actions/setup-pandoc@v1

- name: Install tinytex
uses: r-lib/actions/setup-tinytex@master

- name: Install sysreq
run: sudo apt update && sudo apt install -y gdal-bin git-core libcairo2-dev libgdal-dev libgeos-dev libgeos++-dev libgit2-dev libpng-dev libssh2-1-dev libssl-dev libudunits2-dev libxml2-dev make pandoc pandoc-citeproc zlib1g-dev libmagick++-dev libssl-dev libsasl2-dev

- name: Pulling hexmake
run: docker pull colinfay/hexmake

- name: Install Chromium
run: |
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:canonical-chromium-builds/stage
sudo apt-get update
sudo apt-get install chromium-browser

- name: Install rmarkdown, bookdown and sysfonts
run: Rscript -e 'install.packages(c("sysfonts", "rmarkdown","bookdown"), Ncpus = 4)'

- name: Before build
run: Rscript before-build.R

- name: Render Book
run: Rscript -e 'bookdown::render_book("index.Rmd", output_dir = "_book/wip")'

- uses: actions/upload-artifact@v1
with:
name: _book
path: _book/

13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,16 @@
.Rhistory
.RData
.Ruserdata
_bookdown_files/
docs/
packages.bib
fcache/
load_server_docker.R
library/
rstudio_prefs
building-shiny-apps-workflow*
!building-shiny-apps-workflow.Rproj
_book/*
!engineering-production-grade-shiny-apps.Rproj
golex/
todoedit
Empty file added .nojekyll
Empty file.
31 changes: 31 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
language: r
cache: packages
os: linux
dist: bionic

env:
global:
- MAKEFLAGS="-j 2"

jobs:
include:
- r: 3.6

install:
- Rscript -e 'if(dir.exists("cache")){unlink("cache")}'
- Rscript -e 'install.packages("remotes")'
- Rscript -e "install.packages('tinytex')"
- Rscript -e "tinytex::install_tinytex()"
- Rscript -e 'remotes::install_github("ThinkR-open/golem", ref = "dev")'
- Rscript -e 'remotes::install_local(force = TRUE)'

script:
- if [ $TRAVIS_BRANCH == "wip" ] ; then make html_wip; fi
- if [ $TRAVIS_BRANCH == "master" ] ; then make html_master; fi
- if [ $TRAVIS_BRANCH == "wip" ] ; then make pdf; fi

after_success:
- if ([ $TRAVIS_PULL_REQUEST == "false" ] && [ $TRAVIS_BRANCH == "wip" ]) ; then bash deploy.sh; fi
- if ([ $TRAVIS_PULL_REQUEST == "false" ] && [ $TRAVIS_BRANCH == "master" ]) ; then bash deploy.sh; fi


99 changes: 99 additions & 0 deletions 00-app-presentation.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# Foreword {.unnumbered}

As a long-time R user (since Version `2.0.0` back in 2004), I have seen more than a few "game-changing" advancements which transformed my entire workflow and opened the doors to new possibilities I never imagined.
One of those came in late 2012 when RStudio released `{shiny}` to the R community.
I was absolutely floored by the very notion that I could create not just a web interface, but a dynamic web interface, all through R code!
To give a little perspective, the only web interfaces I had built before Shiny were very utilitarian PHP-powered sites with a MySQL database back-end to summarize local state parks data near my graduate school's location, and let's just say those projects would not win any awards for web design!

I certainly experienced the longtime adage of learning the hard way as I began to create Shiny apps at my day job and for personal projects.
Over the first year or so of my time with Shiny, I created small apps that revealed the potential it could bring, and it is still amazing that I somehow stitched those together without fully understanding the nuances of reactivity, optimal UI designs, and other software-development principles that a classically trained statistician and Linux enthusiast never knew about!
Things began to click in my mind bit by bit (especially after attending the first (and only) Shiny Developer Conference), and I found myself with the task of creating not just simple prototypes, but large-scale software products meant for **production** use.
Oh my, what have I gotten myself into?

While being a frequent visitor to the Shiny mailing list and the helpful `shiny` tag on Stack Overflow, I felt a serious lack of resources addressing the optimal techniques, best practices, and practical advice of taking my Shiny apps to production.
And then, one of the most transformative events in my R usage occurred.
During the 2019 `rstudio::conf`, I was checking out the excellent poster session and found the [Building Big Shiny Apps](https://thinkr-open.github.io/rstudioconf2019) poster presented by Colin Fay.
I had known Colin as a fellow curator for the [RWeekly](https://rweekly.org/) project and knew he had done some work with Shiny, but during his walkthrough I always had this loud voice in my head saying "Hey, Colin knows exactly what I've been thinking about!" This was the first time I saw the important challenges any Shiny app developer in this space will undoubtedly encounter stated in language I could relate to, even with me being new to the software development mindset.
Needless to say, I had tremendous fun talking Shiny and all things R with Colin and Vincent Guyader at the conferences, trying to soak up all of their insights and advice every chance I could.

Colin and I both agreed in our Shiny Developer Series [episode](https://shinydevseries.com/post/episode-2-golem) that creating resources for this audience was an important step in the evolution of sharing best practices with Shiny.
Fast forward to today, and you are now reading a tremendous resource aimed squarely at the R users in our world who have embarked on creating production-level applications.
*Engineering Production-Grade Shiny Apps* contains an excellent blend of both Shiny-specific topics (many of which have not been addressed in previous books about Shiny) and practical advice from software development that fit in nicely with Shiny apps.
You will find many nuggets of wisdom sprinkled throughout these chapters.
It's very hard to pick favorites, but certainly one that felt like a moment of enlightenment was the concept of building triggers and watchers to define your own patterns of object invalidation.
Now I use that technique in every app I create!
Of course, one of the key pillars holding the foundation of this book is the [`{golem}`](https://thinkr-open.github.io/golem) package, and I have found that the time I invested to learn the ins and outs of creating applications with `{golem}` has paid off significantly for creating my complex applications, especially with multi-person development teams.
As I was finishing my writing of this Foreword, my four-year-old son asked me, "Why does `{golem}` create nice things, Daddy?" Well, this book is easily the best way to explain that answer!
I hope reading *Engineering Production-Grade Shiny Apps* helps you on your journey to creating large Shiny applications!

> Eric Nantz - Host of the R-Podcast and the Shiny Developer Series


# Application presentation {.unnumbered}

This book uses a series of applications as examples.

## `{hexmake}` {.unnumbered}

`{hexmake}` is an application that has been designed to build hex logos.
It was built by Colin, and it serves two main purposes: it helps the creation of a logo, but mainly it serves as an example of some complex features you can use inside a `{shiny}` application (image manipulation, custom CSS, linking to an external database, save and restore, etc.).

Figure \@ref(fig:00-app-presentation-1) is a screenshot of this application.

(ref:hexmakefront) The `{hexmake}` application.

```{r 00-app-presentation-1, echo=FALSE, fig.cap="(ref:hexmakefront)", out.width="100%"}
knitr::include_graphics("img/hexmake.png")
```

The app is available at [engineering-shiny.org/hexmake/](https://engineering-shiny.org/hexmake/).

The code is available at [github.com/ColinFay/hexmake](https://github.com/ColinFay/hexmake).

## `{tidytuesday201942}` {.unnumbered}

`{tidytuesday201942}` is an application using the dataset from week 42 of `tidytuesday` 2019.
It was built by Colin, and it serves as an example of an app built from scratch using bootstrap 4.

Figure \@ref(fig:00-app-presentation-2) is a screenshot of this application.

(ref:tidytuesday) The `{tidytuesday201942}` application.

```{r 00-app-presentation-2, echo=FALSE, fig.cap="(ref:tidytuesday)", out.width="100%"}
knitr::include_graphics("img/tidytuesdayapp.png")
```

The app is available at [engineering-shiny.org/tidytuesday201942/](https://engineering-shiny.org/tidytuesday201942/).

The code is available at [github.com/ColinFay/tidytuesday201942](https://github.com/ColinFay/tidytuesday201942).

## `{minifying}` {.unnumbered}

`{minifying}` is an application to minify CSS, JavaScript, HTML, and JSON files.
It was built built by Colin as a use case for the workflow of this book.
You will find the details of how this app was constructed in the Appendix, "*Use case: Building an App, from Start to Finish*".

Figure \@ref(fig:00-app-presentation-3) is a screenshot of this application.

(ref:minifying) The `{minifying}` application.

```{r 00-app-presentation-3, echo=FALSE, fig.cap="(ref:tidytuesday)", out.width="100%"}
knitr::include_graphics("img/minifying.png")
```

The app is available at [engineering-shiny.org/minifying/](https://engineering-shiny.org/minifying/).
The code is available at [github.com/ColinFay/minifying](https://github.com/ColinFay/minifying).

## Other applications {.unnumbered}

- `{shinipsumdemo}` is an application built by Cervan as an example for `{shinipsum}`, available at [engineering-shiny.org/shinipsumdemo/](https://engineering-shiny.org/shinipsumdemo/).

- `{golemhtmltemplate}` is an application built by Colin as an example for `{shinipsum}` and `shiny::htmlTemplate()`, available at [engineering-shiny.org/golemhtmltemplate/](https://engineering-shiny.org/golemhtmltemplate/).

- `{databasedemo}` is an application built by Cervan using an external database, available at [engineering-shiny.org/databasedemo/](https://engineering-shiny.org/databasedemo/).

- `{grayscale}` is an application built by Cervan using an external html template, available at [engineering-shiny.org/grayscale/](https://engineering-shiny.org/grayscale/).

- `{bs4dashdemo}` is an application built by Cervan with the `{bs4dash}` package, available at [engineering-shiny.org/bs4dashdemo/](https://engineering-shiny.org/bs4dashdemo/).

- `{shinyfuture}` is an application built by Cervan as an example of using `{promises}` and `{future}` inside a `{shiny}` app, available at [engineering-shiny.org/shinyfuture/](https://engineering-shiny.org/shinyfuture/).
Loading