These are a series of tutorials designed for journalists interested in learning R and RStudio, however they would be helpful to anyone wanting to get started. These lessons focus on the Tidyverse packages and a few others that I've found to be super useful and it covers basic data analysis concepts. If you previously learned Excel or SQL, you will recognize a lot of similar concepts, however it's not necessary that you know those other programs to get started with these tutorials.
They are designed to walk you through data that is mostly pre-written, but then opportunities for you to write your own code, as well. The DIY lessons are ones that you would create entirely from scratch (with answers provided).
You can download all the tutorials at once by clicking on the green "Code" button and choosing "Download zip." Then unzip the files and you'll have separate directories and all the correct sub-directories that you need to do these tutorials.
Alternatively, if you want to download each tutorial one and a time, you'll have to be sure to download all the files in that folder. Some has a sub-folder called "data." When you download, make sure it still has this structure.
This is just a short video that walks you through installing R and RStudio; launching RStudio and installing a few packages. There is an R script included here that has code you can use to install all the packages needed for the subsequent tutorials. You can view this video on YouTube.
This has a short video and data that you can use to create your first project and Notebook script, and get a taste of some of the code from Tidyverse that we'll use for data analysis.You can view this video on YouTube.
This is where we really get moving with importing data and going through the main components of Tidyverse's dplyr package for basic data analysis. You can also view a video matching this exercise on YouTube.
This is a continuation of the previous exercise, but this time using more complex data from the Minnesota death certificates database. Brief introduction to making plots with ggplot2.
This shows you some basic cleanup, recoding and rearranging techniques such as pivot_wider and pivot_longer.
This focuses on how to import csv and Excel files, as well as joining and appending data, but also offers additional practice in some data recoding, a basic plot and basic analysis.
This runs through the basics of ggplot2, covering bar/column charts, line charts, stacked bar charts and scatterplot, as well as tips for making your charts look good (titles, axis styling, etc). This also introduces you to using an RMarkdown page.
This is an introduction to a package called tidycensus that is designed to make it easier for you to get Census data from the U.S. Census Bureau's API. It also includes a brief introduction to doing some mapping in R using that data. YOU WILL NEED AN API KEY FROM CENSUS FOR THIS. Directions are in the tutorial.
This tutorial shows you how to write your code in an RMarkdown file and then "knit" it into a pretty HTML page (with the option of hiding your code). This is a great way to make a beautiful presentation of your findings to share with others. It also shows you some other formatting tools such as the formattable package and the DT package for making a searchable, sortable table.
This is a way to put many of your new skills to practice on a full data analysis. It also shows you how to download data from a live URL (in this case, the New York Times COVID cases and deaths data by county).
This is also a full analysis of a dataset, putting many of your new skills to work. This is residential building permit data from the Twin Cities.
You will find three exercises that you can do yourself and they include an answer sheet you can check when you are finished. The police_shootings and salaries exercises would be appropriate after getting through the first 4 tutorials. The student_diversity one would be best for after getting through exercise 6.