Transport · Public data

World seaports

Maritime ports and terminals worldwide with UN/LOCODEs, harbor depths and coordinates.

National Geospatial-Intelligence Agency (NGA), Publication 150 World Port Index · Public domain · commons_pubdata.transport.seaports

Read Markdown

Registered, not loaded yet: the table is not in the catalog. This page fills in after its first refresh.

Query it with DuckDB.

Bash
lhbox duckdb --catalog commons/pubdata
SQL · Large seaports by country
SELECT country_code, country_name, count(*) AS total_ports,
       count(*) FILTER (WHERE harbor_size = 'Large') AS large_ports
FROM commons_pubdata.transport.seaports
GROUP BY 1, 2 ORDER BY large_ports DESC, total_ports DESC LIMIT 20;

Read it where you work.

Public, read-only data. With an account, lhbox duckdb attaches the catalog as commons_pubdata; an agent with the LakehouseBox connector opens it with open_public_catalog("commons/pubdata"). Without one, DuckDB reads the public files directly.

More example queries

  • Deep-water Mediterranean ports able to berth >= 15 m cargo piers
    SQL
    SELECT port_name, un_locode, country_code, harbor_size, cargo_pier_depth_m, latitude, longitude
    FROM commons_pubdata.transport.seaports
    WHERE water_body ILIKE '%Mediterranean%' AND cargo_pier_depth_m >= 15
    ORDER BY cargo_pier_depth_m DESC;

Know your columns.

ColumnTypeMeaning
port_numberintNGA World Port Index unique numeric identifier
port_namestringmain port name
un_locodestring5-character UN/LOCODE (e.g. NLRTM for Rotterdam, USLAX for Los Angeles)
country_codestringISO 3166-1 alpha-2 country code (joins reference.countries)
country_namestringcountry or territory name as listed in Pub 150
region_namestringNGA hydrographic region name
View all 17 columns
water_bodystringocean, sea or gulf the port opens onto
harbor_sizestringLarge, Medium, Small or Very Small
harbor_typestringCoastal (Natural), Coastal (Breakwater), River (Natural), River (Basin), Open Roadstead, etc.
shelter_affordedstringExcellent, Good, Fair, Poor or None
channel_depth_mdoublecontrolling channel depth, metres
cargo_pier_depth_mdoublecargo pier depth, metres
oil_terminal_depth_mdoubleoil terminal depth, metres
max_vessel_length_mdoublemaximum vessel length, metres
max_vessel_draft_mdoublemaximum vessel draft, metres
latitudedoubleWGS84 latitude in decimal degrees
longitudedoubleWGS84 longitude in decimal degrees

Join keys: country_code, un_locode.

Before you query.

  1. un_locode is normalized without spaces (e.g.
  2. 'NLRTM', 'ESBCN') and is null for small anchorages that have no assigned UN/LOCODE.
  3. Depth and vessel dimension columns (channel_depth_m, cargo_pier_depth_m, max_vessel_length_m) are null when unreported (0 in the raw NGA table is stored as null here, since 0 m means unknown, not zero depth).

Source & licence.

Source
National Geospatial-Intelligence Agency (NGA), Publication 150 World Port Index
Licence
Public domain (US government work)
Attribution
World Port Index (Pub 150), National Geospatial-Intelligence Agency (NGA), public domain.
Coverage
worldwide, ~3,800 maritime ports and terminals; current NGA World Port Index edition
Refresh
monthly, the whole table replaced; source version n/a
Table
commons/pubdata · transport.seaports · Iceberg v? · browse the catalog
Recipe
pubdata/recipes/seaports.py, registry entry pubdata/registry/seaports.yaml

Source: National Geospatial-Intelligence Agency (NGA), Publication 150 World Port Index · Public domain · Snapshot shown: not loadedHTML for people. Markdown for agents.