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:21] abuhman [4. Description] |
oss-health-metrics:metrics:contributor-diversity [2017/05/16 16:49] klumbard |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== 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. | ||
- | 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 handle that. 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 26: | ||
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 37: | ||
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 53: | ||
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 |