Installations

Most of the data journalism that goes on day after day is local. People care about where they live. So in order to make these tutorials more meaningful to you, I’ve developed a system where you can localize them to your state. Now you don’t have to do this – they will work if you don’t. But if you don’t, every tutorial is going to be about the great state of Nebraska, my home. If you’re fortunate enough to be from the greatest state in the Union, you can do nothing. If you’re from somewhere else and want your tutorials to about that place, do the following.

Step 1: Edit your R environment.

Open R Studio and go to the console. You may or may not have usethis installed, but getting it is easy. Copy this, paste it into the console and hit enter:

install.packages("usethis")

Now, copy this, paste it into the console and hit enter:

usethis::edit_r_environ()

If you’ve never done this before, a blank document will open up. If you have done this before, you should see your previous entries into your .Renviron. On the first empty line of your document, add this:

tutorial.state = "XX"

Replace XX with the postal abbreviation of your state. So if you’re from Florida, it’s FL. If you’re from Vermont, it’s VT.

Once you’ve done that, save the file and close it.

Then, quit R Studio. Start it back up. You have to do this for your new R environment to get loaded in.

Step 2: Check on your work.

In the first tutorial, the basics, there’s a welcome message at the top greeting you.

Go to the Tutorial tab, find The Basics, and click Start Tutorial. In the section called The Goal, you should see “Welcome, student from …” and your state’s name. If you don’t see your state, something went wrong. The default state is Nebraska. That means if you don’t set a state, you’re from Nebraska now. Why Nebraska? That’s where I teach, so that’s what I set as the failure condition. Welcome, new Husker. We’re very friendly. You’re going to love it here.

If cheering for Dear Old Nebraska U isn’t your jam, go back to the top and try again.