-
Notifications
You must be signed in to change notification settings - Fork 20
[Data] br_mma_cnuc — Cadastro Nacional de Unidades de Conservação #1488
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
2b5ca31
f10acb7
3216a27
2b0c798
6599a61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| {{ | ||
| config( | ||
| alias="unidades_conservacao", | ||
| schema="br_mma_cnuc", | ||
| materialized="table", | ||
| ) | ||
| }} | ||
|
|
||
| select | ||
| safe_cast(ano as int64) ano, | ||
| safe_cast(semestre as int64) semestre, | ||
| safe_cast(id_uc as int64) id_uc, | ||
| safe_cast(codigo_uc as string) codigo_uc, | ||
| safe_cast(nome_uc as string) nome_uc, | ||
| safe_cast(esfera_administrativa as string) esfera_administrativa, | ||
| safe_cast(categoria_manejo as string) categoria_manejo, | ||
| safe_cast(categoria_iucn as string) categoria_iucn, | ||
| safe_cast(grupo as string) grupo, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Mesmo acontece nas variáveis orgao_gestor e informacoes_gerais
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Esse comportamento acontece com diversas colunas |
||
| safe_cast(protecao_integral as int64) protecao_integral, | ||
| safe_cast(uso_sustentavel as int64) uso_sustentavel, | ||
| safe_cast(sigla_uf as string) sigla_uf, | ||
| safe_cast(municipios_abrangidos as string) municipios_abrangidos, | ||
| safe_cast(ano_criacao as int64) ano_criacao, | ||
| safe_cast(ano_ato_legal_recente as int64) ano_ato_legal_recente, | ||
| safe_cast(ato_legal_criacao as string) ato_legal_criacao, | ||
| safe_cast(outros_atos_legais as string) outros_atos_legais, | ||
| safe_cast(plano_manejo as string) plano_manejo, | ||
| safe_cast(conselho_gestor as string) conselho_gestor, | ||
| safe_cast(orgao_gestor as string) orgao_gestor, | ||
| safe_cast(informacoes_gerais as string) informacoes_gerais, | ||
| safe_cast(fonte_area as int64) fonte_area, | ||
| safe_cast(area_soma_biomas as float64) area_soma_biomas, | ||
| safe_cast(area_soma_biomas_continental as float64) area_soma_biomas_continental, | ||
| safe_cast(area_ato_legal_criacao as float64) area_ato_legal_criacao, | ||
| safe_cast(area_amazonia as float64) area_amazonia, | ||
| safe_cast(area_caatinga as float64) area_caatinga, | ||
| safe_cast(area_cerrado as float64) area_cerrado, | ||
| safe_cast(area_mata_atlantica as float64) area_mata_atlantica, | ||
| safe_cast(area_pampa as float64) area_pampa, | ||
| safe_cast(area_pantanal as float64) area_pantanal, | ||
| safe_cast(area_marinha as float64) area_marinha, | ||
| safe_cast(bioma_declarado as string) bioma_declarado, | ||
| safe_cast(biomas_abrangidos as string) biomas_abrangidos, | ||
| safe_cast(percentual_alem_linha_costa as float64) percentual_alem_linha_costa, | ||
| safe_cast(recortes as float64) recortes, | ||
| safe_cast(mar_territorial as float64) mar_territorial, | ||
| safe_cast(municipio_costeiro as float64) municipio_costeiro, | ||
| safe_cast( | ||
| municipio_costeiro_area_marinha as float64 | ||
| ) municipio_costeiro_area_marinha, | ||
| safe_cast(amazonia_legal as float64) amazonia_legal, | ||
| safe_cast(lei_mata_atlantica as float64) lei_mata_atlantica, | ||
| safe_cast(sobreposicao_ti_tq as float64) sobreposicao_ti_tq, | ||
| safe_cast(programa_projeto as string) programa_projeto, | ||
| safe_cast(sitios_patrimonio_mundial as string) sitios_patrimonio_mundial, | ||
| safe_cast(sitios_ramsar as string) sitios_ramsar, | ||
| safe_cast(mosaico as string) mosaico, | ||
| safe_cast(reserva_biosfera as string) reserva_biosfera, | ||
| safe_cast(codigo_wdpa as string) codigo_wdpa, | ||
| safe_cast(regiao as string) regiao, | ||
| safe_cast( | ||
| qualidade_dados_georreferenciados as string | ||
| ) qualidade_dados_georreferenciados, | ||
| safe_cast(presente_versao_anterior as string) presente_versao_anterior, | ||
| safe_cast(diferenca_area as float64) diferenca_area, | ||
| safe_cast(razao_diferenca_area as float64) razao_diferenca_area, | ||
| safe_cast(data_publicacao_cnuc as date) data_publicacao_cnuc, | ||
| safe_cast(data_ultima_certificacao as date) data_ultima_certificacao, | ||
| st_geogfromtext(safe_cast(geometria as string), make_valid => true) geometria, | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. geometria deve ser tipada como geography. Atualizar o manual de estilo e integrar com o MCP seria um bom próx passo
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Outro ponto, pra garantir qualidade é bom validar as geometrias com o BBOX aproximado do brasil. O objetivo é saber se os polígonos estão dentro do território BR
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Das +-36k de linhas somente 2927k tem geometrias não nulas. Me parece estranho;
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. existem geometrias nulas com valores de áreas em hectares nas demais colunas |
||
| from {{ set_datalake_project("br_mma_cnuc_staging.unidades_conservacao") }} as t | ||

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.
variáveis string com descrições de ucs e similares estão ora em caixa alta ora em Title