Python coded project for use with a Google Trends Extended for Health API key to conduct multiple sampling of all GT API calls on Windows and MacOS
If you would like to run this tool on Windows or Mac operating systems, please run Google Trends Data Extraction Tool.exe in the Google Trends Data Extraction Tool folder.
To run the source code, please run main.py in this folder.
Code files include: main.py, createURL.py, inputarea.py, getinput.py, specification_sheet.py
-
How to use Please select and enter in sequence after opening the tool. Except for Search Domian and Category, the rest are required. Please ensure that no red statements appear in Messages, otherwise you will not be able to run this tool.
-
API Key Please select a TXT file containing a valid API Key. The API Key must be authorized, otherwise you cannot access the data.
-
Target Directory Select or create a save path according to your preference. The output file will be saved in the path you selected. Please ensure that your path name is not too long, otherwise it will cause the program to crash.
-
Specification This tool provides a service for saving the current specification. You can save the current specification in a JSON file wherever you prefer. When you would like to perform the same operation next time, you can click Load Specification, find the JSON you saved last time and load it.
-
Samples Samples Value = one sample of the original terms + the number of re-samples Multiple sampling cannot change the specification.
-
Queries One ROW of input content is one query, and you can enter up to 5 terms in one query. You can have the program automatically perform queries for you up to five times, that is, you can enter 5 ROWS of content, and the program will automatically perform five queries for you in the order of the rows. Queries are automatically executed and the specifications cannot be changed, but the terms can be different. Please note: If you select Graph Averages as the API Method, please enter more than two terms; if you see that the input box is blocked, it means that you only need to enter one term.
-
Quotas Quotas helps you track the quota of request data that has been used today. Queries used this session = Number of rows with content * Number of Samples
-
If you need to repackage the executable file, enter the current folder in the terminal and perform the following operations: pyinstaller --onefile --windowed --add-data "about.ui;." --add-data "category.ui;." --add-data "CR.xlsx;." --add-data "mainwindow.ui;." --add-data "quotas.json;." --add-data "resource.qrc;." --add-data "popupWindows/error_popup_400.ui;." --add-data "popupWindows/error_popup_403.ui;." --add-data "popupWindows/error_popup_429.ui;." --add-data "popupWindows/other_error_popup.ui;." --add-data "popupWindows/url_empty_popup.ui;." main.py
-
For more help please contact the developer