1 Introduction

The following is a data analytics curriculum specifically designed for the intro track of Shaping the Future of the Bay Area, the flagship course of the Stanford Future Bay Initiative. Stanford students who enroll in the course will work through this material alongside lectures and discussions, and are expected to complete the assignments at the end of each chapter for a grade. Those students can then continue on to participate in practicum projects that make use of these technical skills.

This curriculum is also designed to be useful to a wider audience (though many datasets and concepts will be most applicable if you are working in the U.S.). Depending on interest, we may create platforms for the general public to engage with the instructors and each other. If you have any questions or comments, reach out to lead instructor Derek Ouyang at .

If you don’t have prior experience in R, this curriculum is designed to help you learn it from scratch. If you have some prior experience, you will likely be able to skim over anything that looks familiar and focus on new techniques. There are many other useful R educational resources online that we will occasionally refer to, and that may be just as useful if not more useful to help you learn R. The best place to start is r.stanford.edu.

In this introductory chapter, we will cover the following:

  • Downloading all the relevant software that we recommend
  • Navigating the RStudio interface, which is our preferred R development environment
  • Navigating R Markdown files, which is our preferred R file format
  • Pulling and Pushing GitHub repos, and publishing R Markdown reports to create web pages similar to the one you’re on
  • Reading data into your R environment, and saving files, in various formats
  • Looping through operations using the classic for loop
  • Exploring and manipulating data in basic ways, particularly with tidyverse functions
  • Plotting data in simple charts using ggplot2
  • Working with geospatial data using sf, tigris, and leaflet

You can navigate through the chapters using the sidebar.


Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.