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.
Files changed (84) hide show
  1. redes/__init__.py +0 -0
  2. redes/__main__.py +5 -0
  3. redes/aggregate.py +71 -0
  4. redes/api.py +2288 -0
  5. redes/areas.py +177 -0
  6. redes/assets/logo.png +0 -0
  7. redes/assets/logo.svg +22 -0
  8. redes/assets/mundo.geo.json +1 -0
  9. redes/bibliometria.py +323 -0
  10. redes/build.py +670 -0
  11. redes/cache_figuras.py +260 -0
  12. redes/cli.py +294 -0
  13. redes/clustering.py +573 -0
  14. redes/dataset.py +154 -0
  15. redes/dendro_helper.py +46 -0
  16. redes/dendrograma.py +402 -0
  17. redes/duplo_mapa.py +254 -0
  18. redes/edit.py +558 -0
  19. redes/exports.py +213 -0
  20. redes/fluxos.py +472 -0
  21. redes/grade.py +67 -0
  22. redes/ies.py +193 -0
  23. redes/kb.py +238 -0
  24. redes/linha_do_tempo.py +309 -0
  25. redes/loaders/__init__.py +110 -0
  26. redes/loaders/base.py +228 -0
  27. redes/loaders/bibtex.py +131 -0
  28. redes/loaders/csv.py +60 -0
  29. redes/loaders/openalex.py +202 -0
  30. redes/loaders/ris.py +112 -0
  31. redes/loaders/scopus.py +154 -0
  32. redes/loaders/wos.py +93 -0
  33. redes/loaders/zotero.py +90 -0
  34. redes/longitudinal.py +295 -0
  35. redes/mappers.py +87 -0
  36. redes/measures.py +305 -0
  37. redes/metodo.py +1505 -0
  38. redes/network.py +204 -0
  39. redes/paises.py +325 -0
  40. redes/paralelo.py +210 -0
  41. redes/pipeline.py +379 -0
  42. redes/pivos.py +183 -0
  43. redes/projeto.py +33 -0
  44. redes/qualidade.py +427 -0
  45. redes/rajadas.py +184 -0
  46. redes/references.py +474 -0
  47. redes/relatorio_unico.py +610 -0
  48. redes/report.py +1232 -0
  49. redes/rotulos.py +299 -0
  50. redes/schema.py +1213 -0
  51. redes/siglas_paises.py +232 -0
  52. redes/similarity.py +59 -0
  53. redes/similitude.py +1090 -0
  54. redes/sugestoes.py +420 -0
  55. redes/termos.py +181 -0
  56. redes/text_utils.py +160 -0
  57. redes/texto.py +168 -0
  58. redes/trabalhador.py +73 -0
  59. redes/ui/app.js +5732 -0
  60. redes/ui/bibliometria.js +460 -0
  61. redes/ui/grafias.js +132 -0
  62. redes/ui/index.html +1184 -0
  63. redes/ui/logo-mark.svg +14 -0
  64. redes/ui/logo.svg +22 -0
  65. redes/ui/style.css +2125 -0
  66. redes/viz/__init__.py +0 -0
  67. redes/viz/cluster.py +293 -0
  68. redes/viz/dendrograma.py +182 -0
  69. redes/viz/densidade.py +292 -0
  70. redes/viz/descritiva.py +221 -0
  71. redes/viz/duplo_mapa.py +280 -0
  72. redes/viz/halo.py +754 -0
  73. redes/viz/linha_do_tempo.py +494 -0
  74. redes/viz/mapa.py +496 -0
  75. redes/viz/sankey.py +268 -0
  76. redes/viz/similitude.py +384 -0
  77. redes/viz/strategic.py +307 -0
  78. redes/words.py +71 -0
  79. redes-0.1.0.dist-info/METADATA +507 -0
  80. redes-0.1.0.dist-info/RECORD +84 -0
  81. redes-0.1.0.dist-info/WHEEL +5 -0
  82. redes-0.1.0.dist-info/entry_points.txt +2 -0
  83. redes-0.1.0.dist-info/licenses/LICENSE +674 -0
  84. redes-0.1.0.dist-info/top_level.txt +1 -0
redes/__init__.py ADDED
File without changes
redes/__main__.py ADDED
@@ -0,0 +1,5 @@
1
+ """Permite `python -m redes`."""
2
+
3
+ from .cli import main
4
+
5
+ raise SystemExit(main())
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