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 — a legenda é colocada FORA do mapa para não sobrepor a figura
provincias.plot(
    ax=ax,
    column="Provincia",
    cmap="tab20",
    edgecolor="black",
    linewidth=0.8,
    legend=True,
    legend_kwds={
        "loc": "center left",
        "bbox_to_anchor": (1.02, 0.5),  # à direita, fora do mapa
        "title": "Província",
    },
)

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

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.4.tar.gz (22.5 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.4-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geomoz-0.1.4.tar.gz
  • Upload date:
  • Size: 22.5 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.4.tar.gz
Algorithm Hash digest
SHA256 0017f4451979f547526c3cb7333f6853f75042bb90f7172d4b50c2d9f2df9d30
MD5 ee9e4b65ea36ffd7212cf851bf9b72ae
BLAKE2b-256 6abf6b3a87c487df2491b48ef934cac5d091722967b4d902498fa5123e8706e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: geomoz-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 30.0 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 94bbd88e55acc2ed069a3c9ac39767e79f74294b6ddf0d65ee36ee1c9f6e1a9e
MD5 9fe1c3e6fcf4e00bc005166c9ca0ec26
BLAKE2b-256 978953d311d89daf0a5c448ce0e37f7448f2b8642e1b539500087ab92a503186

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