Diving into web traffic: A 3D data visualisation experiment
I recently spent an entertaining afternoon exploring new ways to visualise our web traffic data. If you’ve ever braved the wilds of Google Analytics, you’ll know it can be like trekking through a dense forest of numbers. It’s powerful, no doubt—but not easy on the eyes. Bar charts and pie graphs can only go so far, especially when trying to communicate your findings to someone who doesn’t speak fluent “data”.
Inspired by this excellent video from a data visualiser at Uber, I set out on a mission: build a 3D visualisation that brings web traffic to life over time.
Step 1 – Wrangling the data
I began by pulling a day’s worth of pageview data from our GA4 API. It seemed straightforward—until I saw just how much traffic even a slow day could produce.
Step 2 – Cleaning house
Next, I wrote a quick script to remove any page with fewer than three views. This helped slim the dataset down to something my laptop could handle without bursting into flames.
Step 3 – Colour coding
I then mapped pageviews to a greyscale—black for low traffic, white for high. Since our homepage receives significantly more traffic than any other page, I applied a logarithmic scale to avoid ending up with one blinding white dot surrounded by a field of nearly identical greys.
Step 4 – Into the 3rd dimension
Here’s where things got a bit tricky. I needed to convert URL paths into 3D coordinates. After trialling a few methods, I landed on using UMAP with 3D embedding. This grouped similar pages near each other, which turned out to be quite useful. I then scaled and centred the coordinates around the homepage—which, in hindsight, may not have been the wisest move.
Step 5 – Plotting with Plotly
Once I had my coordinates, it was time to plot. Plotly made it relatively straightforward to turn the processed data into an interactive 3D visualisation.
Step 6 – Adding the animation
Initially, I visualised just a single day. But things got far more interesting when I expanded the project to cover a full year—animating the data so that one second of animation represented one day of pageviews.
The Results: It worked (sort of)
The UMAP clustering grouped related pages together in a surprisingly elegant way. You could see the structure of the site—sections naturally forming their own little gravitational clusters.
One moment stood out in particular: the day the website went down. The animation didn’t just show a dip—it was a dramatic drop-off, instantly recognisable.
Was it perfect? Not quite. The scaling and centring introduced a sort of shaky-camera effect that made it a bit nauseating to watch all the way through. If I’d had more time, I would have worked on stabilising the animation for a smoother viewing experience.
Final thoughts
This was a proper nerdy side quest—but one that made me rethink how we present and explore web data. Turning flat analytics into a living, breathing visualisation isn’t just fun—it’s also a brilliant way to spot patterns and anomalies you’d otherwise miss.
Next up? Holograms.