This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Os dados estão presentes no repositório big query da base dos dados | |
| SELECT id_municipio, | |
| count(*) as quantidade_nivel_superior, | |
| ( select count(*) | |
| from `basedosdados.br_me_rais.microdados_vinculos` vinc_sub | |
| where vinc_sub.id_municipio = vinc.id_municipio and | |
| ano = 2023 and | |
| vinculo_ativo_3112 ="1" and | |
| natureza_juridica = "1244") as total_servidores_municipio, #1244= município |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import defaultdict | |
| from graphlib import TopologicalSorter | |
| from heapq import heappush, heappop, heapify | |
| def topo_lex(pairs): | |
| deps = defaultdict(set) # node -> set(dependencies) | |
| for a, b in pairs: | |
| deps.setdefault(a, set()) | |
| deps[b].add(a) |
OlderNewer