Closed machow closed 2 months ago
Attention: Patch coverage is 93.02326%
with 6 lines
in your changes are missing coverage. Please review.
Project coverage is 81.87%. Comparing base (
ece39e8
) to head (05578a6
). Report is 125 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
great_tables/_data_color/palettes.py | 92.77% | 6 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thank you for the huge amount of work you put into this and the related PR! Will review shortly.
@abstractqqq in case it's useful for polars_ds, this PR should remove pandas as a dependency (except for importing from great_tables.data
, which we'll tackle later!). We should be able to release soon. Definitely let us know if you run into any issues with it.
This PR removes mizani as a dependency, so that we don't transitively depend on scipy and pandas. Note that our internal implementation does not depend on numpy, so that we can drop it as a dependency in a later PR.
This implementation is not as elegant as mizani's, or quite as optimized, but should do well for our purposes.
Speed
Our default implementation was about 50% slower than mizani in a simple test. But both are very fast for simple table displays (1.52 ms for 1,000 points for ours, 1ms for mizani.)
The main difference is that we're using a simple bisect lookup to find cutoff corresponding to a value (in order to get coefficients for transforming within a cutoff band). Mizani uses a table lookup, which cuts the input/response space into 256 bins.
Fixes: https://github.com/posit-dev/great-tables/issues/7