Skip to content

0.4.0 release

Compare
Choose a tag to compare
@ResidentMario ResidentMario released this 01 Nov 18:04
· 54 commits to master since this release
71e1372

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.