Skip to content

Commit 6043d8d

Browse files
committed
Initial commit
1 parent 47e7991 commit 6043d8d

10 files changed

+127
-2
lines changed

.Rbuildignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
^.*\.Rproj$
2+
^\.Rproj\.user$
3+
^\.httr-oauth$

.gitignore

+9-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
# RStudio files
1818
.Rproj.user/
19+
*.Rproj
1920

2021
# produced vignettes
2122
vignettes/*.html
@@ -24,13 +25,19 @@ vignettes/*.pdf
2425
# OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3
2526
.httr-oauth
2627

27-
# knitr and R markdown default cache directories
28+
# knitr and R Markdown default cache directories
2829
/*_cache/
2930
/cache/
3031

31-
# Temporary files created by R markdown
32+
# Temporary files created by R Markdown
3233
*.utf8.md
3334
*.knit.md
3435

3536
# Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html
3637
rsconnect/
38+
.Rproj.user
39+
40+
# bookdown files
41+
_book
42+
_bookdown_files
43+
_main.*

.travis.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
language: r
2+
sudo: false
3+
4+
cache:
5+
directories:
6+
- $HOME/.npm
7+
- _book
8+
packages: true
9+
10+
script:
11+
- Rscript -e 'bookdown::render_book("index.Rmd")'
12+
13+
after_success:
14+
- nvm install stable
15+
- npm install netlify-cli -g
16+
17+
deploy:
18+
provider: script
19+
script: netlify deploy --prod --dir _book
20+
skip_cleanup: true

DESCRIPTION

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Imports:
2+
bookdown,
3+
ggrepel,
4+
hexbin,
5+
knitr,
6+
rmarkdown,
7+
tidyverse

LICENSE.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[![Creative Commons License](https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-nc-sa/4.0/)
2+
3+
This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).

README.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Geospatial Visualization
2+
3+
This repository contains the source for the book [Geospatial Visualization]().
4+
5+
We welcome suggestions for improvements.
6+
7+
* Small matters, such as typos, can be submitted through pull requests.
8+
* Larger matters can be submitted through issues.

_bookdown.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
new_session: true
2+
delete_merged_file: true
3+
4+
rmd_files: [
5+
"index.Rmd"
6+
]
7+
8+
before_chapter_script: "_common.R"

_common.R

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
set.seed(2466)
2+
3+
options(
4+
digits = 3,
5+
dplyr.print_max = 6,
6+
dplyr.print_min = 6
7+
)
8+
9+
knitr::opts_chunk$set(
10+
cache = TRUE,
11+
collapse = TRUE,
12+
comment = "#>",
13+
fig.align = 'center',
14+
fig.asp = 0.618, # 1 / phi
15+
fig.show = "hold"
16+
)
17+
18+
# Stamps plots with a tag
19+
# Idea from Claus Wilke's "Data Visualization" https://serialmentor.com/dataviz/
20+
stamp <- function(
21+
tag = "Bad", tag_color = "#B33A3A", tag_size = 16, tag_padding = 1
22+
)
23+
{
24+
list(
25+
theme(
26+
plot.tag = element_text(color = tag_color, size = tag_size),
27+
plot.tag.position = "topright"
28+
),
29+
labs(
30+
tag =
31+
str_pad(tag, width = str_length(tag) + tag_padding, side = "left")
32+
)
33+
)
34+
}
35+

_output.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
bookdown::gitbook:
2+
split_by: rmd
3+
config:
4+
toc:
5+
collapse: section
6+
before: |
7+
<li><strong><a href="./">Vis Wisdom</a></strong></li>
8+
edit:
9+
link: https://github.com/dcl-docs/vis-wisdom/edit/master/%s
10+
download: null
11+
sharing: null

index.Rmd

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
knitr: bookdown::render_book
3+
title: "Geospatial Visualization"
4+
author: "Sara Altman, Bill Behrman"
5+
date: "`r Sys.Date()`"
6+
description: "This book is a practical introduction to creating effective geospatial visualizations."
7+
url: 'https\://datalab.stanford.edu/dcl-docs/geo-vis'
8+
github-repo: dcl-docs/geo-vis
9+
site: bookdown::bookdown_site
10+
documentclass: book
11+
#bibliography: references.bib
12+
link-citations: true
13+
---
14+
15+
# Welcome {-}
16+
17+
This book is a practical introduction to creating effective geospatial visualizations.
18+
19+
## An evolving book {-}
20+
21+
This book is not intended to be static. Starting in January 2019, we use this book to teach data visualization in the Stanford [Data Challenge Lab](https://datalab.stanford.edu/challenge-lab) (DCL) course. The DCL functions as a testing ground for educational materials, as our students give us routine feedback on what they read and do in the course. We use this feedback to constantly improve our materials, including this book. The [source for the book](https://github.com/dcl-docs/geo-vis) is also available on GitHub where we welcome suggestions for improvements.
22+
23+
This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/).

0 commit comments

Comments
 (0)