Working With Time Series Data That Has Missing Values And Irregular Intervals
I spent three days debugging a growth curve model last month because the timestamp column had timezone mismatches between the source feeds. One dataset was UTC, another was EST, and I didn't notice until the inflection points were shifted by five hours. Once I normalized everything to a single epoch format the model produced something that actually looked right. The core problem is simple enough. You have a series of measurements over time and you want to understand how something changed between two points. In Bieber's case the measurements are publicly available metrics — YouTube views, Spotify streams, social media followers — collected at irregular intervals. You can't just take a simple average or a linear regression and call it a day. The data has gaps, outliers, and different scales across platforms. Here's what I do. First, I align all the sources to the same date range and resample to a consistent cadence, usually weekly. Weekly is the sweet spot for pop culture data. Daily is too noisy, monthly loses too much resolution. Then I fill gaps using linear interpolation for short spans under three weeks, and forward-fill for anything longer. I mark interpolated segments clearly so they don't get treated as real observations later.
For the actual growth calculation I use a log-transformed difference. Raw follower counts are misleading because they compound. Going from 1 million to 2 million is a 100% jump, but going from 50 million to 51 million is only 2%. Log transforms flatten that scale and make rate comparisons fair. I compute week-over-week log changes and then smooth them with a 12-week moving average. That removes the viral spike noise without flattening real trends. The tricky part is defining when fame actually starts. Most datasets begin tracking when the artist already has a presence, not from zero. I usually anchor my timeline to the first data point that exceeds a minimum threshold — for Bieber that's roughly 10,000 YouTube subscribers in late 2008. Anything before that is background noise and doesn't factor into the growth calculation. This anchor point matters more than people realize. Pick too early and you dilute the curve. Pick too late and you miss the acceleration phase. I also separate organic growth from event-driven spikes. A single TV appearance or award show can inflate metrics by 300% in one week. If you don't flag those, they distort your baseline growth rate. I use a simple rule: any week where the metric exceeds three standard deviations above the trailing 12-week mean gets marked as an event spike and excluded from the trend calculation. The spike still exists in the raw data, it's just not treated as part of the underlying trajectory.
One edge case that bites everyone. When an artist goes quiet for six months and then returns, the growth rate looks devastatingly negative. But that's not decline, it's absence. I handle this by capping negative growth at zero during known hiatus periods. For Bieber that was roughly 2015 to early 2020 when he stepped back from releasing music. The algorithm should know when an artist is inactive and not punish the growth curve for it. The final output is a single normalized growth index starting at 1.0 at the anchor date and compounding from there. It's easier to compare across artists this way than wrestling with raw numbers that mean nothing outside their own context. A growth index of 47 means the metric has compounded 47 times its starting value, regardless of whether that started at 5,000 or 5,000,000. This approach isn't perfect. The interpolation fills create a false sense of precision. The event spike detection sometimes misses slower burns that build over several weeks rather than hitting in one week. And the anchor point selection is subjective — two researchers analyzing the same data might pick different start dates and get different results. I've seen the same analysis produce growth indices that vary by 15% depending entirely on where someone decided the timeline begins. That's a limitation worth noting rather than hiding.
Get the Full Details

If you need something faster for rough comparisons, a simple exponential fit on the logged data gets you 80% of the way there in about ten minutes. The full pipeline I described takes maybe forty-five minutes once you've built the preprocessing scripts, but it pays off when you're comparing multiple artists across different eras and the details matter.