Skip to content

Commit

Permalink
feat: donors hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanoshadjipetrou committed Jun 4, 2024
1 parent a5fce5b commit 6e46c0b
Show file tree
Hide file tree
Showing 3 changed files with 244 additions and 106 deletions.
3 changes: 2 additions & 1 deletion src/config/mapping/pledgescontributions/bar.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@
"contributionsUrlParams": "?$apply=filter(financialDataSet eq 'Pledges_Contributions' AND indicatorName eq 'Contribution - Reference Rate'<filterString>)/groupby((periodCovered),aggregate(actualAmount with sum as value))&$orderby=periodCovered asc",
"donorBarType": "donor.type.name",
"donorBarDonor": "donor.name",
"donorBarType2": "donor.type.parent.name",
"donorBarIndicatorField": "indicatorName",
"donorBarIndicatorPledge": "Pledge - Reference Rate",
"donorBarIndicatorContribution": "Contribution - Reference Rate",
"donorBarIndicatorPledgeAmount": "plannedAmount",
"donorBarIndicatorContributionAmount": "actualAmount",
"donorBarUrlParams": "?$apply=filter(financialDataSet eq 'Pledges_Contributions'<filterString>)/groupby((donor/name,donor/type/name,indicatorName),aggregate(plannedAmount with sum as plannedAmount,actualAmount with sum as actualAmount))"
"donorBarUrlParams": "?$apply=filter(financialDataSet eq 'Pledges_Contributions'<filterString>)/groupby((donor/name,donor/type/name,donor/type/parent/name,indicatorName),aggregate(plannedAmount with sum as plannedAmount,actualAmount with sum as actualAmount))"
}
5 changes: 3 additions & 2 deletions src/config/mapping/pledgescontributions/sunburst.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
"dataPath": "value",
"type": "donor.type.name",
"donor": "donor.name",
"type2": "donor.type.parent.name",
"indicatorField": "indicatorName",
"indicatorPledge": "Pledge - Reference Rate",
"indicatorContribution": "Contribution - Reference Rate",
"amount": "amount",
"pledgeUrlParams": "?$apply=filter(financialDataSet eq 'Pledges_Contributions' AND indicatorName eq 'Pledge - Reference Rate'<filterString>)/groupby((donor/name,donor/type/name),aggregate(plannedAmount with sum as amount))",
"contributionUrlParams": "?$apply=filter(financialDataSet eq 'Pledges_Contributions' AND indicatorName eq 'Contribution - Reference Rate'<filterString>)/groupby((donor/name,donor/type/name),aggregate(actualAmount with sum as amount))"
"pledgeUrlParams": "?$apply=filter(financialDataSet eq 'Pledges_Contributions' AND indicatorName eq 'Pledge - Reference Rate'<filterString>)/groupby((donor/name,donor/type/name,donor/type/parent/name),aggregate(plannedAmount with sum as amount))",
"contributionUrlParams": "?$apply=filter(financialDataSet eq 'Pledges_Contributions' AND indicatorName eq 'Contribution - Reference Rate'<filterString>)/groupby((donor/name,donor/type/name,donor/type/parent/name),aggregate(actualAmount with sum as amount))"
}
Loading

0 comments on commit 6e46c0b

Please sign in to comment.