Skip to main content

Activity

From For

Definition

Activity is a metric defined by X-lab Open Laboratory. To fully understand this metric, you can refer to the article published by Dr. Zhao Shengyu.

Activity is a statistical indicator, which is calculated as follows: the activity of a specific developer in a specific repository for a month is the square root of the weighted sum of all collaborative behaviors of that developer in that month, i.e., Au=wiciA_u = \sqrt{\sum{w_ic_i}}. The activity of the repository is the sum of the activity of all developers in the repository for that month, i.e., Ar=Au=uwiciA_r = \sum{A_u} = \sum_u{\sqrt{\sum{w_ic_i}}}.

Where cic_i is the total number of a certain collaborative behavior, and wiw_i is the weight of the corresponding collaborative behavior. According to the results of the AHP analysis, the weights of various behaviors are currently set as follows:

BehaviorSubmit IssueIssue CommentSubmit PRPR Review CommentPR Merged
Weight2.22350.52524.06790.74272.0339

The activity indicator only considers collaborative behaviors that have substantial contributions to the repository and does not consider behaviors such as Star, Fork, etc. Therefore, this indicator is very important for identifying the activity level of the repository and displaying the historical activity situation of the most active contributors.

Data

  • Link (Basic): https://oss.open-digger.cn/{platform}/{owner}/{repo}/activity.json

  • Link (Details): https://oss.open-digger.cn/{platform}/{owner}/{repo}/activity_details.json

To obtain data for a specific repository, please replace {platform}, {owner}, and {repo} with the actual names. Here is an activity example and an activity details example.

The activity data contains the historical activity statistics of the repository, while the activity details data contains the composition of the repository's activity, i.e., the activity details of each developer in the repository.

Code

Here's the implementation code.

CodePen Demo

Activity Demo


Activity Details Demo

The following example has been implemented in HyperCRX, which can be seen in the Perceptor tab of the repository page after installing the HyperCRX plugin.