I am building a model to calculate geometric mean for each shape file in model builder. How to do write Expression and Code Block which would:
Take in shapefile "City_1" and use all the values in Field "Area" and calculate n√a*b*c*d. ..... where n are number of values in field "Area" and a,b,c,d are all the value in field "Area"
Solved! Go to Solution.
Since 'area' was mentioned... consider 3 land parcels of 10, 100, and 1000 hectares.
what is the mean-ish thing?
import scipy.stats as st
areas = np.array([10, 100, 1000])
st.gmean(areas) # --- floating point 'issues' but 100
99.99999999999996
np.mean(areas) # ---- hmmmmm ;)
370.0