PMassicotte / gtrendsR

R functions to perform and display Google Trends queries
352 stars 112 forks source link

Data by Canadian cities #461

Open liliagarciamanrique opened 2 months ago

liliagarciamanrique commented 2 months ago

I have been trying to get searches by Canadian cities using the CMA (Census Metropolitan Area) code.

I have also been trying to get results by writing the city's name, but it doesn't work. Here is my code:

res <- gtrends(c("EV"), geo = c("CA-AB-825"), time = "2018-01-01 2024-05-05" ) I keep getting the same if I use "CA-AB-Calgary Error in get_widget(comparison_item, category, gprop, hl, cookie_url, : widget$status_code == 200 is not TRUE

If I look at the results in Google Trends, I see 23 cities displaying results that don't follow a CMA geography. And I can't find a DMA for Canada.

Is there a way to get results from Canadian cities?

PMassicotte commented 2 months ago

If you download the data directly from the website, do you have the data you are looking for?

liliagarciamanrique commented 2 months ago

No, I only get trends for the province (Alberta). And I do get the information that $interst_by_city captures.

Will this mean I can retrieve no more detailed information (as in the US)?

PMassicotte commented 2 months ago

I am afraid, if the official tool is not providing such data, we can not either :)