Skip to content

Commit a5d16c6

Browse files
committed
docs/gitcoin-social-graph
1 parent 32b0720 commit a5d16c6

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: Funding in a Social Network
3+
sidebar_position: 5
4+
---
5+
6+
Analyze Gitcoin grants funding in a social network. New to OSO? Check out our [Getting Started guide](../get-started/index.md) to set up your BigQuery or API access.
7+
8+
This tutorial combines Farcaster and Gitcoin data to to identify popular projects within a social network.
9+
10+
## BigQuery
11+
12+
If you haven't already, then the first step is to subscribe to OSO public datasets in BigQuery. You can do this by clicking the "Subscribe" button on our [Datasets page](../integrate/datasets/#oso-production-data-pipeline). For this tutorial, you'll need to subscribe to the Gitcoin and Karma3/OpenRank datasets. (You can also use the Farcaster dataset in place of OpenRank.)
13+
14+
The following queries should work if you copy-paste them into your [BigQuery console](https://console.cloud.google.com/bigquery).
15+
16+
### Identify popular projects within your social network
17+
18+
```sql
19+
select distinct
20+
donations.donor_address,
21+
users.user_source_id as fid,
22+
users.user_name as username,
23+
donations.project_name,
24+
amount_in_usd,
25+
timestamp
26+
from `gitcoin.all_donations` as donations
27+
join `oso_production.artifacts_by_user_v1` as users
28+
on lower(donations.donor_address) = users.artifact_name
29+
where
30+
user_source = 'FARCASTER'
31+
and users.user_source_id in (
32+
with max_date as (
33+
select max(date) as last_date
34+
from `karma3.localtrust`
35+
)
36+
select cast(j as string) as fid
37+
from `karma3.localtrust`
38+
where i = 5650
39+
order by v desc
40+
limit 150
41+
)
42+
```

0 commit comments

Comments
 (0)