There is a newer version of this record available.

Software Open Access

ResidentMario/geoplot: 0.4.0 release

Aleksey Bilogur; Aneesh Karve; Luis Marsano; Martin Fleischmann

This release is a major breaking refactor of the colormap parameters in geoplot.

Changes to the scheme parameter and the removal of k parameter

In previous versions of geoplot, categorical colormaps were specified by a combination of the scheme and k string parameters. For example:

import geoplot as gplt
df = gpd.read_file(gplt.datasets.get_path('usa_cities'))
gplt.pointplot(df, hue='ELEV_IN_FT', cmap='viridis', scheme='EqualInterval', k=5)

In versions of geoplot 0.4.0 and later, the code to do this is now:

gplt.pointplot(df, hue='ELEV_IN_FT', cmap='viridis', scheme='EqualInterval')

Or this:

import mapclassify as mc
scheme = mc.EqualInterval(df['ELEV_IN_FT'], k=5)
gplt.pointplot(df, hue='ELEV_IN_FT', cmap='viridis', scheme=scheme)

This changeset was implemented primarily to make it possible to share the same colormap across plots. This was previously very difficult to do: see #163 and #182 for further context.

Other changes

This update also includes a number of minor bugfixes and docs changes.

Files (10.6 MB)
Name Size
ResidentMario/geoplot-0.4.0.zip
md5:5d4da79b56699ac01d61f6f86353925a
10.6 MB Download
200
10
views
downloads
All versions This version
Views 20041
Downloads 102
Data volume 109.5 MB21.2 MB
Unique views 17237
Unique downloads 82

Share

Cite as