Search code examples
rfipscountry-codesgoogle-trends

What do gtrendsR statistical areas correlate with?


I am downloading data from google trends using R. Using this code

library(gtrendsR)
data(countries)

city_code <- function(geo){
  codes <- unique(countries$sub_code[substr(countries$sub_code, 1,5) == geo])
  if(length(codes) > 1){
    countries[countries$sub_code %in% codes[2:length(codes)], 2:3]
  } else{
    message('No city code for this geo')
  }
}

I am able to identify 212 statistical areas in the United States. By state, it looks something like this

https://i.sstatic.net/diCju.jpg

My issue is that I don't understand what these statistical areas are correlated too. They seem to most resemble "combined statistical areas" but sometimes they are metropolitan statistical areas. The main issue is I don't know where they get "US-AL-606" as the code for Dothan Alabama. It captures Dothan Alabama from google trends but I can't find anything online that makes use of the same coding scheme were Dothan Alabama = "US-AL-606."

Does anybody have experience with this or know what direction to point me in? I want to be able to map this information to their corresponding counties at some point


Solution

  • These are the Nielsen Direct Marketing Areas (DMAs). They correspond to areas where people receive similar television and radio offerings.