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

Add plots of editors load in current-reviews-data.ipynb #24

Merged
merged 6 commits into from
Aug 27, 2024

Conversation

santisoler
Copy link
Member

@santisoler santisoler commented Jul 14, 2024

Add a new "Editors load" section to the current-reviews-data.ipynb with plots of number of contributions by each editor in each quarter. Include a new function in functions.py to count number of contributions per quarter.


This PR was created during SciPy2024 sprints.

@lwasser
Copy link
Member

lwasser commented Jul 31, 2024

hey @santisoler is this PR still a WIP or is it meant to be reviewed? many thanks!! 🙌🏻

@santisoler
Copy link
Member Author

Hi @lwasser! Sorry for not updating the status of this PR. The plots are working now, but maybe we want to improve how they look or customize them a little bit. I would appreciate if you could review them. Thanks for asking!

@santisoler santisoler marked this pull request as ready for review August 2, 2024 13:45
@lwasser
Copy link
Member

lwasser commented Aug 7, 2024

hi @santisoler wonderful !! thank you. i'll put this on my list of pr's to review!! thank you again for the help here!!

Copy link
Member

@lwasser lwasser left a comment

Choose a reason for hiding this comment

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

@santisoler this is looking really nice! thank you!
i left a few suggested changes to the code. then i have a few followup requests

  1. can you please make the plot color purple color="purple" we use that color on other plots in our metrics dashboard!
  2. Can you please only list the y axis label once rather than on each plot? if this is hard let's modify the y axis label to be "reviews per quarter"
  3. this is just a question - how hard would it be to move the title - which is the editor name - to the left or right side of the plot? if that is super hard, let's skip it.
    rOpenSci's plot looks like this:
Screenshot 2024-08-09 at 7 25 08 PM

what i dislike about the plot is i think there needs to be more space between each facet. but what i like is that each row has a label with the editor name and the y axis is only labeled once.

If you dont' have time to play with the plot axis' too much id' say just change the colors, and clean up the filtering of the data and the vmin date
then let's open another issue to clean up the labels .

thank you again for this!

"source": [
"charts = []\n",
"for editor in editors:\n",
" if editor in ignore_editors:\n",
Copy link
Member

Choose a reason for hiding this comment

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

can you please in a higher up cell filter out
ignore_editors so it's not mixed into this plot cell? that will just make things a bit cleaner.

that could look like this:

# Remove TBD and editors that are no longer active
current_editors = [editor for editor in editors if editor not in ignore_editors]

Copy link
Member

Choose a reason for hiding this comment

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

then you can just loop through current editors

for editor in current_editors:

"# Get axes min and max values so all plots have the same scale\n",
"\n",
"# Get vmin and vmax for the dates\n",
"min_date = reviews_df.created_at.min().to_period(\"Q\").start_time\n",
Copy link
Member

Choose a reason for hiding this comment

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

Let's filter only on the currently open reviews and reviews with editors that are not in the ignore list.

ignore_editors = ["TBD", "lwasser", "xmnlab"]

current_reviews = edits[~edits['editor'].isin(ignore_editors)]
min_date = current_reviews.Date.min().to_period("Q").start_time

NOTE: let's add lwasser and xmnlab to the ignore list for these plots!

then we can grab the min time from the list of current reviews! and the plots will look nicer !

"# Get vmin and vmax for the dates\n",
"min_date = reviews_df.created_at.min().to_period(\"Q\").start_time\n",
"end_of_this_quarter = pd.Timestamp.today().to_period(\"Q\").end_time\n",
"time_domain = (min_date, end_of_this_quarter)\n",
Copy link
Member

Choose a reason for hiding this comment

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

Right now the ticks have a .5 increment. can we please make that increment 1 instead?

Screenshot 2024-08-09 at 7 20 24 PM

@lwasser
Copy link
Member

lwasser commented Aug 15, 2024

@santisoler here is another idea if you are short on time! We could merge this PR as is and if you have time in the future - you could work on edits. If not, no worries. I'm suggesting this only because i am going to reorganize this repo a bit to make space for other types of organization metrics. I'd love to get this pr merged without rushing you! The plot works and is great as is.

We can finesse it in future pr's. Does that work for you?

santisoler and others added 6 commits August 18, 2024 19:07
@lwasser
Copy link
Member

lwasser commented Aug 19, 2024

Hi there 👋🏻
I just rebased this branch after making some changes to the directory structure to support an upcoming report that caused a merge conflict!

I've created a small package in metrics-theme/src called metrics theme. The functions.py module can be added there, and I added a small plot theme module as well, so our plots are all consistent!

@lwasser lwasser merged commit 4257d44 into pyOpenSci:main Aug 27, 2024
2 checks passed
@santisoler
Copy link
Member Author

Hi @lwasser! Sorry for the delayed reply! Thanks for merging the PR. I started working on the points you mentioned, but haven't pushed yet (coming back from vacations requires some time to catch up). I'll open another PR with those changes if that works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants