cncf / devstats.archive

📈CNCF-created tool for analyzing and graphing developer contributions
https://devstats.cncf.io/
Apache License 2.0
445 stars 147 forks source link

[feature request] generate company contributions for each year #353

Closed linsun closed 1 year ago

linsun commented 1 year ago

For Istio project (In the process of donating to CNCF atm), is it possible to generate company contributions (top 15 companies) for each year since the project started in 2017. For example:

2017 (Jan 1) to 2017 (Dec 31) 2018 (Jan 1) to 2018 (Dec 31) 2019 (Jan 1) to 2019 (Dec 31) 2020 (Jan 1) to 2020 (Dec 31) 2021 (Jan 1) to 2021 (Dec 31) YTD so far since 2022 Jan 1.

for this view: https://istio.teststats.cncf.io/d/5/companies-table?orgId=1&var-period_name=Last%20quarter&var-metric=contributions

Thanks so much!

lukaszgryglicki commented 1 year ago

Depends how urgent it is, I'll be on vacation till end of July, starting Friday.

linsun commented 1 year ago

Thanks so much @lukaszgryglicki!

I did find a workaround (https://istio.teststats.cncf.io/d/4/company-statistics-by-repository-group?orgId=1&var-p[…]-metric=activity&var-repogroup_name=All&var-companies=All) so this would be nice to have.

lukaszgryglicki commented 1 year ago

Yes, but your "workaround" is not giving you the exact yearly data you originally wanted, do you still need it? If so I can generate tomorrow.

lukaszgryglicki commented 1 year ago

Yeach year generated via command like:

GHA2DB_CSVOUT=2021.csv GHA2DB_LOCAL=1 PG_DB=istio runq /q.sql {{project_scale}} 1.0 {{exclude_bots}} "`cat ./etc/gha2db/util_sql/exclude_bots.sql`" qr ',2021-01-01,2022-01-01'

CSV data is here:

Closing, please reopen if needed @linsun

linsun commented 1 year ago

This is super nice to have, thank you @lukaszgryglicki!!

cc @craigbox - we have been trying to get these data for a while!

lukaszgryglicki commented 1 year ago

@linsun - if you need any data that is not directly avail in DevStats - you can always ask me - it is very easy to execute custom SQL and save as CSV for you.

linsun commented 1 year ago

You rock, thanks again!