Skip to main content

Utility Python package for IBGE information

Project description

IBGE-Utils

ibge-utils é uma API Python com funções utilitárias para manipulação e extração de dados georeferenciados, de acordo com os padrões do IBGE.

Dados

Os dados da API foram extraídos das Tabelas da Divisão Territorial Brasileira 2022 do IBGE, e estão distribuídos nas tabelas do arquivo ibge.duckdb no seguinte esquema:

tables

Macrorregiões

from ibge.brasil import Macrorregiao

norte = Macrorregiao(geocodigo=1) # OU
norte = Macrorregiao(nome="norte")

norte.estados # Estados do Norte
# Ouput:
# [Rondônia, Acre, Amazonas, Roraima, Pará, Amapá, Tocantins]
norte.mesorregioes # Mesorregiões do Norte
norte.microrregioes # Microrregiões do Norte
norte.municipios # Todos os municípios do Norte

Estados

from ibge.brasil import Estado

rondonia = Estado(geocodigo=11) # OU
rondonia = Estado(uf="RO")

rondonia.macrorregiao # Norte
rondonia.mesorregioes # [Leste Rondoniense, Madeira-Guaporé]
rondonia.microrregioes # Microrregiões de Rondônia
rondonia.municipios # Todos os municípios de Rondônia

Municípios

from ibge.brasil import Municipio

cerejeiras = Municipio(geocodigo=1100056)

cerejeiras.macrorregiao # Norte
cerejeiras.estado # Rondônia
cerejeiras.mesorregiao # Leste Rondoniense
cerejeiras.microrregiao # Colorado do Oeste
cerejeiras.info
# Output:
# {'latitude': -13.187,
# 'longitude': -60.8168,
# 'fuso_horario': 'America/Porto_Velho'}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ibge_utils-1.0.1.tar.gz (246.7 kB view details)

Uploaded Source

Built Distribution

ibge_utils-1.0.1-py3-none-any.whl (247.8 kB view details)

Uploaded Python 3

File details

Details for the file ibge_utils-1.0.1.tar.gz.

File metadata

  • Download URL: ibge_utils-1.0.1.tar.gz
  • Upload date:
  • Size: 246.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1015-azure

File hashes

Hashes for ibge_utils-1.0.1.tar.gz
Algorithm Hash digest
SHA256 945a19e9253fc7981d3e4ee528d3d9a0402b7025c2a41f7d27dcf8a3806f3e8c
MD5 525e36bc328c86520495057579a10da0
BLAKE2b-256 678a0a1502abf6f1a9ca08c268395ffbfb9aa0e6145b65ffe5265a5ceceb45e8

See more details on using hashes here.

File details

Details for the file ibge_utils-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ibge_utils-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 247.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.5.0-1015-azure

File hashes

Hashes for ibge_utils-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a48338a993aa993ff8a5633cc6ec49e52d7e45e206748bdf8fdb29cf790df689
MD5 c9d1a52ee1276a5cef14a37228312fde
BLAKE2b-256 e0e668c27742a90ba4366ae15f482ef566a22bec598822b499108903d715ea54

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page