Analyzing the performance of related queries over time
After capturing more information about the context, we can track the evolution of these queries over time. This could provide us with valuable information about local trends that have been rising in importance under our radar. We will do so using the following steps:
- We will select the rising queries related to bitcoin in the US:
query_data = d_full[(d_full['source_query']=='bitcoin' )&(d_full['type']=='rising')&(d_full['geo']=='US')]
query_data.head()
This results in the following output:
Figure 3.18: Rising queries related to bitcoin in the US
- We will use the top five resulting queries to track their performance in the last 12 months:
kw_list = query_data.head()['query'].tolist() # list of keywords to get data
# build payload
pytrend.build_payload(kw_list, cat=0, timeframe='today 12-m')
# Interest over...