hestia-earth-models 0.74.10__py3-none-any.whl → 0.74.12__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 (410) hide show
  1. hestia_earth/models/agribalyse2016/fuelElectricity.py +1 -2
  2. hestia_earth/models/agribalyse2016/machineryInfrastructureDepreciatedAmountPerCycle.py +1 -7
  3. hestia_earth/models/akagiEtAl2011/utils.py +2 -6
  4. hestia_earth/models/aware/scarcityWeightedWaterUse.py +1 -4
  5. hestia_earth/models/aware2_0/scarcityWeightedWaterUse.py +1 -4
  6. hestia_earth/models/chaudharyBrooks2018/damageToTerrestrialEcosystemsLandOccupation.py +1 -4
  7. hestia_earth/models/chaudharyBrooks2018/damageToTerrestrialEcosystemsLandTransformation.py +1 -4
  8. hestia_earth/models/chaudharyBrooks2018/damageToTerrestrialEcosystemsTotalLandUseEffects.py +1 -4
  9. hestia_earth/models/cml2001Baseline/abioticResourceDepletionFossilFuels.py +1 -4
  10. hestia_earth/models/cml2001Baseline/abioticResourceDepletionMineralsAndMetals.py +1 -4
  11. hestia_earth/models/cml2001Baseline/eutrophicationPotentialExcludingFate.py +1 -4
  12. hestia_earth/models/cml2001Baseline/resourceUseEnergyDepletionDuringCycle.py +12 -10
  13. hestia_earth/models/cml2001Baseline/resourceUseMineralsAndMetalsDuringCycle.py +5 -5
  14. hestia_earth/models/cml2001Baseline/terrestrialAcidificationPotentialIncludingFateAverageEurope.py +1 -7
  15. hestia_earth/models/cml2001NonBaseline/eutrophicationPotentialIncludingFateAverageEurope.py +1 -7
  16. hestia_earth/models/cml2001NonBaseline/terrestrialAcidificationPotentialExcludingFate.py +1 -7
  17. hestia_earth/models/config/ImpactAssessment.json +12 -6
  18. hestia_earth/models/config/Site.json +16 -0
  19. hestia_earth/models/cycle/aboveGroundCropResidueTotal.py +1 -6
  20. hestia_earth/models/cycle/practice/landCover.py +9 -9
  21. hestia_earth/models/dammgen2009/noxToAirExcreta.py +1 -2
  22. hestia_earth/models/deRuijterEtAl2010/nh3ToAirCropResidueDecomposition.py +1 -2
  23. hestia_earth/models/ecoalimV9/cycle.py +1 -2
  24. hestia_earth/models/ecoalimV9/impact_assessment.py +10 -3
  25. hestia_earth/models/ecoinventV3/cycle.py +1 -2
  26. hestia_earth/models/ecoinventV3AndEmberClimate/cycle.py +1 -2
  27. hestia_earth/models/edip2003/ozoneDepletionPotential.py +1 -7
  28. hestia_earth/models/emepEea2019/utils.py +1 -2
  29. hestia_earth/models/emissionNotRelevant/__init__.py +2 -2
  30. hestia_earth/models/environmentalFootprintV3_1/environmentalFootprintSingleOverallScore.py +1 -4
  31. hestia_earth/models/environmentalFootprintV3_1/freshwaterEcotoxicityPotentialCtue.py +1 -7
  32. hestia_earth/models/environmentalFootprintV3_1/marineEutrophicationPotential.py +1 -7
  33. hestia_earth/models/environmentalFootprintV3_1/photochemicalOzoneCreationPotentialHumanHealthNmvocEq.py +1 -7
  34. hestia_earth/models/environmentalFootprintV3_1/scarcityWeightedWaterUse.py +1 -7
  35. hestia_earth/models/environmentalFootprintV3_1/soilQualityIndexLandOccupation.py +2 -7
  36. hestia_earth/models/environmentalFootprintV3_1/soilQualityIndexLandTransformation.py +2 -7
  37. hestia_earth/models/environmentalFootprintV3_1/soilQualityIndexTotalLandUseEffects.py +2 -7
  38. hestia_earth/models/epa2014/no3ToGroundwaterExcreta.py +1 -2
  39. hestia_earth/models/fantkeEtAl2016/damageToHumanHealthParticulateMatterFormation.py +2 -11
  40. hestia_earth/models/faostat2018/liveweightPerHead.py +11 -7
  41. hestia_earth/models/faostat2018/product/price.py +9 -5
  42. hestia_earth/models/faostat2018/seed.py +5 -12
  43. hestia_earth/models/faostat2018/utils.py +14 -6
  44. hestia_earth/models/frischknechtEtAl2000/ionisingRadiationKbqU235Eq.py +4 -8
  45. hestia_earth/models/geospatialDatabase/altitude.py +1 -2
  46. hestia_earth/models/geospatialDatabase/clayContent.py +1 -2
  47. hestia_earth/models/geospatialDatabase/croppingIntensity.py +1 -3
  48. hestia_earth/models/geospatialDatabase/drainageClass.py +1 -2
  49. hestia_earth/models/geospatialDatabase/ecoClimateZone.py +1 -2
  50. hestia_earth/models/geospatialDatabase/erodibility.py +1 -2
  51. hestia_earth/models/geospatialDatabase/heavyWinterPrecipitation.py +1 -2
  52. hestia_earth/models/geospatialDatabase/histosol.py +1 -2
  53. hestia_earth/models/geospatialDatabase/longFallowRatio.py +1 -3
  54. hestia_earth/models/geospatialDatabase/nutrientLossToAquaticEnvironment.py +1 -2
  55. hestia_earth/models/geospatialDatabase/organicCarbonPerKgSoil.py +1 -2
  56. hestia_earth/models/geospatialDatabase/potentialEvapotranspirationAnnual.py +1 -2
  57. hestia_earth/models/geospatialDatabase/potentialEvapotranspirationLongTermAnnualMean.py +1 -2
  58. hestia_earth/models/geospatialDatabase/potentialEvapotranspirationMonthly.py +1 -2
  59. hestia_earth/models/geospatialDatabase/precipitationAnnual.py +1 -2
  60. hestia_earth/models/geospatialDatabase/precipitationLongTermAnnualMean.py +1 -2
  61. hestia_earth/models/geospatialDatabase/precipitationMonthly.py +1 -2
  62. hestia_earth/models/geospatialDatabase/sandContent.py +1 -2
  63. hestia_earth/models/geospatialDatabase/siltContent.py +1 -2
  64. hestia_earth/models/geospatialDatabase/slope.py +1 -2
  65. hestia_earth/models/geospatialDatabase/slopeLength.py +1 -2
  66. hestia_earth/models/geospatialDatabase/soilPh.py +1 -2
  67. hestia_earth/models/geospatialDatabase/temperatureAnnual.py +1 -2
  68. hestia_earth/models/geospatialDatabase/temperatureLongTermAnnualMean.py +1 -2
  69. hestia_earth/models/geospatialDatabase/temperatureMonthly.py +1 -2
  70. hestia_earth/models/geospatialDatabase/totalNitrogenPerKgSoil.py +1 -2
  71. hestia_earth/models/geospatialDatabase/totalPhosphorusPerKgSoil.py +1 -2
  72. hestia_earth/models/geospatialDatabase/waterDepth.py +1 -2
  73. hestia_earth/models/hestia/aboveGroundCropResidue.py +1 -2
  74. hestia_earth/models/hestia/aboveGroundCropResidueTotal.py +1 -6
  75. hestia_earth/models/hestia/brackishWater.py +1 -2
  76. hestia_earth/models/hestia/cationExchangeCapacityPerKgSoil.py +1 -2
  77. hestia_earth/models/hestia/cropResidueManagement.py +1 -2
  78. hestia_earth/models/hestia/croppingIntensity.py +1 -7
  79. hestia_earth/models/hestia/default_emissions.py +3 -5
  80. hestia_earth/models/hestia/default_resourceUse.py +4 -11
  81. hestia_earth/models/hestia/excretaKgMass.py +9 -6
  82. hestia_earth/models/hestia/excretaKgN.py +8 -7
  83. hestia_earth/models/hestia/excretaKgVs.py +8 -7
  84. hestia_earth/models/hestia/feedConversionRatio/__init__.py +5 -7
  85. hestia_earth/models/hestia/flowingWater.py +1 -2
  86. hestia_earth/models/hestia/freshWater.py +1 -2
  87. hestia_earth/models/hestia/histosol.py +1 -2
  88. hestia_earth/models/hestia/inorganicFertiliser.py +2 -14
  89. hestia_earth/models/hestia/irrigatedTypeUnspecified.py +1 -7
  90. hestia_earth/models/hestia/landCover.py +192 -911
  91. hestia_earth/models/hestia/landCover_utils.py +769 -0
  92. hestia_earth/models/hestia/landOccupationDuringCycle.py +1 -2
  93. hestia_earth/models/hestia/liveAnimal.py +1 -3
  94. hestia_earth/models/hestia/longFallowRatio.py +1 -7
  95. hestia_earth/models/hestia/management.py +14 -8
  96. hestia_earth/models/hestia/materialAndSubstrate.py +1 -2
  97. hestia_earth/models/hestia/milkYield.py +2 -12
  98. hestia_earth/models/hestia/netPrimaryProduction.py +1 -2
  99. hestia_earth/models/hestia/organicCarbonPerHa.py +1 -2
  100. hestia_earth/models/hestia/pToSurfaceWaterAquacultureSystems.py +2 -4
  101. hestia_earth/models/hestia/pastureGrass.py +3 -4
  102. hestia_earth/models/hestia/pastureSystem.py +1 -7
  103. hestia_earth/models/hestia/potentialEvapotranspirationAnnual.py +1 -2
  104. hestia_earth/models/hestia/potentialEvapotranspirationMonthly.py +1 -2
  105. hestia_earth/models/hestia/precipitationAnnual.py +1 -2
  106. hestia_earth/models/hestia/precipitationMonthly.py +1 -2
  107. hestia_earth/models/hestia/rainfallAnnual.py +1 -2
  108. hestia_earth/models/hestia/rainfallMonthly.py +1 -2
  109. hestia_earth/models/hestia/residueBurnt.py +1 -7
  110. hestia_earth/models/hestia/residueIncorporated.py +1 -7
  111. hestia_earth/models/hestia/residueLeftOnField.py +1 -7
  112. hestia_earth/models/hestia/residueRemoved.py +3 -8
  113. hestia_earth/models/hestia/resourceUse_utils.py +4 -20
  114. hestia_earth/models/hestia/salineWater.py +1 -2
  115. hestia_earth/models/hestia/seed_emissions.py +5 -6
  116. hestia_earth/models/hestia/slope.py +44 -0
  117. hestia_earth/models/hestia/slopeLength.py +44 -0
  118. hestia_earth/models/hestia/soilMeasurement.py +1 -2
  119. hestia_earth/models/hestia/stockingDensityAnimalHousingAverage.py +1 -7
  120. hestia_earth/models/hestia/temperatureAnnual.py +1 -2
  121. hestia_earth/models/hestia/temperatureMonthly.py +1 -2
  122. hestia_earth/models/hestia/totalNitrogenPerKgSoil.py +1 -2
  123. hestia_earth/models/hestia/unknownPreSeasonWaterRegime.py +1 -7
  124. hestia_earth/models/hestia/utils.py +5 -5
  125. hestia_earth/models/hestia/waterDepth.py +1 -2
  126. hestia_earth/models/hestia/waterSalinity.py +1 -2
  127. hestia_earth/models/impact_assessment/emissions.py +8 -9
  128. hestia_earth/models/impact_assessment/post_checks/cycle.py +1 -1
  129. hestia_earth/models/impact_assessment/pre_checks/cycle.py +1 -1
  130. hestia_earth/models/ipcc2006/aboveGroundCropResidueRemoved.py +1 -3
  131. hestia_earth/models/ipcc2006/aboveGroundCropResidueTotal.py +1 -3
  132. hestia_earth/models/ipcc2006/belowGroundCropResidue.py +1 -3
  133. hestia_earth/models/ipcc2006/n2OToAirCropResidueDecompositionDirect.py +2 -6
  134. hestia_earth/models/ipcc2006/n2OToAirCropResidueDecompositionIndirect.py +1 -2
  135. hestia_earth/models/ipcc2006/n2OToAirExcretaDirect.py +1 -2
  136. hestia_earth/models/ipcc2006/n2OToAirExcretaIndirect.py +1 -2
  137. hestia_earth/models/ipcc2006/n2OToAirInorganicFertiliserDirect.py +1 -2
  138. hestia_earth/models/ipcc2006/n2OToAirInorganicFertiliserIndirect.py +1 -2
  139. hestia_earth/models/ipcc2006/n2OToAirOrganicFertiliserDirect.py +1 -2
  140. hestia_earth/models/ipcc2006/n2OToAirOrganicFertiliserIndirect.py +1 -2
  141. hestia_earth/models/ipcc2013ExcludingFeedbacks/gwp100.py +1 -7
  142. hestia_earth/models/ipcc2013IncludingFeedbacks/gwp100.py +1 -7
  143. hestia_earth/models/ipcc2019/aboveGroundBiomass.py +1 -1
  144. hestia_earth/models/ipcc2019/aboveGroundCropResidueTotal.py +1 -3
  145. hestia_earth/models/ipcc2019/animal/milkYieldPerAnimal.py +3 -7
  146. hestia_earth/models/ipcc2019/animal/pastureGrass.py +1 -2
  147. hestia_earth/models/ipcc2019/belowGroundBiomass.py +1 -1
  148. hestia_earth/models/ipcc2019/belowGroundCropResidue.py +1 -3
  149. hestia_earth/models/ipcc2019/biocharOrganicCarbonPerHa.py +1 -1
  150. hestia_earth/models/ipcc2019/ch4ToAirAquacultureSystems.py +2 -6
  151. hestia_earth/models/ipcc2019/ch4ToAirEntericFermentation.py +2 -12
  152. hestia_earth/models/ipcc2019/ch4ToAirExcreta.py +1 -2
  153. hestia_earth/models/ipcc2019/ch4ToAirFloodedRice.py +2 -10
  154. hestia_earth/models/ipcc2019/ch4ToAirOrganicSoilCultivation.py +1 -1
  155. hestia_earth/models/ipcc2019/co2ToAirAboveGroundBiomassStockChange.py +1 -1
  156. hestia_earth/models/ipcc2019/co2ToAirBelowGroundBiomassStockChange.py +1 -1
  157. hestia_earth/models/ipcc2019/co2ToAirBiocharStockChange.py +1 -1
  158. hestia_earth/models/ipcc2019/co2ToAirLimeHydrolysis.py +1 -2
  159. hestia_earth/models/ipcc2019/co2ToAirOrganicSoilCultivation.py +1 -1
  160. hestia_earth/models/ipcc2019/co2ToAirSoilOrganicCarbonStockChange.py +1 -1
  161. hestia_earth/models/ipcc2019/co2ToAirUreaHydrolysis.py +1 -2
  162. hestia_earth/models/ipcc2019/croppingDuration.py +1 -2
  163. hestia_earth/models/ipcc2019/n2OToAirCropResidueBurningDirect.py +1 -2
  164. hestia_earth/models/ipcc2019/n2OToAirCropResidueDecompositionDirect.py +2 -7
  165. hestia_earth/models/ipcc2019/n2OToAirExcretaDirect.py +1 -2
  166. hestia_earth/models/ipcc2019/n2OToAirInorganicFertiliserDirect.py +2 -7
  167. hestia_earth/models/ipcc2019/n2OToAirOrganicFertiliserDirect.py +2 -7
  168. hestia_earth/models/ipcc2019/n2OToAirOrganicSoilCultivationDirect.py +2 -7
  169. hestia_earth/models/ipcc2019/n2OToAir_indirect_emissions_utils.py +3 -9
  170. hestia_earth/models/ipcc2019/nh3ToAirInorganicFertiliser.py +2 -6
  171. hestia_earth/models/ipcc2019/nh3ToAirOrganicFertiliser.py +2 -6
  172. hestia_earth/models/ipcc2019/no3ToGroundwaterCropResidueDecomposition.py +2 -7
  173. hestia_earth/models/ipcc2019/no3ToGroundwaterExcreta.py +2 -8
  174. hestia_earth/models/ipcc2019/no3ToGroundwaterInorganicFertiliser.py +2 -7
  175. hestia_earth/models/ipcc2019/no3ToGroundwaterOrganicFertiliser.py +2 -7
  176. hestia_earth/models/ipcc2019/nonCo2EmissionsToAirNaturalVegetationBurning.py +1 -1
  177. hestia_earth/models/ipcc2019/noxToAirInorganicFertiliser.py +2 -6
  178. hestia_earth/models/ipcc2019/noxToAirOrganicFertiliser.py +2 -6
  179. hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_1.py +1 -1
  180. hestia_earth/models/ipcc2019/organicCarbonPerHa_tier_2.py +1 -1
  181. hestia_earth/models/ipcc2019/pastureGrass.py +1 -2
  182. hestia_earth/models/ipcc2021/gwp100.py +2 -11
  183. hestia_earth/models/jarvisAndPain1994/n2ToAirExcreta.py +1 -2
  184. hestia_earth/models/koble2014/utils.py +1 -3
  185. hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsClimateChange.py +1 -7
  186. hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -7
  187. hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +1 -7
  188. hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsPdfYear.py +1 -7
  189. hestia_earth/models/lcImpactAllEffects100Years/damageToFreshwaterEcosystemsWaterStress.py +1 -7
  190. hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealth.py +1 -7
  191. hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthClimateChange.py +1 -7
  192. hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthHumanToxicityCancerogenic.py +1 -7
  193. hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -7
  194. hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthParticulateMatterFormation.py +1 -7
  195. hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthPhotochemicalOzoneFormation.py +1 -7
  196. hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthStratosphericOzoneDepletion.py +1 -7
  197. hestia_earth/models/lcImpactAllEffects100Years/damageToHumanHealthWaterStress.py +1 -7
  198. hestia_earth/models/lcImpactAllEffects100Years/damageToMarineEcosystemsMarineEcotoxicity.py +1 -7
  199. hestia_earth/models/lcImpactAllEffects100Years/damageToMarineEcosystemsMarineEutrophication.py +1 -7
  200. hestia_earth/models/lcImpactAllEffects100Years/damageToMarineEcosystemsPdfYear.py +1 -7
  201. hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsClimateChange.py +1 -7
  202. hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsPdfYear.py +1 -7
  203. hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +1 -7
  204. hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsTerrestrialAcidification.py +1 -7
  205. hestia_earth/models/lcImpactAllEffects100Years/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -7
  206. hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsClimateChange.py +1 -7
  207. hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -7
  208. hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +1 -7
  209. hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsPdfYear.py +1 -7
  210. hestia_earth/models/lcImpactAllEffectsInfinite/damageToFreshwaterEcosystemsWaterStress.py +1 -7
  211. hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealth.py +1 -7
  212. hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthClimateChange.py +1 -7
  213. hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthHumanToxicityCancerogenic.py +1 -7
  214. hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -7
  215. hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthParticulateMatterFormation.py +1 -7
  216. hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthPhotochemicalOzoneFormation.py +1 -7
  217. hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthStratosphericOzoneDepletion.py +1 -7
  218. hestia_earth/models/lcImpactAllEffectsInfinite/damageToHumanHealthWaterStress.py +1 -7
  219. hestia_earth/models/lcImpactAllEffectsInfinite/damageToMarineEcosystemsMarineEcotoxicity.py +1 -7
  220. hestia_earth/models/lcImpactAllEffectsInfinite/damageToMarineEcosystemsMarineEutrophication.py +1 -7
  221. hestia_earth/models/lcImpactAllEffectsInfinite/damageToMarineEcosystemsPdfYear.py +1 -7
  222. hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsClimateChange.py +1 -7
  223. hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsPdfYear.py +1 -7
  224. hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +1 -7
  225. hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialAcidification.py +1 -7
  226. hestia_earth/models/lcImpactAllEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -7
  227. hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -7
  228. hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +1 -7
  229. hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsPdfYear.py +1 -7
  230. hestia_earth/models/lcImpactCertainEffects100Years/damageToFreshwaterEcosystemsWaterStress.py +1 -7
  231. hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealth.py +1 -7
  232. hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthClimateChange.py +1 -7
  233. hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthHumanToxicityCancerogenic.py +1 -7
  234. hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -7
  235. hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthParticulateMatterFormation.py +1 -7
  236. hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthPhotochemicalOzoneFormation.py +1 -7
  237. hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthStratosphericOzoneDepletion.py +1 -7
  238. hestia_earth/models/lcImpactCertainEffects100Years/damageToHumanHealthWaterStress.py +1 -7
  239. hestia_earth/models/lcImpactCertainEffects100Years/damageToMarineEcosystemsMarineEcotoxicity.py +1 -7
  240. hestia_earth/models/lcImpactCertainEffects100Years/damageToMarineEcosystemsMarineEutrophication.py +1 -7
  241. hestia_earth/models/lcImpactCertainEffects100Years/damageToMarineEcosystemsPdfYear.py +1 -7
  242. hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsClimateChange.py +1 -7
  243. hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsPdfYear.py +1 -7
  244. hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +1 -7
  245. hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsTerrestrialAcidification.py +1 -7
  246. hestia_earth/models/lcImpactCertainEffects100Years/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -7
  247. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEcotoxicity.py +1 -7
  248. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsFreshwaterEutrophication.py +1 -7
  249. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsPdfYear.py +1 -7
  250. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToFreshwaterEcosystemsWaterStress.py +1 -7
  251. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealth.py +1 -7
  252. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthClimateChange.py +1 -7
  253. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthHumanToxicityCancerogenic.py +1 -7
  254. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthHumanToxicityNonCancerogenic.py +1 -7
  255. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthParticulateMatterFormation.py +1 -7
  256. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthPhotochemicalOzoneFormation.py +1 -7
  257. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthStratosphericOzoneDepletion.py +1 -7
  258. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToHumanHealthWaterStress.py +1 -7
  259. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToMarineEcosystemsMarineEcotoxicity.py +1 -7
  260. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToMarineEcosystemsMarineEutrophication.py +1 -7
  261. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToMarineEcosystemsPdfYear.py +1 -7
  262. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsClimateChange.py +1 -7
  263. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsPdfYear.py +1 -7
  264. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsPhotochemicalOzoneFormation.py +1 -7
  265. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialAcidification.py +1 -7
  266. hestia_earth/models/lcImpactCertainEffectsInfinite/damageToTerrestrialEcosystemsTerrestrialEcotoxicity.py +1 -7
  267. hestia_earth/models/linkedImpactAssessment/emissions.py +4 -6
  268. hestia_earth/models/linkedImpactAssessment/utils.py +4 -6
  269. hestia_earth/models/mocking/search-results.json +1 -1
  270. hestia_earth/models/pooreNemecek2018/aboveGroundCropResidueTotal.py +1 -3
  271. hestia_earth/models/pooreNemecek2018/belowGroundCropResidue.py +1 -3
  272. hestia_earth/models/pooreNemecek2018/ch4ToAirAquacultureSystems.py +1 -2
  273. hestia_earth/models/pooreNemecek2018/excretaKgN.py +3 -4
  274. hestia_earth/models/pooreNemecek2018/excretaKgVs.py +4 -4
  275. hestia_earth/models/pooreNemecek2018/freshwaterWithdrawalsDuringCycle.py +3 -9
  276. hestia_earth/models/pooreNemecek2018/landOccupationDuringCycle.py +3 -7
  277. hestia_earth/models/pooreNemecek2018/longFallowDuration.py +1 -7
  278. hestia_earth/models/pooreNemecek2018/n2OToAirAquacultureSystemsDirect.py +1 -2
  279. hestia_earth/models/pooreNemecek2018/n2ToAirAquacultureSystems.py +1 -2
  280. hestia_earth/models/pooreNemecek2018/nh3ToAirAquacultureSystems.py +1 -2
  281. hestia_earth/models/pooreNemecek2018/no3ToGroundwaterCropResidueDecomposition.py +1 -2
  282. hestia_earth/models/pooreNemecek2018/no3ToGroundwaterExcreta.py +1 -2
  283. hestia_earth/models/pooreNemecek2018/no3ToGroundwaterInorganicFertiliser.py +1 -2
  284. hestia_earth/models/pooreNemecek2018/no3ToGroundwaterOrganicFertiliser.py +1 -2
  285. hestia_earth/models/pooreNemecek2018/no3ToGroundwaterSoilFlux_utils.py +1 -2
  286. hestia_earth/models/pooreNemecek2018/noxToAirAquacultureSystems.py +1 -2
  287. hestia_earth/models/pooreNemecek2018/nurseryDensity.py +1 -7
  288. hestia_earth/models/pooreNemecek2018/nurseryDuration.py +1 -7
  289. hestia_earth/models/pooreNemecek2018/plantationDensity.py +1 -7
  290. hestia_earth/models/pooreNemecek2018/plantationLifespan.py +1 -7
  291. hestia_earth/models/pooreNemecek2018/plantationProductiveLifespan.py +1 -7
  292. hestia_earth/models/pooreNemecek2018/rotationDuration.py +1 -7
  293. hestia_earth/models/pooreNemecek2018/saplingsDepreciatedAmountPerCycle.py +1 -7
  294. hestia_earth/models/poschEtAl2008/terrestrialAcidificationPotentialAccumulatedExceedance.py +1 -7
  295. hestia_earth/models/poschEtAl2008/terrestrialEutrophicationPotentialAccumulatedExceedance.py +1 -7
  296. hestia_earth/models/recipe2016Egalitarian/damageToFreshwaterEcosystemsSpeciesYear.py +1 -7
  297. hestia_earth/models/recipe2016Egalitarian/damageToHumanHealth.py +1 -7
  298. hestia_earth/models/recipe2016Egalitarian/damageToMarineEcosystemsSpeciesYear.py +1 -7
  299. hestia_earth/models/recipe2016Egalitarian/damageToResourceAvailability.py +1 -7
  300. hestia_earth/models/recipe2016Egalitarian/damageToTerrestrialEcosystemsSpeciesYear.py +1 -7
  301. hestia_earth/models/recipe2016Egalitarian/ecosystemDamageOzoneFormation.py +1 -7
  302. hestia_earth/models/recipe2016Egalitarian/fossilResourceScarcity.py +1 -7
  303. hestia_earth/models/recipe2016Egalitarian/freshwaterAquaticEcotoxicityPotential14Dcbeq.py +1 -7
  304. hestia_earth/models/recipe2016Egalitarian/freshwaterEutrophicationPotential.py +1 -7
  305. hestia_earth/models/recipe2016Egalitarian/humanCarcinogenicToxicity.py +1 -7
  306. hestia_earth/models/recipe2016Egalitarian/humanDamageOzoneFormation.py +2 -10
  307. hestia_earth/models/recipe2016Egalitarian/humanNonCarcinogenicToxicity.py +1 -7
  308. hestia_earth/models/recipe2016Egalitarian/marineAquaticEcotoxicityPotential14Dcbeq.py +1 -7
  309. hestia_earth/models/recipe2016Egalitarian/marineEutrophicationPotential.py +1 -7
  310. hestia_earth/models/recipe2016Egalitarian/ozoneDepletionPotential.py +1 -7
  311. hestia_earth/models/recipe2016Egalitarian/terrestrialAcidificationPotential.py +1 -7
  312. hestia_earth/models/recipe2016Egalitarian/terrestrialEcotoxicityPotential14Dcbeq.py +1 -7
  313. hestia_earth/models/recipe2016Hierarchist/damageToFreshwaterEcosystemsSpeciesYear.py +1 -7
  314. hestia_earth/models/recipe2016Hierarchist/damageToHumanHealth.py +1 -7
  315. hestia_earth/models/recipe2016Hierarchist/damageToMarineEcosystemsSpeciesYear.py +1 -7
  316. hestia_earth/models/recipe2016Hierarchist/damageToResourceAvailability.py +1 -7
  317. hestia_earth/models/recipe2016Hierarchist/damageToTerrestrialEcosystemsSpeciesYear.py +1 -7
  318. hestia_earth/models/recipe2016Hierarchist/ecosystemDamageOzoneFormation.py +2 -10
  319. hestia_earth/models/recipe2016Hierarchist/fossilResourceScarcity.py +1 -7
  320. hestia_earth/models/recipe2016Hierarchist/freshwaterAquaticEcotoxicityPotential14Dcbeq.py +1 -7
  321. hestia_earth/models/recipe2016Hierarchist/freshwaterEutrophicationPotential.py +1 -7
  322. hestia_earth/models/recipe2016Hierarchist/humanCarcinogenicToxicity.py +1 -7
  323. hestia_earth/models/recipe2016Hierarchist/humanDamageOzoneFormation.py +2 -10
  324. hestia_earth/models/recipe2016Hierarchist/humanNonCarcinogenicToxicity.py +1 -7
  325. hestia_earth/models/recipe2016Hierarchist/marineAquaticEcotoxicityPotential14Dcbeq.py +1 -7
  326. hestia_earth/models/recipe2016Hierarchist/marineEutrophicationPotential.py +1 -7
  327. hestia_earth/models/recipe2016Hierarchist/ozoneDepletionPotential.py +1 -7
  328. hestia_earth/models/recipe2016Hierarchist/terrestrialAcidificationPotential.py +1 -7
  329. hestia_earth/models/recipe2016Hierarchist/terrestrialEcotoxicityPotential14Dcbeq.py +1 -7
  330. hestia_earth/models/recipe2016Individualist/damageToFreshwaterEcosystemsSpeciesYear.py +1 -7
  331. hestia_earth/models/recipe2016Individualist/damageToHumanHealth.py +1 -7
  332. hestia_earth/models/recipe2016Individualist/damageToMarineEcosystemsSpeciesYear.py +1 -7
  333. hestia_earth/models/recipe2016Individualist/damageToResourceAvailability.py +1 -7
  334. hestia_earth/models/recipe2016Individualist/damageToTerrestrialEcosystemsSpeciesYear.py +1 -7
  335. hestia_earth/models/recipe2016Individualist/ecosystemDamageOzoneFormation.py +2 -10
  336. hestia_earth/models/recipe2016Individualist/fossilResourceScarcity.py +1 -7
  337. hestia_earth/models/recipe2016Individualist/freshwaterAquaticEcotoxicityPotential14Dcbeq.py +1 -7
  338. hestia_earth/models/recipe2016Individualist/freshwaterEutrophicationPotential.py +1 -7
  339. hestia_earth/models/recipe2016Individualist/humanCarcinogenicToxicity.py +1 -7
  340. hestia_earth/models/recipe2016Individualist/humanDamageOzoneFormation.py +2 -10
  341. hestia_earth/models/recipe2016Individualist/humanNonCarcinogenicToxicity.py +1 -7
  342. hestia_earth/models/recipe2016Individualist/marineAquaticEcotoxicityPotential14Dcbeq.py +1 -7
  343. hestia_earth/models/recipe2016Individualist/marineEutrophicationPotential.py +1 -7
  344. hestia_earth/models/recipe2016Individualist/ozoneDepletionPotential.py +1 -7
  345. hestia_earth/models/recipe2016Individualist/terrestrialAcidificationPotential.py +1 -7
  346. hestia_earth/models/recipe2016Individualist/terrestrialEcotoxicityPotential14Dcbeq.py +1 -7
  347. hestia_earth/models/resourceUseNotRelevant/__init__.py +2 -8
  348. hestia_earth/models/schererPfister2015/nErosionSoilFlux.py +1 -2
  349. hestia_earth/models/schererPfister2015/pErosionSoilFlux.py +1 -2
  350. hestia_earth/models/schererPfister2015/pToDrainageWaterSoilFlux.py +1 -2
  351. hestia_earth/models/schererPfister2015/pToGroundwaterSoilFlux.py +1 -2
  352. hestia_earth/models/schererPfister2015/pToSurfaceWaterSoilFlux.py +1 -2
  353. hestia_earth/models/schmidt2007/ch4ToAirWasteTreatment.py +1 -2
  354. hestia_earth/models/schmidt2007/h2SToAirWasteTreatment.py +1 -2
  355. hestia_earth/models/schmidt2007/n2OToAirWasteTreatmentDirect.py +1 -2
  356. hestia_earth/models/schmidt2007/nh3ToAirWasteTreatment.py +1 -2
  357. hestia_earth/models/site/grouped_measurement.py +2 -3
  358. hestia_earth/models/stehfestBouwman2006/n2OToAirCropResidueDecompositionDirect.py +1 -2
  359. hestia_earth/models/stehfestBouwman2006/n2OToAirExcretaDirect.py +1 -2
  360. hestia_earth/models/stehfestBouwman2006/n2OToAirInorganicFertiliserDirect.py +1 -2
  361. hestia_earth/models/stehfestBouwman2006/n2OToAirOrganicFertiliserDirect.py +1 -2
  362. hestia_earth/models/stehfestBouwman2006/n2OToAirSoilFlux_utils.py +1 -2
  363. hestia_earth/models/stehfestBouwman2006/noxToAirCropResidueDecomposition.py +1 -2
  364. hestia_earth/models/stehfestBouwman2006/noxToAirExcreta.py +1 -2
  365. hestia_earth/models/stehfestBouwman2006/noxToAirInorganicFertiliser.py +1 -2
  366. hestia_earth/models/stehfestBouwman2006/noxToAirOrganicFertiliser.py +1 -2
  367. hestia_earth/models/stehfestBouwman2006/noxToAirSoilFlux_utils.py +1 -2
  368. hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirCropResidueDecomposition.py +1 -2
  369. hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirExcreta.py +1 -2
  370. hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirInorganicFertiliser.py +1 -2
  371. hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirOrganicFertiliser.py +1 -2
  372. hestia_earth/models/stehfestBouwman2006GisImplementation/noxToAirSoilFlux_utils.py +1 -2
  373. hestia_earth/models/transformation/input/excreta.py +7 -5
  374. hestia_earth/models/transformation/product/excreta.py +4 -4
  375. hestia_earth/models/usetoxV2/freshwaterEcotoxicityPotentialCtue.py +1 -7
  376. hestia_earth/models/utils/__init__.py +26 -7
  377. hestia_earth/models/utils/background_emissions.py +3 -3
  378. hestia_earth/models/utils/blank_node.py +31 -12
  379. hestia_earth/models/utils/emission.py +24 -10
  380. hestia_earth/models/utils/indicator.py +28 -13
  381. hestia_earth/models/utils/input.py +22 -5
  382. hestia_earth/models/utils/management.py +18 -4
  383. hestia_earth/models/utils/measurement.py +14 -6
  384. hestia_earth/models/utils/practice.py +24 -4
  385. hestia_earth/models/utils/product.py +32 -14
  386. hestia_earth/models/version.py +1 -1
  387. hestia_earth/models/webbEtAl2012AndSintermannEtAl2012/nh3ToAirOrganicFertiliser.py +1 -2
  388. hestia_earth/orchestrator/models/__init__.py +22 -11
  389. {hestia_earth_models-0.74.10.dist-info → hestia_earth_models-0.74.12.dist-info}/METADATA +2 -2
  390. {hestia_earth_models-0.74.10.dist-info → hestia_earth_models-0.74.12.dist-info}/RECORD +410 -404
  391. tests/models/cml2001Baseline/test_abioticResourceDepletionFossilFuels.py +4 -9
  392. tests/models/cml2001Baseline/test_abioticResourceDepletionMineralsAndMetals.py +4 -9
  393. tests/models/environmentalFootprintV3_1/test_environmentalFootprintSingleOverallScore.py +4 -9
  394. tests/models/environmentalFootprintV3_1/test_marineEutrophicationPotential.py +1 -7
  395. tests/models/environmentalFootprintV3_1/test_scarcityWeightedWaterUse.py +2 -8
  396. tests/models/environmentalFootprintV3_1/test_soilQualityIndexLandTransformation.py +3 -13
  397. tests/models/hestia/test_default_emissions.py +2 -2
  398. tests/models/hestia/test_default_resourceUse.py +3 -3
  399. tests/models/hestia/test_landCover.py +42 -295
  400. tests/models/hestia/test_landCover_utils.py +233 -0
  401. tests/models/hestia/test_slope.py +23 -0
  402. tests/models/hestia/test_slopeLength.py +23 -0
  403. tests/models/ipcc2019/test_no3ToGroundwaterExcreta.py +1 -0
  404. tests/models/poschEtAl2008/test_terrestrialAcidificationPotentialAccumulatedExceedance.py +4 -9
  405. tests/models/poschEtAl2008/test_terrestrialEutrophicationPotentialAccumulatedExceedance.py +4 -9
  406. tests/models/utils/test_indicator.py +6 -4
  407. tests/models/utils/test_measurement.py +7 -5
  408. {hestia_earth_models-0.74.10.dist-info → hestia_earth_models-0.74.12.dist-info}/LICENSE +0 -0
  409. {hestia_earth_models-0.74.10.dist-info → hestia_earth_models-0.74.12.dist-info}/WHEEL +0 -0
  410. {hestia_earth_models-0.74.10.dist-info → hestia_earth_models-0.74.12.dist-info}/top_level.txt +0 -0
@@ -19,15 +19,9 @@ LOOKUPS = {
19
19
  TERM_ID = 'terrestrialAcidificationPotential'
20
20
 
21
21
 
22
- def _indicator(value: float):
23
- indicator = _new_indicator(TERM_ID, MODEL)
24
- indicator['value'] = value
25
- return indicator
26
-
27
-
28
22
  def run(impact_assessment: dict):
29
23
  value = impact_emission_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['emission'])
30
24
  logRequirements(impact_assessment, model=MODEL, term=TERM_ID,
31
25
  value=value)
32
26
  logShouldRun(impact_assessment, MODEL, TERM_ID, value is not None)
33
- return _indicator(value) if value is not None else None
27
+ return _new_indicator(term=TERM_ID, model=MODEL, value=value)
@@ -22,12 +22,6 @@ LOOKUPS = {
22
22
  TERM_ID = 'terrestrialEcotoxicityPotential14Dcbeq'
23
23
 
24
24
 
25
- def _indicator(value: float):
26
- indicator = _new_indicator(TERM_ID, MODEL)
27
- indicator['value'] = value
28
- return indicator
29
-
30
-
31
25
  def run(impact_assessment: dict):
32
26
  value = impact_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['pesticideAI'])
33
- return _indicator(value) if value is not None else None
27
+ return _new_indicator(term=TERM_ID, model=MODEL, value=value)
@@ -28,12 +28,6 @@ LOOKUPS = {
28
28
  MODEL = 'resourceUseNotRelevant'
29
29
 
30
30
 
31
- def _indicator(term_id: str, land_cover_id: str):
32
- indicator = _new_indicator(term_id, MODEL, land_cover_id)
33
- indicator['value'] = 0
34
- return indicator
35
-
36
-
37
31
  def _resourceUse_ids():
38
32
  return lookup_term_ids(download_lookup(f"{TermTermType.RESOURCEUSE.value}.csv"))
39
33
 
@@ -58,5 +52,5 @@ def _should_run_resourceUse(impact: dict):
58
52
  def run(_, impact: dict):
59
53
  term_ids = _resourceUse_ids()
60
54
  term_ids = list(filter(_should_run_resourceUse(impact), term_ids))
61
- land_cover_term_id = get_land_cover_term_id(get_site(impact).get('siteType'))
62
- return [_indicator(term_id, land_cover_term_id) for term_id in term_ids]
55
+ land_cover_id = get_land_cover_term_id(get_site(impact).get('siteType'))
56
+ return [_new_indicator(term=term_id, model=MODEL, value=0, land_cover_id=land_cover_id) for term_id in term_ids]
@@ -51,8 +51,7 @@ TIER = EmissionMethodTier.TIER_1.value
51
51
 
52
52
 
53
53
  def _emission(value: float):
54
- emission = _new_emission(TERM_ID, MODEL)
55
- emission['value'] = [value]
54
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
56
55
  emission['methodTier'] = TIER
57
56
  return emission
58
57
 
@@ -51,8 +51,7 @@ TIER = EmissionMethodTier.TIER_1.value
51
51
 
52
52
 
53
53
  def _emission(value: float):
54
- emission = _new_emission(TERM_ID, MODEL)
55
- emission['value'] = [value]
54
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
56
55
  emission['methodTier'] = TIER
57
56
  return emission
58
57
 
@@ -45,8 +45,7 @@ TIER = EmissionMethodTier.TIER_1.value
45
45
 
46
46
 
47
47
  def _emission(value: float):
48
- emission = _new_emission(TERM_ID, MODEL)
49
- emission['value'] = [value]
48
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
50
49
  emission['methodTier'] = TIER
51
50
  return emission
52
51
 
@@ -33,8 +33,7 @@ TIER = EmissionMethodTier.TIER_1.value
33
33
 
34
34
 
35
35
  def _emission(value: float):
36
- emission = _new_emission(TERM_ID, MODEL)
37
- emission['value'] = [value]
36
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
38
37
  emission['methodTier'] = TIER
39
38
  return emission
40
39
 
@@ -46,8 +46,7 @@ TIER = EmissionMethodTier.TIER_1.value
46
46
 
47
47
 
48
48
  def _emission(value: float):
49
- emission = _new_emission(TERM_ID, MODEL)
50
- emission['value'] = [value]
49
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
51
50
  emission['methodTier'] = TIER
52
51
  return emission
53
52
 
@@ -25,8 +25,7 @@ TIER = EmissionMethodTier.TIER_1.value
25
25
 
26
26
 
27
27
  def _emission(value: float):
28
- emission = _new_emission(TERM_ID, MODEL)
29
- emission['value'] = [value]
28
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
30
29
  emission['methodTier'] = TIER
31
30
  return emission
32
31
 
@@ -25,8 +25,7 @@ TIER = EmissionMethodTier.TIER_1.value
25
25
 
26
26
 
27
27
  def _emission(value: float):
28
- emission = _new_emission(TERM_ID, MODEL)
29
- emission['value'] = [value]
28
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
30
29
  emission['methodTier'] = TIER
31
30
  return emission
32
31
 
@@ -25,8 +25,7 @@ TIER = EmissionMethodTier.TIER_1.value
25
25
 
26
26
 
27
27
  def _emission(value: float):
28
- emission = _new_emission(TERM_ID, MODEL)
29
- emission['value'] = [value]
28
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
30
29
  emission['methodTier'] = TIER
31
30
  return emission
32
31
 
@@ -25,8 +25,7 @@ TIER = EmissionMethodTier.TIER_1.value
25
25
 
26
26
 
27
27
  def _emission(value: float):
28
- emission = _new_emission(TERM_ID, MODEL)
29
- emission['value'] = [value]
28
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
30
29
  emission['methodTier'] = TIER
31
30
  return emission
32
31
 
@@ -1,9 +1,8 @@
1
1
  from functools import reduce
2
2
  from hestia_earth.schema import MeasurementMethodClassification
3
- from hestia_earth.utils.tools import non_empty_list, flatten, is_number, list_sum
3
+ from hestia_earth.utils.tools import non_empty_list, flatten, is_number, list_sum, pick
4
4
 
5
5
  from hestia_earth.models.log import logRequirements, logShouldRun
6
- from hestia_earth.models.utils import _include
7
6
  from hestia_earth.models.utils.measurement import _new_measurement
8
7
  from hestia_earth.models.utils.term import get_lookup_value
9
8
  from . import MODEL
@@ -31,7 +30,7 @@ MODEL_KEY = 'grouped_measurement'
31
30
 
32
31
 
33
32
  def _measurement(term_id: str, measurement: dict):
34
- data = _new_measurement(term_id) | _include(measurement, [
33
+ data = _new_measurement(term_id) | pick(measurement, [
35
34
  'depthUpper', 'depthLower', 'startDate', 'endDate', 'dates'
36
35
  ])
37
36
  data["value"] = [0]
@@ -45,8 +45,7 @@ TIER = EmissionMethodTier.TIER_2.value
45
45
 
46
46
 
47
47
  def _emission(value: float):
48
- emission = _new_emission(TERM_ID, MODEL)
49
- emission['value'] = [value]
48
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
50
49
  emission['methodTier'] = TIER
51
50
  return emission
52
51
 
@@ -52,8 +52,7 @@ TIER = EmissionMethodTier.TIER_2.value
52
52
 
53
53
 
54
54
  def _emission(value: float):
55
- emission = _new_emission(TERM_ID, MODEL)
56
- emission['value'] = [value]
55
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
57
56
  emission['methodTier'] = TIER
58
57
  return emission
59
58
 
@@ -55,8 +55,7 @@ TIER = EmissionMethodTier.TIER_2.value
55
55
 
56
56
 
57
57
  def _emission(value: float):
58
- emission = _new_emission(TERM_ID, MODEL)
59
- emission['value'] = [value]
58
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
60
59
  emission['methodTier'] = TIER
61
60
  return emission
62
61
 
@@ -55,8 +55,7 @@ TIER = EmissionMethodTier.TIER_2.value
55
55
 
56
56
 
57
57
  def _emission(value: float):
58
- emission = _new_emission(TERM_ID, MODEL)
59
- emission['value'] = [value]
58
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
60
59
  emission['methodTier'] = TIER
61
60
  return emission
62
61
 
@@ -71,8 +71,7 @@ N2O_FACTORS_BY_CROP = {
71
71
 
72
72
 
73
73
  def _emission(value: float):
74
- emission = _new_emission(TERM_ID, MODEL)
75
- emission['value'] = [value]
74
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
76
75
  emission['methodTier'] = TIER
77
76
  return emission
78
77
 
@@ -40,8 +40,7 @@ TIER = EmissionMethodTier.TIER_2.value
40
40
 
41
41
 
42
42
  def _emission(value: float):
43
- emission = _new_emission(TERM_ID, MODEL)
44
- emission['value'] = [value]
43
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
45
44
  emission['methodTier'] = TIER
46
45
  return emission
47
46
 
@@ -47,8 +47,7 @@ TIER = EmissionMethodTier.TIER_2.value
47
47
 
48
48
 
49
49
  def _emission(value: float):
50
- emission = _new_emission(TERM_ID, MODEL)
51
- emission['value'] = [value]
50
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
52
51
  emission['methodTier'] = TIER
53
52
  return emission
54
53
 
@@ -50,8 +50,7 @@ TIER = EmissionMethodTier.TIER_2.value
50
50
 
51
51
 
52
52
  def _emission(value: float):
53
- emission = _new_emission(TERM_ID, MODEL)
54
- emission['value'] = [value]
53
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
55
54
  emission['methodTier'] = TIER
56
55
  return emission
57
56
 
@@ -50,8 +50,7 @@ TIER = EmissionMethodTier.TIER_2.value
50
50
 
51
51
 
52
52
  def _emission(value: float):
53
- emission = _new_emission(TERM_ID, MODEL)
54
- emission['value'] = [value]
53
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
55
54
  emission['methodTier'] = TIER
56
55
  return emission
57
56
 
@@ -56,8 +56,7 @@ TIER = EmissionMethodTier.TIER_2.value
56
56
 
57
57
 
58
58
  def _emission(value: float):
59
- emission = _new_emission(TERM_ID, MODEL)
60
- emission['value'] = [value]
59
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
61
60
  emission['methodTier'] = TIER
62
61
  return emission
63
62
 
@@ -37,8 +37,7 @@ TIER = EmissionMethodTier.TIER_1.value
37
37
 
38
38
 
39
39
  def _emission(value: float):
40
- emission = _new_emission(TERM_ID, MODEL)
41
- emission['value'] = [value]
40
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
42
41
  emission['methodTier'] = TIER
43
42
  return emission
44
43
 
@@ -44,8 +44,7 @@ TIER = EmissionMethodTier.TIER_1.value
44
44
 
45
45
 
46
46
  def _emission(value: float):
47
- emission = _new_emission(TERM_ID, MODEL)
48
- emission['value'] = [value]
47
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
49
48
  emission['methodTier'] = TIER
50
49
  return emission
51
50
 
@@ -47,8 +47,7 @@ TIER = EmissionMethodTier.TIER_1.value
47
47
 
48
48
 
49
49
  def _emission(value: float):
50
- emission = _new_emission(TERM_ID, MODEL)
51
- emission['value'] = [value]
50
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
52
51
  emission['methodTier'] = TIER
53
52
  return emission
54
53
 
@@ -47,8 +47,7 @@ TIER = EmissionMethodTier.TIER_1.value
47
47
 
48
48
 
49
49
  def _emission(value: float):
50
- emission = _new_emission(TERM_ID, MODEL)
51
- emission['value'] = [value]
50
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
52
51
  emission['methodTier'] = TIER
53
52
  return emission
54
53
 
@@ -51,8 +51,7 @@ TIER = EmissionMethodTier.TIER_1.value
51
51
 
52
52
 
53
53
  def _emission(value: float):
54
- emission = _new_emission(TERM_ID, MODEL)
55
- emission['value'] = [value]
54
+ emission = _new_emission(term=TERM_ID, model=MODEL, value=value)
56
55
  emission['methodTier'] = TIER
57
56
  return emission
58
57
 
@@ -1,10 +1,10 @@
1
1
  from functools import reduce
2
2
  from hestia_earth.schema import NodeType, TermTermType, Input, Product
3
3
  from hestia_earth.utils.model import filter_list_term_type, find_term_match
4
- from hestia_earth.utils.tools import list_sum
4
+ from hestia_earth.utils.tools import list_sum, omit
5
5
 
6
6
  from hestia_earth.models.log import logShouldRun
7
- from hestia_earth.models.utils import _omit, term_id_prefix
7
+ from hestia_earth.models.utils import term_id_prefix
8
8
  from hestia_earth.models.utils.blank_node import merge_blank_nodes
9
9
  from hestia_earth.models.utils.input import _new_input
10
10
  from hestia_earth.models.utils.transformation import previous_transformation
@@ -40,10 +40,12 @@ def _to_input(transformation: dict):
40
40
  def new_input(values: tuple):
41
41
  product, ratio = values
42
42
  # omit all keys in Product but not in Input
43
- data = _omit(product, list(Product().fields.keys() - Input().fields.keys()))
43
+ data = omit(product, list(Product().fields.keys() - Input().fields.keys()))
44
44
  logShouldRun(transformation, MODEL_LOG, product.get('term', {}).get('@id'), True)
45
- return data | _new_input(product.get('term')) | {
46
- 'value': [v * ratio for v in product.get('value', [])],
45
+ return data | _new_input(
46
+ term=product.get('term'),
47
+ value=[v * ratio for v in product.get('value', [])]
48
+ ) | {
47
49
  'fromCycle': True
48
50
  }
49
51
  return new_input
@@ -1,9 +1,9 @@
1
1
  from hestia_earth.schema import SchemaType, TermTermType
2
- from hestia_earth.utils.tools import list_sum, non_empty_list
2
+ from hestia_earth.utils.tools import list_sum, non_empty_list, omit
3
3
  from hestia_earth.utils.model import filter_list_term_type
4
4
 
5
5
  from hestia_earth.models.log import debugValues, logRequirements, logShouldRun
6
- from hestia_earth.models.utils import get_kg_term_units, _omit, sum_values
6
+ from hestia_earth.models.utils import get_kg_term_units, sum_values
7
7
  from hestia_earth.models.utils.product import _new_product
8
8
  from hestia_earth.models.utils.constant import Units, convert_to_N
9
9
  from hestia_earth.models.utils.term import get_lookup_value
@@ -69,8 +69,8 @@ def _add_product(transformation: dict, units: str, inputs: list, emissions: list
69
69
  should_run = all([has_value])
70
70
  logShouldRun(transformation, MODEL_LOG, term_id, should_run)
71
71
  return {
72
- **_omit(input_same_units, ['fromCycle']),
73
- **_new_product(term_id, _product_value(input_same_units, emissions))
72
+ **omit(input_same_units, ['fromCycle']),
73
+ **_new_product(term=term_id, value=_product_value(input_same_units, emissions))
74
74
  } if should_run else None
75
75
 
76
76
 
@@ -22,12 +22,6 @@ LOOKUPS = {
22
22
  TERM_ID = 'freshwaterEcotoxicityPotentialCtue'
23
23
 
24
24
 
25
- def _indicator(value: float):
26
- indicator = _new_indicator(TERM_ID, MODEL)
27
- indicator['value'] = value
28
- return indicator
29
-
30
-
31
25
  def run(impact_assessment: dict):
32
26
  value = impact_lookup_value(MODEL, TERM_ID, impact_assessment, LOOKUPS['pesticideAI'])
33
- return _indicator(value) if value is not None else None
27
+ return _new_indicator(term=TERM_ID, model=MODEL, value=value)
@@ -8,11 +8,13 @@ import datetime
8
8
  from functools import reduce
9
9
  import operator
10
10
  from pydash.objects import get
11
- from typing import Union, List, Callable
12
- from hestia_earth.schema import SchemaType
11
+ from typing import Union, List, Callable, Any, Optional
12
+ from hestia_earth.schema import SchemaType, TermTermType
13
13
  from hestia_earth.utils.api import download_hestia
14
- from hestia_earth.utils.tools import flatten, non_empty_list, safe_parse_date
14
+ from hestia_earth.utils.tools import flatten, non_empty_list, safe_parse_date, to_precision, is_number
15
15
  from hestia_earth.utils.date import is_in_days, is_in_months
16
+ from hestia_earth.utils.model import linked_node
17
+ from hestia_earth.utils.term import download_term
16
18
 
17
19
  from .constant import Units
18
20
 
@@ -35,16 +37,33 @@ def group_by(values: list, keys: list):
35
37
  return reduce(_group_by, values, {})
36
38
 
37
39
 
38
- def _term_id(term): return term.get('@id') if isinstance(term, dict) else term
40
+ def value_with_precision(value):
41
+ def _to_precision(value):
42
+ return to_precision(value) if is_number(value) and value else value
43
+
44
+ return list(map(_to_precision, value)) if isinstance(value, list) else _to_precision(value)
45
+
39
46
 
47
+ def set_node_value(key: str, value: Any, is_list: bool = False):
48
+ return ({
49
+ key: ([
50
+ value_with_precision(value)
51
+ ] if is_list and not isinstance(value, list) else value_with_precision(value))
52
+ } if value is not None else {})
40
53
 
41
- def _omit(values: dict, keys: list) -> dict: return {k: v for k, v in values.items() if k not in keys}
42
54
 
55
+ def set_node_stats(node: dict):
56
+ include_stats = any([key in node for key in ['min', 'max', 'sd']])
57
+ return ({'statsDefinition': 'modelled'} if include_stats else {}) | node
43
58
 
44
- def _include(value: dict, keys: list) -> dict: return {k: v for k, v in value.items() if k in keys}
59
+
60
+ def set_node_term(key: str, term_id: str, term_type: Optional[TermTermType] = None):
61
+ return {
62
+ key: linked_node(download_term(term_id, term_type))
63
+ } if term_id else {}
45
64
 
46
65
 
47
- def unique_values(values: list, key='@id'): return list({v[key]: v for v in values}.values())
66
+ def _term_id(term): return term.get('@id') if isinstance(term, dict) else term
48
67
 
49
68
 
50
69
  def _run_in_serie(data: dict, models: list): return reduce(lambda prev, model: model(prev), models, data)
@@ -3,11 +3,11 @@ from typing import Callable, Tuple
3
3
  from hestia_earth.schema import TermTermType, EmissionMethodTier
4
4
  from hestia_earth.utils.lookup import _is_missing_value, lookup_columns
5
5
  from hestia_earth.utils.model import find_term_match, filter_list_term_type
6
- from hestia_earth.utils.tools import flatten, non_empty_list, safe_parse_float
6
+ from hestia_earth.utils.tools import flatten, non_empty_list, safe_parse_float, omit
7
7
  from hestia_earth.utils.emission import cycle_emissions_in_system_boundary
8
8
 
9
9
  from hestia_earth.models.log import logShouldRun, logRequirements, debugValues
10
- from . import is_from_model, _omit
10
+ from . import is_from_model
11
11
  from .term import get_lookup_value
12
12
 
13
13
 
@@ -141,7 +141,7 @@ def parse_term_id(term_id: str): return term_id.split('-')[0]
141
141
 
142
142
 
143
143
  def join_term_id(term_id: str, data: dict):
144
- return '-'.join(non_empty_list([term_id] + list(_omit(data, ['value']).values())))
144
+ return '-'.join(non_empty_list([term_id] + list(omit(data, ['value']).values())))
145
145
 
146
146
 
147
147
  def _process_mapping(
@@ -28,6 +28,7 @@ from hestia_earth.utils.lookup_utils import (
28
28
  is_model_siteType_allowed,
29
29
  is_model_product_id_allowed,
30
30
  is_siteType_allowed,
31
+ is_site_measurement_id_allowed,
31
32
  is_product_id_allowed,
32
33
  is_product_termType_allowed,
33
34
  is_input_id_allowed,
@@ -132,18 +133,22 @@ def _run_model_required(model: str, term_id: str, data: dict, skip_logs: bool =
132
133
 
133
134
  def _run_required(model: str, term_id: str, data: dict):
134
135
  siteType_allowed = is_siteType_allowed(data, term_id)
136
+ site_measurement_id_allowed = is_site_measurement_id_allowed(data, term_id)
135
137
  product_id_allowed = is_product_id_allowed(data, term_id)
136
138
  product_termType_allowed = is_product_termType_allowed(data, term_id)
137
139
  input_id_allowed = is_input_id_allowed(data, term_id)
138
140
  input_termType_allowed = is_input_termType_allowed(data, term_id)
139
141
 
140
142
  run_required = all([
141
- siteType_allowed, product_id_allowed, product_termType_allowed, input_id_allowed, input_termType_allowed
143
+ siteType_allowed, site_measurement_id_allowed,
144
+ product_id_allowed, product_termType_allowed,
145
+ input_id_allowed, input_termType_allowed
142
146
  ])
143
147
  # model is only used for logs here, skip logs if model not provided
144
148
  if model:
145
149
  debugValues(data, model=model, term=term_id,
146
150
  siteType_allowed=siteType_allowed,
151
+ site_measurement_id_allowed=site_measurement_id_allowed,
147
152
  product_id_allowed=product_id_allowed,
148
153
  product_termType_allowed=product_termType_allowed,
149
154
  input_id_allowed=input_id_allowed,
@@ -228,7 +233,7 @@ def get_total_value(nodes: list):
228
233
  return list(map(lambda node: list_sum(node.get('value', []), None), nodes))
229
234
 
230
235
 
231
- def _value_as(term_id: str, convert_to_property=True):
236
+ def _value_as(term_id: str, convert_to_property: bool = True, **log_args):
232
237
  def get_value(node: dict):
233
238
  factor = get_node_property_value(
234
239
  None, node, term_id, default=0, handle_percents=False
@@ -240,11 +245,23 @@ def _value_as(term_id: str, convert_to_property=True):
240
245
  value = list_sum(node.get('value', []))
241
246
  property = get_node_property(node, term_id, find_default_property=False, download_from_hestia=True)
242
247
  ratio = factor / 100 if property.get('term', {}).get('units', '') == '%' else factor
248
+
249
+ if log_args.get('log_node'):
250
+ debugValues(**log_args, **{
251
+ 'convert_value': value,
252
+ f"conversion_with_{term_id}": factor
253
+ })
254
+
243
255
  return 0 if ratio == 0 else (value * ratio if convert_to_property else value / ratio)
244
256
  return get_value
245
257
 
246
258
 
247
- def get_total_value_converted(nodes: list, conversion_property: Union[List[str], str], convert_to_property=True):
259
+ def get_total_value_converted(
260
+ nodes: list,
261
+ conversion_property: Union[List[str], str],
262
+ convert_to_property: bool = True,
263
+ **log_args
264
+ ):
248
265
  """
249
266
  Get the total `value` of a list of Blank Nodes converted using a property of each Blank Node.
250
267
 
@@ -266,13 +283,14 @@ def get_total_value_converted(nodes: list, conversion_property: Union[List[str],
266
283
  def convert_multiple(node: dict):
267
284
  value = 0
268
285
  for prop in conversion_property:
269
- value = _value_as(prop, convert_to_property)(node)
286
+ value = _value_as(prop, convert_to_property, **log_args)(node)
270
287
  node['value'] = [value]
271
288
  return value
272
289
 
273
290
  return [
274
- _value_as(conversion_property, convert_to_property)(node) if isinstance(conversion_property, str) else
275
- convert_multiple(node) for node in nodes
291
+ _value_as(conversion_property, convert_to_property, **log_args)(node) if isinstance(conversion_property, str)
292
+ else convert_multiple(node)
293
+ for node in nodes
276
294
  ]
277
295
 
278
296
 
@@ -285,19 +303,20 @@ def get_total_value_converted_with_min_ratio(
285
303
  ):
286
304
  values = [
287
305
  (
306
+ blank_node.get('@type'),
288
307
  blank_node.get('term', {}).get('@id'),
289
308
  list_sum(blank_node.get('value', [])),
290
309
  get_node_property_value(model, blank_node, prop_id)
291
310
  ) for blank_node in blank_nodes
292
311
  ]
293
312
  value_logs = log_as_table([{
294
- 'node-id': term_id,
295
- 'node-value': value,
313
+ f"{node_type}-id": term_id,
314
+ f"{node_type}-value": value,
296
315
  f"{prop_id}-value": prop_value
297
- } for term_id, value, prop_value in values])
316
+ } for node_type, term_id, value, prop_value in values])
298
317
 
299
- total_value = list_sum([value for term_id, value, prop_value in values])
300
- total_value_with_property = list_sum([value for term_id, value, prop_value in values if prop_value])
318
+ total_value = list_sum([value for node_type, term_id, value, prop_value in values])
319
+ total_value_with_property = list_sum([value for node_type, term_id, value, prop_value in values if prop_value])
301
320
  total_value_ratio = total_value_with_property / total_value if total_value > 0 else 0
302
321
 
303
322
  logs = {
@@ -313,7 +332,7 @@ def get_total_value_converted_with_min_ratio(
313
332
  **logs)
314
333
 
315
334
  total_converted_value = list_sum([
316
- value * prop_value for term_id, value, prop_value in values if all([value, prop_value])
335
+ value * prop_value for node_type, term_id, value, prop_value in values if all([value, prop_value])
317
336
  ])
318
337
 
319
338
  return (