I have an ESRI featureclass with a lot of records that have been scored to certain criteria, although criteria have been left null for records where they aren't deemed relevant.
I'm now trying to produce the final scores for each record, which require adding all the values for each feature and dividing by the number of criteria scored. Is there any easy way to script this?
I am trying to think of a way to run through each feature and calculate the number of criteria scored... or conversely, the number of criteria left null.
I am attempting the following code in the field calculator but not having any luck so far, am I on the right lines?
def mean(Welcoming, Access, Community, Safe, Provision, Quality, Security, Dog, Litter, Grounds): fieldList = [Welcoming, Access, Community, Safe, Provision, Quality, Security, Dog, Litter, Grounds] validList =  for i in fieldList: if i != None: validList.append(i) meanVal = sum(validList)/len(validList) return meanVal