Word Trends#
>>> from techminer2.tools import word_trends
>>> chart = word_trends(
... #
... # ITEMS PARAMS:
... field='author_keywords',
... #
... # TREND ANALYSIS:
... time_window=2,
... #
... # CHART PARAMS:
... title="Total Number of Documents, with Percentage of Documents Published in the Last Years",
... metric_label=None,
... field_label=None,
... #
... # ITEM FILTERS:
... top_n=20,
... occ_range=(None, None),
... gc_range=(None, None),
... custom_items=None,
... #
... # DATABASE PARAMS:
... root_dir="example/",
... database="main",
... year_filter=(None, None),
... cited_by_filter=(None, None),
... )
>>> chart.fig_.write_html("sphinx/_static/analyze/words/word_trends.html")
>>> chart.df_.head()
rank_occ OCC ... average_growth_rate average_docs_per_year
author_keywords ...
FINTECH 1 31 ... -1.0 9.0
INNOVATION 2 7 ... -1.5 0.5
FINANCIAL_SERVICES 3 4 ... 0.0 1.5
FINANCIAL_INCLUSION 4 3 ... -1.0 0.0
FINANCIAL_TECHNOLOGY 5 3 ... 0.0 1.0
[5 rows x 7 columns]
>>> print(chart.prompt_)
Your task is ...