This week’s assignment is to transform a data set for easier downstream analysis. I understand that the assignment required the use of a data set from the UCI Machine Learning Repository, but I felt that since the football season is upon us the following data set would be pertinent. I hope this is ok.

This data set can be found at: https://raw.githubusercontent.com/fivethirtyeight/data/master/nfl-suspensions/nfl-suspensions-data.csv.
http://fivethirtyeight.com is an interesting site for the data enthusiast.

The data set I chose lists all NFL suspensions from 1946 to 2014. Here are the first 5 observations from the data set:

##          name team  games                          category
## 1    F. Davis  WAS Indef. Substance abuse, repeated offense
## 2 J. Blackmon  JAX Indef. Substance abuse, repeated offense
## 3  L. Brazill  IND Indef. Substance abuse, repeated offense
## 4  T. Jackson  WAS Indef. Substance abuse, repeated offense
## 5    M. Hapes  NYG Indef.                  Personal conduct
## 6     R. Rice  BAL Indef.                  Personal conduct
##               desc. year
## 1 Marijuana-related 2014
## 2                   2014
## 3                   2014
## 4                   2014
## 5  Gambling-related 1946
## 6 Domestic violence 2014
##                                                                                                            source
## 1 http://www.cbssports.com/nfl/eye-on-football/24448694/redskins-te-fred-davis-suspended-Indefiniteinitely-by-nfl
## 2   http://espn.go.com/nfl/story/_/id/11257934/justin-blackmon-jacksonville-jaguars-arrested-marijuana-possession
## 3    http://www.nfl.com/news/story/0ap2000000364622/article/lavon-brazill-released-by-colts-in-wake-of-suspension
## 4        http://www.nfl.com/news/story/0ap2000000364087/article/tanard-jackson-suspended-Indefiniteinitely-by-nfl
## 5                                                     http://espn.go.com/blog/nflnation/tag/_/name/frank-filchock
## 6            http://espn.go.com/new-york/nfl/story/_/id/11489134/baltimore-ravens-cut-ray-rice-new-video-surfaces

For my purposes I want to focus on all substance abuse related suspensions from 1980 to 2014. All superflorous columns will be removed.

Here are the first 5 observations from the transformed data set:

##             Name Team Year Length
## 170    M. Prater  DEN 2014      4
## 171 F. Alexander  HOU 2014      4
## 172  J. Blackmon  JAX 2013      4
## 173   L. Brazill  IND 2013      4
## 174   B. Collins  MIA 2013      4
## 175     F. Davis  WAS 2011      4

And now it is much easier to work with the data: