Skip to content

Commit

Permalink
docs: update open collective blog post to subscribe to data (#2383)
Browse files Browse the repository at this point in the history
  • Loading branch information
ryscheng authored Oct 23, 2024
1 parent e6d8c98 commit 57f11de
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ tags: [data-science, open-collective]
image: ./total_amount_donated_oc.png
---

import Button from "../../src/components/plasmic/Button";

[Open Collective](https://opencollective.com) is a platform that enables groups
to collect and disburse funds transparently. It is used by many open-source
projects, communities, and other groups to fund their activities. Notable
Expand Down Expand Up @@ -74,17 +76,30 @@ to open-source tools to build applications.

## Getting started

To get started with the Open Collective transactions datasets, you can access
them directly in BigQuery. The datasets are available in the
`opensource-observer` project. For instance, getting the total amount of
To get started with the Open Collective transactions datasets,
subscribe to the dataset on BigQuery here:

<Button
size={"compact"}
color={"blue"}
target={"_blank"}
link={
"https://console.cloud.google.com/bigquery/analytics-hub/exchanges/projects/87806073973/locations/us/dataExchanges/open_source_observer_190181416ae/listings/open_collective_1926d37f24d"
}
children={"Subscribe on BigQuery"}
/>{" "}

*Note: If you have not yet set up BigQuery on your Google account, check out our [Getting Started guide](../../docs/get-started/).*

For instance, getting the total amount of
donations per month in USD can be done with the following query:

```sql
SELECT
DATE_TRUNC(DATE(created_at), MONTH) AS donation_month,
SUM(CAST(JSON_VALUE(amount, "$.value") AS FLOAT64)) AS total_amount
FROM
`opensource-observer.open_collective.deposits`
`YOUR_PROJECT.open_collective.deposits`
WHERE
JSON_VALUE(amount, "$.currency") = "USD"
AND DATE(created_at) >= DATE("2020-01-01")
Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 57f11de

Please sign in to comment.