redes 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- redes/__init__.py +0 -0
- redes/__main__.py +5 -0
- redes/aggregate.py +71 -0
- redes/api.py +2288 -0
- redes/areas.py +177 -0
- redes/assets/logo.png +0 -0
- redes/assets/logo.svg +22 -0
- redes/assets/mundo.geo.json +1 -0
- redes/bibliometria.py +323 -0
- redes/build.py +670 -0
- redes/cache_figuras.py +260 -0
- redes/cli.py +294 -0
- redes/clustering.py +573 -0
- redes/dataset.py +154 -0
- redes/dendro_helper.py +46 -0
- redes/dendrograma.py +402 -0
- redes/duplo_mapa.py +254 -0
- redes/edit.py +558 -0
- redes/exports.py +213 -0
- redes/fluxos.py +472 -0
- redes/grade.py +67 -0
- redes/ies.py +193 -0
- redes/kb.py +238 -0
- redes/linha_do_tempo.py +309 -0
- redes/loaders/__init__.py +110 -0
- redes/loaders/base.py +228 -0
- redes/loaders/bibtex.py +131 -0
- redes/loaders/csv.py +60 -0
- redes/loaders/openalex.py +202 -0
- redes/loaders/ris.py +112 -0
- redes/loaders/scopus.py +154 -0
- redes/loaders/wos.py +93 -0
- redes/loaders/zotero.py +90 -0
- redes/longitudinal.py +295 -0
- redes/mappers.py +87 -0
- redes/measures.py +305 -0
- redes/metodo.py +1505 -0
- redes/network.py +204 -0
- redes/paises.py +325 -0
- redes/paralelo.py +210 -0
- redes/pipeline.py +379 -0
- redes/pivos.py +183 -0
- redes/projeto.py +33 -0
- redes/qualidade.py +427 -0
- redes/rajadas.py +184 -0
- redes/references.py +474 -0
- redes/relatorio_unico.py +610 -0
- redes/report.py +1232 -0
- redes/rotulos.py +299 -0
- redes/schema.py +1213 -0
- redes/siglas_paises.py +232 -0
- redes/similarity.py +59 -0
- redes/similitude.py +1090 -0
- redes/sugestoes.py +420 -0
- redes/termos.py +181 -0
- redes/text_utils.py +160 -0
- redes/texto.py +168 -0
- redes/trabalhador.py +73 -0
- redes/ui/app.js +5732 -0
- redes/ui/bibliometria.js +460 -0
- redes/ui/grafias.js +132 -0
- redes/ui/index.html +1184 -0
- redes/ui/logo-mark.svg +14 -0
- redes/ui/logo.svg +22 -0
- redes/ui/style.css +2125 -0
- redes/viz/__init__.py +0 -0
- redes/viz/cluster.py +293 -0
- redes/viz/dendrograma.py +182 -0
- redes/viz/densidade.py +292 -0
- redes/viz/descritiva.py +221 -0
- redes/viz/duplo_mapa.py +280 -0
- redes/viz/halo.py +754 -0
- redes/viz/linha_do_tempo.py +494 -0
- redes/viz/mapa.py +496 -0
- redes/viz/sankey.py +268 -0
- redes/viz/similitude.py +384 -0
- redes/viz/strategic.py +307 -0
- redes/words.py +71 -0
- redes-0.1.0.dist-info/METADATA +507 -0
- redes-0.1.0.dist-info/RECORD +84 -0
- redes-0.1.0.dist-info/WHEEL +5 -0
- redes-0.1.0.dist-info/entry_points.txt +2 -0
- redes-0.1.0.dist-info/licenses/LICENSE +674 -0
- redes-0.1.0.dist-info/top_level.txt +1 -0
redes/__init__.py
ADDED
|
File without changes
|
redes/__main__.py
ADDED
redes/aggregate.py
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"""Conjunto agregado por autor ou por periódico (acoplamento agregado).
|
|
2
|
+
|
|
3
|
+
Espelha `AggregatedDataset`: mantém os documentos do conjunto original e, por
|
|
4
|
+
cima deles, itens de alto nível que agrupam documentos.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import sqlite3
|
|
10
|
+
|
|
11
|
+
from .dataset import Dataset
|
|
12
|
+
|
|
13
|
+
_SQL_AUTORES_DO_DOCUMENTO = (
|
|
14
|
+
"SELECT a.idAuthor, a.authorName FROM Document_Author da, Author a "
|
|
15
|
+
"WHERE da.Document_idDocument = ? AND da.Author_idAuthor = a.idAuthor;"
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
_SQL_PERIODICO_DO_DOCUMENTO = (
|
|
19
|
+
"SELECT j.idJournal, j.source FROM Document d, Journal j "
|
|
20
|
+
"WHERE d.idDocument = ? AND d.Journal_idJournal = j.idJournal;"
|
|
21
|
+
)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class Agregado:
|
|
25
|
+
"""Itens de alto nível (autor ou periódico) com seus documentos."""
|
|
26
|
+
|
|
27
|
+
def __init__(self, dataset: Dataset) -> None:
|
|
28
|
+
self.dataset = dataset
|
|
29
|
+
self.altos: dict[int, str] = {}
|
|
30
|
+
self.documentos: dict[int, list[int]] = {}
|
|
31
|
+
|
|
32
|
+
def adiciona(self, alto_id: int, rotulo: str, doc_id: int) -> None:
|
|
33
|
+
if alto_id not in self.altos:
|
|
34
|
+
self.altos[alto_id] = rotulo
|
|
35
|
+
self.documentos[alto_id] = []
|
|
36
|
+
if doc_id not in self.documentos[alto_id]:
|
|
37
|
+
self.documentos[alto_id].append(doc_id)
|
|
38
|
+
|
|
39
|
+
def lista_alto_nivel(self) -> list[int]:
|
|
40
|
+
return sorted(self.altos)
|
|
41
|
+
|
|
42
|
+
def documentos_do_alto_nivel(self, alto_id: int) -> list[int]:
|
|
43
|
+
return list(self.documentos.get(alto_id, []))
|
|
44
|
+
|
|
45
|
+
def frequencia_documento_item(self, alto_id: int) -> int:
|
|
46
|
+
return len(self.documentos.get(alto_id, []))
|
|
47
|
+
|
|
48
|
+
def citacoes(self, doc_id: int) -> int:
|
|
49
|
+
return self.dataset.citacoes(doc_id)
|
|
50
|
+
|
|
51
|
+
def __len__(self) -> int:
|
|
52
|
+
return len(self.altos)
|
|
53
|
+
|
|
54
|
+
# ------------------------------------------------------------- construtores
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def por_autor(cls, conexao: sqlite3.Connection, dataset: Dataset) -> "Agregado":
|
|
58
|
+
agregado = cls(dataset)
|
|
59
|
+
for doc_id in dataset.lista_documentos():
|
|
60
|
+
for linha in conexao.execute(_SQL_AUTORES_DO_DOCUMENTO, (doc_id,)):
|
|
61
|
+
agregado.adiciona(linha["idAuthor"], linha["authorName"], doc_id)
|
|
62
|
+
return agregado
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def por_periodico(cls, conexao: sqlite3.Connection, dataset: Dataset) -> "Agregado":
|
|
66
|
+
agregado = cls(dataset)
|
|
67
|
+
for doc_id in dataset.lista_documentos():
|
|
68
|
+
linha = conexao.execute(_SQL_PERIODICO_DO_DOCUMENTO, (doc_id,)).fetchone()
|
|
69
|
+
if linha is not None:
|
|
70
|
+
agregado.adiciona(linha["idJournal"], linha["source"], doc_id)
|
|
71
|
+
return agregado
|