Add Contributor Conversion & Drop-off Funnel Visualizations#914
Add Contributor Conversion & Drop-off Funnel Visualizations#914Akshatb2006 wants to merge 30 commits intooss-aspen:devfrom
Conversation
Signed-off-by: Akshat Baranwal <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Akshat Baranwal <[email protected]>
…06/8Knot into contributor_engagement
…kshatb2006/8Knot into contributor_engagement" This reverts commit c2a4776, reversing changes made to 4b4f0a7.
Signed-off-by: Akshat Baranwal <[email protected]>
Signed-off-by: Akshat Baranwal <[email protected]>
Signed-off-by: Akshat Baranwal <[email protected]>
Signed-off-by: Akshat Baranwal <[email protected]>
Signed-off-by: Akshat Baranwal <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
- 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 <[email protected]>
Signed-off-by: Akshat Baranwal <[email protected]>
…06/8Knot into contributor_engagement
Signed-off-by: Akshat Baranwal <[email protected]>
Signed-off-by: Akshat Baranwal <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
cdolfi
left a comment
There was a problem hiding this comment.
will do a full review later, a few comments
| style={"padding": "1.5rem"}, | ||
| ), | ||
| ], | ||
| className="dark-card", |
There was a problem hiding this comment.
each card should be its own file
There was a problem hiding this comment.
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?
|
|
||
| def create_figure(df: pd.DataFrame): | ||
| """Create the radar chart figure.""" | ||
| activity_metrics = { |
There was a problem hiding this comment.
this should be in process data
| @celery_app.task( | ||
| bind=True, | ||
| autoretry_for=(Exception,), | ||
| exponential_backoff=2, |
There was a problem hiding this comment.
This query should not be edited
Signed-off-by: Akshat Baranwal <[email protected]>
f11ee1a to
c07a223
Compare
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Akshat Baranwal <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
Signed-off-by: Asish Kumar <[email protected]>
cf5933a to
27b338b
Compare
cdolfi
left a comment
There was a problem hiding this comment.
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.
| @@ -75,3 +75,4 @@ def issue_assignee_query(self, repos): | |||
| """ | |||
|
|
|||
| logging.warning(f"{issue_assignee_query.__name__} COLLECTION - END") | |||
There was a problem hiding this comment.
no change, remove line change
| @@ -82,4 +82,4 @@ def contributors_query(self, repos): | |||
| Additional post-processing done on-the-fly in 8knot/pages/utils/preprocessing_utils.py | |||
There was a problem hiding this comment.
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.
What table is this? We do not have it in our augur instance
There was a problem hiding this comment.
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.
this should be on the chaoss page
| style={"padding": "1.5rem"}, | ||
| ), | ||
| ], | ||
| className="dark-card", |
| logging.warning(f"{VIZ_ID} - START") | ||
| start = time.perf_counter() | ||
|
|
||
| # GET ALL DATA FROM POSTGRES CACHE |
There was a problem hiding this comment.
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.
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.
this should be in a create_figure function. See other visualizations or the template
| ), | ||
| dbc.Row( | ||
| [ | ||
| dbc.Col(gc_contributor_funnel, width=6), |
|
|
||
| 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.
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.