unepwcmc/ProtectedPlanet — pull request #70 by deciob (2014-07-15 11:27:42+00:00)
Title: Viz stats

## Adds statistics to the country and regional factsheet pages.
**TODO**: *regional stats* and *total-percentage* on both regional and country levels are still random.

### Front-end:
* The stats are rendered in separate partial views, one per stat row, example: *_factsheet_other_info.html.erb*
* The factsheet styling has been moved into a separate scss file.
* The annular-sector visualizations are created with d3, and fail gracefully for browsers that do not support svg.

### Statistics:
This pull requests adds several features in order to calculate geospatial statistics:
#### Base Layers
There are base layers to be added. These include geometries for countries, territorial seas and Economic exclusive zones. There is documentation on [Base Datasets](docs/base_datasets.md).
Basically you will need to run
```
rake import:countries_geometries
```
#### Geospatial Statistics
We can now calculate geospatial statistics for countries (still an alpha version though). The process is documented on [Statistics](docs/statistics.md)
Basically you will need to:
+ Add mollweide projection:
```
rake geo_stats:insert_mollweide
```
+ Dissolve countries geometries
```
rake geo_stats:dissolve_countries
```
+ Calculate Statistics
```
rake geo_stats:calculate
```
### Testing
The great majority of the rake tasks above run modules that are tested.