How to use the mapclassify.classifiers.CLASSIFIERS function in mapclassify

To help you get started, we’ve selected a few mapclassify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github martinfleis / momepy / momepy / diversity.py View on Github external
binning="HeadTailBreaks",
        gini_simpson=False,
        inverse=False,
        categorical=False,
        categories=None,
        verbose=True,
        **classification_kwds
    ):
        if not categorical:
            try:
                import mapclassify.classifiers as classifiers
            except ImportError:
                raise ImportError("The 'mapclassify' package is required")

            schemes = {}
            for classifier in classifiers.CLASSIFIERS:
                schemes[classifier.lower()] = getattr(classifiers, classifier)
            binning = binning.lower()
            if binning not in schemes:
                raise ValueError(
                    "Invalid binning. Binning must be in the"
                    " set: %r" % schemes.keys()
                )

        self.gdf = gdf
        self.sw = spatial_weights
        self.id = gdf[unique_id]
        self.binning = binning
        self.gini_simpson = gini_simpson
        self.inverse = inverse
        self.categorical = categorical
        self.categories = categories

mapclassify

Classification Schemes for Choropleth Maps.

BSD-3-Clause
Latest version published 3 months ago

Package Health Score

76 / 100
Full package analysis

Similar packages