Growth Metrics#
>>> from techminer2.metrics import growth_metrics
>>> metrics = growth_metrics(
... field='author_keywords',
... time_window=2,
... #
... # FILTER PARAMS:
... top_n=20,
... occ_range=(None, None),
... gc_range=(None, None),
... custom_items=None,
... #
... # DATABASE PARAMS:
... root_dir="example/",
... database="main",
... year_filter=None,
... cited_by_filter=None,
... )
>>> print(metrics.df_.head().to_markdown())
| author_keywords | rank_occ | OCC | between_2018_2019 | before_2018 | growth_percentage | average_growth_rate | average_docs_per_year |
|:---------------------|-----------:|------:|--------------------:|--------------:|--------------------:|----------------------:|------------------------:|
| FINTECH | 1 | 31 | 18 | 13 | 58.06 | -1 | 9 |
| INNOVATION | 2 | 7 | 1 | 6 | 14.29 | -1.5 | 0.5 |
| FINANCIAL_SERVICES | 3 | 4 | 3 | 1 | 75 | 0 | 1.5 |
| FINANCIAL_INCLUSION | 4 | 3 | 0 | 3 | 0 | -1 | 0 |
| FINANCIAL_TECHNOLOGY | 5 | 3 | 2 | 1 | 66.67 | 0 | 1 |
>>> print(metrics.prompt_)
Your task is ...