mthh / jenkspy

Compute Natural Breaks in Python (Fisher-Jenks algorithm)
https://pypi.python.org/pypi/jenkspy
MIT License
215 stars 28 forks source link

Generating more than 1 date in the same break #21

Closed jorgelpbarretob closed 1 year ago

jorgelpbarretob commented 2 years ago

breaks_jkp = [] for v in breaks:

idx = ts.index[ts == v] breaks_jkp.append(idx) breaks_jkp

[DatetimeIndex(['2021-04-18'], dtype='datetime64[ns]', name='date', freq=None), DatetimeIndex(['2021-05-14', '2021-06-11', '2021-09-27'], dtype='datetime64[ns]', name='date', freq=None), DatetimeIndex(['2021-07-13'], dtype='datetime64[ns]', name='date', freq=None), DatetimeIndex(['2021-07-04'], dtype='datetime64[ns]', name='date', freq=None), DatetimeIndex(['2021-09-03'], dtype='datetime64[ns]', name='date', freq=None)]

Issue

mthh commented 2 years ago

Sorry for the late answer. Can you show an extract of your data (notably in y and ts variables) so that I can help you debug your code ?

mthh commented 1 year ago

I'm closing this issue but don't hesitate to open a new one if you have any problem.