Skip to content

Contract: movimentacao_portuaria

Port cargo movement — ANTAQ.

Source unavailable since 2026-06-23

ANTAQ took offline the estatistica.antaq.gov.br host, which served the Estatístico Aquaviário files: it returns 403 (Cloudflare challenge) or redirects to an unavailability notice on gov.br, depending on the client; on 2026-11-11, that notice page started returning 404. The dashboard is at aquarela.antaq.gov.br (ANTAQ Statistics page), and the bulk files agrobr reads (/ea/txt/*.zip) are not on that host. Calls to antaq.movimentacao() raise SourceUnavailableError. No alternative source offers equivalent coverage — Base dos Dados only covers 2014-2020. Last checked: 2026-08-31.

Schema

Column Type Nullable Unit Constraints
ano INTEGER No — ≥ 2010
mes INTEGER No — 1-12
data_atracacao DATETIME Yes — —
tipo_navegacao STRING Yes — —
tipo_operacao STRING Yes — —
natureza_carga STRING Yes — —
sentido STRING Yes — Embarcados/Desembarcados
porto STRING Yes — —
complexo_portuario STRING Yes — —
terminal STRING Yes — —
municipio STRING Yes — —
uf STRING Yes — valid state
regiao STRING Yes — —
cd_mercadoria STRING Yes — —
mercadoria STRING Yes — —
grupo_mercadoria STRING Yes — —
origem STRING Yes — —
destino STRING Yes — —
peso_bruto_ton FLOAT Yes ton ≥ 0
qt_carga FLOAT Yes — ≥ 0
teu INTEGER Yes — ≥ 0

PK: (ano, mes, porto, cd_mercadoria, sentido, tipo_navegacao)

Aggregation

datasets.movimentacao_portuaria aggregates the source output by the PK (ano, mes, porto, cd_mercadoria, sentido, tipo_navegacao): peso_bruto_ton, qt_carga and teu are summed; complexo_portuario, municipio, uf, regiao, mercadoria and grupo_mercadoria take the first non-null value in the group; data_atracacao, tipo_operacao, natureza_carga, terminal, origem and destino survive only when the group holds a single value - otherwise they come out null. Rows without ano or mes (a carga with no matching atracacao) are dropped before aggregation. In a 2024 excerpt, 10 cargas become 6 rows. A null peso_bruto_ton, qt_carga or teu in any row of the group makes the sum null: missing is not zero.

If an ANTAQ TXT member lacks a column used by the join, the filters or the PK, the dataset raises ParseError naming the column (list on the source page).

qt_carga has no canonical unit: ANTAQ publishes QTCarga without one and its meaning changes with the cargo type. The column uses float64, including empty results.

Parameters

  • ano: int — movement year (required, ≥ 2010)
  • mercadoria: str | None — filter by commodity (substring, case-insensitive)
  • porto: str | None — filter by port (substring, case-insensitive)
  • uf: str | None — filter by state (exact match, uppercase)
  • sentido: str | None — "embarque" or "desembarque"
  • tipo_navegacao: str | None — navigation type
  • natureza_carga: str | None — cargo nature

Example

from agrobr import datasets

# 2024 movement
df = await datasets.movimentacao_portuaria(ano=2024)

# Soybeans shipped from Santos
df = await datasets.movimentacao_portuaria(
    ano=2024, mercadoria="Soja", porto="Santos", sentido="embarque"
)

# With metadata
df, meta = await datasets.movimentacao_portuaria(ano=2024, return_meta=True)

data_atracacao preserves the published date and time as datetime64[ns]; a calendar typo becomes NaT with a warning in MetaInfo.validation_warnings. Non-date text raises ParseError. ano, mes, and teu use Int64; peso_bruto_ton and qt_carga use float64. Populated and empty results have the same dtypes. sentido, tipo_navegacao, and natureza_carga accept their documented aliases and complete published labels, ignoring case, accents and surrounding whitespace. Unsupported values raise InvalidParameterError before downloading the ZIPs.