TrueInsight/Google-Trends-Extraction-Tool: Version 2.2.0
TrueInsight · Zenodo (CERN European Organization for Nuclear Research) · 2020
December 2020 Changes: Google tweaked the API, breaking the JSON parsing. I incorporated Daniel Ferry's JSON parser (details in Table 2) to make it more robust against this type of event in the future. The parser made some of my manual parsing code redundant, although that is still included, but commented out. The parser now handles all of the JSON strings returned for all the API calls, and then my reporting code takes the result from there. Modified fGenerateSuggestedName by adding an "If bShowCompletionMsgBoxes Then _" statement so that shortening the name under which the output file will be saved will not generate a message when the process is being automated across multiple runs. Modified fGetLogFile by adding an "If bShowCompletionMsgBoxes Then _" statement so that errors in writing to the log file will not generate a message when the process is being automated across multiple runs. Imported the late Chip Pearson's modArraySupport module (details in Table 2) and replaced most instances of Application.Transpose with his TransposeArray and a modified Range.Resize statement, due to problems with Application.Transpose. Changes which only apply to my own testing (i.e., if not bProductionVersion then…): Updated the fWriteToFile procedure so that, when logging json strings returned from the API using my multiple sampling strategy, each new returned string is appended to the existing file, instead of only the first string (which contains values for all dates under my implementation). Technically, this means the json can be imported anywhere else and all the samples reconstituted. Added a line of code to append each query string for each sample to an output file (only in my own testing, i.e., if not bProductionVersion then…). Each query can be used in a browser as a URL. Note that the query strings contain the API account key! Bug fixes: Corrected a bug in the updating of the queries used per session for Google Trends Extended for Health queries Google Trends Data Extraction Tool Help File.docx Source Code v2.2.0.zip