Trending Words per Year#
>>> from techminer2.tools.words import trending_words_per_year
>>> words = trending_words_per_year(
... #
... # PARAMS:
... field="author_keywords",
... n_words_per_year=5,
... custom_items=None,
... #
... # DATABASE PARAMS:
... root_dir="example/",
... database="main",
... year_filter=None,
... cited_by_filter=None,
... )
>>> words.fig_.write_html("sphinx/_static/analyze/words/trending_words_per_year.html")
>>> words.df_.head()
year OCC year_q1 year_med ... rn height width
author_keywords ...
RESEARCHERS 1 2016 2016 ... 4 0.150000 1
CONTENT_ANALYSIS 2 2016 2016 ... 2 0.177333 1
POPULAR_PRESS 2 2016 2016 ... 3 0.177333 1
DIGITALIZATION 3 2016 2016 ... 0 0.204667 1
TECHNOLOGIES 2 2016 2016 ... 1 0.177333 2
[5 rows x 8 columns]
>>> from techminer2.analyze.words import trending_words_per_year
>>> words = trending_words_per_year(
... #
... # PARAMS:
... field="author_keywords",
... n_words_per_year=5,
... custom_items=[
... "FINTECH",
... "BLOCKCHAIN",
... "ARTIFICIAL_INTELLIGENCE",
... ],
... #
... # DATABASE PARAMS:
... root_dir="example/",
... database="main",
... year_filter=None,
... cited_by_filter=None,
... )
>>> words.df_
year OCC year_q1 year_med ... rn height width
author_keywords ...
FINTECH 31 2017 2018 ... 0 0.970000 2
BLOCKCHAIN 3 2018 2019 ... 0 0.178276 2
ARTIFICIAL_INTELLIGENCE 2 2019 2019 ... 1 0.150000 1
[3 rows x 8 columns]