We employ the Tidyverse approach throughout the Mapping with R workshop and we assume you are already familiar with Tidyverse R. If not, please review our Introduction to R in advance of the workshop.

We will teach in our training lab (023 Bostock) unless otherwise stated in the registration information. The workstations in the Lab are preconfigured with all the necessary software and libraries. Therefore, we will not take time to install software or configure personal laptops. All libraries, packages, code, and data are shareable and documented through this website. A link to the repository is in the header.

Software

If you are not attending the workshop in person, you will need to install the following software to complete the hands-on portions of the workshop.

Packages

The packages used for this workshop and website are listed in the Session Info section below. However, the primary mapping packages include:

- leaflet
- tidycensus
- sf
- tmap
- tmaptools
- tigris
- ggplot2 (with geom_sf() function.  i.e. development version of ggplot2)
- viridis

Workshop Philosophy

Mapping with R is a two hour workshop, part of the R learning series entitled R We Having Fun Yet‽ hosted by the Data & Visualization Services Department at the Duke University Libraries. We will approach R using the free RStudio IDE, an intent to make reproducible literate code, and a bias towards the tidyverse. We believe this open tool-set provides a context that enables and reinforces reproducible workflows, analysis, and reporting.

As part of the workshop we create opportunities for reinforced active learning by creating hands-on exercises. You will have time to complete these exercises during the workshop.

Recordings, Repository, Shareable datasets

There’s a link to the repository in the upper right-hand header.

You can find links to previous recordings of this workshop, along with links to the shareable data sets, at the mapping section of the Rfun site. Similarly, you will find links to our broader array of workshop resources at the the Guides or Workshops sections of our DVS website

All code and data for this website and workshop are shareable through the repository under the CC-By-NC license.

Session Info

Listed below are the library (packages) and session info used to execute the code in the workshop and create this documentation

sessioninfo::session_info()
## - Session info ----------------------------------------------------------
##  setting  value                       
##  version  R version 3.5.2 (2018-12-20)
##  os       Windows 10 x64              
##  system   x86_64, mingw32             
##  ui       RTerm                       
##  language (EN)                        
##  collate  English_United States.1252  
##  ctype    English_United States.1252  
##  tz       America/New_York            
##  date     2019-01-18                  
## 
## - Packages --------------------------------------------------------------
##  package      * version   date       lib source        
##  assertthat     0.2.0     2017-04-11 [1] CRAN (R 3.5.1)
##  backports      1.1.3     2018-12-14 [1] CRAN (R 3.5.2)
##  base64enc      0.1-3     2015-07-28 [1] CRAN (R 3.5.0)
##  bindr          0.1.1     2018-03-13 [1] CRAN (R 3.5.1)
##  bindrcpp     * 0.2.2     2018-03-29 [1] CRAN (R 3.5.1)
##  broom          0.5.1     2018-12-05 [1] CRAN (R 3.5.2)
##  cellranger     1.1.0     2016-07-27 [1] CRAN (R 3.5.1)
##  class          7.3-14    2015-08-30 [2] CRAN (R 3.5.2)
##  classInt       0.3-1     2018-12-18 [1] CRAN (R 3.5.2)
##  cli            1.0.1     2018-09-25 [1] CRAN (R 3.5.1)
##  codetools      0.2-15    2016-10-05 [2] CRAN (R 3.5.2)
##  colorspace     1.3-2     2016-12-14 [1] CRAN (R 3.5.2)
##  crayon         1.3.4     2017-09-16 [1] CRAN (R 3.5.1)
##  crosstalk      1.0.0     2016-12-21 [1] CRAN (R 3.5.1)
##  curl           3.3       2019-01-10 [1] CRAN (R 3.5.2)
##  DBI            1.0.0     2018-05-02 [1] CRAN (R 3.5.1)
##  dichromat      2.0-0     2013-01-24 [1] CRAN (R 3.5.0)
##  digest         0.6.18    2018-10-10 [1] CRAN (R 3.5.1)
##  dplyr        * 0.7.8     2018-11-10 [1] CRAN (R 3.5.1)
##  e1071          1.7-0     2018-07-28 [1] CRAN (R 3.5.1)
##  evaluate       0.12      2018-10-09 [1] CRAN (R 3.5.1)
##  fansi          0.4.0     2018-10-05 [1] CRAN (R 3.5.1)
##  forcats      * 0.3.0     2018-02-19 [1] CRAN (R 3.5.1)
##  foreign        0.8-71    2018-07-20 [2] CRAN (R 3.5.2)
##  generics       0.0.2     2018-11-29 [1] CRAN (R 3.5.2)
##  geosphere      1.5-7     2017-11-05 [1] CRAN (R 3.5.1)
##  ggmap        * 2.6.1     2016-01-23 [1] CRAN (R 3.5.1)
##  ggplot2      * 3.1.0     2018-10-25 [1] CRAN (R 3.5.1)
##  glue           1.3.0     2018-07-17 [1] CRAN (R 3.5.1)
##  gridExtra      2.3       2017-09-09 [1] CRAN (R 3.5.1)
##  gtable         0.2.0     2016-02-26 [1] CRAN (R 3.5.1)
##  haven          2.0.0     2018-11-22 [1] CRAN (R 3.5.1)
##  highr          0.7       2018-06-09 [1] CRAN (R 3.5.1)
##  hms            0.4.2     2018-03-10 [1] CRAN (R 3.5.1)
##  htmltools      0.3.6     2017-04-28 [1] CRAN (R 3.5.1)
##  htmlwidgets  * 1.3       2018-09-30 [1] CRAN (R 3.5.1)
##  httpuv         1.4.5.1   2018-12-18 [1] CRAN (R 3.5.2)
##  httr           1.4.0     2018-12-11 [1] CRAN (R 3.5.2)
##  jpeg           0.1-8     2014-01-23 [1] CRAN (R 3.5.0)
##  jsonlite       1.6       2018-12-07 [1] CRAN (R 3.5.2)
##  KernSmooth     2.23-15   2015-06-29 [2] CRAN (R 3.5.2)
##  knitr          1.21      2018-12-10 [1] CRAN (R 3.5.2)
##  labeling       0.3       2014-08-23 [1] CRAN (R 3.5.0)
##  later          0.7.5     2018-09-18 [1] CRAN (R 3.5.1)
##  lattice        0.20-38   2018-11-04 [2] CRAN (R 3.5.2)
##  lazyeval       0.2.1     2017-10-29 [1] CRAN (R 3.5.1)
##  leaflet      * 2.0.2     2018-08-27 [1] CRAN (R 3.5.1)
##  lubridate      1.7.4     2018-04-11 [1] CRAN (R 3.5.1)
##  lwgeom         0.1-5     2018-12-07 [1] CRAN (R 3.5.2)
##  magrittr       1.5       2014-11-22 [1] CRAN (R 3.5.1)
##  mapproj        1.2.6     2018-03-29 [1] CRAN (R 3.5.1)
##  maps           3.3.0     2018-04-03 [1] CRAN (R 3.5.1)
##  maptools       0.9-4     2018-09-19 [1] CRAN (R 3.5.1)
##  mapview      * 2.6.3     2018-12-19 [1] CRAN (R 3.5.2)
##  mime           0.6       2018-10-05 [1] CRAN (R 3.5.1)
##  modelr         0.1.2     2018-05-11 [1] CRAN (R 3.5.1)
##  munsell        0.5.0     2018-06-12 [1] CRAN (R 3.5.1)
##  nlme           3.1-137   2018-04-07 [2] CRAN (R 3.5.2)
##  pillar         1.3.1     2018-12-15 [1] CRAN (R 3.5.2)
##  pkgconfig      2.0.2     2018-08-16 [1] CRAN (R 3.5.1)
##  plyr           1.8.4     2016-06-08 [1] CRAN (R 3.5.1)
##  png            0.1-7     2013-12-03 [1] CRAN (R 3.5.0)
##  promises       1.0.1     2018-04-13 [1] CRAN (R 3.5.1)
##  proto          1.0.0     2016-10-29 [1] CRAN (R 3.5.1)
##  purrr        * 0.2.5     2018-05-29 [1] CRAN (R 3.5.1)
##  R6             2.3.0     2018-10-04 [1] CRAN (R 3.5.1)
##  rappdirs       0.3.1     2016-03-28 [1] CRAN (R 3.5.1)
##  raster         2.8-4     2018-11-03 [1] CRAN (R 3.5.1)
##  RColorBrewer   1.1-2     2014-12-07 [1] CRAN (R 3.5.0)
##  Rcpp           1.0.0     2018-11-07 [1] CRAN (R 3.5.1)
##  readr        * 1.3.1     2018-12-21 [1] CRAN (R 3.5.2)
##  readxl       * 1.2.0     2018-12-19 [1] CRAN (R 3.5.2)
##  reshape2       1.4.3     2017-12-11 [1] CRAN (R 3.5.1)
##  rgdal          1.3-6     2018-10-16 [1] CRAN (R 3.5.1)
##  rgeos          0.4-2     2018-11-08 [1] CRAN (R 3.5.1)
##  RgoogleMaps    1.4.3     2018-11-07 [1] CRAN (R 3.5.1)
##  rjson          0.2.20    2018-06-08 [1] CRAN (R 3.5.0)
##  rlang          0.3.1     2019-01-08 [1] CRAN (R 3.5.2)
##  rmarkdown      1.11      2018-12-08 [1] CRAN (R 3.5.2)
##  rstudioapi     0.9.0     2019-01-09 [1] CRAN (R 3.5.2)
##  rvest          0.3.2     2016-06-17 [1] CRAN (R 3.5.1)
##  satellite      1.0.1     2017-10-18 [1] CRAN (R 3.5.1)
##  scales         1.0.0     2018-08-09 [1] CRAN (R 3.5.1)
##  sessioninfo    1.1.1     2018-11-05 [1] CRAN (R 3.5.1)
##  sf           * 0.7-2     2018-12-20 [1] CRAN (R 3.5.2)
##  shiny          1.2.0     2018-11-02 [1] CRAN (R 3.5.1)
##  sp             1.3-1     2018-06-05 [1] CRAN (R 3.5.1)
##  stringi        1.2.4     2018-07-20 [1] CRAN (R 3.5.1)
##  stringr      * 1.3.1     2018-05-10 [1] CRAN (R 3.5.1)
##  tibble       * 2.0.1     2019-01-12 [1] CRAN (R 3.5.2)
##  tidycensus   * 0.9       2019-01-09 [1] CRAN (R 3.5.2)
##  tidyr        * 0.8.2     2018-10-28 [1] CRAN (R 3.5.1)
##  tidyselect     0.2.5     2018-10-11 [1] CRAN (R 3.5.1)
##  tidyverse    * 1.2.1     2017-11-14 [1] CRAN (R 3.5.2)
##  tigris       * 0.7       2018-04-14 [1] CRAN (R 3.5.1)
##  tmap         * 2.2       2019-01-05 [1] CRAN (R 3.5.2)
##  tmaptools    * 2.0-1     2018-08-07 [1] CRAN (R 3.5.1)
##  units          0.6-2     2018-12-05 [1] CRAN (R 3.5.2)
##  utf8           1.1.4     2018-05-24 [1] CRAN (R 3.5.1)
##  uuid           0.1-2     2015-07-28 [1] CRAN (R 3.5.0)
##  viridis      * 0.5.1     2018-03-29 [1] CRAN (R 3.5.1)
##  viridisLite  * 0.3.0     2018-02-01 [1] CRAN (R 3.5.1)
##  webshot        0.5.1     2018-09-28 [1] CRAN (R 3.5.1)
##  withr          2.1.2     2018-03-15 [1] CRAN (R 3.5.1)
##  xfun           0.4       2018-10-23 [1] CRAN (R 3.5.1)
##  XML            3.98-1.16 2018-08-19 [1] CRAN (R 3.5.1)
##  xml2           1.2.0     2018-01-24 [1] CRAN (R 3.5.1)
##  xtable         1.8-3     2018-08-29 [1] CRAN (R 3.5.1)
##  yaml           2.2.0     2018-07-25 [1] CRAN (R 3.5.1)
## 
## [1] C:/Users/jrl/Documents/R/win-library/3.5
## [2] C:/Program Files/R/R-3.5.2/library
 
R We Having Fun Yet‽ -- Learning Series
Data & Visualization Services
Duke University Libraries
C bn
Shareable via Creative Commons: CC By-NC