Analyzing 911 phone call seasonality

As the saying goes, history repeats itself. Understanding these patterns helps us make smarter and more prepared decisions. The challenge is separating the pattern from the noise surrounding it. We can use the Fourier transform, commonly used by engineers, to accomplish exactly that—separate signal from noise.Today, let’s analyze 911 phone call data from Montgomery County, PA. We’re looking to answer whether there are higher or lower levels of 911 calls during:

  • Certain hours of the day?Certain days of the week?Certain months of the year?

Based on the results, we can make decisions on how to staff our 911 call center. For example, if we find that call volume is highest on Friday evenings, we can offer more shifts on Friday evenings so our call center can handle the higher call volume.

What does the Fourier transform do?

The Fourier transform allows you to transform a function of time and signal into a function of frequency and power. This tells you what frequencies make up your signal and how strong they are. In our case, the signal is the number of phone calls and we might be expecting some kind of weekly or daily frequencies.

On the left, we graphed the sum of two sin waves, one with a period of 5 and frequency of 1/5=0.2 and the other with a frequency of 1/10=0.1. In the Fourier transform, we can clearly see that we have two waves with frequencies of 0.2 and 0.1 by looking at the frequencies corresponding to the peaks.

Real data often contains noise and the Fourier transform lets us see through the noise, and see which frequencies actually matter.

We took the signal from before and added random noise, and we can still clearly see the same frequencies of the signal in the Fourier transform. This is how the Fourier transform separates signal from noise.

This article won’t delve into the mathematics and derivation of Fourier transform here. If you’re interested, I recommend watching 3Blue1Brown’s Visual Introduction to the Fourier Transform after completing this exercise. I recommend doing this exercise first because Fourier Transforms are one of those concepts where starting with a practical example will help you appreciate the mathematics behind it.

#python #programming #data-science #scipy

Analyzing Seasonality with Fourier Transforms using Python & SciPy
3.80 GEEK