Publications by Harold Nelson
Exercises with County Data
Exercises with County Data Harold Nelson 9/27/2021 Setup Make the packages tidyverse and socviz available. This assumes you have already installed them on your computer. Answer library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── t...
1551 sym R (13377 sym/33 pcs) 8 img
Exercises on Iteration and Strings
Exercises on Iteration and Strings Harold Nelson 9/22/2021 Ex1 Given a string and a non-negative int n, return a larger string that is n copies of the original string. string_times(‘Hi’, 2) → ‘HiHi’ string_times(‘Hi’, 3) → ‘HiHiHi’ string_times(‘Hi’, 1) → ‘Hi’ def string_times(str, n): Answer def string_times(str...
2301 sym R (2230 sym/54 pcs)
Creating Vectors
Creating Vectors Harold Nelson 9/12/2021 The c() function. “c” stands for concatenate, cram together, or collect. It assembles whatever you put in it into a single vector. Example x = c(1,3,5) x ## [1] 1 3 5 Coercion If the items are of different types, “coercion” will be used to make everything have a type that will accomodate all o...
414 sym R (126 sym/7 pcs)
Notes Sep 13
R Markdown This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com. When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within t...
595 sym R (1604 sym/4 pcs) 1 img
Using Cocalc to Teach Python
Using Cocalc to Teach Python Harold Nelson 9/19/2021 Cocalc Cocalc (Collaborative Calculation) was created by Professor William Stein of the University of Washington to make Sage, a computer algebra system (CAS) widely available. It was originally known as SageMath Cloud. In addition to Sage, it incorporates many computer languages including P...
2793 sym
Leaflet Demo
Setup The following two lines move some software to your computer. You should run the following chunk by itself then Make the two lines comments after you run them once. # install.packages("leaflet") # install.packages("tidyverse") The following two lines make the packages available to your R session. Leave them here. library(leaflet) library(tid...
599 sym R (1522 sym/21 pcs)
Chapter 4 GIS
Chapter 4 Harold Nelson 7/19/2021 Setup library(sf) # Objects and functions for geospatial data ## Linking to GEOS 3.8.1, GDAL 3.2.1, PROJ 7.2.1 library(rgdal) # Functions for spatial data input/output ## Loading required package: sp ## rgdal: version: 1.5-23, (SVN revision 1121) ## Geospatial Data Abstraction Library extensio...
635 sym R (9126 sym/38 pcs) 8 img
Chapter 4 Part 2
Chapter 4 Part 2 Harold Nelson 10/10/2021 Setup Get the libraries and re-create the data from Part 1. library(sf) # Objects and functions for geospatial data ## Linking to GEOS 3.8.1, GDAL 3.2.1, PROJ 7.2.1 library(rgdal) # Functions for spatial data input/output ## Loading required package: sp ## rgdal: version: 1.5-23, (SVN ...
1099 sym R (4888 sym/29 pcs) 2 img
Tobias Trees
Tobias Trees Harold Nelson 10/12/2021 Read the trees data from the Tobias collection. Setup library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ── ## ✓ ggplot2 3.3.3 ✓ purrr 0.3.4 ## ✓ tibble 3.1.2...
409 sym R (5225 sym/23 pcs) 3 img
Tobias DEM
Tobias DEM Harold Nelson 10/16/2021 Read the Tobias Depth Elevation Model Setup library(tidyverse) ## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ── ## ✓ ggplot2 3.3.3 ✓ purrr 0.3.4 ## ✓ tibble 3.1.2 ✓ dpl...
422 sym R (2101 sym/25 pcs) 2 img