Get R!


Go to — Install R — for instructions on installing the latest and greatest versions of R and RStudio.

Intro to R


This series of tutorials teaches the basics of importing data, using new packages, cleaning and summarizing data with “tidy” tools, and using ggplot2 to make charts and data visualizations.

Day 1

  1. Create a new RStudio project and R script.
  2. Install new R packages.
  3. Create variables, lists, data frames.
  4. Read data into R.
  5. Arrange and filter your data.
  6. Solve a cat mystery.
  7. Become a pet detective.

Packages: readr, dplyr

  1. Data transformations
    • Add new columns.
    • Summarize your data.
    • Split groups and categories in your data.
    • Save data.
  2. Make plots.
    • Scatter plots and transparency.
    • Add a smoothed trend line to the plot.
    • Add titles, colors, and axis labels.
    • Bar charts.
    • Histograms.

Packages: ggplot2

  1. Read data from Excel.
  2. Make more plots.
    • Add titles, colors, and axis labels.
    • Box plots.
    • Bar plots.
    • Label points.
    • Log transform your chart axis.
    • Save charts to different formats.
  3. Connect to TEMPO.
    • View tables.
    • Read data.

Packages: readxl, tidyr, RODBC, lubridate

Workshops


Each workshop dives into more detail on a common data anlaysis or visualization task.

Writing functions
Maps and shapefiles
  1. Collapse data spread across many columns.
  2. Fill in empty rows from Excel.
  3. Reorder ggplots from highest to lowest.
  4. Read a whole folder of files at once.
  5. Clean spaces and special characters from column names.
  6. Parse dates into season, month, quarter, day of the year.
  7. Read a set range of cells from Excel.

Packages: tidyr, readxl, lubridate, forcats, ggplot2