-
-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dados-atualizacao] br_inep_saeb #1041
Merged
Merged
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7feddbd
inicia update e inclusão de novas bases do saeb
lucasnascm ce6f409
atualiza table_config de proficiencia
lucasnascm 87e9a3f
sobe nova tabela de proficiencia compatibilizada entre anos
lucasnascm 1df8c97
corrige table_config
lucasnascm 6c1b44b
atualiza repo com dataset_config e README
lucasnascm ff6097a
Update bases/br_inep_saeb/dicionario/table_config.yaml
rdahis e40fcf7
Update bases/br_inep_saeb/dicionario/table_description.txt
rdahis 8ce1144
Merge branch 'master' into update_saeb
rdahis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Dados públicos do Sistema de Avaliação da Educação Básica (Saeb) do INEP. | ||
|
||
Dados originais em https://www.gov.br/inep/pt-br/areas-de-atuacao/avaliacao-e-exames-educacionais/saeb/resultados. | ||
|
||
Todo o código usado na captura e limpeza está em `code/` |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
|
||
# Qual organização disponibiliza os dados originais? | ||
# Opções: escolher dessa lista -> https://basedosdados.org/api/3/action/organization_list= | ||
organization: | ||
- br-inep | ||
|
||
dataset_id: br_inep_saeb | ||
|
||
title: Sistema de Avaliação da Educação Básica (Saeb) | ||
|
||
# exemplo: descrição e anotações úteis sobre os dados. | ||
description: Dados referente ao total de acessos a Banda Larga Fixa (também denominado por Serviço Comunicação Multimídia - SCM) provenientes da Anatel. A base inclui ainda, dados de entrada de banda larga nas escolas segundo o Programa Banda Larga nas Escolas e a instalação de backhauls segundo o Plano Nacional de Universalização da Banda Larga. | ||
|
||
# Quais grupos caracterizam a base? | ||
# Opções: escolher dessa lista -> https://basedosdados.org/api/3/action/group_list | ||
groups: [educacao] | ||
|
||
# Quais etiquetas caracterizam a base? | ||
# Opções: escolher dessa lista -> https://basedosdados.org/api/3/action/tag_list | ||
# Caso crie etiquetas novas, as regras são: | ||
# - letras minúsculas | ||
# - sem acentos | ||
# - não repita nomes de grupos (ex. educacao, saude, meio ambiente, economia, etc.) | ||
tags: ['alfabetizacao', 'ensino fundamental'] | ||
|
||
ckan_url: | ||
|
||
github_url: https://github.com/basedosdados/mais/tree/master/bases/br_inep_saeb | ||
|
||
metadata_modified: |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
Query para publicar a tabela. | ||
|
||
Esse é o lugar para: | ||
- modificar nomes, ordem e tipos de colunas | ||
- dar join com outras tabelas | ||
- criar colunas extras (e.g. logs, proporções, etc.) | ||
|
||
Qualquer coluna definida aqui deve também existir em `table_config.yaml`. | ||
|
||
# Além disso, sinta-se à vontade para alterar alguns nomes obscuros | ||
# para algo um pouco mais explícito. | ||
|
||
TIPOS: | ||
- Para modificar tipos de colunas, basta substituir STRING por outro tipo válido. | ||
- Exemplo: `SAFE_CAST(column_name AS NUMERIC) column_name` | ||
- Mais detalhes: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types | ||
*/ | ||
|
||
CREATE VIEW basedosdados-dev.br_inep_saeb.dicionario AS | ||
SELECT | ||
SAFE_CAST(id_tabela AS STRING) id_tabela, | ||
SAFE_CAST(coluna AS STRING) coluna, | ||
SAFE_CAST(chave AS STRING) chave, | ||
SAFE_CAST(cobertura_temporal AS STRING) cobertura_temporal, | ||
SAFE_CAST(valor AS STRING) valor | ||
FROM basedosdados-dev.br_inep_saeb_staging.dicionario AS t |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"name": "id_tabela", "bigquery_type": "string", "description": "ID Tabela", "temporal_coverage": null, "covered_by_dictionary": null, "directory_column": {"dataset_id": null, "table_id": null, "column_name": null}, "measurement_unit": null, "has_sensitive_data": null, "is_in_staging": true, "is_partition": false, "type": "STRING", "mode": "NULLABLE"}, {"name": "coluna", "bigquery_type": "string", "description": "Coluna", "temporal_coverage": null, "covered_by_dictionary": null, "directory_column": {"dataset_id": null, "table_id": null, "column_name": null}, "measurement_unit": null, "has_sensitive_data": null, "is_in_staging": true, "is_partition": false, "type": "STRING", "mode": "NULLABLE"}, {"name": "chave", "bigquery_type": "string", "description": "Chave", "temporal_coverage": null, "covered_by_dictionary": null, "directory_column": {"dataset_id": null, "table_id": null, "column_name": null}, "measurement_unit": null, "has_sensitive_data": null, "is_in_staging": true, "is_partition": false, "type": "STRING", "mode": "NULLABLE"}, {"name": "cobertura_temporal", "bigquery_type": "string", "description": "Cobertura Temporal", "temporal_coverage": null, "covered_by_dictionary": null, "directory_column": {"dataset_id": null, "table_id": null, "column_name": null}, "measurement_unit": null, "has_sensitive_data": null, "is_in_staging": true, "is_partition": false, "type": "STRING", "mode": "NULLABLE"}, {"name": "valor", "bigquery_type": "string", "description": "Valor", "temporal_coverage": null, "covered_by_dictionary": null, "directory_column": {"dataset_id": null, "table_id": null, "column_name": null}, "measurement_unit": null, "has_sensitive_data": null, "is_in_staging": true, "is_partition": false, "type": "STRING", "mode": "NULLABLE"}] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"name": "id_tabela", "bigquery_type": null, "description": null, "temporal_coverage": null, "covered_by_dictionary": null, "directory_column": {"dataset_id": null, "table_id": null, "column_name": null}, "measurement_unit": null, "has_sensitive_data": null, "is_in_staging": null, "is_partition": null, "type": "STRING"}, {"name": "coluna", "bigquery_type": null, "description": null, "temporal_coverage": null, "covered_by_dictionary": null, "directory_column": {"dataset_id": null, "table_id": null, "column_name": null}, "measurement_unit": null, "has_sensitive_data": null, "is_in_staging": null, "is_partition": null, "type": "STRING"}, {"name": "chave", "bigquery_type": null, "description": null, "temporal_coverage": null, "covered_by_dictionary": null, "directory_column": {"dataset_id": null, "table_id": null, "column_name": null}, "measurement_unit": null, "has_sensitive_data": null, "is_in_staging": null, "is_partition": null, "type": "STRING"}, {"name": "cobertura_temporal", "bigquery_type": null, "description": null, "temporal_coverage": null, "covered_by_dictionary": null, "directory_column": {"dataset_id": null, "table_id": null, "column_name": null}, "measurement_unit": null, "has_sensitive_data": null, "is_in_staging": null, "is_partition": null, "type": "STRING"}, {"name": "valor", "bigquery_type": null, "description": null, "temporal_coverage": null, "covered_by_dictionary": null, "directory_column": {"dataset_id": null, "table_id": null, "column_name": null}, "measurement_unit": null, "has_sensitive_data": null, "is_in_staging": null, "is_partition": null, "type": "STRING"}] |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
|
||
dataset_id: br_inep_saeb | ||
|
||
table_id: dicionario | ||
|
||
# Descreva a tabela. Essas são as primeiras frases que um usuário vai ver. | ||
# Você não precisa ser muito conciso. Sinta-se a vontade para dar exemplos de | ||
# como usar os dados. | ||
# Se souber, liste também aplicações: pesquisa, apps, etc. que usem os dados., | ||
description: Dicionário da tabela de proficiência do SAEB para os anos de 1995 a 2019 | ||
|
||
# A máxima unidade espacial que a tabela cobre. | ||
spatial_coverage: | ||
|
||
# Anos cobertos pela tabela. | ||
# Preencher como lista de intervalos. | ||
# Exemplo: 1995(1)2019. | ||
temporal_coverage: | ||
|
||
# A unidade temporal com qual a tabela é atualizada. | ||
# Opções em 'https://basedosdados.org/api/3/action/bd_available_options' | ||
update_frequency: | ||
|
||
# Entidade representada por cada linha. | ||
# Opções em 'https://basedosdados.org/api/3/action/bd_available_options' | ||
entity: | ||
|
||
# A unidade temporal representada por cada linha. | ||
# Opções em 'https://basedosdados.org/api/3/action/bd_available_options' | ||
time_unit: | ||
|
||
# O conjunto mínimo de colunas identificando cada linha unicamente. | ||
# Preencha com os nomes de colunas. | ||
# Exemplos: id_municipio, ano. | ||
# Pode ser vazio pois certas tabelas não possuem identificadores. | ||
identifying_columns: | ||
- table_id | ||
rdahis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- coluna | ||
- chave | ||
- cobertura_temporal | ||
|
||
last_updated: | ||
metadata: | ||
data: | ||
release: | ||
|
||
# Versão da tabela. Seguindo o padrão de semantic versioning. | ||
# Exemplo: v1.1.3 | ||
version: v1.0 | ||
|
||
# Quem está preenchendo esses metadados? | ||
published_by: | ||
name: Lucas Moreira | ||
email: lucas.moreira@basedosdados.org | ||
github_user: lucasnascm | ||
website: | ||
ckan_user: lucasnascm | ||
|
||
# Qual organização/departamento/pessoa tratou os dados? | ||
# As vezes há um ponto intermediário entre os dados originais e subir na Base dos Dados. | ||
# Se essa pessoa é você, preencha abaixo com suas informações. | ||
data_cleaned_by: | ||
name: Lucas Moreira | ||
email: lucas.moreira@basedosdados.org | ||
github_user: lucasnascm | ||
ckan_user: lucasnascm | ||
website: | ||
code_url: https://github.com/basedosdados/mais/tree/master/bases/br_inep_saeb/code | ||
|
||
# Se houve passos de tratamento, limpeza e manipulação de dados, descreva-os aqui. | ||
data_cleaning_description: Compatibizaliação de todos os dicionários da série temporal do SAEB | ||
|
||
# Url dos dados originais no GCP Storage. | ||
raw_files_url: | ||
|
||
# Url dos arquivos auxiliares no GCP Storage. | ||
auxiliary_files_url: | ||
|
||
# Url da tabela de arquitetura no GCP Storage. | ||
architecture_url: | ||
|
||
# A tabela tem colunas que precisam de dicionário? | ||
# Opções: yes, no. | ||
covered_by_dictionary: | ||
|
||
source_bucket_name: basedosdados-dev | ||
|
||
project_id_prod: basedosdados-dev | ||
|
||
project_id_staging: basedosdados-dev | ||
|
||
# Liste as colunas da tabela que representam partições. | ||
# Não esqueça de deletar essas colunas nas tabelas .csv na hora de subir para o BigQuery. | ||
# Isso poupará muito tempo e dinheiro às pessoas utilizando essa tabela. | ||
# Se não houver partições, não modifique abaixo. | ||
partitions: | ||
|
||
bdm_file_size: | ||
|
||
# Quais são as colunas? Certifique-se de escrever uma boa descrição, as pessoas vão gostar | ||
# para saber sobre o que é a coluna. | ||
# Adicionar todas as colunas manualmente pode ser bastante cansativo, por isso, quando | ||
# inicializando este arquivo de configuração, você pode apontar a função para uma amostra de dados que | ||
# preencherá automaticamente as colunas. | ||
# Algumas colunas existirão apenas na tabela final, você as construirá em `publish.sql`. | ||
# Para esses, defina is_in_staging como False. | ||
# Além disso, você deve adicionar as colunas de partição aqui e definir is_partition como True. | ||
columns: | ||
- name: id_tabela | ||
bigquery_type: string | ||
description: ID Tabela | ||
temporal_coverage: | ||
covered_by_dictionary: | ||
directory_column: | ||
dataset_id: | ||
table_id: | ||
column_name: | ||
measurement_unit: | ||
has_sensitive_data: | ||
is_in_staging: yes | ||
is_partition: no | ||
- name: coluna | ||
bigquery_type: string | ||
description: Coluna | ||
temporal_coverage: | ||
covered_by_dictionary: | ||
directory_column: | ||
dataset_id: | ||
table_id: | ||
column_name: | ||
measurement_unit: | ||
has_sensitive_data: | ||
is_in_staging: yes | ||
is_partition: no | ||
- name: chave | ||
bigquery_type: string | ||
description: Chave | ||
temporal_coverage: | ||
covered_by_dictionary: | ||
directory_column: | ||
dataset_id: | ||
table_id: | ||
column_name: | ||
measurement_unit: | ||
has_sensitive_data: | ||
is_in_staging: yes | ||
is_partition: no | ||
- name: cobertura_temporal | ||
bigquery_type: string | ||
description: Cobertura Temporal | ||
temporal_coverage: | ||
covered_by_dictionary: | ||
directory_column: | ||
dataset_id: | ||
table_id: | ||
column_name: | ||
measurement_unit: | ||
has_sensitive_data: | ||
is_in_staging: yes | ||
is_partition: no | ||
- name: valor | ||
bigquery_type: string | ||
description: Valor | ||
temporal_coverage: | ||
covered_by_dictionary: | ||
directory_column: | ||
dataset_id: | ||
table_id: | ||
column_name: | ||
measurement_unit: | ||
has_sensitive_data: | ||
is_in_staging: yes | ||
is_partition: no | ||
|
||
metadata_modified: |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
Dicionário da tabela de proficiência do SAEB para os anos de 1995 a 2019 | ||
|
||
Para saber mais acesse: | ||
Website: | ||
Github: | ||
|
||
Ajude a manter o projeto :) | ||
Apoia-se: https://apoia.se/basedosdados | ||
|
||
Publicado por | ||
------------- | ||
Nome: Lucas Moreira | ||
Código: | ||
Email: lucas.moreira@basedosdados.org | ||
Tratado por | ||
----------- | ||
Nome: Lucas Moreira | ||
Código: https://github.com/basedosdados/mais/tree/master/bases/br_inep_saeb/code | ||
Email: lucas.moreira@basedosdados.org | ||
|
||
|
||
|
||
|
||
Colunas identificando linhas unicamente | ||
------------------- | ||
- table_id | ||
rdahis marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- coluna | ||
- chave | ||
- cobertura_temporal | ||
|
||
|
||
|
||
|
||
Cobertura Temporal | ||
------------------ | ||
|
||
|
||
|
||
|
||
Cobertura Espacial | ||
------------------ | ||
|
||
|
||
|
||
|
||
Tratamento | ||
---------- | ||
Compatibizaliação de todos os dicionários da série temporal do SAEB | ||
|
||
|
||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
Query para publicar a tabela. | ||
|
||
Esse é o lugar para: | ||
- modificar nomes, ordem e tipos de colunas | ||
- dar join com outras tabelas | ||
- criar colunas extras (e.g. logs, proporções, etc.) | ||
|
||
Qualquer coluna definida aqui deve também existir em `table_config.yaml`. | ||
|
||
# Além disso, sinta-se à vontade para alterar alguns nomes obscuros | ||
# para algo um pouco mais explícito. | ||
|
||
TIPOS: | ||
- Para modificar tipos de colunas, basta substituir STRING por outro tipo válido. | ||
- Exemplo: `SAFE_CAST(column_name AS NUMERIC) column_name` | ||
- Mais detalhes: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types | ||
*/ | ||
|
||
CREATE VIEW basedosdados-dev.br_inep_saeb.proficiencia AS | ||
SELECT | ||
SAFE_CAST(ano AS INT64) ano, | ||
SAFE_CAST(id_regiao AS STRING) id_regiao, | ||
SAFE_CAST(sigla_uf AS STRING) sigla_uf, | ||
SAFE_CAST(id_municipio AS STRING) id_municipio, | ||
SAFE_CAST(id_escola AS STRING) id_escola, | ||
SAFE_CAST(rede AS STRING) rede, | ||
SAFE_CAST(localizacao AS STRING) localizacao, | ||
SAFE_CAST(serie AS INT64) serie, | ||
SAFE_CAST(turno AS STRING) turno, | ||
SAFE_CAST(disciplina AS STRING) disciplina, | ||
SAFE_CAST(id_turma AS STRING) id_turma, | ||
SAFE_CAST(id_aluno AS STRING) id_aluno, | ||
SAFE_CAST(sexo AS STRING) sexo, | ||
SAFE_CAST(raca_cor AS STRING) raca_cor, | ||
SAFE_CAST(estrato AS INT64) estrato, | ||
SAFE_CAST(amostra AS INT64) amostra, | ||
SAFE_CAST(peso_aluno AS FLOAT64) peso_aluno, | ||
SAFE_CAST(proficiencia AS FLOAT64) proficiencia, | ||
SAFE_CAST(erro_padrao AS FLOAT64) erro_padrao, | ||
SAFE_CAST(proficiencia_saeb AS FLOAT64) proficiencia_saeb, | ||
SAFE_CAST(erro_padrao_saeb AS FLOAT64) erro_padrao_saeb | ||
FROM basedosdados-dev.br_inep_saeb_staging.proficiencia AS t |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
id_tabela