This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
oss-health-metrics:metrics:contributor-diversity [2017/04/05 19:22] abuhman [4. Description] |
oss-health-metrics:metrics:contributor-diversity [2017/05/18 00:15] klumbard |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | __**[[oss-health-metrics:metrics|<< Back to List of Activity Metrics]]**__ | ||
====== Contributor Diversity ====== | ====== Contributor Diversity ====== | ||
- | ===== 1. Acronym ===== | ||
- | + | ===== 1. Description ===== | |
- | ===== 2. Alternate Names ===== | + | |
- | + | ||
- | ===== 3. Classification ===== | + | |
- | Community Health | + | |
- | + | ||
- | ===== 4. Description ===== | + | |
Ratio of contributors from a single company over all contributors. | Ratio of contributors from a single company over all contributors. | ||
Also described as: Maintainers from different companies. Diversity of contributor affiliation. | Also described as: Maintainers from different companies. Diversity of contributor affiliation. | ||
Line 14: | Line 8: | ||
The SQL queries below provide a total number of organizations or companies in relation to pull requests. If pull requests are not the best indicator of contributions, the queries can be modified to match the most helpful definition of contributions. Queries are for the GHTorrent database. | The SQL queries below provide a total number of organizations or companies in relation to pull requests. If pull requests are not the best indicator of contributions, the queries can be modified to match the most helpful definition of contributions. Queries are for the GHTorrent database. | ||
- | Another option for contributor diversity is percentage of the repository written by an organization. Code for this is under development and is not fully tested. In progress example code may be found here https://github.com/OSSHealth/ghdata/blob/dev/organizationHistory/pythonBlameHistoryTree.py . This code uses Git Blame and the GHTorrent database for its data sources. | + | Another option for contributor diversity is percentage of the repository written by an organization. Code for this is under development and is not fully tested. In progress example code may be found [[https://github.com/OSSHealth/ghdata/blob/dev/organizationHistory/pythonBlameHistoryTree.py|here]]. This code uses Git Blame and the GHTorrent database for its data sources. |
- | ==== Visualization ==== | + | ===== 2. Use Cases ===== |
- | ==== Interpretation ==== | + | ===== 3. Sample Visualization ===== |
- | + | ===== 4. Sample Implementations ===== | |
- | ===== 5. Known Implementations ===== | + | === GHTorrent: Total number of organizations by project making pull requests (approved or not): === |
- | + | ||
- | ===== 6. Data Source ===== | + | |
- | GHTorrent Database, Git Blame | + | |
- | + | ||
- | ===== 7. Pseudo Code/Query ===== | + | |
- | === Total number of organizations by project making pull requests (approved or not): === | + | |
SELECT count(distinct org_id) as num_organizations, projects.name as project_name, url | SELECT count(distinct org_id) as num_organizations, projects.name as project_name, url | ||
Line 39: | Line 27: | ||
group by projects.id | group by projects.id | ||
- | === Alternately, using the "company" field in the users table instead of the organization: === | + | === GHTorrent: Alternately, using the "company" field in the users table instead of the organization: === |
SELECT count(distinct company) as num_companies, projects.name as project_name, url | SELECT count(distinct company) as num_companies, projects.name as project_name, url | ||
Line 50: | Line 38: | ||
GROUP BY projects.id | GROUP BY projects.id | ||
- | === Number of organizations by project making pull requests that are approved: === | + | === GHTorrent: Number of organizations by project making pull requests that are approved: === |
SELECT count(distinct org_id) as num_organizations, projects.name as project_name, url | SELECT count(distinct org_id) as num_organizations, projects.name as project_name, url | ||
Line 66: | Line 54: | ||
group by projects.id | group by projects.id | ||
- | ===== 8. Data Exchange Format ===== | + | ===== 5. Known Implementations ===== |
- | + | ||
- | + | ||
- | ===== 9. References to Academic Literature ===== | + | |
- | + | ||
- | + | ||
- | ===== 10. Internet References ===== | + | |
+ | ===== 6. External References (Literature) ===== | ||
- | ===== 11. Contributors ===== | ||
- | Anna Buhman |