Cartopy
A Python library for cartographic visualizations with Matplotlib
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 cartopyuv
uv add cartopypoetry
poetry add cartopyInstalling 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
Tags
More Scientific/Engineering packages
NumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
pandaspandas provides fast, flexible data structures…
permissive · top 100 on PyPI
scipyscipy provides numerical algorithms for…
permissive · top 100 on PyPI
scikit-learnscikit-learn provides a comprehensive Python…
permissive · top 1,000 on PyPI
dilldill extends Python's pickle module to…
permissive · top 1,000 on PyPI
multiprocessMultiprocess is an enhanced fork of Python's…
permissive · top 1,000 on PyPI
pyprojpyproj provides a Python interface to PROJ,…
permissive · top 1,000 on PyPI
basemapBasemap renders geographic data on matplotlib…
permissive · top 15,000 on PyPI
plotbinPlotBin provides utilities to create and…
unclear · top 15,000 on PyPI
descartesConverts geometric objects and GeoJSON-like…
permissive · top 15,000 on PyPI
basemap-dataProvides geographic data assets (coastlines,…
copyleft · top 15,000 on PyPI
geopandasGeoPandas extends pandas DataFrames to handle…
permissive · top 1,000 on PyPI
splotsplot creates static and interactive…
permissive · top 15,000 on PyPI
xtgeovizProvides plotting functions for xtgeo objects,…
copyleft · top 15,000 on PyPI
staticmapGenerates static map images with geographic…
unclear · top 15,000 on PyPI
healpyhealpy wraps the HEALPix C++ library to handle…
copyleft · top 15,000 on PyPI