4

How can I apply Robinson projection in a GeoPandas plot?

import geopandas as gpd

world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
world.plot(column='pop_est')

enter image description here

1 Answer 1

5

Use the cartopy library to bring in the Robinson details.

More details on the GeoPandas Docs.

import geopandas as gpd
from cartopy import crs as ccrs

world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
robinson = ccrs.Robinson().proj4_init
world.to_crs(robinson).plot(column='pop_est')

enter image description here

1
  • Fantastic, thanks!
    – Stücke
    Jan 30 at 16:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.