Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project-schema.json: add benefits array #438

Merged
merged 11 commits into from
Nov 28, 2023
30 changes: 28 additions & 2 deletions docs/_static/i18n.csv
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ lobbyingMeetings/address/countryName,Country name,True,
lobbyingMeetings/numberOfParticipants,Number of participants,False,
lobbyingMeetings/publicOffice,Public office,False,
lobbyingMeetings/publicOffice,Public office,False,
lobbyingMeetings/publicOffice/person,Person.,False,
lobbyingMeetings/publicOffice/person,Person,False,
lobbyingMeetings/publicOffice/person/name,Name,True,
lobbyingMeetings/publicOffice/organization,Organization,False,
lobbyingMeetings/publicOffice/organization,Organization reference,False,
Expand All @@ -478,7 +478,7 @@ social/consultationMeetings/address/countryName,Country name,True,
social/consultationMeetings/numberOfParticipants,Number of participants,False,
social/consultationMeetings/publicOffice,Public office,False,
social/consultationMeetings/publicOffice,Public office,False,
social/consultationMeetings/publicOffice/person,Person.,False,
social/consultationMeetings/publicOffice/person,Person,False,
social/consultationMeetings/publicOffice/person/name,Name,True,
social/consultationMeetings/publicOffice/organization,Organization,False,
social/consultationMeetings/publicOffice/organization,Organization reference,False,
Expand All @@ -487,3 +487,29 @@ social/consultationMeetings/publicOffice/organization/id,Organization ID,True,
social/consultationMeetings/publicOffice/jobTitle,Job title,True,
environment,Environment,False,
environment/goals,Environmental goals,False,
benefits,Benefits,False,
benefits,Benefit,False,
benefits/title,Title,True,
benefits/description,Description,True,
benefits/beneficiaries,Beneficiaries,False,
benefits/beneficiaries,Beneficiary,False,
benefits/beneficiaries/location,Location,False,
benefits/beneficiaries/location,Delivery Location,False,
benefits/beneficiaries/location/id,Identifier,True,
benefits/beneficiaries/location/description,Description,True,
benefits/beneficiaries/location/geometry,Geometry,False,
benefits/beneficiaries/location/geometry/type,Type,False,
benefits/beneficiaries/location/geometry/coordinates,Coordinates,False,
benefits/beneficiaries/location/gazetteer,Gazetteer,False,
benefits/beneficiaries/location/gazetteer/scheme,Gazetteer scheme,False,
benefits/beneficiaries/location/gazetteer/identifiers,Identifiers,False,
benefits/beneficiaries/location/uri,URI,True,
benefits/beneficiaries/location/address,Address,False,
benefits/beneficiaries/location/address,Address,False,
benefits/beneficiaries/location/address/streetAddress,Street address,True,
benefits/beneficiaries/location/address/locality,Locality,True,
benefits/beneficiaries/location/address/region,Region,True,
benefits/beneficiaries/location/address/postalCode,Postal code,True,
benefits/beneficiaries/location/address/countryName,Country name,True,
benefits/beneficiaries/description,Description,True,
benefits/beneficiaries/numberOfPeople,Number of people,False,
28 changes: 25 additions & 3 deletions docs/cost/ids/sustainability.md
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,7 @@ Indirect\]
:columns: 8
OC4IDS mapping
^^^

See [number of beneficiaries (social module)](social-number-of-beneficiaries)
````

`````
Expand Down Expand Up @@ -1247,6 +1247,7 @@ Disclose dates for project approval \[submission date, approval date\]
OC4IDS mapping
^^^
Project level:

For each date:

- Add a `Milestone` to the `milestones` array and set its:
Expand Down Expand Up @@ -1414,12 +1415,11 @@ gender empowerment
:columns: 8
OC4IDS mapping
^^^
Project level: For each impact identified add a `benefit` object to the `benefits` array and assign it a locally unique `id`. Set the `title` as the list code and add details explaining the benefit to `.description`.
Project level: For each co-benefit, add a `Benefit` object to the `benefits` array, map the option from the list to its `.title` and map the explanation to its `.description`.
```json
{
"benefits": [
{
"id": "1",
"title": "environmental",
"description": "The new water management plant will mean less water is removed from the delta meaning more is left in place for use by the local biome."
}
Expand Down Expand Up @@ -2044,7 +2044,29 @@ Indicate the number of direct and indirect project beneficiaries (E.g. direct: \
:columns: 8
OC4IDS mapping
^^^
Project level:

1. Add a `Benefit` object to the `benefits` array.
2. Add a `Beneficiary` object to the benefit's `.beneficiaries` array, set its `.description` to "Direct beneficiaries" and set its `.numberOfPeople` to the number of direct beneficiaries.
3. Add a `Beneficiary` object to the benefit's `.beneficiaries` array, set its `.description` to "Indirect beneficiaries" and set its `.numberOfPeople` to the number of indirect beneficiaries.
```json
{
"benefits": [
{
"beneficiaries": [
{
"description": "Direct beneficiaries",
"numberOfPeople": 1000
},
{
"description": "Indirect beneficiaries",
"numberOfPeople": 2000
}
]
}
]
}
```
````

`````
Expand Down
15 changes: 14 additions & 1 deletion docs/examples/blank.json
Original file line number Diff line number Diff line change
Expand Up @@ -530,5 +530,18 @@
"goals": [
"string"
]
}
},
"benefits": [
{
"title": "string",
"description": "string",
"beneficiaries": [
{
"description": "string",
"location": {},
"numberOfPeople": "integer"
}
]
}
]
}
20 changes: 19 additions & 1 deletion docs/examples/example.json
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,25 @@
"goals": [
"climateChangeMitigation"
]
}
},
"benefits": [
{
"title": "Environmental",
"description": "The new water management plant will mean less water is removed from the delta meaning more is left in place for use by the local biome.",
"beneficiaries": [
{
"description": "Local population of water plant.",
"numberOfPeople": 1000,
"location": {
"id": "1",
"address": {
"countryName": "United Kingdom"
}
}
}
]
}
]
}
]
}
1 change: 1 addition & 0 deletions docs/reference/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
* [#426](https://github.com/open-contracting/infrastructure/pull/426) - `milestones`
* [#379](https://github.com/open-contracting/infrastructure/pull/379) - `contractingProcesses.summary.tender.datePublished`
* [#426](https://github.com/open-contracting/infrastructure/pull/426) - `contractingProcesses.summary.milestones`
* [#438](https://github.com/open-contracting/infrastructure/pull/438) - add `benefits`.
* [#432](https://github.com/open-contracting/infrastructure/pull/432):
* `identificationPeriod`
* `preparationPeriod`
Expand Down
91 changes: 81 additions & 10 deletions docs/reference/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@ Each `Classification` has the following fields:

This sub-schema is referenced by the following properties:
* [`locations`](project-schema.json,,locations)
* [`Beneficiary/location`](project-schema.json,/definitions/Beneficiary,location)

Each `Location` has the following fields:

Expand All @@ -381,6 +382,11 @@ Each `Location` has the following fields:
:title: locations
```

```{jsoninclude} ../../docs/examples/example.json
:jsonpointer: /projects/0/benefits/0/beneficiaries/0/location
:title: benefits/0/beneficiaries/0/location
```

````

`````
Expand Down Expand Up @@ -598,11 +604,6 @@ Each `OrganizationReference` has the following fields:
:title: lobbyingMeetings/0/publicOffice/organization
```

```{jsoninclude} ../../docs/examples/example.json
:jsonpointer: /projects/0/social/consultationMeetings/0/publicOffice/organization
:title: social/consultationMeetings/0/publicOffice/organization
```

````

`````
Expand Down Expand Up @@ -660,6 +661,11 @@ Each `Address` has the following fields:
:title: social/consultationMeetings/0/address
```

```{jsoninclude} ../../docs/examples/example.json
:jsonpointer: /projects/0/benefits/0/beneficiaries/0/location/address
:title: benefits/0/beneficiaries/0/location/address
```

````

`````
Expand Down Expand Up @@ -1138,6 +1144,76 @@ Each `MilestoneReference` has the following fields:

`````

### Benefit

`Benefit` is defined as:

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

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

Each `Benefit` has the following fields:

`````{tab-set}

````{tab-item} Schema

```{jsonschema} ../../build/current_lang/project-schema.json
:pointer: /definitions/Benefit
:collapse: title,description,beneficiaries
:addtargets:
```

````

````{tab-item} Examples

```{jsoninclude} ../../docs/examples/example.json
:jsonpointer: /projects/0/benefits
:title: benefits
```

````

`````

### Beneficiary

`Beneficiary` is defined as:

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

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

Each `Beneficiary` has the following fields:

`````{tab-set}

````{tab-item} Schema

```{jsonschema} ../../build/current_lang/project-schema.json
:pointer: /definitions/Beneficiary
:collapse: location,description,numberOfPeople
:addtargets:
```

````

````{tab-item} Examples

```{jsoninclude} ../../docs/examples/example.json
:jsonpointer: /projects/0/benefits/0/beneficiaries
:title: benefits/0/beneficiaries
```

````

`````

### Meeting

`Meeting` is defined as:
Expand Down Expand Up @@ -1210,11 +1286,6 @@ Each `PublicOffice` has the following fields:
:title: lobbyingMeetings/0/publicOffice
```

```{jsoninclude} ../../docs/examples/example.json
:jsonpointer: /projects/0/social/consultationMeetings/0/publicOffice
:title: social/consultationMeetings/0/publicOffice
```

````

`````
Expand Down
30 changes: 25 additions & 5 deletions mapping/sustainability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@
Disclose who is the climate finance investment intended to benefit \[free text to explain the beneficiaries\] and number of beneficiaries. \[Select from the list:
Direct
Indirect\]
mapping: ''
mapping: See [number of beneficiaries (social module)](social-number-of-beneficiaries)
example: ''
- id: '3.8'
title: Amount of investment
Expand Down Expand Up @@ -823,12 +823,11 @@
environmental
gender empowerment
\[add free text to explain the co-benefits\]
mapping: 'Project level: For each impact identified add a `benefit` object to the `benefits` array and assign it a locally unique `id`. Set the `title` as the list code and add details explaining the benefit to `.description`.'
mapping: 'Project level: For each co-benefit, add a `Benefit` object to the `benefits` array, map the option from the list to its `.title` and map the explanation to its `.description`.'
example: |-
{
"benefits": [
{
"id": "1",
"title": "environmental",
"description": "The new water management plant will mean less water is removed from the delta meaning more is left in place for use by the local biome."
}
Expand Down Expand Up @@ -1211,8 +1210,29 @@
module: Social
indicator: Beneficiary population
disclosure format: 'Indicate the number of direct and indirect project beneficiaries (E.g. direct: \[number\]; indirect: "number"). Beneficiaries are the individuals who benefit directly or indirectly from the project; they are the target group of the infrastructure project and their needs are addressed by the intervention.'
mapping: ''
example: ''
mapping: |-
Project level:

1. Add a `Benefit` object to the `benefits` array.
2. Add a `Beneficiary` object to the benefit's `.beneficiaries` array, set its `.description` to "Direct beneficiaries" and set its `.numberOfPeople` to the number of direct beneficiaries.
3. Add a `Beneficiary` object to the benefit's `.beneficiaries` array, set its `.description` to "Indirect beneficiaries" and set its `.numberOfPeople` to the number of indirect beneficiaries.
example: |-
{
"benefits": [
{
"beneficiaries": [
{
"description": "Direct beneficiaries",
"numberOfPeople": 1000
},
{
"description": "Indirect beneficiaries",
"numberOfPeople": 2000
}
]
}
]
}
- id: '4.2'
title: Inclusive design and implementation
module: Social
Expand Down
Loading
Loading