# SD212 Lab 02

## [name] Type your name on the next line


## [Q1]
> What sources of help (if any) did you utilize to complete this lab?
> Please be specific.



## [Q2]
> What did you think of the lab overall? We hope that it was
> challenging but instructive, and maybe even fun. Again, if you can
> be specific that is helpful!



## [Q3]
> What is the name of Scott Neal's fraternity brother who plays the
> accordion?



## [Q4]
> Enron employee John Arnold sent an email discussing oil prices
> saying (among other things), "Who cares if we nuke afghanistan?".

> On what date was this email sent?
> Type your date as `YYYY/MM/DD`.



## [Q5]
> On January 30 2002, Mark Germann from Sacramento sent an email to
> a single Enron employee urging him to donate his ill-gotten gains.

> What was the LAST NAME of the employee to whom Mr. Germann sent his
> letter?



## [Q6]
> After receiving it, what did that employee do with Mr. Germann's
> email?



## [Q7]
> What is the total number of emails in the dataset you are looking
> at?

> Hint: don't count the folders. Look at the documentation for the
> `-type` flag to `find`.



## [Q8]
> How many emails were *sent* by Enron employees in the dataset during
> the year 1999?

> (For this question, only consider emails in subfolders named 'sent'
> or 'sent_items')

> Hint: remember to look at the *first* time the `Date` header appears
> in the email. For that purpose, the `-m` option to grep might be
> useful.

> Hint 2: One oddball employee has his `sent` folder in a
> sub-subfolder. Make sure you don't miss it!



## [Q9]
> How many emails mention golf in the subject line?

> Hint: You will probably want to `grep` twice: First to extract the
> first `Subject: ` header line, and secondly to do a
> *case-insensitive* search for "golf" in each of those lines.

> Check out the `-i` and `-c` flags to grep.



## [Q10]
> How many emails contain profanity?

> There is some flexibility in your definition of "profanity" here,
> but try to do your best to capture the kind of words that would be
> "bleeped" on network TV or radio, without double-counting.
> [This research paper][seven] contains a classic list of such
> words.

> Hint: make a regular expression for profanity for grep. Use the `|`
> "alternation" operator to allow multiple possibilities.



## [Q11]
> Explain in just a few sentences your approach to solving this problem,
> and how your code works.

> Be sure to mention *which dataset* (1%, 10%, or full) you managed to
> get it working for.



## [Q12]
> Looking at your final graph, which time(s) of day were employees
> most likely to use profanity? What could explain this?



## [Q13]
> Can you think of any shortcomings or biases in this analysis?
> If so, explain briefly what you might do to correct it.



## [Q14]
> What question are you trying to answer or investigate using this
> data?



## [Q15]
> Having completed your analysis, what conclusions (if any) can you
> draw about the original question? If you had time, what improvements
> would you make or what would be the next thing you would
> investigate?



