Oceans play a crucial role in human welfare. From providing food, livelihood and recreational activities to the regulation of the climate. Sustainable management of the oceans therefore requires an integrated and quantitative method for measuring and monitoring the quality. The ocean health index (OHI) is calculated on the basis of ten different goals for a healthy connection between man and the ocean. With this an overall score for each coastal state can be determined. According to this index the oceans worldwide score 59 out of 100 (range 41 to 87). In addition, the industrialized countries generally perform better than the developing countries, but with some notable exceptions. Only 5% of countries scored higher than 70, while 32% of countries have a score lower than 50, the OHI is a powerful tool to improve public awareness, ocean management and policy decisions, and to establish priorities within the research.

Assignment

The file ohi.txt1 contains the individual scores of all coastal states for the objectives used in the calculation of the OHI. Each line starts with an integer that is used as code for the coastal state, followed by the name of the coastal state and then thirteen integers between 0 and 100 indicating the score for thirteen different (sub)goals. The various fields on each line are separated by a single tab. Following table shows the scores for some coastal states from the file.

ocean health index
Quality scores for several coastal states on thirteen goals that measure the health of the oceans. Empty cells are goals that are not relevant to the coastal state because they require a resident human population or for which the coastal state does not have the local resources to produce the goal. The goals are Food Provision (FP), Artisanal Fishing Opportunities (AO), Natural Products (NP), Carbon Storage (CS), Coastal Protection (CP), Coastal Livelihoods & Economies (LE), Tourism & Recreation (TR), Sense of Place (SP), Clean Waters (CW) en Biodiversity (BD). The goal LE is divided into two sub-goals: Livelihoods (LIV) , and Economies (ECO). SP contains two sub-goals: Iconic Species (ICO) and Lasting Special Places (LSP).The goal BD contains two sub-goals: Habitats (HAB) and Species (SPP).

Asked:

Example

>>> mean([3, 7, 6, 11])
6.75
>>> mean([3, None, None, 7, None, 6, 11])
6.75
>>> mean([None, None, None, None, None])

>>> data = database('ohi.txt')
>>> data['Belgium']
[11, 95, 75, 100, 100, 61, 56, 4, 58, 5, 71, 99, 82]
>>> data['Netherlands']
[35, 96, 71, 100, 100, 79, 53, 4, 65, 85, 67, 89, 81]
>>> data['France']
[72, 96, 75, 79, 49, 94, 67, 27, 63, 29, 60, 72, 77]
>>> data['Monaco']
[1, 95, None, None, None, 95, 71, 99, 43, 0, 69, None, 85]
>>> data['Jarvis Island']
[None, None, None, None, 98, None, None, None, 65, 100, 78, 95, 76]
>>> data['Antarctica']
[None, None, None, None, None, None, None, None, None, None, None, None, None]

>>> oceanHealthIndex('Belgium', data)
64
>>> oceanHealthIndex('Netherlands', data)
70
>>> oceanHealthIndex('France', data)
66
>>> oceanHealthIndex('Monaco', data)
65
>>> oceanHealthIndex('Jarvis Island', data)
86
>>> oceanHealthIndex('Antarctica', data)

Source