Skip to content

Commit 6327ee8

Browse files
committed
third times a charm
1 parent 7ea3d54 commit 6327ee8

File tree

13 files changed

+417
-61
lines changed

13 files changed

+417
-61
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-dc2b3fd22b49a90ec3bb" style="width:100%;height:480px;" class="leaflet html-widget"></div>
342-
<script type="application/json" data-for="htmlwidget-dc2b3fd22b49a90ec3bb">{"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-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>
343343
</div>
344344
</div>
345345

docs/answers-2_tidycensus.html

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

docs/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274

275275

276276
<p> </p>
277-
<p><a href="slides"><strong>Slides</strong></a></p>
277+
<p><a href="/slides/"><strong>Slides</strong></a></p>
278278
<p><a href="https://github.com/libjohn/map-fall2018">Code for Hands-on Workshop – Fall 2018</a></p>
279279
<div id="overview" class="section level2">
280280
<h2>Overview</h2>

docs/slides/index.Rmd

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
---
22
title: "Practical Mapping in R:<br>Lat/Lon plotting & Choropleths"
3-
subtitle: "leaflet, tidycensus, tmap, and sf"
4-
author: "John Little & Drew Keener"
3+
subtitle: "leaflet, tidycensus, and sf"
4+
author: "John Little"
55
date: "2018-1-25"
66
output:
77
xaringan::moon_reader:
88
lib_dir: libs
99
css:
1010
- default
11-
- duke_color_pallettes_slides.css
11+
- default-fonts
12+
- duke-blue
13+
- hygge-duke
1214
- cc-fonts.css
1315
- figures.css
1416
nature:
@@ -119,7 +121,7 @@ Packages of interest but not part of this workshop include...
119121
- `argeos`
120122

121123
---
122-
class: green, middle, center
124+
class: duke-green, middle, center
123125

124126
## Hands-on
125127

@@ -143,7 +145,7 @@ class: green, middle, center
143145

144146
]
145147
---
146-
class: center, middle, softblue
148+
class: center, middle, duke-softblue
147149

148150
## Georeferencing
149151

@@ -163,7 +165,7 @@ background-image: url(images/xy.png)
163165
???
164166
Image Credit: [GAO](https://www.flickr.com/photos/usgao/8269791489/)
165167
---
166-
class: center, middle, softblue
168+
class: center, middle, duke-softblue
167169

168170
## Choropleth
169171

@@ -212,7 +214,7 @@ background-image: url(images/polygons.png)
212214
- Example of [Census Bureau TIGER Metadata](https://www2.census.gov/geo/tiger/TIGER_DP/2015ACS/Metadata/STATE_METADATA_2015.txt) file
213215

214216
---
215-
class: center, middle, softblue
217+
class: center, middle, duke-softblue
216218

217219
## Thematic Mapping
218220

@@ -256,7 +258,7 @@ class: center, middle, softblue
256258
- `ggplot2::geom_sf`
257259

258260
---
259-
class: middle, green
261+
class: middle, duke-green
260262

261263
## Save, Write, Output
262264

@@ -269,7 +271,7 @@ class: middle, green
269271
- Integrate an HTML widget into an R Notebook
270272

271273
---
272-
class: softblue, middle, center
274+
class: duke-softblue, middle, center
273275

274276
## Markdown
275277

@@ -328,7 +330,7 @@ Numbered list:
328330
]
329331

330332
---
331-
class: orange, middle, center
333+
class: duke-orange, middle, center
332334

333335
## **Reproducible Research**
334336

docs/slides/index.html

Lines changed: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
<head>
44
<title>Practical Mapping in R: Lat/Lon plotting &amp; Choropleths</title>
55
<meta charset="utf-8">
6-
<meta name="author" content="John Little &amp; Drew Keener" />
7-
<link href="libs/remark-css-0.0.1/example.css" rel="stylesheet" />
8-
<link rel="stylesheet" href="duke_color_pallettes_slides.css" type="text/css" />
6+
<meta name="author" content="John Little" />
7+
<link href="libs/remark-css-0.0.1/default.css" rel="stylesheet" />
8+
<link href="libs/remark-css-0.0.1/default-fonts.css" rel="stylesheet" />
9+
<link href="libs/remark-css-0.0.1/duke-blue.css" rel="stylesheet" />
10+
<link href="libs/remark-css-0.0.1/hygge-duke.css" rel="stylesheet" />
911
<link rel="stylesheet" href="cc-fonts.css" type="text/css" />
1012
<link rel="stylesheet" href="figures.css" type="text/css" />
1113
</head>
@@ -14,8 +16,8 @@
1416
class: center, middle, inverse, title-slide
1517

1618
# Practical Mapping in R:<br>Lat/Lon plotting &amp; Choropleths
17-
## leaflet, tidycensus, tmap, and sf
18-
### John Little &amp; Drew Keener
19+
## leaflet, tidycensus, and sf
20+
### John Little
1921
### 2018-1-25
2022

2123
---
@@ -123,7 +125,7 @@
123125
- `argeos`
124126

125127
---
126-
class: green, middle, center
128+
class: duke-green, middle, center
127129

128130
## Hands-on
129131

@@ -147,7 +149,7 @@
147149

148150
]
149151
---
150-
class: center, middle, softblue
152+
class: center, middle, duke-softblue
151153

152154
## Georeferencing
153155

@@ -167,7 +169,7 @@
167169
???
168170
Image Credit: [GAO](https://www.flickr.com/photos/usgao/8269791489/)
169171
---
170-
class: center, middle, softblue
172+
class: center, middle, duke-softblue
171173

172174
## Choropleth
173175

@@ -216,7 +218,7 @@
216218
- Example of [Census Bureau TIGER Metadata](https://www2.census.gov/geo/tiger/TIGER_DP/2015ACS/Metadata/STATE_METADATA_2015.txt) file
217219

218220
---
219-
class: center, middle, softblue
221+
class: center, middle, duke-softblue
220222

221223
## Thematic Mapping
222224

@@ -260,7 +262,7 @@
260262
- `ggplot2::geom_sf`
261263

262264
---
263-
class: middle, green
265+
class: middle, duke-green
264266

265267
## Save, Write, Output
266268

@@ -273,7 +275,7 @@
273275
- Integrate an HTML widget into an R Notebook
274276

275277
---
276-
class: softblue, middle, center
278+
class: duke-softblue, middle, center
277279

278280
## Markdown
279281

@@ -332,7 +334,7 @@
332334
]
333335

334336
---
335-
class: orange, middle, center
337+
class: duke-orange, middle, center
336338

337339
## **Reproducible Research**
338340

@@ -435,15 +437,33 @@
435437
"highlightLines": true,
436438
"countIncrementalSlides": false
437439
});
438-
if (window.HTMLWidgets) slideshow.on('afterShowSlide', function (slide) {window.dispatchEvent(new Event('resize'));});
439-
(function() {var d = document, s = d.createElement("style"), r = d.querySelector(".remark-slide-scaler"); if (!r) return; s.type = "text/css"; s.innerHTML = "@page {size: " + r.style.width + " " + r.style.height +"; }"; d.head.appendChild(s);})();</script>
440+
if (window.HTMLWidgets) slideshow.on('afterShowSlide', function (slide) {
441+
window.dispatchEvent(new Event('resize'));
442+
});
443+
(function() {
444+
var d = document, s = d.createElement("style"), r = d.querySelector(".remark-slide-scaler");
445+
if (!r) return;
446+
s.type = "text/css"; s.innerHTML = "@page {size: " + r.style.width + " " + r.style.height +"; }";
447+
d.head.appendChild(s);
448+
})();</script>
440449

441-
<script type="text/x-mathjax-config">
442-
MathJax.Hub.Config({
443-
tex2jax: {
444-
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre']
450+
<script>
451+
(function() {
452+
var i, text, code, codes = document.getElementsByTagName('code');
453+
for (i = 0; i < codes.length;) {
454+
code = codes[i];
455+
if (code.parentNode.tagName !== 'PRE' && code.childElementCount === 0) {
456+
text = code.textContent;
457+
if (/^\\\((.|\s)+\\\)$/.test(text) || /^\\\[(.|\s)+\\\]$/.test(text) ||
458+
/^\$\$(.|\s)+\$\$$/.test(text) ||
459+
/^\\begin\{([^}]+)\}(.|\s)+\\end\{[^}]+\}$/.test(text)) {
460+
code.outerHTML = code.innerHTML; // remove <code></code>
461+
continue;
462+
}
463+
}
464+
i++;
445465
}
446-
});
466+
})();
447467
</script>
448468
<!-- dynamically load mathjax for compatibility with self-contained -->
449469
<script>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
2+
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
3+
@import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700);
4+
5+
body { font-family: 'Droid Serif', 'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC', serif; }
6+
h1, h2, h3 {
7+
font-family: 'Yanone Kaffeesatz';
8+
font-weight: normal;
9+
}
10+
.remark-code, .remark-inline-code { font-family: 'Source Code Pro', 'Lucida Console', Monaco, monospace; }

docs/slides/libs/remark-css-0.0.1/example.css renamed to docs/slides/libs/remark-css-0.0.1/default.css

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz);
2-
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic);
3-
@import url(https://fonts.googleapis.com/css?family=Source+Code+Pro:400,700);
4-
5-
body { font-family: 'Droid Serif', 'Palatino Linotype', 'Book Antiqua', Palatino, 'Microsoft YaHei', 'Songti SC', serif; }
6-
h1, h2, h3 {
7-
font-family: 'Yanone Kaffeesatz';
8-
font-weight: normal;
9-
}
101
a, a > code {
112
color: rgb(249, 38, 114);
123
text-decoration: none;
@@ -17,7 +8,6 @@ a, a > code {
178
padding-right: 4em;
189
font-size: 90%;
1910
}
20-
.remark-code, .remark-inline-code { font-family: 'Source Code Pro', 'Lucida Console', Monaco, monospace; }
2111
.remark-code-line-highlighted { background-color: #ffff88; }
2212

2313
.inverse {
@@ -27,7 +17,6 @@ a, a > code {
2717
}
2818
.inverse h1, .inverse h2, .inverse h3 {
2919
color: #f3f3f3;
30-
line-height: 1.0em;
3120
}
3221
/* Two-column layout */
3322
.left-column {
@@ -62,14 +51,14 @@ blockquote {
6251
border-left: solid 5px lightgray;
6352
padding-left: 1em;
6453
}
65-
table {
54+
.remark-slide table {
6655
margin: auto;
6756
border-top: 1px solid #666;
6857
border-bottom: 1px solid #666;
6958
}
70-
table thead th { border-bottom: 1px solid #ddd; }
59+
.remark-slide table thead th { border-bottom: 1px solid #ddd; }
7160
th, td { padding: 5px; }
72-
thead, tfoot, tr:nth-child(even) { background: #eee }
61+
.remark-slide thead, .remark-slide tfoot, .remark-slide tr:nth-child(even) { background: #eee }
7362

7463
@page { margin: 0; }
7564
@media print {

0 commit comments

Comments
 (0)