Skip to content

Commit 15b7ed7

Browse files
committed
update slides
1 parent 6327ee8 commit 15b7ed7

11 files changed

+86
-420
lines changed

docs/01_georeference.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/02_choropleth.html

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

docs/033_thematic_leaflet_example.html

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/answers-1_xy-leaflet.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,8 @@ <h3>Plot XY on the Map</h3>
338338
<span class="st"> </span><span class="kw">addMarkers</span>(<span class="dt">lat =</span> <span class="op">~</span>Latitude,
339339
<span class="dt">lng =</span> <span class="op">~</span>Longitude,
340340
<span class="dt">popup =</span> xy_locations<span class="op">$</span>Company)</code></pre></div>
341-
<div id="htmlwidget-4cdb4aa1160884c782d6" style="width:100%;height:480px;" class="leaflet html-widget"></div>
342-
<script type="application/json" data-for="htmlwidget-4cdb4aa1160884c782d6">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"calls":[{"method":"addTiles","args":["//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,null,{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"&copy; <a href=\"http://openstreetmap.org\">OpenStreetMap<\/a> contributors, <a href=\"http://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA<\/a>"}]},{"method":"addMarkers","args":[[40.2487413,-7.9110809,9.49858,-7.0320658,-17.0490108,21.8693003,53.3323703,31.394935,30.274084,14.1313261],[72.1297653,111.4253892,50.8105261,108.4365067,-41.5612423,106.7691712,-6.2152673,92.835795,120.15507,122.8277624],null,null,null,{"interactive":true,"draggable":false,"keyboard":true,"title":"","alt":"","zIndexOffset":0,"opacity":1,"riseOnHover":false,"riseOffset":250},["Ailane","Thoughtbeat","Lazz","Zoomdog","Minyx","Devpulse","Meembee","Quamba","Realcube","Fatz"],null,null,null,null,{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"className":"","sticky":true},null]}],"limits":{"lat":[-17.0490108,53.3323703],"lng":[-41.5612423,122.8277624]}},"evals":[],"jsHooks":[]}</script>
341+
<div id="htmlwidget-975a8ca2cd4313573cc7" style="width:100%;height:480px;" class="leaflet html-widget"></div>
342+
<script type="application/json" data-for="htmlwidget-975a8ca2cd4313573cc7">{"x":{"options":{"crs":{"crsClass":"L.CRS.EPSG3857","code":null,"proj4def":null,"projectedBounds":null,"options":{}}},"calls":[{"method":"addTiles","args":["//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",null,null,{"minZoom":0,"maxZoom":18,"tileSize":256,"subdomains":"abc","errorTileUrl":"","tms":false,"noWrap":false,"zoomOffset":0,"zoomReverse":false,"opacity":1,"zIndex":1,"detectRetina":false,"attribution":"&copy; <a href=\"http://openstreetmap.org\">OpenStreetMap<\/a> contributors, <a href=\"http://creativecommons.org/licenses/by-sa/2.0/\">CC-BY-SA<\/a>"}]},{"method":"addMarkers","args":[[40.2487413,-7.9110809,9.49858,-7.0320658,-17.0490108,21.8693003,53.3323703,31.394935,30.274084,14.1313261],[72.1297653,111.4253892,50.8105261,108.4365067,-41.5612423,106.7691712,-6.2152673,92.835795,120.15507,122.8277624],null,null,null,{"interactive":true,"draggable":false,"keyboard":true,"title":"","alt":"","zIndexOffset":0,"opacity":1,"riseOnHover":false,"riseOffset":250},["Ailane","Thoughtbeat","Lazz","Zoomdog","Minyx","Devpulse","Meembee","Quamba","Realcube","Fatz"],null,null,null,null,{"interactive":false,"permanent":false,"direction":"auto","opacity":1,"offset":[0,0],"textsize":"10px","textOnly":false,"className":"","sticky":true},null]}],"limits":{"lat":[-17.0490108,53.3323703],"lng":[-41.5612423,122.8277624]}},"evals":[],"jsHooks":[]}</script>
343343
</div>
344344
</div>
345345

docs/answers-2_tidycensus.html

Lines changed: 6 additions & 6 deletions
Large diffs are not rendered by default.

docs/slides/index.Rmd

Lines changed: 16 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Practical Mapping in R:<br>Lat/Lon plotting & Choropleths"
33
subtitle: "leaflet, tidycensus, and sf"
44
author: "John Little"
5-
date: "2018-1-25"
5+
date: "2018-10-23"
66
output:
77
xaringan::moon_reader:
88
lib_dir: libs
@@ -62,46 +62,45 @@ This is a presenter comment for the presenter mode
6262
use 'p' to toggle the presenter mode or '?' or 'h' to toggle the help / key-shortcut options
6363

6464
---
65-
## Prequisites
65+
## Prerequisites
6666

6767
- 023 Lab Workstations (All packages and versions already installed)
6868

69-
- Intro to R: Tidyverse, R Notebooks, R Markdown, RStudio
69+
- [Intro to R](https://intro2r.library.duke.edu/): Tidyverse, R Notebooks, R Markdown, RStudio
70+
- [ggplot2](https://ggplot.library.duke.edu/)
7071

7172
## Background Resources
7273

7374
- [Intro2r](https://rfun.library.duke.edu/intro2r/)
7475
- [Reproducibility with git & RStudio](https://rfun.library.duke.edu/git/)
75-
- [Visualization in R using ggplot2](https://rfun.netlify.com/2017/09/26/visualization-in-r-using-ggplot2-workshop-fall-2017/)
76+
- [Visualization in R using ggplot2](https://rfun.library.duke.edu/portfolio/ggplot_workshop/)
7677
- [DVS learning materials: handouts, guides, data, and videos](http://library.duke.edu/data/news/past-workshops)
7778

7879

7980
---
8081
## Why Make Maps with R
8182

82-
- Mapping is not necessarily GIS Analysis
83-
84-
- Know R and not as familiar with
83+
- Already comfortable with R and not as familiar with
8584
- ArcGIS
8685
- QGIS
86+
- Tableau
8787
- Python
8888

8989
---
9090
## Library Packages used in this Workshop
9191

92-
- `leaflet` -- best for interactivity
93-
- `tidycensus` -- thematic mapping, Census geography (shapefiles), Census data
94-
- `ggplot2` -- great for facet maps
92+
- **`leaflet`** -- creates interactive maps
93+
- **`tidycensus`** -- thematic mapping, Census geography (shapefiles), Census data
94+
- **`sf`** - [Simple Features Access](https://en.wikipedia.org/wiki/Simple_Features) for R (Open Geospatial & ISO)
95+
- `ggplot2` -- especially `geom_sf()` and `facet_wrap()`
96+
- `ggmap` -- can quickly generate simple static maps + more
9597
- Thematic Mapping
9698
- `tmap`
97-
- `sf`
9899
- `ggplot2`
99-
- to use `geom_sf()` will need to install ggplot2 development version
100-
- `devtools::install_github("tidyverse/ggplot2")`
101100
- `viridis` -- diverging colors, sequential, bucketing colors
102-
- `sf` vs. `sp`
103-
- sf for simple features. Modern and current
104-
- sp for spatial polygons. The legacy approach
101+
- `dplyr` (`tidyverse`)
102+
103+
&nbsp;
105104

106105
See Also [System Info](http://rfun.library.duke.edu/map/software_prereqs.html#packages)
107106

@@ -114,8 +113,6 @@ Packages of interest but not part of this workshop include...
114113

115114
- `raster`
116115

117-
- `ggmap`
118-
119116
- `maptools`
120117

121118
- `argeos`
@@ -197,15 +194,12 @@ background-image: url(images/hierarchy.png)
197194

198195
https://www.census.gov/geo/reference/webatlas/
199196

200-
---
201-
background-image: url(images/decennial_v_acs.jpg)
202-
203197
---
204198
background-image: url(images/polygons.png)
205199
## Polygons
206200

207201
---
208-
## Census Variables
202+
## Identifying Census Variables
209203

210204
- `tidycensus` -- [How To: *Searching for Variables*](https://walkerke.github.io/tidycensus/articles/basic-usage.html#searching-for-variables)
211205

@@ -270,84 +264,6 @@ class: middle, duke-green
270264

271265
- Integrate an HTML widget into an R Notebook
272266

273-
---
274-
class: duke-softblue, middle, center
275-
276-
## Markdown
277-
278-
---
279-
.pull-left[
280-
281-
&nbsp;
282-
283-
&nbsp;
284-
285-
```
286-
287-
# Heading
288-
289-
## Sub-heading
290-
291-
### Another deeper heading
292-
293-
Text attributes
294-
*italic*, **bold**, `monospace`.
295-
296-
A [link](http://example.com).
297-
298-
Bullet list:
299-
- apples
300-
- oranges
301-
- pears
302-
303-
Numbered list:
304-
1. apples
305-
2. oranges
306-
3. pears
307-
```
308-
]
309-
310-
.pull-right[
311-
# Heading
312-
## Sub-heading
313-
314-
### Another deeper heading
315-
316-
*italicized*, **bold**, `monospace`
317-
318-
A [link](http://google.com)
319-
320-
Bullet list:
321-
- applies
322-
- oranges
323-
- pears
324-
325-
Numbered list:
326-
1. apples
327-
2. oranges
328-
3. pears
329-
330-
]
331-
332-
---
333-
class: duke-orange, middle, center
334-
335-
## **Reproducible Research**
336-
337-
Integrate your reproducible workflow using *Literate Coding* practices in *R* then generate reports directly from analysis
338-
339-
### R Notebooks + R Markdown + Git
340-
341-
???
342-
343-
This is where **Open** becomes **Awesome**
344-
345-
------
346-
## Design Practices
347-
348-
Drew fill in here
349-
350-
351267
---
352268
## Thank You For Attending
353269

docs/slides/index.html

Lines changed: 17 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<title>Practical Mapping in R: Lat/Lon plotting &amp; Choropleths</title>
55
<meta charset="utf-8">
66
<meta name="author" content="John Little" />
7+
<meta name="date" content="2018-10-23" />
78
<link href="libs/remark-css-0.0.1/default.css" rel="stylesheet" />
89
<link href="libs/remark-css-0.0.1/default-fonts.css" rel="stylesheet" />
910
<link href="libs/remark-css-0.0.1/duke-blue.css" rel="stylesheet" />
@@ -18,7 +19,7 @@
1819
# Practical Mapping in R:<br>Lat/Lon plotting &amp; Choropleths
1920
## leaflet, tidycensus, and sf
2021
### John Little
21-
### 2018-1-25
22+
### 2018-10-23
2223

2324
---
2425

@@ -66,46 +67,45 @@
6667
use 'p' to toggle the presenter mode or '?' or 'h' to toggle the help / key-shortcut options
6768

6869
---
69-
## Prequisites
70+
## Prerequisites
7071

7172
- 023 Lab Workstations (All packages and versions already installed)
7273

73-
- Intro to R: Tidyverse, R Notebooks, R Markdown, RStudio
74+
- [Intro to R](https://intro2r.library.duke.edu/): Tidyverse, R Notebooks, R Markdown, RStudio
75+
- [ggplot2](https://ggplot.library.duke.edu/)
7476

7577
## Background Resources
7678

7779
- [Intro2r](https://rfun.library.duke.edu/intro2r/)
7880
- [Reproducibility with git &amp; RStudio](https://rfun.library.duke.edu/git/)
79-
- [Visualization in R using ggplot2](https://rfun.netlify.com/2017/09/26/visualization-in-r-using-ggplot2-workshop-fall-2017/)
81+
- [Visualization in R using ggplot2](https://rfun.library.duke.edu/portfolio/ggplot_workshop/)
8082
- [DVS learning materials: handouts, guides, data, and videos](http://library.duke.edu/data/news/past-workshops)
8183

8284

8385
---
8486
## Why Make Maps with R
8587

86-
- Mapping is not necessarily GIS Analysis
87-
88-
- Know R and not as familiar with
88+
- Already comfortable with R and not as familiar with
8989
- ArcGIS
9090
- QGIS
91+
- Tableau
9192
- Python
9293

9394
---
9495
## Library Packages used in this Workshop
9596

96-
- `leaflet` -- best for interactivity
97-
- `tidycensus` -- thematic mapping, Census geography (shapefiles), Census data
98-
- `ggplot2` -- great for facet maps
97+
- **`leaflet`** -- creates interactive maps
98+
- **`tidycensus`** -- thematic mapping, Census geography (shapefiles), Census data
99+
- **`sf`** - [Simple Features Access](https://en.wikipedia.org/wiki/Simple_Features) for R (Open Geospatial &amp; ISO)
100+
- `ggplot2` -- especially `geom_sf()` and `facet_wrap()`
101+
- `ggmap` -- can quickly generate simple static maps + more
99102
- Thematic Mapping
100103
- `tmap`
101-
- `sf`
102104
- `ggplot2`
103-
- to use `geom_sf()` will need to install ggplot2 development version
104-
- `devtools::install_github("tidyverse/ggplot2")`
105105
- `viridis` -- diverging colors, sequential, bucketing colors
106-
- `sf` vs. `sp`
107-
- sf for simple features. Modern and current
108-
- sp for spatial polygons. The legacy approach
106+
- `dplyr` (`tidyverse`)
107+
108+
&amp;nbsp;
109109

110110
See Also [System Info](http://rfun.library.duke.edu/map/software_prereqs.html#packages)
111111

@@ -118,8 +118,6 @@
118118

119119
- `raster`
120120

121-
- `ggmap`
122-
123121
- `maptools`
124122

125123
- `argeos`
@@ -201,15 +199,12 @@
201199

202200
https://www.census.gov/geo/reference/webatlas/
203201

204-
---
205-
background-image: url(images/decennial_v_acs.jpg)
206-
207202
---
208203
background-image: url(images/polygons.png)
209204
## Polygons
210205

211206
---
212-
## Census Variables
207+
## Identifying Census Variables
213208

214209
- `tidycensus` -- [How To: *Searching for Variables*](https://walkerke.github.io/tidycensus/articles/basic-usage.html#searching-for-variables)
215210

@@ -274,84 +269,6 @@
274269

275270
- Integrate an HTML widget into an R Notebook
276271

277-
---
278-
class: duke-softblue, middle, center
279-
280-
## Markdown
281-
282-
---
283-
.pull-left[
284-
285-
&amp;nbsp;
286-
287-
&amp;nbsp;
288-
289-
```
290-
291-
# Heading
292-
293-
## Sub-heading
294-
295-
### Another deeper heading
296-
297-
Text attributes
298-
*italic*, **bold**, `monospace`.
299-
300-
A [link](http://example.com).
301-
302-
Bullet list:
303-
- apples
304-
- oranges
305-
- pears
306-
307-
Numbered list:
308-
1. apples
309-
2. oranges
310-
3. pears
311-
```
312-
]
313-
314-
.pull-right[
315-
# Heading
316-
## Sub-heading
317-
318-
### Another deeper heading
319-
320-
*italicized*, **bold**, `monospace`
321-
322-
A [link](http://google.com)
323-
324-
Bullet list:
325-
- applies
326-
- oranges
327-
- pears
328-
329-
Numbered list:
330-
1. apples
331-
2. oranges
332-
3. pears
333-
334-
]
335-
336-
---
337-
class: duke-orange, middle, center
338-
339-
## **Reproducible Research**
340-
341-
Integrate your reproducible workflow using *Literate Coding* practices in *R* then generate reports directly from analysis
342-
343-
### R Notebooks + R Markdown + Git
344-
345-
???
346-
347-
This is where **Open** becomes **Awesome**
348-
349-
------
350-
## Design Practices
351-
352-
Drew fill in here
353-
354-
355272
---
356273
## Thank You For Attending
357274

0 commit comments

Comments
 (0)