以下の内容はhttps://px-wing.hatenablog.com/entry/2021/02/09/065211より取得しました。


JupyterLabでpytrendsを利用してトレンド情報を取得する

参考ページ

https://pypi.org/project/pytrends/ https://github.com/GeneralMills/pytrends https://dev.classmethod.jp/articles/pytrends_introduction/

インストール

$ pip install pytrends

コード

from pytrends.request import TrendReq

## 日本時間に合わせるためにtzに540を指定する。tzは分の値を指定する
pytrends = TrendReq(hl='ja-JP', tz=540)

## トレンドを検索したいワードを指定する
kw_list = ['bootstrap','tailwindcss','Bulma','Materialize']

# googleにリクエストする。
pytrends.build_payload(kw_list=kw_list, timeframe='2021-02-02T00 2021-02-09T00', geo="JP")

pytrends.interest_over_time()

実行結果

f:id:PX-WING:20210209003814p:plain

コード

  • 県ごとのトレンド
from pytrends.request import TrendReq

## 日本時間に合わせるためにtzに540を指定する。tzは分の値を指定する
pytrends = TrendReq(hl='ja-JP', tz=540)

## トレンドを検索したいワードを指定する
kw_list = ['bootstrap','tailwindcss','Bulma','Materialize']

pytrends.build_payload(kw_list=kw_list, timeframe='2021-02-02T00 2021-02-09T00', geo="JP")
pytrends.interest_by_region(resolution='COUNTRY', inc_low_vol=True, inc_geo_code=True)

実行結果

f:id:PX-WING:20210209004219p:plain

結果

  • まだまだbootstrapは人気がある



以上の内容はhttps://px-wing.hatenablog.com/entry/2021/02/09/065211より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14