unepwcmc/ProtectedPlanet — pull request #10 by migtorres (2014-06-18 09:37:07+00:00)
Title: Stats Calculator

Calculates the following stats:

Global

Total PA’s
% Cover of PA’s (towards AICHI Target) Broken down by Terrestrial, Marine and Coastal
PA’s with IUCN Category (also percentage)
Number of types of designations (there are a lot apparently, as countries make them up)
Total PA’s by designation
Number of countries providing data

N.B. PA team requested that there be a map showing the regions
Country

Total PA's
% cover of PA’s
No PA’s with IUCN Category
Number of types of designations (there are a lot apparently, as countries make them up)
Total PA’s by designation

Adds also stats tables for the output of geoprocessing statistics (regional_statistics, country_statistics) and the Regions table (was missing).

Tests on:
test/unit/stats_test.rb

Module on:
lib/modules/stats.rb