-
Notifications
You must be signed in to change notification settings - Fork 72
Add Contributor Conversion & Drop-off Funnel Visualizations #914
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
base: dev
Are you sure you want to change the base?
Conversation
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
…06/8Knot into contributor_engagement
…kshatb2006/8Knot into contributor_engagement" This reverts commit c2a4776, reversing changes made to 4b4f0a7.
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
- Updated query to use augur_data.contributor_engagement table instead of non-existent tables - Fixed schema references (tables were in public schema, not augur_data) - Improved funnel logic to show proper progression: All Contributors -> Basic Engagement -> Deep Engagement - Query now returns meaningful data instead of empty results
- Added n_repolist_uses=3 to caching_wrapper call to properly handle multiple %s placeholders - This should resolve the 'tuple index out of range' error in worker execution
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
…06/8Knot into contributor_engagement
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
cdolfi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do a full review later, a few comments
| style={"padding": "1.5rem"}, | ||
| ), | ||
| ], | ||
| className="dark-card", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
each card should be its own file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both the cards are connected, so we put this in the same file. Do you want us to create seperate file for putting gc_contributor_dropoff?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
|
|
||
| def create_figure(df: pd.DataFrame): | ||
| """Create the radar chart figure.""" | ||
| activity_metrics = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be in process data
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done with commit cf5933a
| @celery_app.task( | ||
| bind=True, | ||
| autoretry_for=(Exception,), | ||
| exponential_backoff=2, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This query should not be edited
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
f11ee1a to
c07a223
Compare
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Akshat Baranwal <kysuakshat23@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
cf5933a to
27b338b
Compare
cdolfi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each of the graph info descriptions should be a lot more detailed, especially with how complicated each of the graphs are. It should go into what data goes into the graph and how it is being displayed or. The lottery factor graphs would be a good example to look into or see how project velocity links to a much more thorough description of the graph. I will be able to give a better review once the query is able to populate the graphs. Please add more comments to your code as well so a reviewer can understand your preprocessing steps.
| df = df[df.created < dt.date.today()] | ||
| """ | ||
|
|
||
| logging.warning(f"{issue_assignee_query.__name__} COLLECTION - END") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no change, remove line change
| df["created_at"] = pd.to_datetime(df["created_at"], utc=True).dt.date | ||
| df = df[df.created_at < dt.date.today()] | ||
| Additional post-processing done on-the-fly in 8knot/pages/utils/preprocessing_utils.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no change remove line change
| d2_total_comments, | ||
| d2_has_pr_with_many_commits, | ||
| d2_commented_on_multiple_prs | ||
| FROM augur_data.contributor_engagement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What table is this? We do not have it in our augur instance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if it is a materialized view on your own instance you will need to use the query that generates that materialized view here
| @@ -0,0 +1,333 @@ | |||
| from dash import html, dcc, callback | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be on the chaoss page
| style={"padding": "1.5rem"}, | ||
| ), | ||
| ], | ||
| className="dark-card", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
| logging.warning(f"{VIZ_ID} - START") | ||
| start = time.perf_counter() | ||
|
|
||
| # GET ALL DATA FROM POSTGRES CACHE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are bots not filtered out?
| ).reset_index() | ||
|
|
||
| # remove bot data if switch is on | ||
| if bot_switch and "cntrb_id" in df_agg.columns: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move into prior function, this applies through line 194
| return nodata_graph() | ||
|
|
||
| # Create the radar chart figure | ||
| activity_metrics = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be in a create_figure function. See other visualizations or the template
| ), | ||
| dbc.Row( | ||
| [ | ||
| dbc.Col(gc_contributor_funnel, width=6), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move to chaoss page
|
|
||
| func_name = ceq.__name__ | ||
| not_cached = cf.get_uncached(func_name=func_name, repolist=repolist) | ||
| if not_cached: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comments as the other visualization
|
Thanks for the review comments! Will update the PR accordingly |
1. Funnel Chart: Contributor Levels & Drop-offs
This funnel visualization displays contributors at different engagement levels within the project and tracks their drop-offs between stages.
Purpose
Helps identify bottlenecks in contributor progression and understand where contributors disengage.
Structure
The funnel is divided into two parallel views:
Levels
This visualization makes it easy to spot where retention can be improved.
2. Radar Chart: Contributor Activities Distribution
This radar chart visualizes the distribution of contributors across various activity dimensions.
Purpose
Provides a quick snapshot of where contributors are spending their efforts in the project.
Dimensions include (example categories)
By analyzing this chart, project maintainers can understand contributor focus areas and where more engagement is needed.