keplergl / kepler.gl

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
http://kepler.gl
MIT License
10.26k stars 1.72k forks source link

Different color scales based on clustering algorithms #181

Open aakim26 opened 6 years ago

aakim26 commented 6 years ago

Right now the only options for coloring a layer based on the data are quantile and quantize. These are nice but have certain shortcomings (outliers can skew the distribution when quantize is used and quantile can group values that are not similar). It would be great if there were different scales based on different clustering algorithms (such as Jenks natural breaks, head/tail breaks, etc). An example that could possibly be integrated into kepler.gl is: https://github.com/schnerd/d3-scale-cluster

heshan0131 commented 6 years ago

@aakim26 adding jenkins nature breaks are definitely on our do to list

heshan0131 commented 6 years ago

We can start by adding Jenks natural breaks as a scale option

d-wasserman commented 5 years ago

Geometric interval would be a great one to have too. It handles skewed distributions a little better relative to Jenks.

danielporto commented 3 years ago

Hi there, is there any update on this issue? I'm wondering because I actually have the same problems pointed by @aakim26 . Thanks for this great work.

easherma commented 1 year ago

Looks like this is a part of a product that has been built off of keplergl but the additional palettes have not yet been contributed back: https://location.foursquare.com/studio/docs/layers-color-scale-and-palettes#jenks-natural-breaks

@nrabinowitz I see you are assigned to this issue, are there currently any plans to add these features back to this codebase?

ibgreen commented 1 year ago

It is true that the core of the kepler.gl team works at Foursquare now and it is fair to say that at this moment, most serious development in kepler.gl is funded by Foursquare.

And Foursquare has indeed developed a long list of improvements on top of kepler.gl, including advanced color scales. While Foursquare has generously been merging back tremendous amounts of code to kepler.gl, to date that have mostly been focused on addressing tons of of smaller issues and some really big structural / tech-debt style improvements to the code base.

We are always discussing how we can justify contributing more to kepler.gl. To give some insight into our thinking, one of the key litmus tests for us is the sign-up rate for the free version of Foursquare Studio - we need to make sure we have enough enticing features compared to kepler.gl to make a sign-up worthwhile. As we see the sign-up rate increases, I expect us to get more comfortable merging back some of these features. After all, a strong kepler.gl community is a big part of what generates interest in Studio in the first place, so holding back too much is not in Foursquare's interest either.

Finally, consider that many companies around the world are building products on kepler.gl (perhaps including your own) but Foursquare is the only major contributor. A change in this situation would almost certainly make a difference to the equation.

I hope the above doesn't lessen your interest in kepler.gl. We work on this because we love kepler.gl and open source and want to contribute as much as we can, but in the end, something needs to fund the work. Maybe we are not doing things right but we are trying.

FWIW - we are currently heads down on pulling together the long awaited kepler.gl 3.0 release in the coming quarter. We hope the release notes will invigorate the community by showing the amount of improvements and work that is continuously going into kepler.gl.

easherma commented 1 year ago

Thanks @ibgreen , I appreciate the update! I am very happy to see contribution to keplergl still being active and am looking forward to a new release.

For context, I am a part of Chi Hack Night and we are currently working on variety of volunteer open source projects related to climate change. I was reminded of keplergl as a tool and demoed it for some folks, and we're considering using it for some of these projects, but one of the requests was for these different color scales.

I'm of course not opposed to contributing back to this project directly (and did open a PR last night), but as an all volunteer org our capacity is somewhat limited and usually focused more directly on the projects themselves.

In particular, I'm reluctant to spend time reduplicating work to add features that may exist elsewhere, as I'm sure you can understand. So I was just curious if there was an expected time frame where that particular feature might be ported back to kepler. This was most just for general awareness, it was not my intention to critique Foursquare's contributions to kepler (and, to be honest, I wasn't aware of them until I started digging around on this feature specifically :-) )

Thanks again for the continued work on this great project! It's truly great to see it still active and I appreciate the response and extra context.