Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add x and y medians to plot #188

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

brunorosilva
Copy link

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

  • Test cases have been modified/added to cover any code changes.
  • Docstrings have been modified/created for any code changes.
  • All linting and formatting checks pass (see the contributing guidelines for more information).

@github-actions github-actions bot added testing Relating to the testing suite data Work relating to data module plotting Work relating to plotting module labels Jul 13, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congratulations on making your first pull request to Data Morph! Please familiarize yourself with the contributing guidelines, if you haven't already.

@stefmolin stefmolin added this to the 0.3.0 milestone Jul 13, 2024
Copy link

codecov bot commented Jul 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.47%. Comparing base (1f7779c) to head (41591fd).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #188   +/-   ##
=======================================
  Coverage   98.47%   98.47%           
=======================================
  Files          43       43           
  Lines        1839     1841    +2     
  Branches      114      114           
=======================================
+ Hits         1811     1813    +2     
  Misses         25       25           
  Partials        3        3           
Files with missing lines Coverage Δ
src/data_morph/data/stats.py 100.00% <ø> (ø)
src/data_morph/plotting/static.py 100.00% <100.00%> (ø)
tests/data/test_stats.py 100.00% <100.00%> (ø)

Copy link
Owner

@stefmolin stefmolin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm running this on multiple different shapes to make sure this doesn't constrict things, but I do have some comments for now.

The statistics here are way too close together it is hard to read. Can we space them out more vertically?

Screenshot 2024-07-13 at 2 51 34 PM

@@ -24,12 +25,14 @@ def get_values(df: pd.DataFrame) -> SummaryStatistics:
Returns
-------
SummaryStatistics
Named tuple consisting of mean and standard deviations of x and y,
Named tuple consisting of mean, median and standard deviations of x and y,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I much prefer Oxford commas, so let's change this to this:

Suggested change
Named tuple consisting of mean, median and standard deviations of x and y,
Named tuple consisting of mean, median, and standard deviations of x and y,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data Work relating to data module plotting Work relating to plotting module testing Relating to the testing suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add median
2 participants