class: center, middle, inverse, title-slide .title[ # R as complete teaching infrastructure: Automating and enriching university geography education ] .subtitle[ ## Matthew Haffner, PhD ] .author[ ### Department of Geography and Anthropology, University of Wisconsin - Eau Claire, USA ] --- .pull-left[ ## Courses - _Quantitative Methods in Geography_ - _Introduction to Urban and Regional Planning_ - _Urban Geography_ - _Geography Field Seminar (Geography of Oregon)_ - _Geographic Information Systems II_ - _Geographic Information Systems III_ - _Human Geography_ ] .pull-right[ <!-- one column web map (start) -->
<!-- one column web map (end) --> ] --- .pull-left[ # Course content - `Rmarkdown`, `blogdown`, Hugo, netlify ] .pull-right[ .center[ <div style='max-height:625px'> <img style='max-height: inherit' src='./img/hex-blogdown.png' height='100%' /> </div> .small[] ] ] --- .pull-left[ # Course content - `Rmarkdown`, `blogdown`, Hugo # Presentations - `xaringan`, `xaringanthemer`, `xaringanExtra`, remark.js ] .pull-right[ .center[ <div style='max-height:625px'> <img style='max-height: inherit' src='./img/hex-xaringan.png' height='100%' /> </div> .small[] ] ] --- .pull-left[ # Course content - `Rmarkdown`, `blogdown`, Hugo # Presentations - `xaringan`, `xaringanthemer`, `xaringanExtra`, remark.js - `leaflet`, `deckgl`, `mapgl`, `streetview` ] .pull-right[ .center[ <div style='max-height:625px'> <img style='max-height: inherit' src='./img/hex-streetview.png' height='100%' /> </div> .small[] ] ] --- .pull-left[ # Plumbing - Canvas API via `reticulate`, `DT`, `ggplot2` ] .pull-right[ .center[ <div style='max-height:625px'> <img style='max-height: inherit' src='./img/hex-reticulate.png' height='100%' /> </div> .small[] ] ] --- class:inverse,center,transition ## Course content --- <div align = 'center'> <iframe width='1366' src='https://geog-370.netlify.app/' height='625' frameborder='0' allow='accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture' allowfullscreen> </iframe> </div> --- <div align = 'center'> <iframe width='1366' src='https://geog-270.netlify.app/' height='625' frameborder='0' allow='accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture' allowfullscreen> </iframe> </div> --- class:inverse,center,transition ## Slide examples --- ## Correlogram (GGally) .pull-left-60[ ``` r # Quick display of two cabapilities of GGally, to assess the distribution and correlation of variables library(GGally) ## From the help page: data(tips, package = "reshape") ggpairs( tips[, c(1, 3, 4, 2)], upper = list(continuous = "density", combo = "box_no_facet"), lower = list(continuous = "points", combo = "dot_no_facet") ) ``` ] .pull-right-40[ <img src="index_files/figure-html/unnamed-chunk-3-1.png" alt="" height="400" /> ] ---
--- ## Slide examples <!-- one column web map (start) --> ``` r library(leaflet) library(widgetframe) loc <- c(32.54616557591488, -116.98885152862641) m <- leaflet(width = '100%', height = '615px') %>% addProviderTiles(providers$Esri.WorldImagery) %>% setView(lng = loc[2], lat = loc[1], zoom = 15) frameWidget(m) ``` <!-- one column web map (end) --> --- ## Slide examples .pre[ ``` lisp (defun haff/xar-add-web-map (COLUMNS CHUNK-DIR) "Insert web map used in xaringan presentations. It inserts a map from the 'chunks' dir" (if (= COLUMNS 1) (progn (setq start-text "<!-- one column web map (start) -->") (setq end-text "<!-- one column web map (end) -->") (setq choices '("CartoDB.Positron" "CartoDB.DarkMatter" "Esri.WorldImagery")) (setq basemap (ido-completing-read "Basemap: " choices)) (cond ((string= basemap "CartoDB.Positron") (setq insert-filename "web-map.Rmd")) ((string= basemap "CartoDB.DarkMatter") (setq insert-filename "web-map-cartodb-dark.Rmd")) ((string= basemap "Esri.WorldImagery") (setq insert-filename "web-map-satellite.Rmd")))) (progn (setq start-text "<!-- two column web map (start) -->") (setq end-text "<!-- two column web map (end) -->") (setq insert-filename "web-map-two-column.Rmd"))) (setq chunk-dir CHUNK-DIR) (setq loc-var (point)) ;; if previous web map exists (if (search-backward start-text nil t nil) (progn ; then (if (y-or-n-p "Use previous web map?") (progn (search-backward start-text nil t nil) (setq copy-start-point (point)) (search-forward end-text nil t nil) (move-end-of-line nil) (setq copy-end-point (point)) (copy-region-as-kill copy-start-point copy-end-point) (goto-char loc-var) (yank) (search-backward "loc <- c(") (search-forward "(") (forward-char 1)) (progn (goto-char loc-var) (insert-file-contents (concat chunk-dir insert-filename))))) (progn ; else (goto-char loc-var) (insert-file-contents (concat chunk-dir insert-filename)))) (search-forward "loc <- c(") (move-end-of-line nil) (forward-char -1) (if (y-or-n-p "Have coordinates from Google Maps?") (progn (evil-paste-before 1)) (evil-insert-state))) ``` ] --- ## Slide examples
--- ## Slide examples ``` r library(streetview) # Vredenburg Crossing in Utrecht, Netherlands streetview( lat = 52.0930, lng = 5.1133, heading = 120, pitch = 5, zoom = 1, height = "500px" ) ``` --- class:inverse,center,transition ## Plumbing --- <style type="text/css"> .dataTables_wrapper, table.dataTable td, table.dataTable th, .dataTables_filter, .dataTables_info, .dataTables_length { font-size: 0.8em; } .dt-button, .dt-buttons .btn { font-size: 0.8em !important; padding: 2px 6px !important; } tr.notes-1 td { background-color: #e8f5e9 !important; } tr.notes-2 td { background-color: #fff9c4 !important; } tr.notes-3 td { background-color: #ffe0b2 !important; } tr.notes-x td { background-color: #fdecea !important; } .notes-select { font-size: 0.85em; cursor: pointer; } .perma-btn { user-select: none; } .pre { height: 500px; overflow-y: auto; } </style>
--- class:inverse # Thank you! - This presentation: https://geohaff-pres.netlify.app/useR-2026 - Source code: https://gitlab.com/mhaffner/presentations/-/tree/master/public/useR-2026 - Email: haffnerm@uwec.edu - Web: - https://geohaff.com - https://4thcoastconsulting.com