Skip to content

napatswift/wv-th-bdgt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

afc7302 · Jun 14, 2024

History

78 Commits
Oct 29, 2023
Nov 2, 2023
Jan 25, 2024
Jun 14, 2024
Oct 29, 2023
Oct 30, 2023
Dec 5, 2023
Jun 12, 2024
Dec 25, 2023
Jun 14, 2024

Repository files navigation

Data structure

1. JSON

Json is used to store the budget data from each methods. The structure of the json is as follows:

{
  "budget_type": "PROJECT",
  "name": "Example Project",
  "amount": 1000000.0,
  "document": "path/to/Example Document",
  "page": 1,
  "fiscal_year_budget": [
    {
      "year": 2022,
      "year_end": null,
      "amount": 500000.0
    },
    {
      "year": 2023,
      "year_end": null,
      "amount": 500000.0
    }
  ],
  "children": [
    {
      "budget_type": "BUDGET_DETAIL",
      "name": "Example Output 1",
      "amount": 500000.0,
      "document": "path/to/Example Document",
      "page": 2,
      "fiscal_year_budget": [
        {
          "year": 2022,
          "year_end": null,
          "amount": 250000.0
        },
        {
          "year": 2023,
          "year_end": null,
          "amount": 250000.0
        }
      ],
      "children": []
    }
  ]
}

The budget_type field can be one of the following:

  • MINISTRY
  • BUDGETARY_UNIT
  • BUDGET_PLAN
  • PROJECT
  • OUTPUT
  • BUDGET_DETAIL

2. CSV For Validating And Editing

The CSV file is used to validate and edit the budget data for non-technical users. The structure of the CSV file is as follows:

column description
error_message error message if the budget is invalid
budget_type MINISTRY, BUDGETARY_UNIT, BUDGET_PLAN, PROJECT, OUTPUT, BUDGET_DETAIL, FISCAL_YEAR_BUDGET
name_1 name of the budgetary unit at level 1
name_2 name of the budgetary unit at level 2
... ...
name_n name of the budgetary unit at level n when n is the number of levels of the budgetary hierarchy
amount amount of the budget
document path to the document (if budget_type is FISCAL_YEAR_BUDGET then this field is null)
page page number of the document (if budget_type is FISCAL_YEAR_BUDGET then this field is null)
fiscal_year fiscal year of the budget (if budget_type is not FISCAL_YEAR_BUDGET then this field is null)
fiscal_year_end fiscal year end of the budget (if budget_type is not FISCAL_YEAR_BUDGET then this field is null)

Example

From the JSON above, the CSV file will be:

error_message,budget_type,name_1,name_2,amount,document,page,fiscal_year,fiscal_year_end
,PROJECT,Example Project,,1000000.0,path/to/Example Document,1,,
,FISCAL_YEAR_BUDGET,,,500000.0,,,2022,
,FISCAL_YEAR_BUDGET,,,500000.0,,,2023,
,BUDGET_DETAIL,,Example Output 1,500000.0,path/to/Example Document,2,,
,FISCAL_YEAR_BUDGET,,,250000.0,,,2022,
,FISCAL_YEAR_BUDGET,,,250000.0,,,2023,

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published