Bears. Beats. Analyzing The Office

A brief, informal analysis of the hilarious sitcom, The Office.

Avery Robbins www.linkedin.com/in/avery-robbins
07-30-2020

Welcome!

If this is your first time reading my blog, then welcome! If this is not your first time, then welcome back! The website is still pretty new, but it is awesome to see so many people take an interest in what I have been sharing! If you find this informal analysis of The Office entertaining, then please share it with a friend!

As a side note, all of the graphs you will see were created using the R programming language, and the data used is from the schrute R package.

Motivation

To be honest, when I saw the image below for the first time a little voice in my head whispered, “satchel!” Is that sad? Haha! True fans of The Office will understand. A couple weeks ago I analyzed transcript data for Avatar: The Last Airbender, and this time around I thought it would be fun to take a closer at another of my favorite TV shows. So, put on your Gettysburg hats and let’s dive right in.


How many times do you think Michael Scott uttered his famous line - “That’s what she said?”

According to the transcript data - 23 times! Some others joined in as well, but it was truly Michael’s joke. Am I missing anyone? I did notice that the group “That’s what she said!” from Beach Games was missing from the data.


Who doesn’t love the world’s best boss, Michael Scott? After season one, of course. The IMDB ratings definitely support that Michael was well loved by many. In the entire series, seasons three and four had the highest average (median) ratings, while the ratings suffered quite a bit after Michael left.


Admittedly, this next graph is pretty random, but I wanted to highlight both Michael’s and Toby’s “goodbye” episodes. Toby’s was rated fairly high, but Michael was such an icon that his was one of the highest rated episodes of the series.


Throughout the entire series, there are at least eight different managers of the Scranton branch (not counting Robert California’s few seconds before he became CEO). Of the managers who were not Michael Scott, Creed was definitely my favorite:

“It’s a beautiful morning at Dunder-Mifflin, or as I like to call it, Great Bratton. Keep it running.” throws keys - Creed


Now let’s look at the entire series and identify when each manager was manager.


A good way of figuring out who was the most liked branch manager of Dunder Mifflin, Scranton, would be to take a poll asking the question: “Who was your favorite Scranton branch manager in The Office?” I would guess the favorite would turn out to be Michael. Another way to gain some insight into the likability of specific managers would be to look at the episode ratings for each episode that they were manager. This is likely flawed because 1) some characters were managers during season finales (or a series finale in Dwight’s case), and those episodes tend to rate higher than others, and 2) there is a large difference between number of episodes as manager for each character.

Either way, this method will just have to do. Using episode ratings certainly supports something that I agree with: Nellie was the worst branch manager! I am sorry, but I just wasn’t a fan of her. Also, I would say that Deangelo is rated too high on this scale, and it is probably because I classified him as manager during the episode, Goodbye, Michael.


Okay, now let’s take a look at important words in each season. One measure of how important a word may be is a simple word count, or term frequency (how frequently a word occurrs in a body of text). Another measure is something called inverse document frequency. This statistic makes very commonly used words less important and increases the importance of words that are not used very much in a collection of texts. In this case, the entire collection of text is the series, while each document or body of text is each individual season.

We can take both of these, the term frequency (tf) and the inverse document frequency (idf), and multiply them together to create the tf-idf statistic. Basically, the tf-idf statistic will identify words that are important in each individual season within the entire series. I hope that makes sense.

Even though I am not an expert on tf-idf, I needed to explain it because that is the x-axis of the next several graphics.

Here we go:

Downsizing is the talk of the town in season 1. Be sure to form an alliance with your co-workers if you don’t want to be next.

Also, there are a couple of odd words here. And there are a few odd words in pretty much every season. Where do they come from?

Here are a couple lines taken directly from the transcript data:

Oh! Welcome to my convenience store. Would you like some googi googi? I have some very delicious googi, googi, only 99 cents plus tax. Try my googi, googi. Try my googi, googi. Try my googi, googi. Try my… - Michael

Watch this. This is Moe. Nyuck-nyuck-nyuck-nyuck-nyuck. Mee! Ah, right here. Three Stooges. Oh, Pam. It’s a guy thing, Pam. I’m sort of a student of comedy. Watch this. Here we go. I’m Hitler. Adolf Hitler. - Michael

Some favorites:

And, I feel God in this Chili’s tonight. WHOOOOOOOO!!!! - Pam

Well, surely this uh, review is a formality because of what happened uh, at our meeting in the parking lot of Chili’s. - Michael

Don’t think of it that way. It’s like, urine goes all over the place. You know, there’s no controlling it. It just… goes - Michael

Makes sense:

There are five stages to grief, which are denial, anger, bargaining, depression, and acceptance. And right now, out there, they’re all denying the fact that they’re sad. And that’s hard. And it’s making them all angry. And it is my job to try to get them all the way through to acceptance. And if not acceptance, then just depression. If I can get them depressed, then I’ll have done my job. - Michael

Rabies is serious.

Michael Scott’s Dunder-Mifflin, Scranton, Meredith Palmer memorial, celebrity rabies awareness, fun run race for the cure, this is Pam. - Pam

And also there is no such thing as a rabies doctor. - Pam

Inspirational:

Finishing that 5k, was the hardest thing I have ever had to do. I ate more fettuccine alfredo and drank less water, than I have in my entire life. People always talk about triumphs of the human spirit, well today I had a triumph of the human body. That’s why everybody was applauding for me at the end. My guts and my heart, and while I eventually puked my guts out, I never puked my heart out. And I’m very, very proud of that. - Michael

So I love Willy Wonka. That golden ticket scene is so inspiring to me that that’s where I cam up with that idea. - Dwight

Now it’s kind of interesting that, from Season 6 and on, a lot of the words that are deemed important are new characters that are introduced. This makes me think that they kept adding new characters to try and keep things interesting. Not say that that is what the data is saying per se, but it’s a thought.

Recyclops destroys! - Dwight

Croak, croak, croak. Bullfrog in love. - Darryl, Kevin, Andy

It’s a Hazmat suit. That stands for hazaderous materials men’s suit wearing. If you rent more than four times a year, it just makes sense to buy. Is there anyone else here that is lice free? Excellent. Do you have your own hazmat suits?

Conclusion

That’s all for now! There is so much more that we could do here. In the future, I want to try and do some more advanced things, like a machine learning model or two. If you have specific questions that you think can be answered from the data, put them in the comments below. Thanks so much for reading!

Citation

For attribution, please cite this work as

Robbins (2020, July 30). Coding with Avery: Bears. Beats. Analyzing The Office. Retrieved from https://codingwithavery.com/posts/2020-07-30-the-office/

BibTeX citation

@misc{robbins2020bears.,
  author = {Robbins, Avery},
  title = {Coding with Avery: Bears. Beats. Analyzing The Office},
  url = {https://codingwithavery.com/posts/2020-07-30-the-office/},
  year = {2020}
}