Skip to content

Instantly share code, notes, and snippets.

@codeslord
Last active April 24, 2019 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeslord/c7cc40a877a1058b55a119924e03b636 to your computer and use it in GitHub Desktop.
Save codeslord/c7cc40a877a1058b55a119924e03b636 to your computer and use it in GitHub Desktop.
!pip install -U --no-deps mapclassify git+git://github.com/geopandas/geopandas.git@master
!pip install pysal==2
!pip install fiona
!pip install pyproj
%matplotlib inline
import geopandas as gpd
import matplotlib as mpl # make rcParams available (optional)
mpl.rcParams['figure.dpi']= 144 # increase dpi (optional)
world = gpd.read_file(gpd.datasets.get_path("naturalearth_lowres"))
world = world[world.name != 'Antarctica'] # remove Antarctica (optional)
world['gdp_per_person'] = world.gdp_md_est / world.pop_est
g = world.plot(column='gdp_per_person', cmap='summer', scheme='quantiles')
g.set_facecolor('#A8C5DD') # make the ocean blue (optional)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment