R Logo

R Learning Series 2020-21

PSRC Logo

Virtual workshops for PSRC

R Fundamentals I

Date: 11/17/2020

Instructor: Hana Ševčíková
Assistants: Christy Lam, Suzanne Childress, Polina Butrina

This module covers an introduction to R, from basic data structures to simple graphs. You will learn how to load external datasets, extract, transform and summarize data, as well as how to quickly visualize simple relations in the data. This module is for beginners or for those who want to refresh their knowledge in R basics.

Go to class
Class video

R Fundamentals II

Date: 12/1/2020

Instructor: Hana Ševčíková
Assistants: Christy Lam, Suzanne Childress, Polina Butrina

Building on the previous module, you will learn how to write and understand functions, what are the control flow structures in R, and how to export data. Installing and using R packages will also be covered.

Go to class
Class video

R Fundamentals Wrap-up

Date: 12/15/2020

Instructors: Hana Ševčíková, Polina Butrina
Assistants: Christy Lam, Suzanne Childress, Craig Helmann

Building on the previous module, you will learn how to write and understand functions, what are the control flow structures in R, and how to export data. Installing and using R packages will also be covered. We close the series on Fundamentals by analyzing Seattle pet names.

Go to class
Class video

Intro to ggplot2

Date: 1/12/2021

Instructor: Christy Lam
Assistants: Hana Ševčíková, Suzanne Childress, Polina Butrina, Craig Helmann

Learn how to visualize your data with the ggplot2 (a.k.a ggplot) library. The underlying model of ggplot is the Grammar of Graphics — a way of “describing the fundamental features that underlie all statistical graphics”. By understanding graphs as layers of individual components you can build a variety of beautiful graphs with ease and flexibility.

Go to class
Class video

dplyr

Date: 1/19/2021

Instructor: Suzanne Childress
Assistants: Hana Ševčíková, Christy Lam, Polina Butrina, Craig Helmann

dplyr is a library that helps you get your data in the right form for your planning work. Most of the time, we need to group, filter, and aggregate data to make it meaningful. You might think you already know how to do this in Excel. Well, this is a better way because someone can easily follow what you did, and it looks like you wrote a paragraph, just in code. In this class, we’ll show you how to use dplyr with King County Restaurant Data.

Go to class
Class video

Rmarkdown for documentation and reproducibility

Date: 2/2/2021

Instructor: Craig Helmann
Assistants: Hana Ševčíková, Suzanne Childress, Christy Lam, Polina Butrina

How much time do you spend trying to understand your own or your colleague's code or reproduce its results? If you like us, then a lot! With R Markdown those times are over. Your analysis becomes a document combining code with text, providing opportunities for documenting every step of the way. When the document is compiled, the code is processed, results are incorporated into the text, and a pdf or html file is created, thus immediately presentable to others. This makes every analysis reproducible and its documentation is up to date with the latest data. We recommend to use R Markdown for data analysis in every analytical team in the agency.

Go to class
Class video

Handling big data with data.table

Date: 2/23/2021

Instructor: Hana Ševčíková
Assistants: Christy Lam, Craig Helmann, Suzanne Childress, Polina Butrina

A frequent criticism of R is its inefficiency in handling large datasets. That's where the R package data.table enters the scene. If your datasets have more than tens of thousands of rows, the data.table package is a must. In this module, you will learn the flexible and intuitive syntax of the package, which allows for time and memory efficient aggregations of huge datasets as well as fast input and output operations. data.table is a package to fall in love with and never handle data in any other way.

Go to class
Class video

Interactive maps with sf and leaflet for R

Date: 3/9/2021

Instructor: Craig Helmann
Assistants: Hana Ševčíková, Suzanne Childress, Christy Lam, Polina Butrina

Leaflet is a popular JavaScript library for interactive maps, used for example by the NYT and Washington Post (see a few leaflet examples). This module will cover the leaflet R package that allows you to build such maps directly from R, avoiding the need of learning the complex syntax of JavaScript. Using PSRC data, you will learn how to create beautiful interactive maps of our region in no time.

Go to class
Class video

Interactive web apps with Shiny

Date: 4/27/2021, 5/11/2021

Instructor: Christy Lam
Assistants: Hana Ševčíková, Suzanne Childress, Craig Helmann, Polina Butrina

Learn how to create interactive web applications with the RStudio’s Shiny library. Shiny is a framework that allows your users to interact with your data and analysis. Shiny provides basic widgets and tools to create the user-interface and server-side functions using R. With that, you can create standalone apps, dashboards, or turn your Rmarkdown document into an interactive document. Shiny apps can utilize other libraries to transform data (e.g. data.table or dplyr), embed plots (e.g. ggplot2 or plotly), maps (e.g. leaflet), or display tabular data (e.g. DT or reactable). All the things learned from previous modules can be embedded into your Shiny web app!

Go to class
Class video (part 1)
Class video (part 2)

Introduction to statistical modeling in R

Date: TBD

Instructor: Hana Ševčíková

Are you interested in finding relations between variables in your data or fit a theoretical model to the observed data? This module covers basic statistical models, such as various types of regression models. You will learn how to interpret the various model outputs and how to choose between competing models.