Search requests have an optional activityMeasure
field. If a value is passed in this field, the result is appended with a totalImpact
value which is calculated assuming the activityMeasure
is given in terms of the activityUnit
of the result. You should pass a value for the activityUnit
field to ensure the calculation is done in the correct unit.
For example,
# construct a GET request to footprint-<tier>
query_params = {
'country':'India',
'activityID':'maize',
'impactCategory': 'Land use_Extensive_forestry',
'activityUnit':'$US'
'activityMeasure':12}
# send as the query params
returns a total land use impact of spending $12USD on Indian Maize growing.
If you don’t pass a value for activityUnit
, we’ll assume it’s the same as that given in the results field - this applies for currencies too. If you pass a recognized currency, we’ll apply a conversion to the currency of the underlying data for you. See here for more about how we do this. If you need a different conversion method, roll your own or submit a feature request.