opensource-observer / insights

Insights and exploratory data analysis on the health of open source software ecosystems
Apache License 2.0
20 stars 10 forks source link

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

Closed asdspal closed 2 weeks ago

asdspal commented 4 weeks ago

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

ccerv1 commented 4 weeks ago

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

asdspal commented 4 weeks ago

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

asdspal commented 4 weeks ago

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

ccerv1 commented 3 weeks ago

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

asdspal commented 3 weeks ago

Whom should I contact for bounty processing on Discord?