How to use the mapclassify.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
spatial_weights,
        unique_id,
        binning="HeadTailBreaks",
        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.categorical = categorical
        self.categories = categories
        self.classification_kwds = classification_kwds
github martinfleis / momepy / momepy / diversity.py View on Github external
unique_id,
        binning="HeadTailBreaks",
        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.categorical = categorical
        self.categories = categories
        self.classification_kwds = classification_kwds

        data = gdf.copy()
github martinfleis / momepy / momepy / diversity.py View on Github external
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
        self.classification_kwds = classification_kwds

mapclassify

Classification Schemes for Choropleth Maps.

BSD-3-Clause
Latest version published 2 months ago

Package Health Score

79 / 100
Full package analysis

Similar packages