Last active
April 24, 2019 11:02
-
-
Save codeslord/c7cc40a877a1058b55a119924e03b636 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!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