![]() ![]() In this paper, we examine how data extracted from the Google Places API and Google Trends can be used to develop high frequency indicators aligned to the statistical concepts, classifications, and definitions used in producing official measures. The views expressed in IMF Working Papers are those of the author(s) and do not necessarily represent the views of the IMF, its Executive Board, or IMF management.Īs the pandemic heigthened policymakers’ demand for more frequent and timely indicators to assess economic activities, traditional data collection and compilation methods to produce official indicators are falling short-triggering stronger interest in real time data to provide early signals of turning points in economic activity. Explore available widgets for keywords and get all available stats for itĬomparisonItems: *gogtrends.Disclaimer: IMF Working Papers describe research in progress by the author(s) and are published to elicit comments and to encourage debate. Realtime, err := gogtrends.Realtime(ctx, "EN", "US", "all") Get available trends categories and realtime trends Daily trendsĭailySearches, err := gogtrends.Daily(ctx, "EN", "US") Working detailed examples for all methods and cases can be found in example folder. Widget - ExploreWidget struct, specific for every method, can be received by Explore method. Loc - string, uppercase location (geo) country code, example "US" - United StatesĬat - string, lowercase category for real time trends, example "all" - all categoriesĮxploreReq - ExploreRequest struct, represents search or comparison items. Called once, then returned from cache.ĮxploreLocations(ctx context.Context) (*ExploreLocTree, error) - tree of locations for explore and comparison. TrendsCategories() mapstring - available categories for Realtime trends.ĮxploreCategories(ctx context.Context) (*ExploreCatTree, error) - tree of categories for explore and comparison. Related(ctx context.Context, w *ExploreWidget, hl string) (*RankedKeyword, error) - related topics or queries, supports two types of widgets. InterestByLocation(ctx context.Context, w *ExploreWidget, hl string) (*GeoMap, error) - interest by location, list for map with geo codes and interest values. InterestOverTime(ctx context.Context, w *ExploreWidget, hl string) (*Timeline, error) - interest over time, dots for chart. Every widget is related to specific method ( InterestOverTime, InterestByLocation, Related) and contains required token and request information. Search(ctx context.Context, word, hl string) (*KeywordTopic, error) - Words/Topics related (5 results max) with your search.Įxplore(ctx context.Context, r *ExploreRequest, hl string) (*ExploreWidget, error) - widgets with tokens. Realtime(ctx context.Context, hl, loc, cat string) (*TrendingStory, error) - represents realtime trends with included articles and sources. Available methodsĭaily(ctx context.Context, hl, loc string) (*TrendingSearch, error) - daily trends descending ordered by days and articles corresponding to it. Please notice, when you call Explore method for keywords comparison, two first widgets would be for all of compared items, next widgets would be for each of individual items. It supports search by multiple categories and locations which you can get as tree structure by ExploreCategories and ExploreLocations. Please take a look at ExploreRequest input. Widget includes request params and unique token for every method.Īlso Explore method supports single and multiple items for comparision. To get widget you should call Explore methods first, it will return constant list of available widgets, every widget corresponds to methods above. Please notice that Realtime trends are available only for limited list of locations.įor InterestOverTime, InterestByLocation and Related - widget and user interface language are required. For Realtime trends category is required param, list of available categories - TrendsCategories. For both methods user interface language are required. To see request-response details use gogtrends.Debug(true) Usageĭaily and Realtime trends used as it is. Gogtrends is API wrapper which allows to get reports from Google Trends.Īll contributions, updates and issues are warmly welcome. ![]()
0 Comments
Leave a Reply. |