stefmolin / data-morph

Morph an input dataset of 2D points into select shapes, while preserving the summary statistics to a given number of decimal points through simulated annealing. It is intended to be used as a teaching tool to illustrate the importance of data visualization.
https://stefaniemolin.com/data-morph/
MIT License
60 stars 16 forks source link

Optimize `LineCollection` #206

Closed JCGoran closed 2 weeks ago

JCGoran commented 1 month ago

As requested in https://github.com/stefmolin/data-morph/pull/198#discussion_r1685782050, this is now a separate PR.

Describe your changes

Checklist

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 98.41%. Comparing base (51b8d26) to head (36d6c94). Report is 14 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/stefmolin/data-morph/pull/206/graphs/tree.svg?width=650&height=150&src=pr&token=3SEEG9SZQO&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stefanie+Molin)](https://app.codecov.io/gh/stefmolin/data-morph/pull/206?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stefanie+Molin) ```diff @@ Coverage Diff @@ ## main #206 +/- ## ========================================== - Coverage 98.42% 98.41% -0.01% ========================================== Files 43 43 Lines 1775 1766 -9 Branches 358 357 -1 ========================================== - Hits 1747 1738 -9 Misses 25 25 Partials 3 3 ``` | [Files with missing lines](https://app.codecov.io/gh/stefmolin/data-morph/pull/206?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stefanie+Molin) | Coverage Δ | | |---|---|---| | [src/data\_morph/shapes/bases/line\_collection.py](https://app.codecov.io/gh/stefmolin/data-morph/pull/206?src=pr&el=tree&filepath=src%2Fdata_morph%2Fshapes%2Fbases%2Fline_collection.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stefanie+Molin#diff-c3JjL2RhdGFfbW9ycGgvc2hhcGVzL2Jhc2VzL2xpbmVfY29sbGVjdGlvbi5weQ==) | `91.89% <100.00%> (-0.42%)` | :arrow_down: | | [tests/shapes/bases/test\_line\_collection.py](https://app.codecov.io/gh/stefmolin/data-morph/pull/206?src=pr&el=tree&filepath=tests%2Fshapes%2Fbases%2Ftest_line_collection.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stefanie+Molin#diff-dGVzdHMvc2hhcGVzL2Jhc2VzL3Rlc3RfbGluZV9jb2xsZWN0aW9uLnB5) | `100.00% <100.00%> (ø)` | |