Skip to content

Commit

Permalink
atualizando
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-custodio committed Oct 25, 2023
1 parent 4d6ebb2 commit c5fff63
Show file tree
Hide file tree
Showing 95 changed files with 1,968 additions and 608 deletions.
5 changes: 4 additions & 1 deletion coleta_diarios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ docker ps > /dev/null
cd ${REPO_DIR} || (git clone https://github.com/okfn-brasil/querido-diario qd && cd ${REPO_DIR})
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install setuptools
pip install wheel
pip install -r ${DATA_COLLECTION_DIR}/requirements-dev.txt

# Coletando diários e movendo para a pasta diários.
Expand All @@ -44,7 +47,7 @@ done

# Finalizando e saindo do ambiente virtual.
cd ${REPO_DIR}
deactivate


# Extraindo texto dos diários e segmentando diários.
cd ${DOWNLOAD_DIR}
Expand Down
2 changes: 1 addition & 1 deletion diario_municipal.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Municipio:
def __init__(self, municipio):
municipio = municipio.rstrip().replace('\n', '') # limpeza inicial
# Alguns nomes de municípios possuem um /AL no final, exemplo: Viçosa no diário 2022-01-17, ato 8496EC0A. Para evitar erros como "vicosa-/al-secretaria-municipal...", a linha seguir remove isso.
municipio = re.sub("(\/AL.*|GABINETE DO PREFEITO.*|PODER.*|http.*|PORTARIA.*|Extrato.*|ATA DE.*|SECRETARIA.*|Fundo.*|SETOR.*|ERRATA.*|- AL.*|GABINETE.*)", "", municipio)
municipio = re.sub("(\/AL.*|GABINETE DO PREFEITO.*|PODER.*|http.*|PORTARIA.*|Extrato.*|ATA DE.*|SECRETARIA.*|Secretaria.*|Fundo.*|SETOR.*|ERRATA.*|- AL.*|GABINETE.*|RATIFICAÇÃO.*)", "", municipio)
self.id = self._computa_id(municipio)
self.nome = municipio

Expand Down
21 changes: 18 additions & 3 deletions docs/site/dados/agua-branca.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"num_exoneracoes": 0
},
"resumo": {
"num_diarios": 45,
"num_diarios": 56,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
Expand Down Expand Up @@ -190,14 +190,29 @@
"num_exoneracoes": 0
},
"7": {
"num_diarios": 9,
"num_diarios": 10,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"8": {
"num_diarios": 3,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"9": {
"num_diarios": 6,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"10": {
"num_diarios": 1,
"num_nomeacoes": 0,
"num_exoneracoes": 0
}
}
},
"resumo": {
"num_diarios": 159,
"num_diarios": 170,
"num_exoneracoes": 0,
"num_nomeacoes": 0
}
Expand Down
25 changes: 20 additions & 5 deletions docs/site/dados/anadia.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@
"num_exoneracoes": 0
},
"resumo": {
"num_diarios": 94,
"num_diarios": 138,
"num_nomeacoes": 0,
"num_exoneracoes": 0
"num_exoneracoes": 1
},
"2": {
"num_diarios": 11,
Expand Down Expand Up @@ -232,15 +232,30 @@
"num_exoneracoes": 0
},
"7": {
"num_diarios": 9,
"num_diarios": 11,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"8": {
"num_diarios": 17,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"9": {
"num_diarios": 13,
"num_nomeacoes": 0,
"num_exoneracoes": 1
},
"10": {
"num_diarios": 12,
"num_nomeacoes": 0,
"num_exoneracoes": 0
}
}
},
"resumo": {
"num_diarios": 414,
"num_exoneracoes": 3,
"num_diarios": 458,
"num_exoneracoes": 4,
"num_nomeacoes": 10
}
}
29 changes: 22 additions & 7 deletions docs/site/dados/arapiraca.json
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,9 @@
"num_exoneracoes": 1
},
"resumo": {
"num_diarios": 136,
"num_nomeacoes": 162,
"num_exoneracoes": 12
"num_diarios": 198,
"num_nomeacoes": 371,
"num_exoneracoes": 14
},
"2": {
"num_diarios": 16,
Expand Down Expand Up @@ -503,15 +503,30 @@
"num_exoneracoes": 0
},
"7": {
"num_diarios": 17,
"num_diarios": 20,
"num_nomeacoes": 33,
"num_exoneracoes": 0
},
"8": {
"num_diarios": 22,
"num_nomeacoes": 60,
"num_exoneracoes": 2
},
"9": {
"num_diarios": 20,
"num_nomeacoes": 51,
"num_exoneracoes": 0
},
"10": {
"num_diarios": 17,
"num_nomeacoes": 98,
"num_exoneracoes": 0
}
}
},
"resumo": {
"num_diarios": 1603,
"num_exoneracoes": 32,
"num_nomeacoes": 519
"num_diarios": 1665,
"num_exoneracoes": 34,
"num_nomeacoes": 728
}
}
25 changes: 20 additions & 5 deletions docs/site/dados/atalaia.json
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,9 @@
"num_exoneracoes": 0
},
"resumo": {
"num_diarios": 99,
"num_diarios": 140,
"num_nomeacoes": 41,
"num_exoneracoes": 8
"num_exoneracoes": 9
},
"2": {
"num_diarios": 10,
Expand Down Expand Up @@ -396,15 +396,30 @@
"num_exoneracoes": 0
},
"7": {
"num_diarios": 12,
"num_diarios": 14,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"8": {
"num_diarios": 14,
"num_nomeacoes": 0,
"num_exoneracoes": 1
},
"9": {
"num_diarios": 14,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"10": {
"num_diarios": 11,
"num_nomeacoes": 0,
"num_exoneracoes": 0
}
}
},
"resumo": {
"num_diarios": 750,
"num_exoneracoes": 93,
"num_diarios": 791,
"num_exoneracoes": 94,
"num_nomeacoes": 421
}
}
19 changes: 17 additions & 2 deletions docs/site/dados/barra-de-santo-antonio.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"num_exoneracoes": 0
},
"resumo": {
"num_diarios": 61,
"num_diarios": 85,
"num_nomeacoes": 0,
"num_exoneracoes": 1
},
Expand Down Expand Up @@ -151,11 +151,26 @@
"num_diarios": 6,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"8": {
"num_diarios": 8,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"9": {
"num_diarios": 9,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"10": {
"num_diarios": 7,
"num_nomeacoes": 0,
"num_exoneracoes": 0
}
}
},
"resumo": {
"num_diarios": 208,
"num_diarios": 232,
"num_exoneracoes": 1,
"num_nomeacoes": 0
}
Expand Down
29 changes: 22 additions & 7 deletions docs/site/dados/barra-de-sao-miguel.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@
"num_exoneracoes": 10
},
"resumo": {
"num_diarios": 93,
"num_nomeacoes": 87,
"num_exoneracoes": 33
"num_diarios": 140,
"num_nomeacoes": 120,
"num_exoneracoes": 39
},
"2": {
"num_diarios": 11,
Expand Down Expand Up @@ -158,15 +158,30 @@
"num_exoneracoes": 0
},
"7": {
"num_diarios": 11,
"num_diarios": 13,
"num_nomeacoes": 35,
"num_exoneracoes": 4
},
"8": {
"num_diarios": 18,
"num_nomeacoes": 30,
"num_exoneracoes": 1
},
"9": {
"num_diarios": 13,
"num_nomeacoes": 2,
"num_exoneracoes": 2
},
"10": {
"num_diarios": 14,
"num_nomeacoes": 1,
"num_exoneracoes": 3
}
}
},
"resumo": {
"num_diarios": 364,
"num_exoneracoes": 34,
"num_nomeacoes": 130
"num_diarios": 411,
"num_exoneracoes": 40,
"num_nomeacoes": 163
}
}
37 changes: 26 additions & 11 deletions docs/site/dados/batalha.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"nome": "Batalha",
"detalhe": {
"2015": {
"5": {
"num_diarios": 1,
"8": {
"num_diarios": 3,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
Expand All @@ -13,18 +13,18 @@
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"6": {
"num_diarios": 6,
"7": {
"num_diarios": 5,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"7": {
"num_diarios": 5,
"6": {
"num_diarios": 6,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"8": {
"num_diarios": 3,
"5": {
"num_diarios": 1,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
Expand Down Expand Up @@ -520,7 +520,7 @@
"num_exoneracoes": 0
},
"resumo": {
"num_diarios": 56,
"num_diarios": 77,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
Expand Down Expand Up @@ -550,14 +550,29 @@
"num_exoneracoes": 0
},
"7": {
"num_diarios": 11,
"num_diarios": 12,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"8": {
"num_diarios": 9,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"9": {
"num_diarios": 5,
"num_nomeacoes": 0,
"num_exoneracoes": 0
},
"10": {
"num_diarios": 6,
"num_nomeacoes": 0,
"num_exoneracoes": 0
}
}
},
"resumo": {
"num_diarios": 588,
"num_diarios": 609,
"num_exoneracoes": 0,
"num_nomeacoes": 0
}
Expand Down
Loading

0 comments on commit c5fff63

Please sign in to comment.