skillfed

Cartopy

A Python library for cartographic visualizations with Matplotlib

cartopy v0.25.0 5.3M downloads/30d#2,127 on PyPI1,614
Permissive license BSD-3-Clause Active released

What it is and what it does

Cartopy is a Python library that simplifies drawing maps for scientific data visualization and analysis. It sits on top of Matplotlib and provides object-oriented map projection definitions, coordinate transformations between projections, and vector data handling through Shapely integration. The library lets you work with geographic data—points, lines, polygons, and raster images—and transform them between different map projections, then render them directly in Matplotlib plots.

You use Cartopy when you need to visualize geospatial data on maps: plotting weather data across regions, displaying geographic features like coastlines and borders, or overlaying scientific measurements on map backgrounds. It handles the projection math and Matplotlib integration so you can focus on your data rather than coordinate system details. The package depends on numpy, matplotlib, shapely, pyproj, pyshp, and packaging—all mature libraries in the scientific Python ecosystem.

Use it for:

  • Plot weather or climate data on map projections for meteorological analysis.
  • Visualize geographic boundaries, coastlines, and administrative regions from shapefiles.
  • Overlay scientific measurements (satellite data, sensor readings) onto map backgrounds.
  • Create publication-quality cartographic visualizations for research papers or reports.
  • Transform and display geospatial point, line, or polygon data across different map projections.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Cartopy makes it easy to draw maps for data analysis and visualization by providing object-oriented projection definitions, point/line/polygon transformations between map projections, and Matplotlib integration for advanced mapping.

Yes. Cartopy is actively maintained, has no known vulnerabilities, and is the standard choice for map visualization in the scientific Python ecosystem. Medium install friction is typical for geospatial libraries with compiled components. The permissive BSD-3-Clause license poses no restrictions. Install it if you need to visualize geographic or geospatial data in Python.

Install

cartopy on PyPI

pip

pip install cartopy

uv

uv add cartopy

poetry

poetry add cartopy

Installing Cartopy

Before you install

Medium install friction due to compiled C++ components and multiple binary wheels across platforms. Active maintenance with recent commits and a stable release cadence; requires Python 3.10 or later.

License in practice

BSD-3-Clause permissive license allows commercial and private use with attribution; no copyleft restrictions on derivative works.

Quickstart

pip install cartopy

import cartopy.crs as ccrs
import matplotlib.pyplot as plt

ax = plt.axes(projection=ccrs.PlateCarree())
ax.coastlines()
plt.show()

Requires a working C++ compiler and system libraries for shapely and pyproj; some platforms may need additional geospatial library dependencies.

Verify before relying

  • Whether pre-built wheels cover all target platforms or if source compilation is needed on some systems.
  • Performance characteristics when handling large shapefiles or high-resolution map data.

Package facts

License BSD-3-Clause (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies 6 — numpy, matplotlib, shapely, packaging, pyshp, pyproj
Maintenance actively maintained — 378 days since the last release
Last repo commit
First released
Downloads 5,250,900/month — #2,127 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cartopy-0.25.0-cp310-cp310-macosx_10_9_x86_64.whl; cartopy-0.25.0-cp310-cp310-macosx_11_0_arm64.whl; cartopy-0.25.0-cp310-cp310-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; cartopy-0.25.0-cp310-cp310-win_amd64.whl; cartopy-0.25.0-cp311-cp311-macosx_10_9_x86_64.whl; cartopy-0.25.0-cp311-cp311-macosx_11_0_arm64.whl; cartopy-0.25.0-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; cartopy-0.25.0-cp311-cp311-win_amd64.whl; cartopy-0.25.0-cp312-cp312-macosx_10_13_x86_64.whl; cartopy-0.25.0-cp312-cp312-macosx_11_0_arm64.whl; cartopy-0.25.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; cartopy-0.25.0-cp312-cp312-win_amd64.whl; cartopy-0.25.0-cp313-cp313-macosx_10_13_x86_64.whl; cartopy-0.25.0-cp313-cp313-macosx_11_0_arm64.whl; cartopy-0.25.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; cartopy-0.25.0-cp313-cp313-win_amd64.whl

Keywords: cartography, map, transform, projection, pyproj, shapely, shapefile

Development Status :: 4 - BetaFramework :: MatplotlibOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: POSIX :: AIXOperating System :: POSIX :: LinuxProgramming Language :: C++Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: GISTopic :: Scientific/Engineering :: Visualization

Tags

map visualization pythongeographic projectionscartographic plottingshapefile mappinggeospatial data visualizationmap coordinate transformationmatplotlib map integration
geospatialcartographymatplotlib-extension

More Scientific/Engineering packages