import libpysal
import geopandas as gpd
import mapclassify as mc
columbus = gpd.read_file(libpysal.examples.get_path('columbus.shp'))
mc.Equal_Interval(columbus.CRIME)
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:483: UserWarning: Deprecated (2.1.0): Equal_Interval is being renamed to EqualInterval. Equal_Interval will be removed on 2020-01-31. warn(self.message)
Equal Interval Lower Upper Count ======================================== x[i] <= 13.921 2 13.921 < x[i] <= 27.664 16 27.664 < x[i] <= 41.407 14 41.407 < x[i] <= 55.149 10 55.149 < x[i] <= 68.892 7
qc = mc.EqualInterval(columbus.CRIME)
mc.HeadTail_Breaks(columbus.CRIME)
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:483: UserWarning: Deprecated (2.1.0): HeadTail_Breaks is being renamed to HeadTailBreaks. HeadTail_Breaks will be removed on 2020-01-31. warn(self.message) /home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:87: DeprecationWarning: Call to deprecated function (or staticmethod) headTail_breaks. (use head_tail_breaks) return headTail_breaks(values[values >= mean], cuts) /home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:87: DeprecationWarning: Call to deprecated function (or staticmethod) headTail_breaks. (use head_tail_breaks) return headTail_breaks(values[values >= mean], cuts) /home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:87: DeprecationWarning: Call to deprecated function (or staticmethod) headTail_breaks. (use head_tail_breaks) return headTail_breaks(values[values >= mean], cuts) /home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:87: DeprecationWarning: Call to deprecated function (or staticmethod) headTail_breaks. (use head_tail_breaks) return headTail_breaks(values[values >= mean], cuts)
HeadTailBreaks Lower Upper Count ======================================== x[i] <= 35.129 25 35.129 < x[i] <= 49.361 12 49.361 < x[i] <= 57.542 8 57.542 < x[i] <= 63.304 3 63.304 < x[i] <= 68.892 1
mc.HeadTailBreaks(columbus.CRIME)
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:87: DeprecationWarning: Call to deprecated function (or staticmethod) headTail_breaks. (use head_tail_breaks) return headTail_breaks(values[values >= mean], cuts) /home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:87: DeprecationWarning: Call to deprecated function (or staticmethod) headTail_breaks. (use head_tail_breaks) return headTail_breaks(values[values >= mean], cuts) /home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:87: DeprecationWarning: Call to deprecated function (or staticmethod) headTail_breaks. (use head_tail_breaks) return headTail_breaks(values[values >= mean], cuts) /home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:87: DeprecationWarning: Call to deprecated function (or staticmethod) headTail_breaks. (use head_tail_breaks) return headTail_breaks(values[values >= mean], cuts)
HeadTailBreaks Lower Upper Count ======================================== x[i] <= 35.129 25 35.129 < x[i] <= 49.361 12 49.361 < x[i] <= 57.542 8 57.542 < x[i] <= 63.304 3 63.304 < x[i] <= 68.892 1
mc.Box_Plot(columbus.CRIME)
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:483: UserWarning: Deprecated (2.1.0): Box_Plot is being renamed to BoxPlot. Box_Plot will be removed on 2020-01-31. warn(self.message)
Box Plot Lower Upper Count ========================================== x[i] <= -22.757 0 -22.757 < x[i] <= 20.049 13 20.049 < x[i] <= 34.001 12 34.001 < x[i] <= 48.585 12 48.585 < x[i] <= 91.391 12
mc.BoxPlot(columbus.CRIME)
Box Plot Lower Upper Count ========================================== x[i] <= -22.757 0 -22.757 < x[i] <= 20.049 13 20.049 < x[i] <= 34.001 12 34.001 < x[i] <= 48.585 12 48.585 < x[i] <= 91.391 12
mc.Natural_Breaks(columbus.CRIME)
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:483: UserWarning: Deprecated (2.1.0): Natural_Breaks is being renamed to NaturalBreaks. Natural_Breaks will be removed on 2020-01-31. warn(self.message)
NaturalBreaks Lower Upper Count ======================================== x[i] <= 0.224 2 0.224 < x[i] <= 22.541 12 22.541 < x[i] <= 34.001 11 34.001 < x[i] <= 48.585 12 48.585 < x[i] <= 68.892 12
mc.NaturalBreaks(columbus.CRIME)
NaturalBreaks Lower Upper Count ======================================== x[i] <= 0.224 2 0.224 < x[i] <= 22.541 12 22.541 < x[i] <= 34.001 11 34.001 < x[i] <= 48.585 12 48.585 < x[i] <= 68.892 12
mc.Fisher_Jenks(columbus.CRIME)
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:483: UserWarning: Deprecated (2.1.0): Fisher_Jenks is being renamed to FisherJenks. Fisher_Jenks will be removed on 2020-01-31. warn(self.message)
FisherJenks Lower Upper Count ======================================== x[i] <= 0.224 2 0.224 < x[i] <= 22.541 12 22.541 < x[i] <= 34.001 11 34.001 < x[i] <= 48.585 12 48.585 < x[i] <= 68.892 12
mc.FisherJenks(columbus.CRIME)
FisherJenks Lower Upper Count ======================================== x[i] <= 0.224 2 0.224 < x[i] <= 22.541 12 22.541 < x[i] <= 34.001 11 34.001 < x[i] <= 48.585 12 48.585 < x[i] <= 68.892 12
mc.Std_Mean(columbus.CRIME)
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:483: UserWarning: Deprecated (2.1.0): Std_Mean is being renamed to StdMean. Std_Mean will be removed on 2020-01-31. warn(self.message)
StdMean Lower Upper Count ======================================== x[i] <= 1.665 2 1.665 < x[i] <= 18.397 6 18.397 < x[i] <= 51.861 30 51.861 < x[i] <= 68.593 10 68.593 < x[i] <= 68.892 1
mc.StdMean(columbus.CRIME)
StdMean Lower Upper Count ======================================== x[i] <= 1.665 2 1.665 < x[i] <= 18.397 6 18.397 < x[i] <= 51.861 30 51.861 < x[i] <= 68.593 10 68.593 < x[i] <= 68.892 1
mc.User_Defined(columbus.CRIME, bins=[51.862, 69.0])
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:483: UserWarning: Deprecated (2.1.0): User_Defined is being renamed to UserDefined. User_Defined will be removed on 2020-01-31. warn(self.message)
UserDefined Lower Upper Count ======================================== x[i] <= 51.862 38 51.862 < x[i] <= 69.000 11
mc.UserDefined(columbus.CRIME, bins=[51.862, 69.0])
UserDefined Lower Upper Count ======================================== x[i] <= 51.862 38 51.862 < x[i] <= 69.000 11
mc.Jenks_Caspall(columbus.CRIME)
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:483: UserWarning: Deprecated (2.1.0): Jenks_Caspall is being renamed to JenksCaspall. Jenks_Caspall will be removed on 2020-01-31. warn(self.message)
JenksCaspall Lower Upper Count ======================================== x[i] <= 20.049 13 20.049 < x[i] <= 29.028 7 29.028 < x[i] <= 36.869 7 36.869 < x[i] <= 48.585 10 48.585 < x[i] <= 68.892 12
mc.JenksCaspall(columbus.CRIME)
JenksCaspall Lower Upper Count ======================================== x[i] <= 20.049 13 20.049 < x[i] <= 29.028 7 29.028 < x[i] <= 36.869 7 36.869 < x[i] <= 48.585 10 48.585 < x[i] <= 68.892 12
mc.Jenks_Caspall_Sampled(columbus.CRIME)
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:483: UserWarning: Deprecated (2.1.0): Jenks_Caspall_Sampled is being renamed to JenksCaspallSampled. Jenks_Caspall_Sampled will be removed on 2020-01-31. warn(self.message) /home/serge/anaconda3/envs/pysaldev/lib/python3.7/site-packages/pandas/core/computation/expressions.py:183: UserWarning: evaluating in Python space because the '*' operator is not supported by numexpr for the bool dtype, use '&' instead .format(op=op_str, alt_op=unsupported[op_str])) /home/serge/anaconda3/envs/pysaldev/lib/python3.7/site-packages/numpy/core/fromnumeric.py:56: FutureWarning: Series.nonzero() is deprecated and will be removed in a future version.Use Series.to_numpy().nonzero() instead return getattr(obj, method)(*args, **kwds)
JenksCaspallSampled Lower Upper Count ======================================== x[i] <= 16.492 6 16.492 < x[i] <= 41.968 27 41.968 < x[i] <= 42.445 1 42.445 < x[i] <= 61.299 13 61.299 < x[i] <= 68.892 2
mc.Jenks_Caspall_Forced(columbus.CRIME)
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:483: UserWarning: Deprecated (2.1.0): Jenks_Caspall_Forced is being renamed to JenksCaspallForced. Jenks_Caspall_Forced will be removed on 2020-01-31. warn(self.message)
JenksCaspallForced Lower Upper Count ======================================== x[i] <= 18.905 10 18.905 < x[i] <= 29.028 10 29.028 < x[i] <= 38.426 9 38.426 < x[i] <= 52.794 10 52.794 < x[i] <= 68.892 10
mc.JenksCaspallForced(columbus.CRIME)
JenksCaspallForced Lower Upper Count ======================================== x[i] <= 18.905 10 18.905 < x[i] <= 29.028 10 29.028 < x[i] <= 38.426 9 38.426 < x[i] <= 52.794 10 52.794 < x[i] <= 68.892 10
mc.JenksCaspallSampled(columbus.CRIME)
JenksCaspallSampled Lower Upper Count ======================================== x[i] <= 18.905 10 18.905 < x[i] <= 34.001 15 34.001 < x[i] <= 54.522 16 54.522 < x[i] <= 54.839 1 54.839 < x[i] <= 68.892 7
mc.Max_P_Classifier(columbus.CRIME, k=5)
/home/serge/Dropbox/p/pysal/src/subpackages/mapclassify/mapclassify/classifiers.py:483: UserWarning: Deprecated (2.1.0): Max_P_Classifier is being renamed to MaxP. Max_P_Classifier will be removed on 2020-01-31. warn(self.message)
MaxP Lower Upper Count ======================================== x[i] <= 27.823 19 27.823 < x[i] <= 29.028 1 29.028 < x[i] <= 39.175 10 39.175 < x[i] <= 50.732 8 50.732 < x[i] <= 68.892 11
mc.MaxP(columbus.CRIME, k=5)
MaxP Lower Upper Count ======================================== x[i] <= 27.823 19 27.823 < x[i] <= 29.028 1 29.028 < x[i] <= 39.175 10 39.175 < x[i] <= 50.732 8 50.732 < x[i] <= 68.892 11