deprecated. use geopandas.

ClimateImpactLab, updated 🕥 2022-06-17 19:56:19

xshape is no longer in development. This repository is a read-only archive.

To plot xarray data using a shapefile, I suggest simply dumping into geopandas:

.. code-block:: python

# for some DataArray da indexed by a single coordinate,
# matching the values in a column of a shapefile

import geopandas as gpd
shp = gpd.read_file('some_shapefile').set_index(


If you'd like to take over development of xshape, feel free to reach out!

Climate Impact Lab

A team of scientists, economists and engineers measuring the real-world costs of climate change.

GitHub Repository