Preparing for analysis
This recipe will prepare the groundwork with the tools you need to complete this project. If you do not have R installed on your computer, please see the instructions in Chapter 1, Preparing Your Data Science Environment.
Getting ready
You need a computer with R installed and an internet connection.
How to do it...
The following steps will get you prepared for the remainder of this chapter by downloading the dataset from the BLS website and ensuring that we have the needed R packages:
- Download the 76.8 MB compressed data from http://www.bls.gov/cew/data/files/2012/csv/2012_annual_singlefile.zip , and save it to a location that you will remember.
- Uncompress the file by right-clicking on it in explorer or finder, and use the appropriate menu item.
If you are familiar with the command line in the Terminal in Linux/Mac OS X, you can easily uncompress the downloaded file using unzip 2012_annual_singlefile.zip
.
- Launch the RStudio IDE on your computer (or just plain R for purists...