Skip to content

Commit

Permalink
add environment.goals and environmentalGoal.csv
Browse files Browse the repository at this point in the history
  • Loading branch information
odscjen committed Nov 14, 2023
1 parent 97ec8a4 commit 33f480d
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 30 deletions.
3 changes: 3 additions & 0 deletions docs/_static/i18n.csv
Original file line number Diff line number Diff line change
Expand Up @@ -366,3 +366,6 @@ completion/finalValueDetails,Final value details,True,
completion/finalScope,Final scope,True,
completion/finalScopeDetails,Final scope details,True,
language,Language,True,
environment,Environment,False,
environment,Environment,False,
environment/goals,Environmental goals,False,
61 changes: 34 additions & 27 deletions docs/cost/ids/sustainability.md
Original file line number Diff line number Diff line change
Expand Up @@ -837,12 +837,12 @@ Eg:
:columns: 8
OC4IDS mapping
^^^
Project level: Add the relevant code from the climateChangeGoal codelist to the `environment.climateChangeGoal` array
Project level: Add the relevant code from the environmentalGoal codelist to the `environment.goals` array
```json
{
"environment": {
"climateChangeGoals": [
"mitigation"
"goals": [
"climateChangeMitigation"
]
}
}
Expand Down Expand Up @@ -1466,38 +1466,45 @@ OC4IDS mapping
^^^
For each planned disbursement:
* If the disbursement relates to a contracting processes, for example a payment from a funder to a supplier or subcontractor of a supplier, get the `ContractingProcess` in the `.contractingProcesses` array to which the disbursement relates and add a `Milestone` object to its `.summary.milestones` array. Otherwise, if the disbursement relates to the project, for example a payment from a funder to the public authority, add a `Milestone` object to the project-level `.milestones` array.
* Set the milestone's:
* `.id` incrementally
* `.status` to 'scheduled'
* `.dueDate` to the date on which the disbursement is planned to occur
* `.type` to 'payment'
* `.value` to the amount and currency of the planned disbursement
- If the disbursement relates to a contracting processes, for example a payment from a funder to a supplier or subcontractor of a supplier, get the `ContractingProcess` in the `.contractingProcesses` array to which the disbursement relates and add a `Milestone` object to its `.summary.milestones` array. Otherwise, if the disbursement relates to the project, for example a payment from a funder to the public authority, add a `Milestone` object to the project-level `.milestones` array.
- Set the milestone's:
- `.id` incrementally
- `.status` to 'scheduled'
- `.dueDate` to the date on which the disbursement is planned to occur
- `.type` to 'payment'
- `.value` to the amount and currency of the planned disbursement
For each actual disbursement:
* If the disbursement relates to a contracting processes, for example a payment from a funder to a supplier or subcontractor of a supplier, get the `ContractingProcess` in the `.contractingProcesses` array to which the disbursement relates and add a `Transaction` object to its `.summary.transactions` array. Otherwise, if the disbursement relates to the project, for example a payment from a funder to the public authority, add a `Transaction` object to the project-level `.transactions` array.
* Set the transaction's:
* `.id` incrementally
* `.date` to the date of the disbursement
* `.value` to the amount and currency of the disbursement
* Get the `Organization` in `.parties` that represents the payer. If none exists yet, [add an organization](../common.md#add-an-organization) for the payer:
* Add 'payer' to the organization's `.roles` array
* Set the transaction's `.payer` to the `.id` and `.name` of the organization
* Get the `Organization` in `.parties` that represents the payee. If none exists yet, [add an organization](../common.md#add-an-organization) for the payee:
* Add 'payee' to the organization's `.roles` array.
* Set the transaction's `.payee` to the `.id` and `.name` of the organization
* Get the `Milestone` in `.milestones` that represents that planned disbursement:
* Set its `.status` to 'met'
* Set its `.dateMet` to the date of the disbursement
* Set the transaction's `.relatedImplementationMilestone` to the `.id` and `.title` of the milestone
- If the disbursement relates to a contracting processes, for example a payment from a funder to a supplier or subcontractor of a supplier, get the `ContractingProcess` in the `.contractingProcesses` array to which the disbursement relates and add a `Transaction` object to its `.summary.transactions` array. Otherwise, if the disbursement relates to the project, for example a payment from a funder to the public authority, add a `Transaction` object to the project-level `.transactions` array.
- Set the transaction's:
- `.id` incrementally
- `.date` to the date of the disbursement
- `.value` to the amount and currency of the disbursement
- Get the `Organization` in `.parties` that represents the payer. If none exists yet, [add an organization](../common.md#add-an-organization) for the payer:
- Add 'payer' to the organization's `.roles` array
- Set the transaction's `.payer` to the `.id` and `.name` of the organization
- Get the `Organization` in `.parties` that represents the payee. If none exists yet, [add an organization](../common.md#add-an-organization) for the payee:
- Add 'payee' to the organization's `.roles` array.
- Set the transaction's `.payee` to the `.id` and `.name` of the organization
- Get the `Milestone` in `.milestones` that represents that planned disbursement:
- Set its `.status` to 'met'
- Set its `.dateMet` to the date of the disbursement
- Set the transaction's `.relatedImplementationMilestone` to the `.id` and `.title` of the milestone
```json
{
"milestones": [
{
"id": "1",
"title": "Grant disbursement"
"title": "Grant disbursement",
"status": "met",
"dueDate": "2023-07-01T00:00:00Z",
"dateMet": "2023-08-01T00:00:00Z",
Expand Down
5 changes: 5 additions & 0 deletions docs/examples/blank.json
Original file line number Diff line number Diff line change
Expand Up @@ -416,5 +416,10 @@
"finalValueDetails": "",
"finalScope": "",
"finalScopeDetails": ""
},
"environment": {
"goals": [
"string"
]
}
}
5 changes: 5 additions & 0 deletions docs/examples/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,11 @@
"finalValueDetails": "Budget increase due to construction delay.",
"finalScope": "Upgrade of Junctions 4 and 5 and repairs to the watercourse at Junction 5.",
"finalScopeDetails": "Scope was expanded to include repairs to a watercourse damaged during construction excavation."
},
"environment": {
"goals": [
"climateChangeMitigation"
]
}
}
]
Expand Down
35 changes: 35 additions & 0 deletions docs/reference/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -1076,3 +1076,38 @@ Each `MilestoneReference` has the following fields:
````
`````

### Environment

`Environment` is defined as:

```{field-description} ../../build/current_lang/project-schema.json /definitions/Environment
```

This sub-schema is referenced by the following properties:
* [`environment`](project-schema.json,,environment)

Each `Environment` has the following fields:

`````{tab-set}
````{tab-item} Schema
```{jsonschema} ../../build/current_lang/project-schema.json
:pointer: /definitions/Environment
:collapse: goals
:addtargets:
```
````
````{tab-item} Examples
```{jsoninclude} ../../docs/examples/example.json
:jsonpointer: /projects/0/environment
:title: environment
```
````
`````
6 changes: 3 additions & 3 deletions mapping/sustainability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -486,12 +486,12 @@
- mitigation
- adaptation
- cross-cutting
mapping: 'Project level: Add the relevant code from the climateChangeGoal codelist to the `environment.climateChangeGoal` array'
mapping: 'Project level: Add the relevant code from the environmentalGoal codelist to the `environment.goals` array'
example: |-
{
"environment": {
"climateChangeGoals": [
"mitigation"
"goals": [
"climateChangeMitigation"
]
}
}
Expand Down
3 changes: 3 additions & 0 deletions schema/project-level/codelists/environmentalGoal.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Code,Title,Description,Source
climateChangeAdaptation,Climate change adaptation,"Adjustment to actual or expected climate and its effects, in order to moderate harm or exploit beneficial opportunities.",OC4IDS
climateChangeMitigation,Climate change mitigation,Reduction of emissions or enhancement of the sinks of greenhouse gases.,OC4IDS
25 changes: 25 additions & 0 deletions schema/project-level/project-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,31 @@
],
"default": "en",
"minLength": 1
},
"environment": {
"title": "Environment",
"description": "Information about the environmental and climate impact of the project and actions the project will take to mitigate potentially negative impacts on adjacent populations and habitats.",
"type": "object",
"properties": {
"goals": {
"title": "Environmental goals",
"description": "The environmental goals pursued, using the closed environmentalGoal codelist.",
"type": [
"array"
],
"items": {
"type": "string",
"enum": [
"climateChangeAdaptation",
"climateChangeMitigation"
]
},
"codelist": "environmentalGoal.csv",
"openCodelist": false,
"minItems": 1
}
},
"minProperties": 1
}
},
"definitions": {
Expand Down

0 comments on commit 33f480d

Please sign in to comment.