insights icon indicating copy to clipboard operation
insights copied to clipboard

[Data Challenge Submission]: Community Engagement Rank using OpenRank for Farcaster

Open asdspal opened this issue 1 year ago • 4 comments

Community Engagement Rank using OpenRank for Farcaster

Brief description

This project implements a Community Engagement Rank system for the Farcaster decentralized social media platform using the OpenRank algorithm. It aims to identify and rank the most engaged and influential users within the Farcaster ecosystem based on their interactions and mentions.

SQL code block

Insert the SQL that we should run to replicate your query:

For LocalTrust

WITH reactions AS (
    SELECT 
        FID,
        CAST(TARGET_CAST_FID AS STRING) AS interaction_id,
        COUNT(*) AS interactions
    FROM 
        {YOUR_PROJECT_NAME}.farcaster.reactions
    WHERE 
        TIMESTAMP >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
        AND DELETED_AT IS NULL
    GROUP BY 
        FID, TARGET_CAST_FID
),
mentions AS (
    SELECT 
        FID,
        JSON_VALUE(m, '$') AS interaction_id,
            COUNT(*) AS interactions
        FROM 
            {YOUR_PROJECT_NAME}.farcaster.casts,
            UNNEST(JSON_EXTRACT_ARRAY(MENTIONS)) AS m
        WHERE 
            TIMESTAMP >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 30 DAY)
            AND DELETED_AT IS NULL
        GROUP BY 
            FID, JSON_VALUE(m, '$')
)
SELECT fid, interaction_id, interactions
FROM reactions
UNION ALL
SELECT fid, interaction_id, interactions
FROM mentions
ORDER BY interactions DESC
LIMIT 100000

PreTrust:

curl https://api.warpcast.com/v2/power-badge-users | jq > power-badge.json

Link

https://github.com/asdspal/OpenRank-Farcaster-Engagement-Rank

asdspal avatar Aug 14 '24 15:08 asdspal

Hey @asdspal! Thanks for your submission. This is cool! However, in order to be considered for the OSO top-up bounty, we'd like to see an implementation on top of the Open Source Observer datasets.

We've included four examples here. Let us know if you decide to submit something. It should be easy now that you are familiar with the OpenRank SDK! We can give you an extra day extension as well.

Carl

ccerv1 avatar Aug 14 '24 22:08 ccerv1

I closed my GCP account last year. I'll try to submit one today with big-query dataset.

asdspal avatar Aug 15 '24 00:08 asdspal

I've updated both query in the issue and github repo notebook, with data from open source observer.

asdspal avatar Aug 15 '24 06:08 asdspal

Works, just tested! Come say hi in the Discord and we can process your bounty.

ccerv1 avatar Aug 17 '24 00:08 ccerv1

Whom should I contact for bounty processing on Discord?

asdspal avatar Aug 22 '24 02:08 asdspal