Skip to content

Instantly share code, notes, and snippets.

@ravi07bec
Created October 29, 2020 06:41
Show Gist options
  • Save ravi07bec/61b0d5d43d1922960cfe985b0b88fce7 to your computer and use it in GitHub Desktop.
Save ravi07bec/61b0d5d43d1922960cfe985b0b88fce7 to your computer and use it in GitHub Desktop.
from pytrends.request import TrendReq
url="https://trends.google.com/trends/explore?date=today%205-y&geo=US&q=dumbbells"
pytrends.build_payload(kw_list, cat=0, timeframe='today 5-y', geo='US', gprop='')
gtrends=pytrends.interest_over_time().reset_index()
test=px.scatter(gtrends,x='date',y=filters3,height=450,title="""<a href="{}">{}</a>""".format(url,filters3+":Google Searches-5 Years"))
test.update_traces(mode='lines+markers')
test.update_layout({
'plot_bgcolor': 'rgba(0, 0, 0, 0)',
'paper_bgcolor': 'rgba(0, 0, 0, 0)',
})
a1=[dcc.Graph(figure=test,config={'displayModeBar': False})]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment