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

Do not validate the geo code on our side. Closes #377. Closes #364. C… #390

Merged
merged 2 commits into from
Apr 19, 2021

Conversation

PMassicotte
Copy link
Owner

@PMassicotte PMassicotte commented Apr 18, 2021

It is very difficult to obtain a curated list of the full Google geo codes. I suggest using a simple regex to parse the geo code to check if the structure is valid. If the user uses an invalid scheme code, gtrends() will simply return an error.

@PMassicotte
Copy link
Owner Author

Are you good with that @eddelbuettel ?

@eddelbuettel
Copy link
Collaborator

Kinda sorta yes. It's a tricky question: not checking is bad, checking with a reg.exp may not catch all. Probably best to proceed.

@PMassicotte
Copy link
Owner Author

Meanwhile, I will continue the quest to find an "official" list or maybe find a way to use a GET to test the code before the actual query.

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

Successfully merging this pull request may close these issues.

2 participants