forked from rafatieppo/lucylattes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlucyLattes.py
86 lines (77 loc) · 2.35 KB
/
lucyLattes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# ======================================================================
# Rafael Tieppo
# rafaeltieppo@yahoo.com.br
# https://rafatieppo.github.io/
# 16-01-2019
# LATTES Scraper
# @rafatieppo
# ======================================================================
# ------------------------------------------------------------
# packages
# ------------------------------------------------------------
from tidydf import *
from extrafuns import *
from report import getrelatorio
from grapho import getgrapho
from verify import getverificacao
from scraperlattes import getnomecompleto
from scraperlattes import getcapit
from scraperlattes import getlivro
from scraperlattes import getperiod
from scraperlattes import getorient
from scraperlattes import getprodtec
from scraperlattes import getprojpesqext
from scraperlattes import getdiscip
from readidlist import readIdList
from index_capes import capes_indprodart
from index_capes import capes_indori
from index_capes import capes_indautdis
from index_capes import capes_distindproddp
from tabulate import tabulate
import pandas as pd
import numpy as np
import os
import requests
from bs4 import BeautifulSoup
import re
import zipfile
import glob
import re
import matplotlib.pyplot as plt
import matplotlib.style as style
# style.available
style.use('fivethirtyeight')
# ------------------------------------------------------------
# lendo a lista dos IDs e nome dos pesquisadores
df_idlist = readIdList()
# ------------------------------------------------------------
# roda as funcoes para pegar dados de cada pesquisador
for nid in range(len(df_idlist)):
zipfilename = str(df_idlist.iloc[nid, 0]) + '.zip'
getprojpesqext(zipfilename)
getprodtec(zipfilename)
getorient(zipfilename)
getperiod(zipfilename)
getlivro(zipfilename)
getcapit(zipfilename)
getnomecompleto(zipfilename)
getdiscip(zipfilename)
gettidydf()
getverificacao()
getgrapho()
# Gerar indicadores qualis ou nao
config_file = open('./config.txt', 'r')
run_indcapes = config_file.readlines()[7].split(':')[1]
run_indcapes = run_indcapes.rstrip('\n')
run_indcapes = run_indcapes.strip(' ')
run_indcapes = int(run_indcapes)
run_indcapes
config_file.close()
if run_indcapes == 1:
capes_indori()
capes_indprodart()
capes_indautdis()
capes_distindproddp()
else:
print("Indicadores capes para PPG nao foram gerados")
getrelatorio()