Skip to content

Case study

Google Trends state map

Pulls Google Trends data and renders state-level maps of the United States for two periods, so the change between them reads at a glance instead of from a table.

Overview

The client wanted to show how interest in a subject shifted across the United States between two periods, and wanted it as a map rather than a chart, because a map makes a regional pattern obvious in a way a table never does.

Two comparable choropleths, plus the code that produced them, so the client could rerun it for other terms.

What I own

Data collection, normalisation and the visualisation.

Complexities tackled

Trends data is relative, which makes two maps hard to compare. The source returns interest scaled within whatever query it was asked, not as an absolute count. Two maps built independently are drawn on two different scales and cannot be honestly placed side by side. Making the comparison valid means fixing the scale across both rather than letting each one normalise itself.

The deliverable was the code, not the picture. The brief asked for both, which is the right instinct: a static image answers one question, and the client had more than one question.

Stack

Python, Pandas for shaping the data, Matplotlib for the maps.

Working on something similar?

Tell me what you are building and what is in the way. I will tell you honestly whether I am the right person for it.

Start a conversation

Last updated: