Get R!


Go to — Install R — to get the latest version of R and RStudio.

Intro to R


This series of workshops teaches the basics of importing data, using new packages, cleaning and summarizing data with tidy tools, and using ggplot2 to create charts, maps and other data visualizations.

  1. Become a Jedi scrap scavenger
  2. Project launch
    • Create a new project and R script
    • Install R packages
    • Create variables, lists, data frames
  3. Read data into R
    • Arrange, select and filter data
  4. Plot the data!

Packages: readr, dplyr
Planets visited: Jakku

  1. Data cleaning
  2. Data transformations
    • Add new columns and convert units
    • Summarize data
    • Save data
  3. Group the data
    • Answers for each group and category
  4. Working with Dates
  5. More plots!

Packages: dplyr, lubridate,
Planets visited: Endor

  1. Make plots
  2. Join tables
  3. ifelse() do this
  4. More plots
    • Scatter plots + box plots
    • Trend lines
    • Add titles, colors, and labels
    • Reference lines
  5. Save plots
  6. Your data
    • Connect to databases
    • Tidy your data
    • Map your data

Packages: ggplot2, readxl Planets visited: Ahch-To

Workshops


Each of these workshops dives into more detail on a common data anlaysis task.

  1. Collapse data spread across many columns
  2. Read an entire folder of files and combine into 1 table
  3. Order plots from highest to lowest
  4. Parse dates into seasons, months, quarters, or day of the year

Packages: tidyr, readxl, lubridate, forcats

  1. Connect to Oracle databases
    • DELTA / TEMPO
  2. Explore datbase tables
  3. Read data from different schemas
  4. Join tables

Packages: RODBC, dplyr

  1. Read and save shapefiles
  2. Convert coordinate projections (ex. Lat/Long to UTM)
  3. Load reference maps
    • States, counties, ZIP Codes
  4. Build interactive maps

Packages: leaflet, sf, tidycensus, tigris


  1. Read CSVs from the web
  2. Connect to FTP sites
  3. Other web APIs
  4. Scrape text from webpages

Packages: dplyr

  1. Read & write data from other stats programs
    • SAS, SPSS, & Stata
    • MATLAB
    • Systat / SigmaPlot
    • Minitab

Packages: haven, foreign

  1. Read and save shapefiles
  2. Convert projections
    • Lat/Long to UTM
  3. Load reference maps
    • States, counties, ZIP Codes
  4. Build interactive maps

Packages: readr