Skip to content

Commit

Permalink
GCP-32
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul Meems committed Feb 15, 2019
1 parent d10ba76 commit 0f9ae5e
Show file tree
Hide file tree
Showing 7 changed files with 167 additions and 327 deletions.
201 changes: 2 additions & 199 deletions docs/source/explanation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Generally, data should include Country and then State/Department and Municipalit

2.1.4 dateOfBirth
-----------------
Date of birth.
Date of birth. [YYYY-MM-DD]

**Type**: *string*

Expand Down Expand Up @@ -597,8 +597,6 @@ The form of coffee (will require conversion to GBE, Green Bean Equivalent)
---------------------
Cost of Production

**Type**: *object*


Costs incurred to produce the coffee during the last production year (calculated per kg of GBE)

Expand All @@ -625,202 +623,7 @@ When calculating costs, include only expenditures coming from the household’s
This indicator is a Sub-metric for Net Income (or Profit).


3.3.3.1 fertilizers
*******************
Fertilizers costs


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.2 pesticides
******************
Pesticides costs


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.3 hiredLabor
******************
Costs of hired labor


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.4 plantingMaterial
************************
Costs of planting material


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.5 renovation
******************
Costs of renovation


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.6 deductionsByBuyers
**************************
Deductions by buyers


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.7 rentOfLand
******************
Rent of land


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.8 energy
**************
Energy costs


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.9 irrigation
******************
Irrigation costs


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.10 capitalAssets
**********************
Capital assets


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.11 cultivationPractices
*****************************
Cultivation practices


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.12 traceabilityAndRecordKeeping
*************************************
Traceability and record keeping


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.13 standardsCertification
*******************************
Costs of standards or certifications


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.14 plantingReforestation
******************************
Planting and reforestation costs


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.15 training
*****************
Training costs


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.16 interest
*****************
Interest on credit


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.17 cropInsurance
**********************
Crop insurance


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.18 cooperativeFees
************************
Cooperative fees


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.19 unpaidFamilyLabor
**************************
Unpaid family labor


.. literalinclude:: ../../schema/productionCosts.json
:language: json
:linenos:
:caption: Object description

3.3.3.20 other
**************
Other costs


.. literalinclude:: ../../schema/productionCosts.json
.. literalinclude:: ../../schema/production-costs.json
:language: json
:linenos:
:caption: Object description
Expand Down
2 changes: 1 addition & 1 deletion example-data/testset.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
},
"productionCosts": {
"fertilizers": {
"amount": 25800,
"amount": 2500,
"percentage": 100
},
"pesticides": {
Expand Down
35 changes: 35 additions & 0 deletions schema/general.definitions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://raw.githubusercontent.com/andrejellema/GlobalCoffeeDataStandard/master/schema/general.definitions.json",
"title": "General definitions",
"definitions": {
"percentage": {
"title": "The percentage, 0-100",
"description": "The percentage, from 0 to 100 with decimals allowed",
"$comment": "Duplicate in /productionCosts.json",
"type": "number",
"minimum": 0,
"maximum": 100
},
"positiveNumber": {
"title": "A positive number > 0",
"description": "A positive number starting at 0 with decimals allowed",
"type": "number",
"minimum": 0
},
"greaterThanZero": {
"title": "The positive number, greater than 0",
"description": "A positive number starting at greater than 0 with decimals allowed",
"type": "number",
"exclusiveMinimum": 0
},
"yesNo": {
"title": "Yes-No enumeration",
"type": "string",
"enum": [
"Yes",
"No"
]
}
}
}
94 changes: 2 additions & 92 deletions schema/global-coffee-data-standard.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"$ref": "./address.json"
},
"dateOfBirth": {
"title": "Date of birth.",
"title": "Date of birth. [YYYY-MM-DD]",
"description": "Best practice is to use 'Year of Birth' as opposed to age. Age has to be updated annually, but year of birth is the same indefinitely, and can be used to calculate age at any point.",
"$extended-description": "Data point used to understand the relative presence of youth and calculate youth engagement: % of producers in the sustainability program or supply chain 35 years old and under.",
"examples": [
Expand Down Expand Up @@ -436,97 +436,7 @@
"title": "Cost of Production",
"description": "Costs incurred to produce the coffee during the last production year (calculated per kg of GBE)",
"$extended-description": "The simple approach asks only about the main costs in the production system that typically account for the vast majority of total costs (and the total amount spent on each during the last production year). By focusing on the main costs in a system, this provides a good sense of the economic picture on the farm without adding substantial detail to the approach.\\nMain costs typically include (at a minimum):\\n* Fertilizers\\n* Pesticides\\n* Hired Labor\\n* Planting material/ Renovation costs\\nFor those using the Full cost accounting approach the categories are comparable though fewer. The full approach would include: deductions by buyers, rent of land, energy, irrigation, capital assets, cultivation practices, traceability and record keeping, costs of standards or certifications, planting and reforestation costs, training costs, interest on credit, crop insurance, cooperative fees, or the value of unpaid family labor (although any important costs in a system should be captured).\\nCosts should be associated with the coffee production only (i.e., if labor is hired for multiple crops, only the portion used for coffee production should be included). One way to make sure that costs are correctly associated with the production of the coffee is to ask for the percent of inputs that were used for the coffee.\\nWhen calculating costs, include only expenditures coming from the household’s own revenue. If inputs are provided as technical assistance for free or at a subsidized cost on a **persistent**, **substantial**, and **systemic** basis it is recommended to account for the value of the input as a cost in the calculation (at an appropriately determined rate).\\n\\n\nThis indicator is a Sub-metric for Net Income (or Profit).",
"type": "object",
"additionalProperties": false,
"required": [
"fertilizers",
"pesticides",
"hiredLabor",
"plantingMaterial",
"renovation"
],
"properties": {
"fertilizers": {
"title": "Fertilizers costs",
"$ref": "./productionCosts.json"
},
"pesticides": {
"title": "Pesticides costs",
"$ref": "./productionCosts.json"
},
"hiredLabor": {
"title": "Costs of hired labor",
"$ref": "./productionCosts.json"
},
"plantingMaterial": {
"title": "Costs of planting material",
"$ref": "./productionCosts.json"
},
"renovation": {
"title": "Costs of renovation",
"$ref": "./productionCosts.json"
},
"deductionsByBuyers": {
"title": "Deductions by buyers",
"$ref": "./productionCosts.json"
},
"rentOfLand": {
"title": "Rent of land",
"$ref": "./productionCosts.json"
},
"energy": {
"title": "Energy costs",
"$ref": "./productionCosts.json"
},
"irrigation": {
"title": "Irrigation costs",
"$ref": "./productionCosts.json"
},
"capitalAssets": {
"title": "Capital assets",
"$ref": "./productionCosts.json"
},
"cultivationPractices": {
"title": "Cultivation practices",
"$ref": "./productionCosts.json"
},
"traceabilityAndRecordKeeping": {
"title": "Traceability and record keeping",
"$ref": "./productionCosts.json"
},
"standardsCertification": {
"title": "Costs of standards or certifications",
"$ref": "./productionCosts.json"
},
"plantingReforestation": {
"title": "Planting and reforestation costs",
"$ref": "./productionCosts.json"
},
"training": {
"title": "Training costs",
"$ref": "./productionCosts.json"
},
"interest": {
"title": "Interest on credit",
"$ref": "./productionCosts.json"
},
"cropInsurance": {
"title": "Crop insurance",
"$ref": "./productionCosts.json"
},
"cooperativeFees": {
"title": "Cooperative fees",
"$ref": "./productionCosts.json"
},
"unpaidFamilyLabor": {
"title": "Unpaid family labor",
"$ref": "./productionCosts.json"
},
"other": {
"title": "Other costs",
"$ref": "./productionCosts.json"
}
}
"$ref": "./production-costs.json"
},
"price": {
"title": "Average Price received per kg of coffee (GBE)",
Expand Down
6 changes: 5 additions & 1 deletion schema/global-unique-id.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@
"type": "string"
},
"timestamp": {
"title": "The creation timestamp.",
"title": "The creation timestamp. [YYYY-MM-DD]",
"description": "The timestamp when this identifier was created.",
"examples": [
"2016-06-31",
"2019-01-03"
],
"type": "string",
"pattern": "^[12][0-9]{3}-[01][0-9]-[0-3][0-9]$",
"format": "full-date"
Expand Down

0 comments on commit 0f9ae5e

Please sign in to comment.