Skip to main content

Analyze Funding Histories

Analyze the funding history of your favorite projects. New to OSO? Check out our Getting Started guide to set up your BigQuery or API access.

This tutorial shows how to quickly lookup the funding history of your favorite projects, and then explore funding from specific sources (e.g. Gitcoin Grants, Open Collective, etc.)

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.

Basic Funding Analysis

Project Funding History

Get the complete funding history for a specific project:

SELECT
time,
event_source,
from_project_name as funder,
amount,
grant_pool_name
FROM `oso_production.oss_funding_v0`
WHERE to_project_name = 'uniswap'
ORDER BY time DESC

Top Funded Projects

Find the projects that have received the most funding:

SELECT
to_project_name,
COUNT(DISTINCT event_source) as funding_sources,
COUNT(*) as number_of_grants,
SUM(amount) as total_funding
FROM `oso_production.oss_funding_v0`
GROUP BY to_project_name
HAVING total_funding > 0
ORDER BY total_funding DESC
LIMIT 20

Advanced Analysis

Funding vs Development Activity

Compare funding with development metrics to understand the relationship between financial support and project activity:

WITH project_funding AS (
SELECT
to_project_name,
SUM(amount) as total_funding,
COUNT(DISTINCT event_source) as funding_sources
FROM `oso_production.oss_funding_v0`
GROUP BY to_project_name
)
SELECT
f.to_project_name,
f.total_funding,
f.funding_sources,
m.active_developer_count_6_months,
m.commit_count_6_months,
m.opened_issue_count_6_months,
m.star_count,
m.fork_count
FROM project_funding f
JOIN `oso_production.code_metrics_by_project_v1` m
ON f.to_project_name = m.project_name
WHERE f.total_funding > 0
ORDER BY f.total_funding DESC

Funding Source Analysis

Analyze the distribution and impact of different funding sources:

SELECT
event_source,
grant_pool_name,
COUNT(DISTINCT to_project_name) as projects_funded,
COUNT(*) as number_of_grants,
SUM(amount) as total_funding,
AVG(amount) as average_grant
FROM `oso_production.oss_funding_v0`
GROUP BY event_source, grant_pool_name
HAVING total_funding > 0
ORDER BY total_funding DESC

Social Network Funding Analysis

Analyze funding patterns within social networks by combining funding data with social graph data:

SELECT DISTINCT
donations.donor_address,
users.user_source_id as fid,
users.user_name as username,
donations.project_name,
amount_in_usd,
timestamp
FROM `gitcoin.all_donations` as donations
JOIN `oso_production.artifacts_by_user_v1` as users
ON lower(donations.donor_address) = users.artifact_name
WHERE
user_source = 'FARCASTER'
AND users.user_source_id IN (
WITH max_date AS (
SELECT max(date) as last_date
FROM `karma3.localtrust`
)
SELECT CAST(j as string) as fid
FROM `karma3.localtrust`
WHERE i = 5650 -- Replace with your FID to see your network
ORDER BY v DESC
LIMIT 150
)
ORDER BY amount_in_usd DESC

For more examples of funding analysis, check out our Insights Repo.