In [2]:
from fj_refactored import fisher_jenks

Simple Hartigan Example


In [6]:
#Data Points
x = [12,10.8, 11, 10.8, 10.8, 10.8, 10.6, 10.8, 10.3, 10.3, 10.3,10.4, 10.5, 10.2, 10.0, 9.9]

In [7]:
p1 = fisher_jenks(x,5)
p1


Out[7]:
[2, 7, 9, 15]

Larger Test Example


In [10]:
x = []
for y in range(500):
    x.append(15)
    x.append(11)
    x.append(2)
    x.append(26)
    x.append(191)
p = fisher_jenks(x,5)
p


Out[10]:
[500, 1000, 1500, 2000]

In [ ]: