hestia-earth-models 0.64.14__py3-none-any.whl → 0.65.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of hestia-earth-models might be problematic. Click here for more details.

Files changed (117) hide show
  1. hestia_earth/models/agribalyse2016/fuelElectricity.py +1 -1
  2. hestia_earth/models/cache_sites.py +15 -24
  3. hestia_earth/models/chaudharyBrooks2018/damageToTerrestrialEcosystemsLandTransformation.py +6 -9
  4. hestia_earth/models/cycle/input/hestiaAggregatedData.py +46 -22
  5. hestia_earth/models/cycle/pre_checks/cache_sources.py +3 -25
  6. hestia_earth/models/cycle/product/economicValueShare.py +2 -2
  7. hestia_earth/models/ecoinventV3/__init__.py +3 -2
  8. hestia_earth/models/ecoinventV3/utils.py +1 -2
  9. hestia_earth/models/ecoinventV3AndEmberClimate/__init__.py +3 -2
  10. hestia_earth/models/environmentalFootprintV3/soilQualityIndexLandTransformation.py +17 -37
  11. hestia_earth/models/faostat2018/landTransformation100YearAverageDuringCycle.py +34 -0
  12. hestia_earth/models/faostat2018/landTransformation20YearAverageDuringCycle.py +34 -0
  13. hestia_earth/models/faostat2018/utils.py +47 -3
  14. hestia_earth/models/hestia/landCover.py +5 -5
  15. hestia_earth/models/hestia/seed_emissions.py +284 -0
  16. hestia_earth/models/ipcc2019/aboveGroundBiomass.py +2 -2
  17. hestia_earth/models/ipcc2019/belowGroundBiomass.py +8 -2
  18. hestia_earth/models/ipcc2019/biomass_utils.py +11 -4
  19. hestia_earth/models/ipcc2019/ch4ToAirEntericFermentation.py +19 -10
  20. hestia_earth/models/ipcc2019/co2ToAirAboveGroundBiomassStockChange.py +2 -1
  21. hestia_earth/models/ipcc2019/co2ToAirBelowGroundBiomassStockChange.py +2 -1
  22. hestia_earth/models/ipcc2019/co2ToAirCarbonStockChange_utils.py +8 -7
  23. hestia_earth/models/ipcc2019/co2ToAirSoilOrganicCarbonStockChange.py +2 -1
  24. hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_1_utils.py +28 -34
  25. hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_2_utils.py +8 -12
  26. hestia_earth/models/ipcc2019/organicCarbonPerHa_utils.py +13 -30
  27. hestia_earth/models/linkedImpactAssessment/freshwaterWithdrawalsInputsProduction.py +4 -1
  28. hestia_earth/models/linkedImpactAssessment/landOccupationInputsProduction.py +16 -1
  29. hestia_earth/models/linkedImpactAssessment/{landTransformationFromForest100YearAverageInputsProduction.py → landTransformation100YearAverageInputsProduction.py} +8 -3
  30. hestia_earth/models/linkedImpactAssessment/{landTransformationFromCropland100YearAverageInputsProduction.py → landTransformation20YearAverageInputsProduction.py} +8 -3
  31. hestia_earth/models/linkedImpactAssessment/utils.py +80 -16
  32. hestia_earth/models/mocking/search-results.json +448 -448
  33. hestia_earth/models/pooreNemecek2018/excretaKgN.py +45 -41
  34. hestia_earth/models/pooreNemecek2018/excretaKgVs.py +89 -63
  35. hestia_earth/models/pooreNemecek2018/saplingsDepreciatedAmountPerCycle.py +8 -8
  36. hestia_earth/models/pooreNemecek2018/utils.py +60 -19
  37. hestia_earth/models/schererPfister2015/nErosionSoilFlux.py +4 -3
  38. hestia_earth/models/schererPfister2015/pErosionSoilFlux.py +4 -3
  39. hestia_earth/models/schererPfister2015/utils.py +12 -9
  40. hestia_earth/models/site/management.py +70 -55
  41. hestia_earth/models/site/pre_checks/cache_sources.py +2 -20
  42. hestia_earth/models/utils/__init__.py +12 -1
  43. hestia_earth/models/utils/aggregated.py +1 -1
  44. hestia_earth/models/utils/blank_node.py +20 -12
  45. hestia_earth/models/utils/cache_sources.py +15 -0
  46. hestia_earth/models/utils/crop.py +5 -0
  47. hestia_earth/models/utils/indicator.py +3 -1
  48. hestia_earth/models/version.py +1 -1
  49. {hestia_earth_models-0.64.14.dist-info → hestia_earth_models-0.65.1.dist-info}/LICENSE +1 -1
  50. {hestia_earth_models-0.64.14.dist-info → hestia_earth_models-0.65.1.dist-info}/METADATA +3 -3
  51. {hestia_earth_models-0.64.14.dist-info → hestia_earth_models-0.65.1.dist-info}/RECORD +80 -109
  52. tests/models/cml2001Baseline/test_abioticResourceDepletionMineralsAndMetals.py +1 -1
  53. tests/models/cycle/input/test_hestiaAggregatedData.py +5 -2
  54. tests/models/environmentalFootprintV3/test_soilQualityIndexLandTransformation.py +39 -28
  55. tests/models/{hyde32/test_landTransformationFromForest20YearAverageDuringCycle.py → faostat2018/test_landTransformation100YearAverageDuringCycle.py} +5 -5
  56. tests/models/{hyde32/test_landTransformationFromForest100YearAverageDuringCycle.py → faostat2018/test_landTransformation20YearAverageDuringCycle.py} +5 -5
  57. tests/models/faostat2018/test_utils.py +28 -0
  58. tests/models/hestia/test_landCover.py +2 -1
  59. tests/models/hestia/test_seed_emissions.py +27 -0
  60. tests/models/ipcc2019/test_aboveGroundBiomass.py +40 -4
  61. tests/models/ipcc2019/test_belowGroundBiomass.py +40 -4
  62. tests/models/ipcc2019/test_co2ToAirAboveGroundBiomassStockChange.py +52 -15
  63. tests/models/ipcc2019/test_co2ToAirBelowGroundBiomassStockChange.py +50 -14
  64. tests/models/ipcc2019/test_co2ToAirSoilOrganicCarbonStockChange.py +53 -32
  65. tests/models/ipcc2019/test_organicCarbonPerHa.py +91 -108
  66. tests/models/ipcc2019/test_organicCarbonPerHa_tier_1_utils.py +33 -50
  67. tests/models/ipcc2019/test_organicCarbonPerHa_tier_2_utils.py +0 -52
  68. tests/models/linkedImpactAssessment/test_freshwaterWithdrawalsInputsProduction.py +6 -4
  69. tests/models/linkedImpactAssessment/test_landOccupationInputsProduction.py +6 -4
  70. tests/models/linkedImpactAssessment/{test_landTransformationFromForest100YearAverageInputsProduction.py → test_landTransformation100YearAverageInputsProduction.py} +7 -5
  71. tests/models/linkedImpactAssessment/{test_landTransformationFromForest20YearAverageInputsProduction.py → test_landTransformation20YearAverageInputsProduction.py} +7 -5
  72. tests/models/pooreNemecek2018/test_excretaKgN.py +2 -2
  73. tests/models/pooreNemecek2018/test_excretaKgVs.py +1 -1
  74. tests/models/pooreNemecek2018/test_utils.py +26 -0
  75. tests/models/site/test_management.py +10 -27
  76. tests/models/test_cache_sites.py +40 -12
  77. tests/models/utils/test_blank_node.py +0 -8
  78. tests/models/utils/test_cache_sources.py +21 -0
  79. hestia_earth/models/blonkConsultants2016/landTransformationFromForest20YearAverageDuringCycle.py +0 -90
  80. hestia_earth/models/faostat2018/landTransformationFromCropland100YearAverage.py +0 -74
  81. hestia_earth/models/faostat2018/landTransformationFromCropland20YearAverage.py +0 -74
  82. hestia_earth/models/hyde32/__init__.py +0 -13
  83. hestia_earth/models/hyde32/landTransformationFromCropland100YearAverageDuringCycle.py +0 -60
  84. hestia_earth/models/hyde32/landTransformationFromCropland20YearAverageDuringCycle.py +0 -60
  85. hestia_earth/models/hyde32/landTransformationFromForest100YearAverageDuringCycle.py +0 -60
  86. hestia_earth/models/hyde32/landTransformationFromForest20YearAverageDuringCycle.py +0 -60
  87. hestia_earth/models/hyde32/landTransformationFromOtherNaturalVegetation100YearAverageDuringCycle.py +0 -61
  88. hestia_earth/models/hyde32/landTransformationFromOtherNaturalVegetation20YearAverageDuringCycle.py +0 -61
  89. hestia_earth/models/hyde32/landTransformationFromPermanentPasture100YearAverageDuringCycle.py +0 -61
  90. hestia_earth/models/hyde32/landTransformationFromPermanentPasture20YearAverageDuringCycle.py +0 -61
  91. hestia_earth/models/hyde32/utils.py +0 -72
  92. hestia_earth/models/linkedImpactAssessment/landTransformationFromCropland20YearAverageInputsProduction.py +0 -36
  93. hestia_earth/models/linkedImpactAssessment/landTransformationFromForest20YearAverageInputsProduction.py +0 -36
  94. hestia_earth/models/linkedImpactAssessment/landTransformationFromOtherNaturalVegetation100YearAverageInputsProduction.py +0 -36
  95. hestia_earth/models/linkedImpactAssessment/landTransformationFromOtherNaturalVegetation20YearAverageInputsProduction.py +0 -36
  96. hestia_earth/models/linkedImpactAssessment/landTransformationFromPermanentPasture100YearAverageInputsProduction.py +0 -36
  97. hestia_earth/models/linkedImpactAssessment/landTransformationFromPermanentPasture20YearAverageInputsProduction.py +0 -36
  98. tests/models/blonkConsultants2016/test_landTransformationFromForest20YearAverageDuringCycle.py +0 -36
  99. tests/models/cycle/pre_checks/test_cache_sources.py +0 -25
  100. tests/models/faostat2018/test_landTransformationFromCropland100YearAverage.py +0 -40
  101. tests/models/faostat2018/test_landTransformationFromCropland20YearAverage.py +0 -40
  102. tests/models/hyde32/__init__.py +0 -0
  103. tests/models/hyde32/test_landTransformationFromCropland100YearAverageDuringCycle.py +0 -21
  104. tests/models/hyde32/test_landTransformationFromCropland20YearAverageDuringCycle.py +0 -21
  105. tests/models/hyde32/test_landTransformationFromOtherNaturalVegetation100YearAverageDuringCycle.py +0 -23
  106. tests/models/hyde32/test_landTransformationFromOtherNaturalVegetation20YearAverageDuringCycle.py +0 -21
  107. tests/models/hyde32/test_landTransformationFromPermanentPasture100YearAverageDuringCycle.py +0 -21
  108. tests/models/hyde32/test_landTransformationFromPermanentPasture20YearAverageDuringCycle.py +0 -21
  109. tests/models/linkedImpactAssessment/test_landTransformationFromCropland100YearAverageInputsProduction.py +0 -23
  110. tests/models/linkedImpactAssessment/test_landTransformationFromCropland20YearAverageInputsProduction.py +0 -23
  111. tests/models/linkedImpactAssessment/test_landTransformationFromOtherNaturalVegetation100YearAverageInputsProduction.py +0 -23
  112. tests/models/linkedImpactAssessment/test_landTransformationFromOtherNaturalVegetation20YearAverageInputsProduction.py +0 -23
  113. tests/models/linkedImpactAssessment/test_landTransformationFromPermanentPasture100YearAverageInputsProduction.py +0 -24
  114. tests/models/linkedImpactAssessment/test_landTransformationFromPermanentPasture20YearAverageInputsProduction.py +0 -24
  115. tests/models/site/pre_checks/test_cache_sources.py +0 -21
  116. {hestia_earth_models-0.64.14.dist-info → hestia_earth_models-0.65.1.dist-info}/WHEEL +0 -0
  117. {hestia_earth_models-0.64.14.dist-info → hestia_earth_models-0.65.1.dist-info}/top_level.txt +0 -0
@@ -1,74 +0,0 @@
1
- from hestia_earth.utils.model import find_term_match
2
-
3
- from hestia_earth.models.log import debugValues, logRequirements, logShouldRun
4
- from hestia_earth.models.utils.indicator import _new_indicator
5
- from hestia_earth.models.utils.impact_assessment import get_country_id, impact_end_year
6
- from . import MODEL
7
- from .utils import get_cropland_ratio
8
-
9
- REQUIREMENTS = {
10
- "ImpactAssessment": {
11
- "endDate": "",
12
- "country": {"@type": "Term", "termType": "region"},
13
- "emissionsResourceUse": [
14
- {"@type": "Indicator", "value": "", "term.@id": "landTransformationFromCropland100YearAverageDuringCycle"}
15
- ]
16
- }
17
- }
18
- LOOKUPS = {
19
- "region-faostatArea": ""
20
- }
21
- RETURNS = {
22
- "Indicator": [{
23
- "value": "",
24
- "landCover": ""
25
- }]
26
- }
27
- TERM_ID = 'landTransformationFromTemporaryCropland100YearAverageDuringCycle,landTransformationFromPermanentCropland100YearAverageDuringCycle' # noqa: E501
28
- FROM_TERM_ID = 'landTransformationFromCropland100YearAverageDuringCycle'
29
- TEMPORARY_TERM_ID = 'landTransformationFromTemporaryCropland100YearAverageDuringCycle'
30
- PERMANENT_TERM_ID = 'landTransformationFromPermanentCropland100YearAverageDuringCycle'
31
-
32
-
33
- def _indicator(term_id: str, value: float):
34
- indicator = _new_indicator(term_id, MODEL, 'cropland')
35
- indicator['value'] = value
36
- return indicator
37
-
38
-
39
- def _run(impact: dict, value: float):
40
- country_id = get_country_id(impact)
41
- end_year = impact_end_year(impact)
42
- total, permanent, temporary = get_cropland_ratio(country_id, end_year - 100, end_year)
43
-
44
- debugValues(impact, model=MODEL, term_id=TEMPORARY_TERM_ID,
45
- diff_temporary_area=temporary,
46
- diff_total_area=total)
47
- debugValues(impact, model=MODEL, term_id=PERMANENT_TERM_ID,
48
- diff_permanent_area=permanent,
49
- diff_total_area=total)
50
-
51
- return [
52
- _indicator(TEMPORARY_TERM_ID, value * temporary / total),
53
- _indicator(PERMANENT_TERM_ID, value * permanent / total)
54
- ] if total is not None else []
55
-
56
-
57
- def _should_run(impact: dict):
58
- indicator = find_term_match(impact.get('emissionsResourceUse', []), FROM_TERM_ID)
59
- cropland_value = indicator.get('value', 0)
60
- has_cropland = cropland_value > 0
61
-
62
- should_run = all([has_cropland])
63
- for term_id in TERM_ID.split(','):
64
- logRequirements(impact, model=MODEL, term=term_id,
65
- has_cropland=has_cropland,
66
- cropland_value=cropland_value)
67
- logShouldRun(impact, MODEL, term_id, should_run)
68
-
69
- return should_run, cropland_value
70
-
71
-
72
- def run(impact: dict):
73
- should_run, value = _should_run(impact)
74
- return _run(impact, value) if should_run else []
@@ -1,74 +0,0 @@
1
- from hestia_earth.utils.model import find_term_match
2
-
3
- from hestia_earth.models.log import debugValues, logRequirements, logShouldRun
4
- from hestia_earth.models.utils.indicator import _new_indicator
5
- from hestia_earth.models.utils.impact_assessment import get_country_id, impact_end_year
6
- from . import MODEL
7
- from .utils import get_cropland_ratio
8
-
9
- REQUIREMENTS = {
10
- "ImpactAssessment": {
11
- "endDate": "",
12
- "country": {"@type": "Term", "termType": "region"},
13
- "emissionsResourceUse": [
14
- {"@type": "Indicator", "value": "", "term.@id": "landTransformationFromCropland20YearAverageDuringCycle"}
15
- ]
16
- }
17
- }
18
- LOOKUPS = {
19
- "region-faostatArea": ""
20
- }
21
- RETURNS = {
22
- "Indicator": [{
23
- "value": "",
24
- "landCover": ""
25
- }]
26
- }
27
- TERM_ID = 'landTransformationFromTemporaryCropland20YearAverageDuringCycle,landTransformationFromPermanentCropland20YearAverageDuringCycle' # noqa: E501
28
- FROM_TERM_ID = 'landTransformationFromCropland20YearAverageDuringCycle'
29
- TEMPORARY_TERM_ID = 'landTransformationFromTemporaryCropland20YearAverageDuringCycle'
30
- PERMANENT_TERM_ID = 'landTransformationFromPermanentCropland20YearAverageDuringCycle'
31
-
32
-
33
- def _indicator(term_id: str, value: float):
34
- indicator = _new_indicator(term_id, MODEL, 'cropland')
35
- indicator['value'] = value
36
- return indicator
37
-
38
-
39
- def _run(impact: dict, value: float):
40
- country_id = get_country_id(impact)
41
- end_year = impact_end_year(impact)
42
- total, permanent, temporary = get_cropland_ratio(country_id, end_year - 20, end_year)
43
-
44
- debugValues(impact, model=MODEL, term_id=TEMPORARY_TERM_ID,
45
- diff_temporary_area=temporary,
46
- diff_total_area=total)
47
- debugValues(impact, model=MODEL, term_id=PERMANENT_TERM_ID,
48
- diff_permanent_area=permanent,
49
- diff_total_area=total)
50
-
51
- return [
52
- _indicator(TEMPORARY_TERM_ID, value * temporary / total),
53
- _indicator(PERMANENT_TERM_ID, value * permanent / total)
54
- ] if total is not None else []
55
-
56
-
57
- def _should_run(impact: dict):
58
- indicator = find_term_match(impact.get('emissionsResourceUse', []), FROM_TERM_ID)
59
- cropland_value = indicator.get('value', 0)
60
- has_cropland = cropland_value > 0
61
-
62
- should_run = all([has_cropland])
63
- for term_id in TERM_ID.split(','):
64
- logRequirements(impact, model=MODEL, term=term_id,
65
- has_cropland=has_cropland,
66
- cropland_value=cropland_value)
67
- logShouldRun(impact, MODEL, term_id, should_run)
68
-
69
- return should_run, cropland_value
70
-
71
-
72
- def run(impact: dict):
73
- should_run, value = _should_run(impact)
74
- return _run(impact, value) if should_run else []
@@ -1,13 +0,0 @@
1
- from os.path import dirname, abspath
2
- import sys
3
- from importlib import import_module
4
-
5
- from hestia_earth.models.utils.blank_node import run_if_required
6
-
7
- CURRENT_DIR = dirname(abspath(__file__)) + '/'
8
- sys.path.append(CURRENT_DIR)
9
- MODEL = 'hyde32'
10
- PKG = '.'.join(['hestia_earth', 'models', MODEL])
11
-
12
-
13
- def run(model: str, data): return run_if_required(MODEL, model, data, import_module(f".{model}", package=PKG))
@@ -1,60 +0,0 @@
1
- from hestia_earth.schema import SiteSiteType
2
-
3
- from .utils import run_land_transformation
4
-
5
- REQUIREMENTS = {
6
- "ImpactAssessment": {
7
- "or": {
8
- "country": {"@type": "Term", "termType": "region"},
9
- "site": {
10
- "@type": "Site",
11
- "region": {"@type": "Term", "termType": "region"}
12
- }
13
- },
14
- "endDate": "",
15
- "product": {"@type": "Term"},
16
- "cycle": {
17
- "@type": "Cycle",
18
- "or": [
19
- {
20
- "@doc": "if the [cycle.functionalUnit](https://hestia.earth/schema/Cycle#functionalUnit) = 1 ha, additional properties are required", # noqa: E501
21
- "cycleDuration": "",
22
- "products": [{
23
- "@type": "Product",
24
- "primary": "True",
25
- "value": "> 0",
26
- "economicValueShare": "> 0"
27
- }],
28
- "practices": [{"@type": "Practice", "value": "", "term.@id": "longFallowRatio"}]
29
- },
30
- {
31
- "@doc": "for plantations, additional properties are required",
32
- "practices": [
33
- {"@type": "Practice", "value": "", "term.@id": "nurseryDensity"},
34
- {"@type": "Practice", "value": "", "term.@id": "nurseryDuration"},
35
- {"@type": "Practice", "value": "", "term.@id": "plantationProductiveLifespan"},
36
- {"@type": "Practice", "value": "", "term.@id": "plantationDensity"},
37
- {"@type": "Practice", "value": "", "term.@id": "plantationLifespan"},
38
- {"@type": "Practice", "value": "", "term.@id": "rotationDuration"}
39
- ]
40
- }
41
- ]
42
- }
43
- }
44
- }
45
- LOOKUPS = {
46
- "@doc": "One of (depending on `site.siteType`)",
47
- "region-forest-landTransformation100years": "cropland",
48
- "region-permanent_pasture-landTransformation100years": "cropland",
49
- "region-other_natural_vegetation-landTransformation100years": "cropland"
50
- }
51
- RETURNS = {
52
- "Indicator": [{
53
- "value": "",
54
- "landCover": ""
55
- }]
56
- }
57
- TERM_ID = 'landTransformationFromCropland100YearAverageDuringCycle'
58
-
59
-
60
- def run(impact_assessment: dict): return run_land_transformation(impact_assessment, TERM_ID, SiteSiteType.CROPLAND)
@@ -1,60 +0,0 @@
1
- from hestia_earth.schema import SiteSiteType
2
-
3
- from .utils import run_land_transformation
4
-
5
- REQUIREMENTS = {
6
- "ImpactAssessment": {
7
- "or": {
8
- "country": {"@type": "Term", "termType": "region"},
9
- "site": {
10
- "@type": "Site",
11
- "region": {"@type": "Term", "termType": "region"}
12
- }
13
- },
14
- "endDate": "",
15
- "product": {"@type": "Term"},
16
- "cycle": {
17
- "@type": "Cycle",
18
- "or": [
19
- {
20
- "@doc": "if the [cycle.functionalUnit](https://hestia.earth/schema/Cycle#functionalUnit) = 1 ha, additional properties are required", # noqa: E501
21
- "cycleDuration": "",
22
- "products": [{
23
- "@type": "Product",
24
- "primary": "True",
25
- "value": "> 0",
26
- "economicValueShare": "> 0"
27
- }],
28
- "practices": [{"@type": "Practice", "value": "", "term.@id": "longFallowRatio"}]
29
- },
30
- {
31
- "@doc": "for plantations, additional properties are required",
32
- "practices": [
33
- {"@type": "Practice", "value": "", "term.@id": "nurseryDensity"},
34
- {"@type": "Practice", "value": "", "term.@id": "nurseryDuration"},
35
- {"@type": "Practice", "value": "", "term.@id": "plantationProductiveLifespan"},
36
- {"@type": "Practice", "value": "", "term.@id": "plantationDensity"},
37
- {"@type": "Practice", "value": "", "term.@id": "plantationLifespan"},
38
- {"@type": "Practice", "value": "", "term.@id": "rotationDuration"}
39
- ]
40
- }
41
- ]
42
- }
43
- }
44
- }
45
- LOOKUPS = {
46
- "@doc": "One of (depending on `site.siteType`)",
47
- "region-forest-landTransformation20years": "cropland",
48
- "region-permanent_pasture-landTransformation20years": "cropland",
49
- "region-other_natural_vegetation-landTransformation20years": "cropland"
50
- }
51
- RETURNS = {
52
- "Indicator": [{
53
- "value": "",
54
- "landCover": ""
55
- }]
56
- }
57
- TERM_ID = 'landTransformationFromCropland20YearAverageDuringCycle'
58
-
59
-
60
- def run(impact_assessment: dict): return run_land_transformation(impact_assessment, TERM_ID, SiteSiteType.CROPLAND)
@@ -1,60 +0,0 @@
1
- from hestia_earth.schema import SiteSiteType
2
-
3
- from .utils import run_land_transformation
4
-
5
- REQUIREMENTS = {
6
- "ImpactAssessment": {
7
- "or": {
8
- "country": {"@type": "Term", "termType": "region"},
9
- "site": {
10
- "@type": "Site",
11
- "region": {"@type": "Term", "termType": "region"}
12
- }
13
- },
14
- "endDate": "",
15
- "product": {"@type": "Term"},
16
- "cycle": {
17
- "@type": "Cycle",
18
- "or": [
19
- {
20
- "@doc": "if the [cycle.functionalUnit](https://hestia.earth/schema/Cycle#functionalUnit) = 1 ha, additional properties are required", # noqa: E501
21
- "cycleDuration": "",
22
- "products": [{
23
- "@type": "Product",
24
- "primary": "True",
25
- "value": "> 0",
26
- "economicValueShare": "> 0"
27
- }],
28
- "practices": [{"@type": "Practice", "value": "", "term.@id": "longFallowRatio"}]
29
- },
30
- {
31
- "@doc": "for plantations, additional properties are required",
32
- "practices": [
33
- {"@type": "Practice", "value": "", "term.@id": "nurseryDensity"},
34
- {"@type": "Practice", "value": "", "term.@id": "nurseryDuration"},
35
- {"@type": "Practice", "value": "", "term.@id": "plantationProductiveLifespan"},
36
- {"@type": "Practice", "value": "", "term.@id": "plantationDensity"},
37
- {"@type": "Practice", "value": "", "term.@id": "plantationLifespan"},
38
- {"@type": "Practice", "value": "", "term.@id": "rotationDuration"}
39
- ]
40
- }
41
- ]
42
- }
43
- }
44
- }
45
- LOOKUPS = {
46
- "@doc": "One of (depending on `site.siteType`)",
47
- "region-cropland-landTransformation100years": "forest",
48
- "region-permanent_pasture-landTransformation100years": "forest",
49
- "region-other_natural_vegetation-landTransformation100years": "forest"
50
- }
51
- RETURNS = {
52
- "Indicator": [{
53
- "value": "",
54
- "landCover": ""
55
- }]
56
- }
57
- TERM_ID = 'landTransformationFromForest100YearAverageDuringCycle'
58
-
59
-
60
- def run(impact_assessment: dict): return run_land_transformation(impact_assessment, TERM_ID, SiteSiteType.FOREST, 100)
@@ -1,60 +0,0 @@
1
- from hestia_earth.schema import SiteSiteType
2
-
3
- from .utils import run_land_transformation
4
-
5
- REQUIREMENTS = {
6
- "ImpactAssessment": {
7
- "or": {
8
- "country": {"@type": "Term", "termType": "region"},
9
- "site": {
10
- "@type": "Site",
11
- "region": {"@type": "Term", "termType": "region"}
12
- }
13
- },
14
- "endDate": "",
15
- "product": {"@type": "Term"},
16
- "cycle": {
17
- "@type": "Cycle",
18
- "or": [
19
- {
20
- "@doc": "if the [cycle.functionalUnit](https://hestia.earth/schema/Cycle#functionalUnit) = 1 ha, additional properties are required", # noqa: E501
21
- "cycleDuration": "",
22
- "products": [{
23
- "@type": "Product",
24
- "primary": "True",
25
- "value": "> 0",
26
- "economicValueShare": "> 0"
27
- }],
28
- "practices": [{"@type": "Practice", "value": "", "term.@id": "longFallowRatio"}]
29
- },
30
- {
31
- "@doc": "for plantations, additional properties are required",
32
- "practices": [
33
- {"@type": "Practice", "value": "", "term.@id": "nurseryDensity"},
34
- {"@type": "Practice", "value": "", "term.@id": "nurseryDuration"},
35
- {"@type": "Practice", "value": "", "term.@id": "plantationProductiveLifespan"},
36
- {"@type": "Practice", "value": "", "term.@id": "plantationDensity"},
37
- {"@type": "Practice", "value": "", "term.@id": "plantationLifespan"},
38
- {"@type": "Practice", "value": "", "term.@id": "rotationDuration"}
39
- ]
40
- }
41
- ]
42
- }
43
- }
44
- }
45
- LOOKUPS = {
46
- "@doc": "One of (depending on `site.siteType`)",
47
- "region-cropland-landTransformation20years": "forest",
48
- "region-permanent_pasture-landTransformation20years": "forest",
49
- "region-other_natural_vegetation-landTransformation20years": "forest"
50
- }
51
- RETURNS = {
52
- "Indicator": [{
53
- "value": "",
54
- "landCover": ""
55
- }]
56
- }
57
- TERM_ID = 'landTransformationFromForest20YearAverageDuringCycle'
58
-
59
-
60
- def run(impact_assessment: dict): return run_land_transformation(impact_assessment, TERM_ID, SiteSiteType.FOREST)
@@ -1,61 +0,0 @@
1
- from hestia_earth.schema import SiteSiteType
2
-
3
- from .utils import run_land_transformation
4
-
5
- REQUIREMENTS = {
6
- "ImpactAssessment": {
7
- "or": {
8
- "country": {"@type": "Term", "termType": "region"},
9
- "site": {
10
- "@type": "Site",
11
- "region": {"@type": "Term", "termType": "region"}
12
- }
13
- },
14
- "endDate": "",
15
- "product": {"@type": "Term"},
16
- "cycle": {
17
- "@type": "Cycle",
18
- "or": [
19
- {
20
- "@doc": "if the [cycle.functionalUnit](https://hestia.earth/schema/Cycle#functionalUnit) = 1 ha, additional properties are required", # noqa: E501
21
- "cycleDuration": "",
22
- "products": [{
23
- "@type": "Product",
24
- "primary": "True",
25
- "value": "> 0",
26
- "economicValueShare": "> 0"
27
- }],
28
- "practices": [{"@type": "Practice", "value": "", "term.@id": "longFallowRatio"}]
29
- },
30
- {
31
- "@doc": "for plantations, additional properties are required",
32
- "practices": [
33
- {"@type": "Practice", "value": "", "term.@id": "nurseryDensity"},
34
- {"@type": "Practice", "value": "", "term.@id": "nurseryDuration"},
35
- {"@type": "Practice", "value": "", "term.@id": "plantationProductiveLifespan"},
36
- {"@type": "Practice", "value": "", "term.@id": "plantationDensity"},
37
- {"@type": "Practice", "value": "", "term.@id": "plantationLifespan"},
38
- {"@type": "Practice", "value": "", "term.@id": "rotationDuration"}
39
- ]
40
- }
41
- ]
42
- }
43
- }
44
- }
45
- LOOKUPS = {
46
- "@doc": "One of (depending on `site.siteType`)",
47
- "region-cropland-landTransformation100years": "`other natural vegetation`",
48
- "region-forest-landTransformation100years": "`other natural vegetation`",
49
- "region-permanent_pasture-landTransformation100years": "`other natural vegetation`"
50
- }
51
- RETURNS = {
52
- "Indicator": [{
53
- "value": "",
54
- "landCover": ""
55
- }]
56
- }
57
- TERM_ID = 'landTransformationFromOtherNaturalVegetation100YearAverageDuringCycle'
58
-
59
-
60
- def run(impact_assessment: dict):
61
- return run_land_transformation(impact_assessment, TERM_ID, SiteSiteType.OTHER_NATURAL_VEGETATION, 100)
@@ -1,61 +0,0 @@
1
- from hestia_earth.schema import SiteSiteType
2
-
3
- from .utils import run_land_transformation
4
-
5
- REQUIREMENTS = {
6
- "ImpactAssessment": {
7
- "or": {
8
- "country": {"@type": "Term", "termType": "region"},
9
- "site": {
10
- "@type": "Site",
11
- "region": {"@type": "Term", "termType": "region"}
12
- }
13
- },
14
- "endDate": "",
15
- "product": {"@type": "Term"},
16
- "cycle": {
17
- "@type": "Cycle",
18
- "or": [
19
- {
20
- "@doc": "if the [cycle.functionalUnit](https://hestia.earth/schema/Cycle#functionalUnit) = 1 ha, additional properties are required", # noqa: E501
21
- "cycleDuration": "",
22
- "products": [{
23
- "@type": "Product",
24
- "primary": "True",
25
- "value": "> 0",
26
- "economicValueShare": "> 0"
27
- }],
28
- "practices": [{"@type": "Practice", "value": "", "term.@id": "longFallowRatio"}]
29
- },
30
- {
31
- "@doc": "for plantations, additional properties are required",
32
- "practices": [
33
- {"@type": "Practice", "value": "", "term.@id": "nurseryDensity"},
34
- {"@type": "Practice", "value": "", "term.@id": "nurseryDuration"},
35
- {"@type": "Practice", "value": "", "term.@id": "plantationProductiveLifespan"},
36
- {"@type": "Practice", "value": "", "term.@id": "plantationDensity"},
37
- {"@type": "Practice", "value": "", "term.@id": "plantationLifespan"},
38
- {"@type": "Practice", "value": "", "term.@id": "rotationDuration"}
39
- ]
40
- }
41
- ]
42
- }
43
- }
44
- }
45
- LOOKUPS = {
46
- "@doc": "One of (depending on `site.siteType`)",
47
- "region-cropland-landTransformation20years": "`other natural vegetation`",
48
- "region-forest-landTransformation20years": "`other natural vegetation`",
49
- "region-permanent_pasture-landTransformation20years": "`other natural vegetation`"
50
- }
51
- RETURNS = {
52
- "Indicator": [{
53
- "value": "",
54
- "landCover": ""
55
- }]
56
- }
57
- TERM_ID = 'landTransformationFromOtherNaturalVegetation20YearAverageDuringCycle'
58
-
59
-
60
- def run(impact_assessment: dict):
61
- return run_land_transformation(impact_assessment, TERM_ID, SiteSiteType.OTHER_NATURAL_VEGETATION)
@@ -1,61 +0,0 @@
1
- from hestia_earth.schema import SiteSiteType
2
-
3
- from .utils import run_land_transformation
4
-
5
- REQUIREMENTS = {
6
- "ImpactAssessment": {
7
- "or": {
8
- "country": {"@type": "Term", "termType": "region"},
9
- "site": {
10
- "@type": "Site",
11
- "region": {"@type": "Term", "termType": "region"}
12
- }
13
- },
14
- "endDate": "",
15
- "product": {"@type": "Term"},
16
- "cycle": {
17
- "@type": "Cycle",
18
- "or": [
19
- {
20
- "@doc": "if the [cycle.functionalUnit](https://hestia.earth/schema/Cycle#functionalUnit) = 1 ha, additional properties are required", # noqa: E501
21
- "cycleDuration": "",
22
- "products": [{
23
- "@type": "Product",
24
- "primary": "True",
25
- "value": "> 0",
26
- "economicValueShare": "> 0"
27
- }],
28
- "practices": [{"@type": "Practice", "value": "", "term.@id": "longFallowRatio"}]
29
- },
30
- {
31
- "@doc": "for plantations, additional properties are required",
32
- "practices": [
33
- {"@type": "Practice", "value": "", "term.@id": "nurseryDensity"},
34
- {"@type": "Practice", "value": "", "term.@id": "nurseryDuration"},
35
- {"@type": "Practice", "value": "", "term.@id": "plantationProductiveLifespan"},
36
- {"@type": "Practice", "value": "", "term.@id": "plantationDensity"},
37
- {"@type": "Practice", "value": "", "term.@id": "plantationLifespan"},
38
- {"@type": "Practice", "value": "", "term.@id": "rotationDuration"}
39
- ]
40
- }
41
- ]
42
- }
43
- }
44
- }
45
- LOOKUPS = {
46
- "@doc": "One of (depending on `site.siteType`)",
47
- "region-cropland-landTransformation100years": "`permanent pasture`",
48
- "region-forest-landTransformation100years": "`permanent pasture`",
49
- "region-other_natural_vegetation-landTransformation100years": "`permanent pasture`"
50
- }
51
- RETURNS = {
52
- "Indicator": [{
53
- "value": "",
54
- "landCover": ""
55
- }]
56
- }
57
- TERM_ID = 'landTransformationFromPermanentPasture100YearAverageDuringCycle'
58
-
59
-
60
- def run(impact_assessment: dict):
61
- return run_land_transformation(impact_assessment, TERM_ID, SiteSiteType.PERMANENT_PASTURE, 100)
@@ -1,61 +0,0 @@
1
- from hestia_earth.schema import SiteSiteType
2
-
3
- from .utils import run_land_transformation
4
-
5
- REQUIREMENTS = {
6
- "ImpactAssessment": {
7
- "or": {
8
- "country": {"@type": "Term", "termType": "region"},
9
- "site": {
10
- "@type": "Site",
11
- "region": {"@type": "Term", "termType": "region"}
12
- }
13
- },
14
- "endDate": "",
15
- "product": {"@type": "Term"},
16
- "cycle": {
17
- "@type": "Cycle",
18
- "or": [
19
- {
20
- "@doc": "if the [cycle.functionalUnit](https://hestia.earth/schema/Cycle#functionalUnit) = 1 ha, additional properties are required", # noqa: E501
21
- "cycleDuration": "",
22
- "products": [{
23
- "@type": "Product",
24
- "primary": "True",
25
- "value": "> 0",
26
- "economicValueShare": "> 0"
27
- }],
28
- "practices": [{"@type": "Practice", "value": "", "term.@id": "longFallowRatio"}]
29
- },
30
- {
31
- "@doc": "for plantations, additional properties are required",
32
- "practices": [
33
- {"@type": "Practice", "value": "", "term.@id": "nurseryDensity"},
34
- {"@type": "Practice", "value": "", "term.@id": "nurseryDuration"},
35
- {"@type": "Practice", "value": "", "term.@id": "plantationProductiveLifespan"},
36
- {"@type": "Practice", "value": "", "term.@id": "plantationDensity"},
37
- {"@type": "Practice", "value": "", "term.@id": "plantationLifespan"},
38
- {"@type": "Practice", "value": "", "term.@id": "rotationDuration"}
39
- ]
40
- }
41
- ]
42
- }
43
- }
44
- }
45
- LOOKUPS = {
46
- "@doc": "One of (depending on `site.siteType`)",
47
- "region-cropland-landTransformation20years": "`permanent pasture`",
48
- "region-forest-landTransformation20years": "`permanent pasture`",
49
- "region-other_natural_vegetation-landTransformation20years": "`permanent pasture`"
50
- }
51
- RETURNS = {
52
- "Indicator": [{
53
- "value": "",
54
- "landCover": ""
55
- }]
56
- }
57
- TERM_ID = 'landTransformationFromPermanentPasture20YearAverageDuringCycle'
58
-
59
-
60
- def run(impact_assessment: dict):
61
- return run_land_transformation(impact_assessment, TERM_ID, SiteSiteType.PERMANENT_PASTURE)