Skip to main content

Deep Dive into a Project

Analyze detailed metrics for a specific project. New to OSO? Check out our Getting Started guide to set up your BigQuery or API access.

tip

All projects are defined as YAML files in OSS Directory. View our current projects here.

Getting Started

Before running any analysis, you'll need to set up your environment:

If you haven't already, subscribe to OSO public datasets in BigQuery by clicking the "Subscribe" button on our Datasets page.

You can run all queries in this guide directly in the BigQuery console.

Find a Project

Search for projects by name:

select
project_id,
project_name,
display_name
from `oso_production.projects_v1`
where lower(display_name) like lower('%merkle%')

Find a Project by Artifact

Find projects associated with specific artifacts:

select
project_id,
project_name,
artifact_namespace as github_owner,
artifact_name as github_repo
from `oso_production.artifacts_by_project_v1`
where
artifact_source = 'GITHUB'
and artifact_namespace like '%uniswap%'

Code Metrics

Get code metrics for a specific project:

select
project_name,
display_name,
star_count,
fork_count,
commit_count_6_months,
contributor_count_6_months
from `oso_production.code_metrics_by_project_v1`
where project_name = 'opensource-observer'

Timeseries Metrics

Get historical metrics for a project:

select
tm.sample_date,
m.metric_name,
tm.amount
from `oso_production.timeseries_metrics_by_project_v0` as tm
join `oso_production.metrics_v0` as m
on tm.metric_id = m.metric_id
join `oso_production.projects_v1` as p
on tm.project_id = p.project_id
where p.project_name = 'wevm'
order by sample_date desc

Code Contributors

Get all contributors to a project's GitHub repositories:

select
te.time,
a.artifact_name as code_contributor,
abp.artifact_name as github_repo,
te.event_type,
te.amount
from `oso_production.timeseries_events_by_artifact_v0` as te
join `oso_production.artifacts_by_project_v1` as abp
on te.to_artifact_id = abp.artifact_id
join `oso_production.artifacts_v1` a
on te.from_artifact_id = a.artifact_id
where
abp.project_name = 'ipfs'
and te.event_type = 'COMMIT_CODE'
order by te.time desc

Adding Projects

Projects are defined as YAML files in our OSS Directory repo. You can add or update your own projects or project artifacts by submitting a pull request.

For more information on how projects work, see our guide here.