Skip to content

Add % of total property to the /budget/history/bureau/ endpoint #133

@jimtyhurst

Description

@jimtyhurst

Desired behavior

Per fiscal_year and service_area_code, add a pct_of_total field in addition to the amount field. The percent field is the amount divided by the aggregated total for the service_area_code in the fiscal_year of that record. So each object will give the percentage of the service code that is budgeted to the bureau for the given year.

Sample response

[
{
"fiscal_year": "2014-15",
"service_area_code": "CD",
"bureau_code": "AU",
"bureau_name": "Office of the City Auditor",
"amount": 5085506,
"pct_of_total": 1.66
},
{
"fiscal_year": "2014-15",
"service_area_code": "CD",
"bureau_code": "DS",
"bureau_name": "Bureau of Development Services",
"amount": 93304186,
"pct_of_total": 30.54
},
...
]

This issue is a follow-up to the initial implementation of the Bureau endpoint as a solution to Issue #76.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions