Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interest by city : include low search volume regions #229

Closed
genann86 opened this issue Sep 26, 2017 · 15 comments
Closed

interest by city : include low search volume regions #229

genann86 opened this issue Sep 26, 2017 · 15 comments

Comments

@genann86
Copy link

Hi there is an option to click to include low search volume regions in the interest by city breakdown. Is that possible with the syntax for gtrendsR?

@PMassicotte
Copy link
Owner

Can you send us an example from Google Trend website?

@genann86
Copy link
Author

In the link below, you will see a box you can check under the section interest by city that expands the list of cities given when you check as opposed to when you don't. I was wondering how I could get the expanded list with the syntax of gtrendsR.
Thank you.
https://trends.google.co.uk/trends/explore?date=2010-01-01%202010-12-31&geo=GB-ENG&q=apple%20pie

@ssinghnorthstarhub
Copy link

So i am using the following code : gtrendsR::gtrends("Pizza hut" ,geo = "GB",time = "all" )

There is an option on the Google trends page to "include low search volume regions" when looking at cities. When you click on that it show 110 cities.

@ssinghnorthstarhub
Copy link

So i am using the following code : gtrendsR::gtrends("Pizza hut" ,geo = "GB",time = "all" )

There is an option on the Google trends page to "include low search volume regions" when looking at cities. When you click on that it show 110 cities.

@PMassicotte
Copy link
Owner

PMassicotte commented Dec 22, 2017

@genann86 @ssinghnorthstarhub Can you try this branch and see if it works as intended.

https://github.com/PMassicotte/gtrendsR/tree/low-search-volume

@ssinghnorthstarhub
Copy link

Sure - Trying it out now.

@ssinghnorthstarhub
Copy link

I don't know if i am doing this wrong but I've triad to load the Zip into r study with no luck. Any tips on how to load this version into R ? Thanks

@PMassicotte
Copy link
Owner

devtools::install_github("PMassicotte/gtrendsR", branch = "low-search-volume")

@ssinghnorthstarhub
Copy link

So I managed to install it - thanks for the heads up - but the following logic below results to NULL
gtrendsR::gtrends("Dominos Pizza" ,geo = "GB",time = "all" )$interest_by_city

Interest over time does works
gtrendsR::gtrends("Dominos Pizza" ,geo = "GB",time = "all" )$interest_over_time

@PMassicotte
Copy link
Owner

PMassicotte commented Dec 22, 2017

For me it works

> gtrendsR::gtrends("Dominos Pizza" ,geo = "GB",time = "all" )$interest_by_city
              location hits       keyword geo gprop
1           Portsmouth  100 Dominos Pizza  GB   web
2            Guildford   84 Dominos Pizza  GB   web
3          Southampton   84 Dominos Pizza  GB   web
4              Reading   82 Dominos Pizza  GB   web
5                Luton   81 Dominos Pizza  GB   web
6              Croydon   80 Dominos Pizza  GB   web
7               Oxford   79 Dominos Pizza  GB   web
8             Brighton   78 Dominos Pizza  GB   web
9              Bristol   76 Dominos Pizza  GB   web
10             Cardiff   75 Dominos Pizza  GB   web
11         Northampton   74 Dominos Pizza  GB   web
12           Brentford   73 Dominos Pizza  GB   web
13            Plymouth   72 Dominos Pizza  GB   web
14       Milton Keynes   71 Dominos Pizza  GB   web
15            Aberdeen   69 Dominos Pizza  GB   web
16          Nottingham   68 Dominos Pizza  GB   web
17       Thames Ditton   67 Dominos Pizza  GB   web
18             Belfast   64 Dominos Pizza  GB   web
19           Leicester   63 Dominos Pizza  GB   web
20              London   62 Dominos Pizza  GB   web
21           Liverpool   59 Dominos Pizza  GB   web
22             Glasgow   59 Dominos Pizza  GB   web
23           Cambridge   58 Dominos Pizza  GB   web
24          Birmingham   58 Dominos Pizza  GB   web
25           Edinburgh   58 Dominos Pizza  GB   web
26          Manchester   55 Dominos Pizza  GB   web
27               Leeds   51 Dominos Pizza  GB   web
28 Newcastle upon Tyne   51 Dominos Pizza  GB   web
29           Sheffield   48 Dominos Pizza  GB   web
30             Norwich   46 Dominos Pizza  GB   web
> gtrendsR::gtrends("Dominos Pizza" ,geo = "GB",time = "all", low_search_volume = TRUE)$interest_by_city
              location hits       keyword geo gprop
1              Swansea  100 Dominos Pizza  GB   web
2           Portsmouth   96 Dominos Pizza  GB   web
3             Dartford   95 Dominos Pizza  GB   web
4            Guildford   90 Dominos Pizza  GB   web
5           Colchester   85 Dominos Pizza  GB   web
6            Stevenage   84 Dominos Pizza  GB   web
7          Southampton   83 Dominos Pizza  GB   web
8               Dundee   83 Dominos Pizza  GB   web
9              Crawley   83 Dominos Pizza  GB   web
10             Reading   83 Dominos Pizza  GB   web
11             Bromley   83 Dominos Pizza  GB   web
12     Hemel Hempstead   82 Dominos Pizza  GB   web
13             Wembley   82 Dominos Pizza  GB   web
14               Luton   79 Dominos Pizza  GB   web
15          Canterbury   79 Dominos Pizza  GB   web
16             Nazeing   79 Dominos Pizza  GB   web
17         Northampton   77 Dominos Pizza  GB   web
18              Slough   77 Dominos Pizza  GB   web
19     Southend-on-Sea   76 Dominos Pizza  GB   web
20              Oxford   76 Dominos Pizza  GB   web
21            Brighton   76 Dominos Pizza  GB   web
22            Basildon   75 Dominos Pizza  GB   web
23             Bristol   75 Dominos Pizza  GB   web
24            Coventry   74 Dominos Pizza  GB   web
25             Ipswich   74 Dominos Pizza  GB   web
26         Bournemouth   74 Dominos Pizza  GB   web
27             Swindon   74 Dominos Pizza  GB   web
28          Teddington   73 Dominos Pizza  GB   web
29           Brentford   73 Dominos Pizza  GB   web
30         Basingstoke   72 Dominos Pizza  GB   web
31            Plymouth   72 Dominos Pizza  GB   web
32       Milton Keynes   71 Dominos Pizza  GB   web
33               Poole   71 Dominos Pizza  GB   web
34             Cardiff   71 Dominos Pizza  GB   web
35             Watford   70 Dominos Pizza  GB   web
36             Croydon   70 Dominos Pizza  GB   web
37            Aberdeen   69 Dominos Pizza  GB   web
38              Sutton   68 Dominos Pizza  GB   web
39          Nottingham   67 Dominos Pizza  GB   web
40              Ilford   67 Dominos Pizza  GB   web
41       Thames Ditton   66 Dominos Pizza  GB   web
42             Belfast   66 Dominos Pizza  GB   web
43           Leicester   64 Dominos Pizza  GB   web
44               Derby   64 Dominos Pizza  GB   web
45          Gloucester   64 Dominos Pizza  GB   web
46           Halesowen   62 Dominos Pizza  GB   web
47      Stoke-on-Trent   62 Dominos Pizza  GB   web
48            Chagford   61 Dominos Pizza  GB   web
49             Glasgow   60 Dominos Pizza  GB   web
50              London   59 Dominos Pizza  GB   web
51       Wolverhampton   59 Dominos Pizza  GB   web
52          Birmingham   57 Dominos Pizza  GB   web
53        Peterborough   56 Dominos Pizza  GB   web
54           Edinburgh   56 Dominos Pizza  GB   web
55           Liverpool   56 Dominos Pizza  GB   web
56             Walsall   56 Dominos Pizza  GB   web
57           Bletchley   55 Dominos Pizza  GB   web
58         Farnborough   55 Dominos Pizza  GB   web
59          Manchester   55 Dominos Pizza  GB   web
60             Burnham   53 Dominos Pizza  GB   web
61           Cambridge   53 Dominos Pizza  GB   web
62 Newcastle upon Tyne   52 Dominos Pizza  GB   web
63                York   52 Dominos Pizza  GB   web
64              Bolton   51 Dominos Pizza  GB   web
65               Leeds   51 Dominos Pizza  GB   web
66             Preston   50 Dominos Pizza  GB   web
67           Sheffield   49 Dominos Pizza  GB   web
68             Norwich   46 Dominos Pizza  GB   web
69            Bradford   40 Dominos Pizza  GB   web
70                Hull   31 Dominos Pizza  GB   web

@ssinghnorthstarhub
Copy link

****hummmm... trying to figure out what the issue can be. So when installing the package - "low search volume" - I the message below. It does not seem to flag anything to be out of line. Could it be the version of R i am using - 3.4 64x on R studio ?

So when running the two functions as you noted above i get the following error messages:

gtrendsR::gtrends("Dominos Pizza" ,geo = "GB",time = "all" )$interest_by_city
NULL
gtrendsR::gtrends("Dominos Pizza" ,geo = "GB",time = "all", low_search_volume = TRUE)$interest_by_city
Error in gtrendsR::gtrends("Dominos Pizza", geo = "GB", time = "all", :
unused argument (low_search_volume = TRUE)

*********************** when installing the package ************************

devtools::install_github("PMassicotte/gtrendsR", force=TRUE, branch = "low-search-volume")
Downloading GitHub repo PMassicotte/gtrendsR@master
from URL https://api.github.com/repos/PMassicotte/gtrendsR/zipball/master
Installing gtrendsR
"C:/PROGRA1/R/R-341.0/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL
"C:/Users/SSingh/AppData/Local/Temp/RtmpSaSVsZ/devtools29645b4432d6/PMassicotte-gtrendsR-a35e084"
--library="C:/Users/SSingh/Documents/R/win-library/3.4" --install-tests

  • installing source package 'gtrendsR' ...
    ** R
    ** data
    *** moving datasets to lazyload DB
    ** inst
    ** preparing package for lazy loading
    ** help
    *** installing help indices
    ** building package indices
    ** testing if installed package can be loaded
    *** arch - i386
    *** arch - x64
  • DONE (gtrendsR)

@ssinghnorthstarhub
Copy link

I just tried it on another machine and I get the same result. Also, I noted that the "low_search_volume " does not show up in the intellisense for the function.

@ssinghnorthstarhub
Copy link

I've also noted the following when running the function:

$interest_by_region
NULL

$interest_by_dma
NULL

$interest_by_city
NULL

@PMassicotte
Copy link
Owner

This means that the package is not installed correctly. Maybe try to remove the package and re-install it.

@ssinghnorthstarhub
Copy link

Thanks. I've just finished doing that. I've tried to use R (without using the R studio program) and no luck. I've also tried uninstalling it then reinstalling it. Tired it on 3 other computers as well and still getting the same result.

The timeline is really coming through, but the regional and city data isn't. I'm going to watch this thread and see if anyone else has this problem in the new year - last working day of the year - but I will resume solving this in the new year .

Many thanks,
Happy holidays/ merry Christmas!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants