Breakups and Google Trends Search Data

Case of the Monday Blues? Interest in breaking up peaks at the end of weekend.

Photo by Elizabeth Tsung on Unsplash

Ever have a bad weekend? Did it lead to you wanting to leave your relationship? Why aren’t people sleeping at 2–4 AM Monday?

According to Google Trends data, the relative interest in breaking up peaks at 3 AM Monday in the US. As if the Monday Blues weren’t already blue enough!

Visualization by Shelby Temple; Data Source Google Trends; Made with PyTrends and Tableau

There is a Cyclical Nature to Breakups

“What rises twice a year, once in Easter and then two weeks before Christmas, has a mini peak every Monday and then flattens out over the summer?”

David McCandless asked this question to his audience during his TED talk, The Beauty of Data Visualization.

The answer was peak break up times according to Facebook status updates.

According to 10,000 scraped Facebook statuses they found there is a clearing out for Spring Break and a second breakup peak leading up to the Winter holidays. Another pattern that emerged was a cyclical spike every Monday.

Inspired by this, I decided to use Google Trends data to explore what day and time people are searching for details on breaking up.

Google Trends

We live in a wonderful new age where we no longer have to solely rely on data sets created from surveys. We can now measure the behavior of people by watching what they do on the internet.

Google Trends is a great public tool to see what people are doing on the internet. On the Google Trends website, you can measure interest on a search topic over time or by geography. You can also compare up to five different search topics.

However, there is a key nuance to this data. It is not measuring the overall query volume. It is measuring the normalized, relative share of Google searches on a topic compared to all other searches for that time and place. For more details on how this data is collected, manipulated, and interpreted here are two useful links:

What is Google Trends data — and what does it mean?

How Trends Data is Adjusted

PyTrends

Brought to you by General Mills, (that’s right — the same people who brought you Cheerios and Lucky Charms) PyTrends is an unofficial Pseudo API package in Python that makes it easy to create magnificent new Google Trend data sets and pull them straight into a table.

“Unofficial-Sumo-API-what-now?” No need to worry, I will break this down.

Two of the most exciting ways to get data off the internet is through web scraping or web APIs. APIs have a broader definition, but for this article let’s define them as: An intended way for data to be pushed or pulled the same way you can browse the internet.

Web APIs are always the preferred method, as they are designed to push the data to you off a call. They have tons of documentation and updates on any changes.

Web scraping is essentially when there should be an API but the company doesn’t want to build it out. You pull the data right out of the html code that is sent to the web browser. This is less preferred, because if the website changes the web scraping code can easily break and you won’t know why. Web scraping is an unintended way of getting the data. Websites are not built with this in mind.

Apparently, Marissa Mayer and Google did intend to build an API for Trends in 2007 — but clearly, “coming soon” means “never” in this context.

PyTrends is unofficial. Meaning that it is not endorsed by Google. It’s a Pseudo API, meaning it behaves to us exactly like an API Python package would, however it is actually web scraping under the hood.

Here is the link, if you are interested in using or learning more about the package:

General Mills PyTrends GitHub

Check it out! With six lines of code, I am creating a Google Trend data set for all of 2017 on searches containing “How to Breakup” by day and hour.