-
Notifications
You must be signed in to change notification settings - Fork 112
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
Code for Scotland, England and N. Ireland #213
Comments
Hi, I would like reiterate that I am also very interested in a solution to this problem that genann has brought up - In addition to Scotland, England and N. Ireland, there is also no category for Wales. It would be extremely useful if this could be resolved! It seems that the appropriate country codes would be as follows (based on the URLS in the Google Trends website) but they can't be found in data(countries). England = 'GB-ENG' Many thanks for your help! |
Do you have a downloadable data source we can use to populate our database of valid codes? |
Hi it is possible to go manually to the trends website since it is only for
four more codes that we are interested in.
I have it here for you.
[image: Inline image 1]
Hope this helps. Thanks.
…On Tue, Nov 14, 2017 at 6:10 PM, Philippe Massicotte < ***@***.***> wrote:
Do you have a downloadable data source we can use to populate our database
of valid codes?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#213 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AcfNdj3fH_vKTGQcZrSamdRnuAWdGSGQks5s2dengaJpZM4Ofgel>
.
|
England = 'GB-ENG' |
We need a source to do it programatically (i.e. with code). |
Hi PMassicotte, What specific information do you need in the downloadable data source? Thank you! |
@CharlotteWoolley We need a file that ideally contains all codes. So we can parse it and add the information inside the package. Obviously, the source we are using at this time is missing some country codes. |
@PMassicotte I think I have managed to find a suitable data source - https://github.com/olahol/iso-3166-2.json/blob/master/data/eQuest.csv This contains all the iso-3166-2 codes for each country, province and county/state. It contains province codes for England. Scotland, Wales, NI, the isle of man and the Channel islands, so is very inclusive and seems to be accurate from some quick investigations. If you need any more info, let me know! Thanks! |
Thank you!
It has the relevant codes and much more!
On 23 Nov 2017, at 14:50, Charlotte Woolley <notifications@github.com<mailto:notifications@github.com>> wrote:
@PMassicotte<https://github.com/pmassicotte> I think I have managed to find a suitable data source -
https://github.com/olahol/iso-3166-2.json/blob/master/data/eQuest.csv
This contains all the iso-3166-2 codes for each country, province and county/state.
It contains province codes for England. Scotland, Wales, NI, the isle of man and the Channel islands, so is very inclusive and seems to be accurate from some quick investigations.
If you need any more info, let me know!
Thanks!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub<#213 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AecfiYJFhc5A8WJWH1bjAscOgdtFhygiks5s5XgUgaJpZM4Ofgel>.
|
Thank you @CharlotteWoolley I will try to do it this week. |
I have found an update to the list we are using However, the missing codes you are looking for are not present. In our list, we have 92821 entries compared to only 4k in your list. |
Hi @PMassicotte, Sorry for my delay replying to this - I have been working on joining the 2 data sources together and removing any formatting problems. I think I now have a data source which you will be able to use - https://github.com/CharlotteWoolley/Comprehensive_ISO_Location_Codes/blob/master/ISO_codes.csv This contains more codes - 122635 and joins the data from the source that you normally use to the codes that I would like to add. E.g. The data source now has all the states of the US included and all of the principalities of the UK that myself and @genann86 would like. Please would you be able to have a look and see if this is a more suitable data source? Thanks! |
@CharlotteWoolley Is you list also contains our codes? Can you compare it and see if we have codes you do not have? |
Hi I believe it now contains everything from the old list and then added some more to it.
On 29 Nov 2017, at 17:17, Philippe Massicotte <notifications@github.com<mailto:notifications@github.com>> wrote:
@CharlotteWoolley<https://github.com/charlottewoolley> Is you list also contains our codes? Can you compare it and see if we have codes you do not have?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#213 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AecfiRi4kEyMQbIsdMd2gPAMdfOXp_V8ks5s7YN_gaJpZM4Ofgel>.
|
@PMassicotte yes it does - It joins all of your codes together with my codes. Using the following code returns 89953 (the same length as the gtrendsR countries dataset), so all of your codes are definitely contained - library(gtrendsR) The only differences are the number of codes and the names column of the countries - I capitalised all of the names and removed full stops to make it easier to remove duplicates after joining the data together. If you would like to explicitly see how I have joined them together my code is here: https://github.com/CharlotteWoolley/Comprehensive_ISO_Location_Codes/blob/master/get_ISO_codes.R Thanks! |
@CharlotteWoolley Good. I will try to update it today. |
Thank you very much.
On 19 Dec 2017, at 01:15, Philippe Massicotte <notifications@github.com<mailto:notifications@github.com>> wrote:
It should be working now.
library(gtrendsR)
plot(gtrends("pizza", geo = "GB-ENG"))
[https://camo.githubusercontent.com/2d6eaee59e4db921cfef02c18756d5ba21f180e1/68747470733a2f2f692e696d6775722e636f6d2f415251633154472e706e67]<https://camo.githubusercontent.com/2d6eaee59e4db921cfef02c18756d5ba21f180e1/68747470733a2f2f692e696d6775722e636f6d2f415251633154472e706e67>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#213 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AecfiXHeWskS7--7MOnmTYfjAKXjuJJYks5tBqvQgaJpZM4Ofgel>.
|
Thank you! 👍 |
Hi! Unfortunately for me it still doesn't work. I still receive the same error message for |
Yes @PMassicotte, I have been away for 2 weeks so haven't been able to test this but I am also having the same problem. The country codes don't seem to have changed at all, despite having tried updating the package, re-installing the package etc etc. Thanks, Charlotte |
Have you installed the dev version? |
I have tried several ways to do that, and at first I would still get the same error, but after the third attempt gtrends stopped working for me completely. Now I get this message: "Error in hl %in% language_codes$code : |
Try to re-install the dev version. Package installation can be corrupted times to times. |
Thanks yes, it is now working! |
British codes are working now, but the american ones stopped working :( |
Should be working now. We have also added a new parameter to include low search volume. |
Hi I am writing to check if the new version has the same problem the old version had of missing the country codes for England, Scotland and Northern Ireland. I cannot seem to find it in the data(countries) file.
It can be done on the google page-->
For example:
https://trends.google.com/trends/explore?date=2009-01-01%202015-12-31&geo=GB-ENG&q=apple
Thanks again for your kind help!
The text was updated successfully, but these errors were encountered: