Skip to content

Commit 9cdd11d

Browse files
authored
Merge pull request #357 from UBC-DSCI/preface-index-white-fig
Fixing preface index entries, white figure in ch1
2 parents 14dac93 + 22e6390 commit 9cdd11d

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

build_html.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Script to generate HTML book
2-
docker run --rm -m 5g -v $(pwd):/home/rstudio/introduction-to-datascience ubcdsci/intro-to-ds:v0.18.0 /bin/bash -c "cd /home/rstudio/introduction-to-datascience; Rscript _build_html.r"
2+
docker run --rm -m 5g -v $(pwd):/home/rstudio/introduction-to-datascience ubcdsci/intro-to-ds:v0.19.0 /bin/bash -c "cd /home/rstudio/introduction-to-datascience; Rscript _build_html.r"

build_pdf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ cp -r data/ pdf/data
2222
cp -r img/ pdf/img
2323

2424
# Build the book with bookdown
25-
docker run --rm -m 5g -v $(pwd):/home/rstudio/introduction-to-datascience ubcdsci/intro-to-ds:v0.18.0 /bin/bash -c "cd /home/rstudio/introduction-to-datascience/pdf; Rscript _build_pdf.r"
25+
docker run --rm -m 5g -v $(pwd):/home/rstudio/introduction-to-datascience ubcdsci/intro-to-ds:v0.19.0 /bin/bash -c "cd /home/rstudio/introduction-to-datascience/pdf; Rscript _build_pdf.r"
2626

2727
# clean files in pdf dir
2828
rm -rf pdf/references.bib

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
book-env:
3-
image: ubcdsci/intro-to-ds:v0.18.0
3+
image: ubcdsci/intro-to-ds:v0.19.0
44
ports:
55
- "8787:8787"
66
volumes:

intro.Rmd

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -612,13 +612,10 @@ n.o.s. with over 60,000 Canadian residents reporting it as their mother tongue.
612612
### Putting it all together
613613

614614
In the block of code below, we put everything from this chapter together, with a few
615-
modifications. In particular, we have
616-
added a few more layers to make the data visualization even more effective.
617-
Specifically, we changed the color of the bars and changed the background from
618-
grey to white to improve the contrast. We have also actually skipped the
615+
modifications. In particular, we have actually skipped the
619616
`select` step that we did above; since you specify the variable names to plot
620617
in the `ggplot` function, you don't actually need to `select` the columns in advance
621-
when creating a visualization. And finally, we provided *comments* next to
618+
when creating a visualization. We have also provided *comments* next to
622619
many of the lines of code below using the
623620
hash symbol `#`. When R sees a `#` sign, \index{comment} \index{aaacommentsymb@\#|see{comment}} it
624621
will ignore all of the text that
@@ -641,17 +638,16 @@ ten_lang <- slice(arranged_lang, 1:10)
641638
# create the visualization
642639
ggplot(ten_lang, aes(x = mother_tongue,
643640
y = reorder(language, mother_tongue))) +
644-
geom_bar(stat = "identity", fill = "steelblue") +
641+
geom_bar(stat = "identity") +
645642
xlab("Mother Tongue (Number of Canadians, 2016 Census)") +
646-
ylab("Language") +
647-
theme_bw() # use a theme to have a white background
643+
ylab("Language")
648644
```
649645

650646
This exercise demonstrates the power of R. In relatively few lines of code, we
651647
performed an entire data science workflow with a highly effective data
652648
visualization! We asked a question, loaded the data into R, wrangled the data
653649
(using `filter`, `arrange` and `slice`) and created a data visualization to
654-
help answer our question. In this chapter, you got a quick taste of the data
650+
help answer our question. In this chapter, you got a quick taste of the data
655651
science workflow; continue on with the next few chapters to learn each of
656652
these steps in much more detail!
657653

0 commit comments

Comments
 (0)