Skip to main content

Geospatial data library for Mozambique with geological and administrative datasets

Project description

GeoMoz - Dados Geográficos de Moçambique

CI PyPI Python R License

GeoMoz é um pacote Python que fornece acesso fácil a dados geográficos de Moçambique, incluindo divisões administrativas (11 províncias, 161 distritos, 459 postos, 11.524 aldeias) e dados geológicos completos.

Inspirado no geobr (Brasil).

Agora também disponível em R! Veja a pasta R/ para o pacote GeoMozR.


Versões Disponíveis

Linguagem Instalação Pasta
Python pip install geomoz Raiz do projeto
R devtools::install_github("geolithicamz-hub/geomoz", subdir="R") R/

Instalação

pip install geomoz

Com dependências completas:

pip install geomoz geopandas matplotlib folium

Uso Rápido

import geomoz
import matplotlib.pyplot as plt

# Carregar dados
provincias = geomoz.read_province()
print(f"{len(provincias)} províncias carregadas")

# Criar figura
fig, ax = plt.subplots(figsize=(8, 12))

# Plot
provincias.plot(
    ax=ax,
    column="Provincia",
    cmap="tab20",
    edgecolor="black",
    linewidth=0.8,
    legend=True,
    legend_kwds={"loc": "upper left", "title": "Provincias"}
)

# Ajustes
ax.set_title("Províncias de Moçambique", fontsize=14)
ax.axis("off")

# Mover legenda
leg = ax.get_legend()
leg.set_bbox_to_anchor((1.05, 1)) # fora do mapa

plt.tight_layout()
plt.show()

Dados Disponíveis

Dataset Registros Função
Províncias 11 read_province()
Distritos 161 read_district()
Postos Administrativos 459 read_admin_post()
Aldeias 11.524 read_village() / CachedGeoMoz.read_village()
Geologia ~50.000 read_geology()

Exemplos

Mapa de Províncias

from geomoz import plot_provinces
plot_provinces(show_names=True, save_path='mapa.png')

Geologia por Província

import geopandas as gpd
from geomoz import read_province, read_geology

province = read_province(name_province="Tete")
geology = read_geology()
geo_tete = gpd.overlay(geology, province, how='intersection')
print(f"Unidades geológicas em Tete: {len(geo_tete)}")

Mapa Web Interativo

import folium
from geomoz import read_province

province = read_province(name_province="Nampula")
m = folium.Map(location=[-14.5, 39], zoom_start=7)
folium.GeoJson(province).add_to(m)
m.save('mapa.html')

Documentação


Desenvolvimento

git clone https://github.com/geolithicamz-hub/geomoz.git
cd geomoz
pip install -e ".[dev]"
pytest -m "not network"

Licença

MIT License - veja LICENSE


GeoMoz - Dados geográficos de Moçambique ao alcance de todos!

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

geomoz-0.1.3.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geomoz-0.1.3-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

Details for the file geomoz-0.1.3.tar.gz.

File metadata

  • Download URL: geomoz-0.1.3.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for geomoz-0.1.3.tar.gz
Algorithm Hash digest
SHA256 44b22a89b8ed36f9912fe8d0dc992b5127b1003628e77cefc283da9000d69fd7
MD5 75cb839f2477ef2c3c265e7a8857cad9
BLAKE2b-256 77e36c8d008aab1da6dfe9a416e93d93663c8d5f47aea432ff2d25f085444a08

See more details on using hashes here.

File details

Details for the file geomoz-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: geomoz-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for geomoz-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a0d2680bbcf4f70c822e4b0240f29f447952acd5b1918d79521b54d251126f91
MD5 9a92205dd293773f3f178c2bab1ac80e
BLAKE2b-256 910eb3c4a6b56880d30458611352e15f281720a5ee9df01c623e01104e3ed597

See more details on using hashes here.

Supported by

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