Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create better concordance in the scheme parameter #185

Open
ResidentMario opened this issue Nov 6, 2019 · 2 comments
Open

Create better concordance in the scheme parameter #185

ResidentMario opened this issue Nov 6, 2019 · 2 comments

Comments

@ResidentMario
Copy link
Owner

The scheme parameter accepts either a string name of a classifier (e.g. EqualInterval) or a fitted mapclassify object (e.g. mc.EqualInterval(df, k=5)). The following changes ought to be made:

  • Currently discrete categorical binning is only possible by passing the string "categorical" to the scheme parameter. The problem is that this magic value is not at all discoverable. It really need to have an equivalent mapclassify expression: e.g. mc.Discrete.

    Also, this string should be renamed to "discrete", as "categorical" is confusing, and not a good name for a mapclassify scheme.

    See Propogate legend_values and legend_labels to colorbar legend #144 for discussion and a clear use case.

  • mapclassify schemes need to be create-able in unfitted form, and you should be able to pass both an unfitted and fitted scheme to geoplot. Passing a fitted scheme is necessary for the "scheme reuse" feature, whilst passing an unfitted scheme is necessary for palatable input to plots that generate data just-in-time (e.g. quadtree), and thus are categorically opaque to the user.

Both of these changes require contribs to mapclassify.

@ResidentMario
Copy link
Owner Author

See this gitter comment for some notes on implementation.

@ResidentMario
Copy link
Owner Author

The second bullet point should now be possible due to mapclassify#51, specifically pooling.py which was added here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant