A set of tools for computing the COUNTER metrics
9.6K
Gera relatórios em formato COUNTER R5.
Criar ambiente virtual para python 3.6+
virtualenv -p python3.6 .venv
Acessar ambiente virtual
source .venv/bin/activate
Instalar dependências e pacotes
apt install libmysqlclient-dev
pip install -r requirements.txt
python setup.py install
Criar banco de dados e tabelas
create database matomo
initialize_database -u STRING_CONNECTION
Popular tabela de periódicos
populate_journals -u STRING_CONNECTION
Calcular métricas COUNTER
É preciso setar as variáveis de ambiente listadas ao final deste README.md
calculate_metrics \
-c COLLECTION_ACRONYM \
-u mysql://user:pass@host:port/database \
--dict_date YYYY-MM-DD \
--use_pretables
Exportar dados para tabelas SUSHI
É preciso setar as variáveis de ambiente listadas ao final deste README.md
export_to_database \
-c COLLECTION_ACRONYM \
-u mysql://user:pass@host:port/database \
--auto
Agregar tabelas
usage: aggregate [-h] [-c COLLECTION] [-p PERIOD]
[-t {aggr_article_language_year_month_metric,aggr_journal_language_year_month_metric,aggr_journal_geolocation_year_month_metric,aggr_journal_language_yop_year_month_metric,aggr_journal_geolocation_yop_year_month_metric}]
optional arguments:
-h, --help show this help message and exit
-c COLLECTION, --collection COLLECTION
Acrônimo de coleção
-p PERIOD, --period PERIOD
Período de datas a serem agregadas (YYYY-MM-DD,YYYY-
MM-DD)
-t {aggr_article_language_year_month_metric,aggr_journal_language_year_month_metric,aggr_journal_geolocation_year_month_metric,aggr_journal_language_yop_year_month_metric,aggr_journal_geolocation_yop_year_month_metric}, --tables {aggr_article_language_year_month_metric,aggr_journal_language_year_month_metric,aggr_journal_geolocation_year_month_metric,aggr_journal_language_yop_year_month_metric,aggr_journal_geolocation_yop_year_month_metric}
Tabelas a serem preenchidas
Content type
Image
Digest
sha256:49e384dc7…
Size
167.4 MB
Last updated
about 4 years ago
docker pull scieloorg/scielo-usage-counter