Skip to content

Commit

Permalink
feat: adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanoshadjipetrou committed Jul 9, 2024
1 parent 6fa1152 commit db64aa4
Show file tree
Hide file tree
Showing 8 changed files with 203 additions and 64 deletions.
5 changes: 3 additions & 2 deletions src/config/mapping/budgets/metrics.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
"disbursementIndicatorName": "Total Disbursement to Last Expenditure Reporting Period - Reference Rate",
"cashBalanceIndicatorName": "Opening Cash Balance - Reference Rate",
"organisationName": "implementationPeriod.grant.principalRecipient.name",
"organisationType": "implementationPeriod.grant.principalRecipient.type.name",
"organisationSubType": "implementationPeriod.grant.principalRecipient.type.name",
"organisationType": "implementationPeriod.grant.principalRecipient.type.parent.name",
"expenditureValue": "actualCumulative",
"budgetValue": "plannedCumulative",
"disbursementValue": "actualCumulative",
"cashBalanceValue": "actual",
"urlParams": "?$apply=filter(financialDataSet eq 'ImplementationPeriodFinancialMetricAmount'<filterString>)/groupby((indicatorName),aggregate(actualAmount with sum as actual,actualAmountCumulative with sum as actualCumulative,plannedAmountCumulative with sum as plannedCumulative))",
"urlParamsOrganisations": "?$apply=filter(financialDataSet eq 'ImplementationPeriodFinancialMetricAmount'<filterString>)/groupby((indicatorName,implementationPeriod/grant/principalRecipient/type/name,implementationPeriod/grant/principalRecipient/name),aggregate(actualAmount with sum as actual,actualAmountCumulative with sum as actualCumulative,plannedAmountCumulative with sum as plannedCumulative))"
"urlParamsOrganisations": "?$apply=filter(financialDataSet eq 'ImplementationPeriodFinancialMetricAmount'<filterString>)/groupby((indicatorName,implementationPeriod/grant/principalRecipient/type/parent/name,implementationPeriod/grant/principalRecipient/type/name,implementationPeriod/grant/principalRecipient/name),aggregate(actualAmount with sum as actual,actualAmountCumulative with sum as actualCumulative,plannedAmountCumulative with sum as plannedCumulative))"
}
8 changes: 4 additions & 4 deletions src/config/mapping/expenditures/bar.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"dataPath": "value",
"name": "<componentField>.parent.parent.name",
"itemName": "<componentField>.parent.name",
"name": "<componentField>.parent.name",
"itemName": "<componentField>.name",
"indicatorName": "indicatorName",
"value": "actualCumulative",
"urlParams": "?$apply=filter(indicatorName in ('Expenditure: Module-Intervention - Reference Rate') AND isLatestReported eq true<filterString>)/groupby((indicatorName,<componentField>/parent/name,<componentField>/parent/parent/name),aggregate(actualAmountCumulative with sum as actualCumulative))"
"value": "actual",
"urlParams": "?$apply=filter(indicatorName in ('Expenditure: Module-Intervention - Reference Rate') AND isLatestReported eq true<filterString>)/groupby((indicatorName,<componentField>/name,<componentField>/parent/name),aggregate(actualAmount with sum as actual))"
}
2 changes: 1 addition & 1 deletion src/config/mapping/expenditures/heatmap.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"budget": "value2",
"expenditure": "value1",
"cycle": "periodCovered",
"urlParams": "?$apply=filter(financialDataSet eq 'Expenditure_Intervention_ReferenceRate' AND isLatestReported eq true<filterString>)/groupby((<rowField>,<columnField>),aggregate(actualAmountCumulative with sum as value1,plannedAmountCumulative with sum as value2))",
"urlParams": "?$apply=filter(financialDataSet eq 'Expenditure_Intervention_ReferenceRate' AND isLatestReported eq true<filterString>)/groupby((<rowField>,<columnField>),aggregate(actualAmount with sum as value1,plannedAmount with sum as value2))",
"url1Items": ["Malaria", "Tuberculosis"],
"url2Items": ["HIV/AIDS", "Other"],
"fields": {
Expand Down
6 changes: 3 additions & 3 deletions src/config/mapping/expenditures/table.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"dataPath": "value",
"name": "<componentField>.parent.parent.name",
"itemName": "<componentField>.parent.name",
"name": "<componentField>.parent.name",
"itemName": "<componentField>.name",
"indicatorName": "indicatorName",
"cumulativeExpenditureValue": "actualCumulative",
"periodExpenditureValue": "actual",
"urlParams": "?$apply=filter(indicatorName in ('Expenditure: Module-Intervention - Reference Rate') AND isLatestReported eq true<filterString>)/groupby((indicatorName,<componentField>/parent/name,<componentField>/parent/parent/name),aggregate(actualAmountCumulative with sum as actualCumulative,actualAmount with sum as actual))"
"urlParams": "?$apply=filter(indicatorName in ('Expenditure: Module-Intervention - Reference Rate') AND isLatestReported eq true<filterString>)/groupby((indicatorName,<componentField>/name,<componentField>/parent/name),aggregate(actualAmountCumulative with sum as actualCumulative,actualAmount with sum as actual))"
}
64 changes: 32 additions & 32 deletions src/config/urls/index.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,37 @@
{
"grants": "https://fetch.theglobalfund.org/v3.4/odata/VGrantAgreements/?$count=true&",
"grantsNoCount": "https://fetch.theglobalfund.org/v3.4/odata/VGrantAgreements",
"results": "https://fetch.theglobalfund.org/v3.4/odata/VReportingResults",
"documents": "https://fetch.theglobalfund.org/v3.4/odata/VProgramDocuments",
"disbursements": "https://fetch.theglobalfund.org/v3.4/odata/VGrantAgreementDisbursements",
"commitments": "https://fetch.theglobalfund.org/v3.4/odata/GrantAgreementCommitments",
"vcommitments": "https://fetch.theglobalfund.org/v3.4/odata/VGrantAgreementCommitments",
"grantDetailGrants": "https://fetch.theglobalfund.org/v3.4/odata/GrantAgreementImplementationPeriods",
"grantPeriods": "https://fetch.theglobalfund.org/v3.4/odata/GrantAgreementImplementationPeriods",
"vgrantPeriods": "https://fetch.theglobalfund.org/v3.4/odata/VGrantAgreementImplementationPeriods",
"grantCycles": "https://fetch.theglobalfund.org/v3.4/odata/grantCycles",
"grantIPGoalsObjectives": "https://fetch.theglobalfund.org/v3.4/odata/GrantAgreementImplementationPeriodGoalsAndObjectives",
"grantDetailDisbursements": "https://fetch.theglobalfund.org/v3.4/odata/GrantAgreementDisbursements",
"budgets": "https://fetch.theglobalfund.org/v3.4/odata/GrantAgreementImplementationPeriodDetailedBudgets",
"allocations": "https://fetch.theglobalfund.org/v3.4/odata/Allocations",
"eligibility": "https://fetch.theglobalfund.org/v3.4/odata/VEligibility",
"grants": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VGrantAgreements/?$count=true&",
"grantsNoCount": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VGrantAgreements",
"results": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VReportingResults",
"documents": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VProgramDocuments",
"disbursements": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VGrantAgreementDisbursements",
"commitments": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/GrantAgreementCommitments",
"vcommitments": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VGrantAgreementCommitments",
"grantDetailGrants": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/GrantAgreementImplementationPeriods",
"grantPeriods": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/GrantAgreementImplementationPeriods",
"vgrantPeriods": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VGrantAgreementImplementationPeriods",
"grantCycles": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/grantCycles",
"grantIPGoalsObjectives": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/GrantAgreementImplementationPeriodGoalsAndObjectives",
"grantDetailDisbursements": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/GrantAgreementDisbursements",
"budgets": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/GrantAgreementImplementationPeriodDetailedBudgets",
"allocations": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/Allocations",
"eligibility": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VEligibility",
"geojson": "https://data.theglobalfund.org/static/simple.geo.json",
"countrycontactinfo": "https://fetch.theglobalfund.org/v3.4/odata/VContacts",
"pledgescontributions": "https://fetch.theglobalfund.org/v3.4/odata/PledgesAndContributions",
"performancerating": "https://fetch.theglobalfund.org/v3.4/odata/GrantAgreementProgressUpdates",
"performanceframework": "https://fetch.theglobalfund.org/v3.4/odata/GrantAgreementImplementationPeriodPerformanceFrameworks",
"fundingrequests": "https://fetch.theglobalfund.org/v3.4/odata/FundingRequests",
"multicountries": "https://fetch.theglobalfund.org/v3.4/odata/MultiCountries",
"indicators": "https://fetch.theglobalfund.org/v3.4/odata/VNationalHealthAndDevelopmentIndicators",
"filteroptionslocations": "https://fetch.theglobalfund.org/v3.4/odata/GeographicAreas?$select=geographicAreaCode_ISO3,geographicAreaCode_ISO2,geographicAreaId,geographicAreaName,geographicAreaParentId&$expand=members($select=geographicAreaCode_ISO3,geographicAreaCode_ISO2,geographicAreaId,geographicAreaName,geographicAreaParentId;$expand=members($select=geographicAreaCode_ISO3,geographicAreaCode_ISO2,geographicAreaId,geographicAreaName,geographicAreaParentId;$expand=members($select=geographicAreaCode_ISO3,geographicAreaCode_ISO2,geographicAreaId,geographicAreaName,geographicAreaParentId;$expand=members)))&$filter=geographicAreaName eq 'World'",
"filteroptionsmulticountries": "https://fetch.theglobalfund.org/v3.4/odata/VGrantAgreements?$apply=filter(multiCountryName%20ne%20null)/groupby((MultiCountryName,GeographicAreaCode_ISO3),aggregate(GrantAgreementId%20with%20countdistinct%20as%20count))",
"filteroptionscomponents": "https://fetch.theglobalfund.org/v3.4/odata/Components",
"filteroptionspartnertypes": "https://fetch.theglobalfund.org/v3.4/odata/VGrantAgreements?$apply=groupby((principalRecipientClassificationName,principalRecipientClassificationId,principalRecipientSubClassificationName,principalRecipientSubClassificationId,principalRecipientName,principalRecipientId))",
"filteroptionsstatus": "https://fetch.theglobalfund.org/v3.4/odata/VGrantAgreements?$apply=groupby((grantAgreementStatusTypeName))",
"filteroptionsstatus1": "https://fetch.theglobalfund.org/v3.4/odata/VGrantAgreementImplementationPeriods?$apply=groupby((implementationPeriodStatusTypeName))",
"filteroptionsdonors": "https://fetch.theglobalfund.org/v3.4/odata/donors/?$filter=donorId%20eq%20c06eaea9-c81b-442b-b403-dc348f3734eb%20or%20donorId%20eq%2025188dfc-7567-4e08-b8d0-088a6b83f238%20or%20donorId%20eq%20641c05fa-129d-4b57-a213-b5f6852ddc5f%20or%20donorid%20eq%20cc30fc59-b2fa-49e3-aa5a-762727daa68c&$expand=members($expand=members($expand=members($expand=members)))",
"filteroptionsreplenishmentperiods": "https://fetch.theglobalfund.org/v3.4/odata/replenishmentperiods",
"multicountriescountriesdata": "https://fetch.theglobalfund.org/v3.4/odata/MultiCountries?$expand=MultiCountryComposition($select=GeographicArea;$expand=GeographicArea($select=GeographicAreaCode_ISO3))&$select=MultiCountryName,MultiCountryComposition",
"countrycontactinfo": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VContacts",
"pledgescontributions": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/PledgesAndContributions",
"performancerating": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/GrantAgreementProgressUpdates",
"performanceframework": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/GrantAgreementImplementationPeriodPerformanceFrameworks",
"fundingrequests": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/FundingRequests",
"multicountries": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/MultiCountries",
"indicators": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VNationalHealthAndDevelopmentIndicators",
"filteroptionslocations": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/GeographicAreas?$select=geographicAreaCode_ISO3,geographicAreaCode_ISO2,geographicAreaId,geographicAreaName,geographicAreaParentId&$expand=members($select=geographicAreaCode_ISO3,geographicAreaCode_ISO2,geographicAreaId,geographicAreaName,geographicAreaParentId;$expand=members($select=geographicAreaCode_ISO3,geographicAreaCode_ISO2,geographicAreaId,geographicAreaName,geographicAreaParentId;$expand=members($select=geographicAreaCode_ISO3,geographicAreaCode_ISO2,geographicAreaId,geographicAreaName,geographicAreaParentId;$expand=members)))&$filter=geographicAreaName eq 'World'",
"filteroptionsmulticountries": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VGrantAgreements?$apply=filter(multiCountryName%20ne%20null)/groupby((MultiCountryName,GeographicAreaCode_ISO3),aggregate(GrantAgreementId%20with%20countdistinct%20as%20count))",
"filteroptionscomponents": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/Components",
"filteroptionspartnertypes": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VGrantAgreements?$apply=groupby((principalRecipientClassificationName,principalRecipientClassificationId,principalRecipientSubClassificationName,principalRecipientSubClassificationId,principalRecipientName,principalRecipientId))",
"filteroptionsstatus": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VGrantAgreements?$apply=groupby((grantAgreementStatusTypeName))",
"filteroptionsstatus1": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/VGrantAgreementImplementationPeriods?$apply=groupby((implementationPeriodStatusTypeName))",
"filteroptionsdonors": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/donors/?$filter=donorId%20eq%20c06eaea9-c81b-442b-b403-dc348f3734eb%20or%20donorId%20eq%2025188dfc-7567-4e08-b8d0-088a6b83f238%20or%20donorId%20eq%20641c05fa-129d-4b57-a213-b5f6852ddc5f%20or%20donorid%20eq%20cc30fc59-b2fa-49e3-aa5a-762727daa68c&$expand=members($expand=members($expand=members($expand=members)))",
"filteroptionsreplenishmentperiods": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/replenishmentperiods",
"multicountriescountriesdata": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/MultiCountries?$expand=MultiCountryComposition($select=GeographicArea;$expand=GeographicArea($select=GeographicAreaCode_ISO3))&$select=MultiCountryName,MultiCountryComposition",
"FILTER_OPTIONS_GEOGRAPHY": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/Geographies?$filter=level eq 'World'&$expand=children($expand=children($expand=children))",
"FILTER_OPTIONS_COMPONENTS": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/ActivityAreasGrouped?$filter=type eq 'Component'",
"FILTER_OPTIONS_REPLENISHMENT_PERIODS": "https://api-gf-api-gf-02.azurewebsites.net/v4/odata/allFinancialIndicators?$apply=filter(financialDataSet eq 'Pledges_Contributions')/groupby((periodCovered))&$orderby=periodCovered asc",
Expand Down
Loading

0 comments on commit db64aa4

Please sign in to comment.