Skip to content

Commit

Permalink
Merge branch 'main' of github.com:davidgasquez/gitcoin-grants-data-po…
Browse files Browse the repository at this point in the history
…rtal
  • Loading branch information
davidgasquez committed Feb 19, 2024
2 parents 597a46e + 57358f4 commit 1a5729f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion data/IPFS_CID
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bafybeicxog6mwiga37znhopbxkwfbj5du4sp6rsga6vaht6y7cxugibpv4
bafybeigetjtk24cave62zjhfypkxbwm67jkdw74x6tsm2anmququm6fvmq
27 changes: 27 additions & 0 deletions ggdp/assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,30 @@ def raw_giveth_projects():
giveth = pd.DataFrame(all_projects)
giveth.convert_dtypes()
return giveth


@asset
def raw_discourse_categories():
"""
Listing of categories from "Discourse" of various communities.
Use 'source' column to group categories by Discourse instance.
"""
forums = {
"Gitcoin": "https://gov.gitcoin.co",
"Giveth": "https://forum.giveth.io",
"Arbitrum": "https://forum.arbitrum.foundation",
"Optimism": "https://gov.optimism.io/",
}

data = []
for community, forum_address in forums.items():
catalog = read_json_with_retry(f"{forum_address}/categories.json")
catalog = catalog["category_list"]["categories"]
for category in catalog:
category["source"] = community
data.extend(catalog)

discourse_df = pd.DataFrame(data)
discourse_df = discourse_df.convert_dtypes()
return discourse_df

0 comments on commit 1a5729f

Please sign in to comment.