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

feat: add x and y medians to plot #188

Open brunorosilva opened 2 months ago

brunorosilva commented 2 months ago

Fixes #181

Describe your changes

Compute the median values for x and for y using the pd.Series.median method. Added median to the get_values docstring.

Checklist

codecov[bot] commented 2 months 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 (d3eba8d). Report is 3 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/stefmolin/data-morph/pull/188/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/188?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 #188 +/- ## ========================================== - Coverage 98.42% 98.41% -0.01% ========================================== Files 43 43 Lines 1775 1767 -8 Branches 358 356 -2 ========================================== - Hits 1747 1739 -8 Misses 25 25 Partials 3 3 ``` | [Files](https://app.codecov.io/gh/stefmolin/data-morph/pull/188?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/data/stats.py](https://app.codecov.io/gh/stefmolin/data-morph/pull/188?src=pr&el=tree&filepath=src%2Fdata_morph%2Fdata%2Fstats.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stefanie+Molin#diff-c3JjL2RhdGFfbW9ycGgvZGF0YS9zdGF0cy5weQ==) | `100.00% <ø> (ø)` | | | [src/data\_morph/plotting/static.py](https://app.codecov.io/gh/stefmolin/data-morph/pull/188?src=pr&el=tree&filepath=src%2Fdata_morph%2Fplotting%2Fstatic.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stefanie+Molin#diff-c3JjL2RhdGFfbW9ycGgvcGxvdHRpbmcvc3RhdGljLnB5) | `100.00% <100.00%> (ø)` | | | [tests/data/test\_stats.py](https://app.codecov.io/gh/stefmolin/data-morph/pull/188?src=pr&el=tree&filepath=tests%2Fdata%2Ftest_stats.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stefanie+Molin#diff-dGVzdHMvZGF0YS90ZXN0X3N0YXRzLnB5) | `100.00% <100.00%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/stefmolin/data-morph/pull/188/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Stefanie+Molin)