Skip to content

Commit

Permalink
Merge pull request #8 from hgraph-io/con-138
Browse files Browse the repository at this point in the history
Update cohorts graph
  • Loading branch information
tmctl authored Apr 15, 2024
2 parents 986732d + 2fbccdf commit 929510a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ <h3 class="text-[30px]">NFT ecosystem activity</h3>
<div class="flex basis-1/3 flex-col">
<h2 class="text-[30px]">NFT Ecosystem Account Cohort Analysis</h2>
<p class="mt-3 text-[16px] max-w-[440px]">
Accounts in the Hedera NFT ecosystem that performed their first NFT
Accounts in the Hedera NFT ecosystem that performed an NFT
ecosystem-related transaction and the percentage of accounts that returned to
perform another related transaction in subsequent weeks.
</p>
Expand Down
18 changes: 9 additions & 9 deletions modules/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,12 @@ export async function fetchData() {
start_date
end_date
total
},
}
,
activeNftAccountCohortsPerWeek: ecosystem_active_nft_account_cohorts {
cohort_date: start_date
period_date: end_date
users: total
cohort
period
total
}
}`

Expand Down Expand Up @@ -157,7 +158,6 @@ export async function fetchRate() {
* Build the bar graph
*/
export function bar({data, period, title, style = 'dark'}) {
console.log(period)
// https://observablehq.com/@vega/vega-lite-annotated-time-series?collection=@vega/vega-lite-api
const hover = vl
.selectPoint('hover')
Expand Down Expand Up @@ -350,10 +350,10 @@ export function line({data, period, title, cumulative = false, style = 'dark'})
* Build the cohort grid
*/
export function cohort({data, title}) {
const csv = data.map(({cohort_date, period_date, users}) => ({
cohort_date: new Date(cohort_date),
period_date: new Date(period_date),
users,
const csv = data.map(({cohort, period, total}) => ({
cohort_date: new Date(cohort),
period_date: new Date(period),
users: total,
}))

const processedData = processCohortData(csv)
Expand Down

0 comments on commit 929510a

Please sign in to comment.