Skip to content

Commit

Permalink
Atualizar segundo turno tabelas com detalhes e perfil_eleitorado
Browse files Browse the repository at this point in the history
  • Loading branch information
Winzen committed Dec 17, 2024
1 parent 27920ea commit f0266de
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 1994, "end": 2022, "interval": 2},
"range": {"start": 1994, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
}}

select
safe_cast(ano as int64) ano,
safe_cast(turno as int64) turno,
safe_cast(id_eleicao as string) id_eleicao,
safe_cast(tipo_eleicao as string) tipo_eleicao,
safe_cast(data_eleicao as string) data_eleicao,
safe_cast(data_eleicao as date) data_eleicao,
safe_cast(sigla_uf as string) sigla_uf,
safe_cast(id_municipio as string) id_municipio,
safe_cast(id_municipio_tse as string) id_municipio_tse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 1994, "end": 2022, "interval": 2},
"range": {"start": 1994, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
}}

select
safe_cast(ano as int64) ano,
safe_cast(turno as int64) turno,
safe_cast(id_eleicao as string) id_eleicao,
safe_cast(tipo_eleicao as string) tipo_eleicao,
safe_cast(data_eleicao as string) data_eleicao,
safe_cast(data_eleicao as date) data_eleicao,
safe_cast(sigla_uf as string) sigla_uf,
safe_cast(id_municipio as string) id_municipio,
safe_cast(id_municipio_tse as string) id_municipio_tse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,16 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 1994, "end": 2022, "interval": 2},
"range": {"start": 1994, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
}}

select
safe_cast(ano as int64) ano,
safe_cast(turno as int64) turno,
safe_cast(id_eleicao as string) id_eleicao,
safe_cast(tipo_eleicao as string) tipo_eleicao,
safe_cast(data_eleicao as string) data_eleicao,
safe_cast(sigla_uf as string) sigla_uf,
safe_cast(id_municipio as string) id_municipio,
safe_cast(id_municipio_tse as string) id_municipio_tse,
Expand All @@ -29,11 +28,12 @@ select
safe_cast(votos_nominais as int64) votos_nominais,
safe_cast(votos_brancos as int64) votos_brancos,
safe_cast(votos_nulos as int64) votos_nulos,
safe_cast(votos_legenda as int64) votos_legenda,
safe_cast(votos_coligacao as int64) votos_coligacao,
safe_cast(votos_nulos_apu_sep as int64) votos_nulos_apu_sep,
safe_cast(votos_pendentes as int64) votos_pendentes,
safe_cast(proporcao_comparecimento as float64) proporcao_comparecimento,
safe_cast(proporcao_votos_nominais as float64) proporcao_votos_nominais,
safe_cast(proporcao_votos_legenda as float64) proporcao_votos_legenda,
safe_cast(proporcao_votos_coligacao as float64) proporcao_votos_coligacao,
safe_cast(proporcao_votos_brancos as float64) proporcao_votos_brancos,
safe_cast(proporcao_votos_nulos as float64) proporcao_votos_nulos
from `basedosdados-staging.br_tse_eleicoes_staging.detalhes_votacao_secao` as t
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 2016, "end": 2022, "interval": 2},
"range": {"start": 2016, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
}}

select
safe_cast(ano as int64) ano,
safe_cast(turno as int64) turno,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 1998, "end": 2022, "interval": 2},
"range": {"start": 1998, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
}}

select
safe_cast(ano as int64) ano,
safe_cast(sigla_uf as string) sigla_uf,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
partition_by={
"field": "ano",
"data_type": "int64",
"range": {"start": 2008, "end": 2022, "interval": 2},
"range": {"start": 2008, "end": 2024, "interval": 2},
},
cluster_by=["sigla_uf"],
)
}}

select
safe_cast(ano as int64) ano,
safe_cast(sigla_uf as string) sigla_uf,
Expand Down

0 comments on commit f0266de

Please sign in to comment.