From 52d74e9b12de0226776d8f4a832d3af2f2d048a1 Mon Sep 17 00:00:00 2001 From: stacytalbot Date: Tue, 30 Jul 2019 14:21:39 +0100 Subject: [PATCH 01/25] Rework coverage stats section --- Gemfile | 1 + Gemfile.lock | 5 + ...{application.css.scss => application.scss} | 17 +- app/assets/stylesheets/atoms/colors.scss | 24 ++ app/assets/stylesheets/atoms/fonts.scss | 32 ++ app/assets/stylesheets/helpers/_flexbox.scss | 80 ++++ .../stylesheets/organisms/stats-card.scss | 133 ++++++ .../resources/mixins/_flexbox.scss | 87 ++++ .../resources/mixins/_rem-calc.scss | 152 +++++++ .../stylesheets/utilities/_flexbox.scss | 394 ++++++++++++++++++ .../stylesheets/utilities/responsive.scss | 29 ++ app/assets/stylesheets/variables/colors.scss | 275 ++++++++++++ app/assets/stylesheets/variables/fonts.scss | 69 +++ app/models/concerns/geometry_concern.rb | 16 +- .../pdf/facts/_coverage_stats.html.erb | 10 +- .../stats/facts/_coverage_stats.html.erb | 124 +----- .../stats/facts/_coverage_stats_land.html.erb | 62 +++ .../facts/_coverage_stats_marine.html.erb | 62 +++ db | 2 +- 19 files changed, 1459 insertions(+), 115 deletions(-) rename app/assets/stylesheets/{application.css.scss => application.scss} (75%) create mode 100644 app/assets/stylesheets/atoms/colors.scss create mode 100644 app/assets/stylesheets/atoms/fonts.scss create mode 100644 app/assets/stylesheets/helpers/_flexbox.scss create mode 100644 app/assets/stylesheets/organisms/stats-card.scss create mode 100644 app/assets/stylesheets/resources/mixins/_flexbox.scss create mode 100644 app/assets/stylesheets/resources/mixins/_rem-calc.scss create mode 100644 app/assets/stylesheets/utilities/_flexbox.scss create mode 100644 app/assets/stylesheets/utilities/responsive.scss create mode 100644 app/assets/stylesheets/variables/colors.scss create mode 100644 app/assets/stylesheets/variables/fonts.scss create mode 100644 app/views/shared/stats/facts/_coverage_stats_land.html.erb create mode 100644 app/views/shared/stats/facts/_coverage_stats_marine.html.erb diff --git a/Gemfile b/Gemfile index bb37cc455..57464641c 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ gem 'pg' gem 'activerecord-postgis-adapter', '~> 3.1.0' gem 'gdal', '~> 0.0.5' gem 'dbf', '~> 2.0.7' +gem 'rb-readline' gem 'elasticsearch', '~> 5.0.3' diff --git a/Gemfile.lock b/Gemfile.lock index ac9854afd..551c9457a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -316,6 +316,7 @@ GEM rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) rake (10.5.0) + rb-readline (0.5.5) redis (3.2.1) redis-namespace (1.5.2) redis (~> 3.0, >= 3.0.4) @@ -451,6 +452,7 @@ DEPENDENCIES premailer-rails rack-cache (~> 1.2) rails (= 4.2.5.1) + rb-readline sass-rails (~> 5.0.4) selenium-webdriver sidekiq (~> 3.5.3) @@ -468,3 +470,6 @@ DEPENDENCIES webmock (~> 1.18.0) whenever will_paginate (~> 3.0) + +BUNDLED WITH + 1.16.1 diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.scss similarity index 75% rename from app/assets/stylesheets/application.css.scss rename to app/assets/stylesheets/application.scss index 296d6d563..e87219433 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.scss @@ -13,6 +13,21 @@ * *= require 'protectedplanet-frontend/dist/style/main' *= require 'custom' + *= require_self */ - @import './map/custom-leaflet'; \ No newline at end of file +@import './resources/**/*'; + +@import './map/custom-leaflet'; + +@import './variables/*'; + +@import './helpers/*'; + +@import './utilities/*'; + +@import './atoms/*'; + +// @import './molecules/*'; + +@import './organisms/*'; \ No newline at end of file diff --git a/app/assets/stylesheets/atoms/colors.scss b/app/assets/stylesheets/atoms/colors.scss new file mode 100644 index 000000000..dd1041532 --- /dev/null +++ b/app/assets/stylesheets/atoms/colors.scss @@ -0,0 +1,24 @@ +@mixin color($color) { + color: $color; +} + +@mixin color-with-state($base-color, $states: (), $property: color) { + #{$property}: $base-color; + + @each $state, $color in $states { + &:#{$state} { + #{$property}: $color; + } + } +} + +%color-base { @include color($color--base); } +%acts-as-link { + &:hover, &:active { text-decoration: underline; } + @include color-with-state($link__color, ( + hover: $link__color--hover, + active: $link__color--pressed, + 'visited:active': $link__color--pressed, + visited: $link__color--visited, + )); +} diff --git a/app/assets/stylesheets/atoms/fonts.scss b/app/assets/stylesheets/atoms/fonts.scss new file mode 100644 index 000000000..16d183a3f --- /dev/null +++ b/app/assets/stylesheets/atoms/fonts.scss @@ -0,0 +1,32 @@ +@mixin text($form-factor, $weight: normal) { + font-family: 'MuseoSans'; + @if($weight != null) { + @include font-weight($weight); + } + + @include form-factor($form-factor); +} + +@mixin text--alt($form-factor, $weight: normal) { + font-family: 'MuseoSlab'; + @if($weight != null) { + @include font-weight($weight); + } + + @include form-factor($form-factor); +} + +@mixin text--icon($form-factor, $weight: normal) { + font-family: 'FontAwesome'; + font-weight: weight($weight); + + @include form-factor($form-factor); +} + +@mixin line-height($line-height) { + line-height: $line-height; +} + +@mixin font-weight($weight) { + font-weight: weight($weight); +} diff --git a/app/assets/stylesheets/helpers/_flexbox.scss b/app/assets/stylesheets/helpers/_flexbox.scss new file mode 100644 index 000000000..05d4d8a43 --- /dev/null +++ b/app/assets/stylesheets/helpers/_flexbox.scss @@ -0,0 +1,80 @@ +//-------------------------------------------------- +// columns +//-------------------------------------------------- +// N.B. flex-basis doesn't work properly in IE11, so be careful using these classes! + +.flex-1-half { flex: 0 1 50%; } + +.flex-1-third { flex: 0 1 33%; } +.flex-2-thirds { flex: 0 1 66%; } + +.flex-1-quarter { flex: 0 1 25%; } +.flex-2-quarters { flex: 0 1 50%; } +.flex-3-quarters { flex: 0 1 75%; } + +.flex-1-fith { flex: 0 1 20%; } +.flex-2-fiths { flex: 0 1 40%; } +.flex-3-fiths { flex: 0 1 60%; } +.flex-4-fiths { flex: 0 1 80%; } + +.flex-1-sixth { flex: 0 1 16%; } +.flex-2-sixths { flex: 0 1 33%; } +.flex-3-sixths { flex: 0 1 50%; } +.flex-4-sixths { flex: 0 1 66%; } +.flex-5-sixths { flex: 0 1 83%; } + +//-------------------------------------------------- +// columns with gutters +//-------------------------------------------------- +.flex-1-third-gutters { flex: 0 1 30%; } +.flex-2-thirds-gutters { flex: 0 1 63%; } + +//-------------------------------------------------- +// classes +//-------------------------------------------------- +.flex { @include flex(); } +.flex-inline { @include flex-inline(); } +.flex-row { @include flex-row(); } +.flex-row-reverse { @include flex-row-reverse(); } +.flex-column { @include flex-column(); } +.flex-column-reverse { @include flex-column-reverse(); } +.flex-nowrap { @include flex-nowrap(); } +.flex-wrap { @include flex-wrap(); } +.flex-wrap-reverse { @include flex-wrap-reverse(); } +.flex-1 { @include flex-1(); } +.flex-grow { @include flex-grow(); } +.flex-no-grow { @include flex-no-grow(); } +.flex-shrink { @include flex-shrink(); } +.flex-no-shrink { @include flex-no-shrink(); } +.flex-h-start { @include flex-h-start(); } +.flex-h-center { @include flex-h-center(); } +.flex-h-between { @include flex-h-between(); } +.flex-h-around { @include flex-h-around(); } +.flex-h-end { @include flex-h-end(); } +.flex-hs-start {@include flex-hs-start(); } +.flex-hs-center { @include flex-hs-center(); } +.flex-hs-between { @include flex-hs-between(); } +.flex-hs-around { @include flex-hs-around(); } +.flex-hs-end { @include flex-hs-end(); } +.flex-v-start { @include flex-v-start(); } +.flex-v-end { @include flex-v-end(); } +.flex-v-center {@include flex-v-center(); } +.flex-v-baseline { @include flex-v-baseline(); } +.flex-v-stretch { @include flex-v-stretch(); } +.flex-vs-start { @include flex-vs-start(); } +.flex-vs-center { @include flex-vs-center(); } +.flex-vs-baseline { @include flex-vs-baseline(); } +.flex-vs-stretch { @include flex-vs-stretch(); } +.flex-vs-end { @include flex-vs-end(); } +.flex-vm-start { @include flex-vm-start(); } +.flex-vm-end { @include flex-vm-end(); } +.flex-vm-center { @include flex-vm-center(); } +.flex-vm-between { @include flex-vm-between(); } +.flex-vm-around { @include flex-vm-around(); } +.flex-vm-stretch { @include flex-vm-stretch(); } + +.flex-center { + @include flex(); + @include flex-h-center(); + @include flex-v-center(); +} \ No newline at end of file diff --git a/app/assets/stylesheets/organisms/stats-card.scss b/app/assets/stylesheets/organisms/stats-card.scss new file mode 100644 index 000000000..4f72250d4 --- /dev/null +++ b/app/assets/stylesheets/organisms/stats-card.scss @@ -0,0 +1,133 @@ +//-------------------------------------------------- +// variables +//-------------------------------------------------- +$stat-colour-land: $brown; +$stat-colour-land-light: lighten($brown, 15%); +$stat-colour-marine: $blue--light; +$stat-colour-marine-light: lighten($blue--light, 15%); + +//-------------------------------------------------- +// mixins +//-------------------------------------------------- +@mixin card-row() { + display: flex; + @include flex-column; + @include flex-wrap; + + @include breakpoint($small){ + @include flex-row; + @include flex-nowrap; + @include flex-h-between; + } +} + +@mixin card-element() { + margin: rem-calc(0 0 10 0); + width: 30%; + + &:last-child { + @include breakpoint($small) { margin-right: auto; } + } +} + +@mixin card-infographic($size, $bg-color: $grey-100, $fill-color: $green) { + @include flex-h-start(); + background-color: $bg-color; + width: rem-calc($size); height: rem-calc($size); + + position: relative; + + .card__cube-inner { + background-color: $fill-color; + + position: absolute; + top: 0; + left: 0; + } +} + +@mixin card-number($color: $grey-66, $font-size: medium, $font-weight: bold) { + @include text--alt($font-size, $font-weight); + color: $color; + display: block; +} + +//-------------------------------------------------- +// classes +//-------------------------------------------------- +.card { + +//-------------------------------------------------- +// card--stats used on country page +//-------------------------------------------------- + &--stats { + @include text(body, thin); + color: $grey-77; + padding: rem-calc(30 0); + + &:not(:last-child) { + border-bottom: dashed rem-calc(1) $grey-33; + } + + .card { + &--land { + + } + + &__body { + @include flex-h-start; + @include flex-nowrap; + + display: flex; + } + + &__column-1 { + margin-right: rem-calc(16); + } + + &__row { + @include card-row(); + } + + &__element { + @include card-element(); + + &--push-right { + margin-right: rem-calc(40); + } + } + + &__cube--land { + @include card-infographic(100, $bg-color: $grey-15, $fill-color: $stat-colour-land); + } + + &__cube--marine { + @include card-infographic(100, $bg-color: $grey-15, $fill-color: $stat-colour-marine); + } + + &__number--land { + @include card-number($stat-colour-land); + } + + &__number--land-light { + @include card-number($stat-colour-land-light); + } + + &__number--marine { + @include card-number($stat-colour-marine); + } + + &__number--marine-light { + @include card-number($stat-colour-marine-light); + } + + &__number--large-land { + @include card-number($stat-colour-land, xxlarge, bold); + } + + &__number--large-marine { + @include card-number($stat-colour-marine, xxlarge, bold); + } + } + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/resources/mixins/_flexbox.scss b/app/assets/stylesheets/resources/mixins/_flexbox.scss new file mode 100644 index 000000000..74c10b4f7 --- /dev/null +++ b/app/assets/stylesheets/resources/mixins/_flexbox.scss @@ -0,0 +1,87 @@ +// This file has been added for all new work - it will eventually replace the old flexbox file once the rest of the styles have been updated. +// The rest of the styling couldn't be updated to use this file yet because it hasn't been merged into develop. + +//-------------------------------------------------- +// flexbox +//-------------------------------------------------- +@mixin flex { display: flex; } +@mixin flex-inline { display: inline-flex; } + +@mixin flex-row { flex-direction: row; } +@mixin flex-row-reverse { flex-direction: row-reverse; } +@mixin flex-column { flex-direction: column; } +@mixin flex-column-reverse { flex-direction: column-reverse; } + +@mixin flex-nowrap { flex-wrap: nowrap; } +@mixin flex-wrap { flex-wrap: wrap; } +@mixin flex-wrap-reverse { flex-wrap: wrap-reverse; } + +@mixin flex-1 { flex: 1; } + +//-------------------------------------------------- +// flex size +//-------------------------------------------------- +@mixin flex-grow { flex-grow: 1; } +@mixin flex-no-grow { flex-grow: 0; } +@mixin flex-shrink { flex-shrink: 1; } +@mixin flex-no-shrink { flex-shrink: 0; } + +//-------------------------------------------------- +// horizontal alignment +//-------------------------------------------------- +@mixin flex-h-start { justify-content: flex-start; } +@mixin flex-h-center { justify-content: center; } +@mixin flex-h-between { justify-content: space-between; } +@mixin flex-h-around { justify-content: space-around; } + +@mixin flex-h-end { + justify-content: flex-end; + margin-left: auto; +} + +//-------------------------------------------------- +// horizontal alignment of self +//-------------------------------------------------- +@mixin flex-hs-start { + justify-self: flex-start; + margin-right: auto; +} +@mixin flex-hs-center { justify-self: center; } +@mixin flex-hs-between { justify-self: space-between; } +@mixin flex-hs-around { justify-self: space-around; } +@mixin flex-hs-end { + justify-self: flex-end; + margin-left: auto; +} + +//-------------------------------------------------- +// vertical alignment +//-------------------------------------------------- +@mixin flex-v-start { align-items: flex-start; } +@mixin flex-v-end { align-items: flex-end; } +@mixin flex-v-center {align-items: center; } +@mixin flex-v-baseline { align-items: baseline; } +@mixin flex-v-stretch { align-items: stretch; } + +//-------------------------------------------------- +// vertical alignment of self +//-------------------------------------------------- +@mixin flex-vs-start { align-self: flex-start; } +@mixin flex-vs-center {align-self: center; } +@mixin flex-vs-baseline { align-self: baseline; } +@mixin flex-vs-stretch { align-self: stretch; } + +@mixin flex-vs-end { + align-self: flex-end; + margin-top: auto; +} + +//-------------------------------------------------- +// vertical alignment of multiple items +//-------------------------------------------------- +@mixin flex-vm-start { align-content: flex-start; } +@mixin flex-vm-end { align-content: flex-end; } +@mixin flex-vm-center {align-content: center; } +@mixin flex-vm-between { align-content: space-between; } +@mixin flex-vm-around { align-content: space-around; } +@mixin flex-vm-stretch { align-content: stretch; } diff --git a/app/assets/stylesheets/resources/mixins/_rem-calc.scss b/app/assets/stylesheets/resources/mixins/_rem-calc.scss new file mode 100644 index 000000000..31687ef1a --- /dev/null +++ b/app/assets/stylesheets/resources/mixins/_rem-calc.scss @@ -0,0 +1,152 @@ +// Foundation for Sites by ZURB +// foundation.zurb.com +// Licensed under MIT Open Source + +//// +/// @group functions +//// + +$global-font-size: 100% !default; + +/// Removes the unit (e.g. px, em, rem) from a value, returning the number only. +/// +/// @param {Number} $num - Number to strip unit from. +/// +/// @returns {Number} The same number, sans unit. +@function strip-unit($num) { + @return $num / ($num * 0 + 1); +} + +/// Converts one or more pixel values into matching rem values. +/// +/// @param {Number|List} $values - One or more values to convert. Be sure to separate them with spaces and not commas. If you need to convert a comma-separated list, wrap the list in parentheses. +/// @param {Number} $base [null] - The base value to use when calculating the `rem`. If you're using Foundation out of the box, this is 16px. If this parameter is `null`, the function will reference the `$base-font-size` variable as the base. +/// +/// @returns {List} A list of converted values. +@function rem-calc($values, $base: null) { + $rem-values: (); + $count: length($values); + + // If no base is defined, defer to the global font size + @if $base == null { + $base: $global-font-size; + } + + // If the base font size is a %, then multiply it by 16px + // This is because 100% font size = 16px in most all browsers + @if unit($base) == '%' { + $base: ($base / 100%) * 16px; + } + + // Using rem as base allows correct scaling + @if unit($base) == 'rem' { + $base: strip-unit($base) * 16px; + } + + @if $count == 1 { + @return -zf-to-rem($values, $base); + } + + @for $i from 1 through $count { + $rem-values: append($rem-values, -zf-to-rem(nth($values, $i), $base)); + } + + @return $rem-values; +} + +// Converts a unitless, pixel, or rem value to em, for use in breakpoints. +@function -zf-bp-to-em($value) { + // Pixel and unitless values are converted to rems + @if unit($value) == 'px' or unitless($value) { + $value: rem-calc($value, $base: 16px); + } + + // Then the value is converted to ems + @return strip-unit($value) * 1em; +} + +/// Converts a pixel value to matching rem value. *Any* value passed, regardless of unit, is assumed to be a pixel value. By default, the base pixel value used to calculate the rem value is taken from the `$global-font-size` variable. +/// @access private +/// +/// @param {Number} $value - Pixel value to convert. +/// @param {Number} $base [null] - Base for pixel conversion. +/// +/// @returns {Number} A number in rems, calculated based on the given value and the base pixel value. rem values are passed through as is. +@function -zf-to-rem($value, $base: null) { + // Check if the value is a number + @if type-of($value) != 'number' { + @warn inspect($value) + ' was passed to rem-calc(), which is not a number.'; + @return $value; + } + + // Transform em into rem if someone hands over 'em's + @if unit($value) == 'em' { + $value: strip-unit($value) * 1rem; + } + + // Calculate rem if units for $value is not rem or em + @if unit($value) != 'rem' { + $value: strip-unit($value) / strip-unit($base) * 1rem; + } + + // Turn 0rem into 0 + @if $value == 0rem { + $value: 0; + } + + @return $value; +} + +/// Converts a pixel, percentage, rem or em value to a unitless value based on a given font size. Ideal for working out unitless line heights. +/// +/// @param {Number} $value - Value to convert to a unitless line height +/// @param {Number} $base - The font size to use to work out the line height - defaults to $global-font-size +/// +/// @return {Number} - Unitless number +@function unitless-calc($value, $base: null) { + + // If no base is defined, defer to the global font size + @if $base == null { + $base: $global-font-size; + } + + // First, lets convert our $base to pixels + + // If the base font size is a %, then multiply it by 16px + @if unit($base) == '%' { + $base: ($base / 100%) * 16px; + } + + @if unit($base) == 'rem' { + $base: strip-unit($base) * 16px; + } + + @if unit($base) == 'em' { + $base: strip-unit($base) * 16px; + } + + // Now lets convert our value to pixels too + @if unit($value) == '%' { + $value: ($value / 100%) * $base; + } + + @if unit($value) == 'rem' { + $value: strip-unit($value) * $base; + } + + @if unit($value) == 'em' { + $value: strip-unit($value) * $base; + } + + // 'px' + @if unit($value) == 'px' { + @return strip-unit($value) / strip-unit($base); + } + + // assume that line-heights greatern then 10 are meant to be absolute in 'px' + @if unitless($value) and ($value > 10) { + @return $value / strip-unit($base); + } + + @return $value; +} \ No newline at end of file diff --git a/app/assets/stylesheets/utilities/_flexbox.scss b/app/assets/stylesheets/utilities/_flexbox.scss new file mode 100644 index 000000000..6fa026c10 --- /dev/null +++ b/app/assets/stylesheets/utilities/_flexbox.scss @@ -0,0 +1,394 @@ +// Flexbox Mixins +// http://philipwalton.github.io/solved-by-flexbox/ +// https://github.com/philipwalton/solved-by-flexbox +// +// Copyright (c) 2013 Brian Franco +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to +// permit persons to whom the Software is furnished to do so, subject to +// the following conditions: +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY +// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +// +// This is a set of mixins for those who want to mess around with flexbox +// using the native support of current browsers. For full support table +// check: http://caniuse.com/flexbox +// +// Basically this will use: +// +// * Fallback, old syntax (IE10, mobile webkit browsers - no wrapping) +// * Final standards syntax (FF, Safari, Chrome, IE11, Opera) +// +// This was inspired by: +// +// * http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ +// +// With help from: +// +// * http://w3.org/tr/css3-flexbox/ +// * http://the-echoplex.net/flexyboxes/ +// * http://msdn.microsoft.com/en-us/library/ie/hh772069(v=vs.85).aspx +// * http://css-tricks.com/using-flexbox/ +// * http://dev.opera.com/articles/view/advanced-cross-browser-flexbox/ +// * https://developer.mozilla.org/en-us/docs/web/guide/css/flexible_boxes + +//---------------------------------------------------------------------- + +// Flexbox Containers +// +// The 'flex' value causes an element to generate a block-level flex +// container box. +// +// The 'inline-flex' value causes an element to generate a inline-level +// flex container box. +// +// display: flex | inline-flex +// +// http://w3.org/tr/css3-flexbox/#flex-containers +// +// (Placeholder selectors for each type, for those who rather @extend) + +@mixin flexbox { + display: -webkit-box; + display: -webkit-flex; + display: -moz-flex; + display: -ms-flexbox; + display: flex; +} + +%flexbox { @include flexbox; } + +//---------------------------------- + +@mixin inline-flex { + display: -webkit-inline-box; + display: -webkit-inline-flex; + display: -moz-inline-flex; + display: -ms-inline-flexbox; + display: inline-flex; +} + +%inline-flex { @include inline-flex; } + +//---------------------------------------------------------------------- + +// Flexbox Direction +// +// The 'flex-direction' property specifies how flex items are placed in +// the flex container, by setting the direction of the flex container's +// main axis. This determines the direction that flex items are laid out in. +// +// Values: row | row-reverse | column | column-reverse +// Default: row +// +// http://w3.org/tr/css3-flexbox/#flex-direction-property + +@mixin flex-direction($value: row) { + @if $value == row-reverse { + -webkit-box-direction: reverse; + -webkit-box-orient: horizontal; + } @else if $value == column { + -webkit-box-direction: normal; + -webkit-box-orient: vertical; + } @else if $value == column-reverse { + -webkit-box-direction: reverse; + -webkit-box-orient: vertical; + } @else { + -webkit-box-direction: normal; + -webkit-box-orient: horizontal; + } + -webkit-flex-direction: $value; + -moz-flex-direction: $value; + -ms-flex-direction: $value; + flex-direction: $value; +} + // Shorter version: + @mixin flex-dir($args...) { @include flex-direction($args...); } + +//---------------------------------------------------------------------- + +// Flexbox Wrap +// +// The 'flex-wrap' property controls whether the flex container is single-line +// or multi-line, and the direction of the cross-axis, which determines +// the direction new lines are stacked in. +// +// Values: nowrap | wrap | wrap-reverse +// Default: nowrap +// +// http://w3.org/tr/css3-flexbox/#flex-wrap-property + +@mixin flex-wrap($value: nowrap) { + // No Webkit Box fallback. + -webkit-flex-wrap: $value; + -moz-flex-wrap: $value; + @if $value == nowrap { + -ms-flex-wrap: none; + } @else { + -ms-flex-wrap: $value; + } + flex-wrap: $value; +} + +//---------------------------------------------------------------------- + +// Flexbox Flow (shorthand) +// +// The 'flex-flow' property is a shorthand for setting the 'flex-direction' +// and 'flex-wrap' properties, which together define the flex container's +// main and cross axes. +// +// Values: | +// Default: row nowrap +// +// http://w3.org/tr/css3-flexbox/#flex-flow-property + +@mixin flex-flow($values: (row nowrap)) { + // No Webkit Box fallback. + -webkit-flex-flow: $values; + -moz-flex-flow: $values; + -ms-flex-flow: $values; + flex-flow: $values; +} + +//---------------------------------------------------------------------- + +// Flexbox Order +// +// The 'order' property controls the order in which flex items appear within +// their flex container, by assigning them to ordinal groups. +// +// Default: 0 +// +// http://w3.org/tr/css3-flexbox/#order-property + +@mixin order($int: 0) { + -webkit-box-ordinal-group: $int + 1; + -webkit-order: $int; + -moz-order: $int; + -ms-flex-order: $int; + order: $int; +} + +//---------------------------------------------------------------------- + +// Flexbox Grow +// +// The 'flex-grow' property sets the flex grow factor. Negative numbers +// are invalid. +// +// Default: 0 +// +// http://w3.org/tr/css3-flexbox/#flex-grow-property + +@mixin flex-grow($int: 0) { + -webkit-box-flex: $int; + -webkit-flex-grow: $int; + -moz-flex-grow: $int; + -ms-flex-positive: $int; + flex-grow: $int; +} + +//---------------------------------------------------------------------- + +// Flexbox Shrink +// +// The 'flex-shrink' property sets the flex shrink factor. Negative numbers +// are invalid. +// +// Default: 1 +// +// http://w3.org/tr/css3-flexbox/#flex-shrink-property + +@mixin flex-shrink($int: 1) { + -webkit-flex-shrink: $int; + -moz-flex-shrink: $int; + -ms-flex-negative: $int; + flex-shrink: $int; +} + +//---------------------------------------------------------------------- + +// Flexbox Basis +// +// The 'flex-basis' property sets the flex basis. Negative lengths are invalid. +// +// Values: Like "width" +// Default: auto +// +// http://www.w3.org/TR/css3-flexbox/#flex-basis-property + +@mixin flex-basis($value: auto) { + -webkit-flex-basis: $value; + -moz-flex-basis: $value; + -ms-flex-preferred-size: $value; + flex-basis: $value; +} + +//---------------------------------------------------------------------- + +// Flexbox "Flex" (shorthand) +// +// The 'flex' property specifies the components of a flexible length: the +// flex grow factor and flex shrink factor, and the flex basis. When an +// element is a flex item, 'flex' is consulted instead of the main size +// property to determine the main size of the element. If an element is +// not a flex item, 'flex' has no effect. +// +// Values: none | || +// Default: See individual properties (1 1 0). +// +// http://w3.org/tr/css3-flexbox/#flex-property + +@mixin flex($fg: 1, $fs: null, $fb: null) { + + // Set a variable to be used by box-flex properties + $fg-boxflex: $fg; + + // Box-Flex only supports a flex-grow value so let's grab the + // first item in the list and just return that. + @if type-of($fg) == 'list' { + $fg-boxflex: nth($fg, 1); + } + + -webkit-box-flex: $fg-boxflex; + -webkit-flex: $fg $fs $fb; + -moz-box-flex: $fg-boxflex; + -moz-flex: $fg $fs $fb; + -ms-flex: $fg $fs $fb; + flex: $fg $fs $fb; +} + +//---------------------------------------------------------------------- + +// Flexbox Justify Content +// +// The 'justify-content' property aligns flex items along the main axis +// of the current line of the flex container. This is done after any flexible +// lengths and any auto margins have been resolved. Typically it helps distribute +// extra free space leftover when either all the flex items on a line are +// inflexible, or are flexible but have reached their maximum size. It also +// exerts some control over the alignment of items when they overflow the line. +// +// Note: 'space-*' values not supported in older syntaxes. +// +// Values: flex-start | flex-end | center | space-between | space-around +// Default: flex-start +// +// http://w3.org/tr/css3-flexbox/#justify-content-property + +@mixin justify-content($value: flex-start) { + @if $value == flex-start { + -webkit-box-pack: start; + -ms-flex-pack: start; + } @else if $value == flex-end { + -webkit-box-pack: end; + -ms-flex-pack: end; + } @else if $value == space-between { + -webkit-box-pack: justify; + -ms-flex-pack: justify; + } @else if $value == space-around { + -ms-flex-pack: distribute; + } @else { + -webkit-box-pack: $value; + -ms-flex-pack: $value; + } + -webkit-justify-content: $value; + -moz-justify-content: $value; + justify-content: $value; +} + // Shorter version: + @mixin flex-just($args...) { @include justify-content($args...); } + +//---------------------------------------------------------------------- + +// Flexbox Align Items +// +// Flex items can be aligned in the cross axis of the current line of the +// flex container, similar to 'justify-content' but in the perpendicular +// direction. 'align-items' sets the default alignment for all of the flex +// container's items, including anonymous flex items. 'align-self' allows +// this default alignment to be overridden for individual flex items. (For +// anonymous flex items, 'align-self' always matches the value of 'align-items' +// on their associated flex container.) +// +// Values: flex-start | flex-end | center | baseline | stretch +// Default: stretch +// +// http://w3.org/tr/css3-flexbox/#align-items-property + +@mixin align-items($value: stretch) { + @if $value == flex-start { + -webkit-box-align: start; + -ms-flex-align: start; + } @else if $value == flex-end { + -webkit-box-align: end; + -ms-flex-align: end; + } @else { + -webkit-box-align: $value; + -ms-flex-align: $value; + } + -webkit-align-items: $value; + -moz-align-items: $value; + align-items: $value; +} + +//---------------------------------- + +// Flexbox Align Self +// +// Values: auto | flex-start | flex-end | center | baseline | stretch +// Default: auto + +@mixin align-self($value: auto) { + // No Webkit Box Fallback. + -webkit-align-self: $value; + -moz-align-self: $value; + @if $value == flex-start { + -ms-flex-item-align: start; + } @else if $value == flex-end { + -ms-flex-item-align: end; + } @else { + -ms-flex-item-align: $value; + } + align-self: $value; +} + +//---------------------------------------------------------------------- + +// Flexbox Align Content +// +// The 'align-content' property aligns a flex container's lines within the +// flex container when there is extra space in the cross-axis, similar to +// how 'justify-content' aligns individual items within the main-axis. Note, +// this property has no effect when the flexbox has only a single line. +// +// Values: flex-start | flex-end | center | space-between | space-around | stretch +// Default: stretch +// +// http://w3.org/tr/css3-flexbox/#align-content-property + +@mixin align-content($value: stretch) { + // No Webkit Box Fallback. + -webkit-align-content: $value; + -moz-align-content: $value; + @if $value == flex-start { + -ms-flex-line-pack: start; + } @else if $value == flex-end { + -ms-flex-line-pack: end; + } @else { + -ms-flex-line-pack: $value; + } + align-content: $value; +} \ No newline at end of file diff --git a/app/assets/stylesheets/utilities/responsive.scss b/app/assets/stylesheets/utilities/responsive.scss new file mode 100644 index 000000000..baca993bd --- /dev/null +++ b/app/assets/stylesheets/utilities/responsive.scss @@ -0,0 +1,29 @@ +//keep old responsive mixins with old breakpoints to avoid breaking styles across the existing site + +@mixin only-mobile { + @media only screen and (max-width: 768px) { + @content; + } +} + +@mixin only-desktop { + @media only screen and (min-width: 768px) { + @content; + } +} + +//---------------------------------------- +// breakpoint variables +//---------------------------------------- +$small: rem-calc(628); //mobile +$medium: rem-calc(763); //tablet portrait +$large: rem-calc(1024); //tablet landscape + +//---------------------------------------- +// responsive mixins +//---------------------------------------- +@mixin breakpoint($breakpoint){ + @media only screen and (min-width: $breakpoint + 1) { + @content; + } +} \ No newline at end of file diff --git a/app/assets/stylesheets/variables/colors.scss b/app/assets/stylesheets/variables/colors.scss new file mode 100644 index 000000000..31c9c2876 --- /dev/null +++ b/app/assets/stylesheets/variables/colors.scss @@ -0,0 +1,275 @@ +$dark-blue: rgb(43, 49, 70); +$grey-blue: #848184; +$blue: #317fce; + +// green palette +$green: #71a32b; +$green--dark: #699728; +$green--darker: #415519; +$green--light: #83af46; +$green--lighter: #e3edd5; +$brown: #702412; +$white: #ffffff; + +// blue palette +$blue: #1d62b1; +$blue--dark: #1a589f; +$blue--light: #3a76bb; +$blue--lighter: #d2e0ef; + +//used on marine insights page +$blue--marine-1: #bfe5e9; +$blue--marine-2: #A1D8DE; +$blue--marine-3: #90BDC4; +$blue--marine-4: #729099; +$blue--marine-5: #444955; + +// red palette +$red: #d80000; +$red--dark: #c20000; +$red--light: #de2626; +$red--lighter: #f7cccc; + +// orange palette +$orange: #ef5833; +$orange--dark: #de522f; +$orange--lighter: #f16e4d; +$orange--lighest: #F5A623; //highlight color on the marine page +$brown-bg: #fcded6; +$yellow: #ffe600; + +// grey palette +$grey-100: #333333; +$grey-77: #666666; +$grey-55: #8f8f8f; +$grey-44: #4a4a4a; +$grey-33: #bbbbbb; +$grey-15: #dfe0e1; +$grey-5: #f2f2f2; +$grey-4: #d8d8d8; +$grey-3: #f8f8f8; + +// palettes +$palettes: +$green $green--dark $green--light $brown $white, +$blue $blue--dark $blue--light $blue--lighter, +$red $red--dark $red--light $red--lighter, +$orange $orange--dark $orange--lighter $brown-bg $yellow, +$grey-100 $grey-77 $grey-55 $grey-33 $grey-15 $grey-5 $grey-3 !default; + +// atoms/leaflet-control +$leaflet-control__color: $green !default; +$leaflet-control__bg-color: $white !default; +$leaflet-control__disabled-color: $grey-5 !default; +$leaflet-control__border: $grey-15 !default; +$leaflet-control__hover-color: $grey-5 !default; + +// atoms/buttons +$button--hide-color: $green !default; +$button--hide-border-color: $grey-4; +$button--grey-border-color: $grey-4 !default; +$button--grey-text-color: $green !default; +$button--fullscreen-text-color: $green !default; +$button--fullscreen-hover-color: $grey-5 !default; +$button--external-color: $green; + +// atoms/colors +$link__color: $green !default; +$link__color--hover: $green--light !default; +$link__color--pressed: $green--dark !default; +$link__color--visited: $green--light !default; + +// molecules/attribute +$attribute-border-color: $grey-4; +$attribute__title-color: $grey-100; +$attribute__value-color: $green; + +// molecules/link-with-icon +$link-with-icon__color: $green !default; +$link-with-icon__bg-color: $white !default; + +// molecules/table +$table-link__color: $green !default; + +// molecules/reference +$reference-link__color: $green !default; +$reference-link-icon__color: $green !default; + +// molecules/big-button +$big-button__color: $white !default; +$big-button__bg-color: $green !default; +$big-button__bg-color--hover: $green--light !default; +$big-button__bg-color--pressed: $green--dark !default; +$big-button__bg-color--visited: $green--light !default; +$big-button__bg-color--disabled: $green--lighter !default; +$big-button-danger__color: $white !default; +$big-button-danger__bg-color: $red !default; +$big-button-danger__bg-color--hover: $red--light !default; +$big-button-danger__bg-color--pressed: $red--dark !default; +$big-button-danger__bg-color--visited: $red--light !default; +$big-button-danger__bg-color--disabled: $red--lighter !default; + +// molecules/horizontal-bar +$horizontal-bar__bg-color: $green !default; +$horizontal-bar-inner__bg-color: $green--darker !default; + +// molecules/dropdown +$dropdown__bg-color: $green--dark !default; +$dropdown-inner__border-top-color: $green !default; +$dropdown-trigger-is-selected__bg-color: $green--dark !default; +$dropdown-element-hover__bg-color: $green !default; + +// molecules/alert +$alert__bg-color: $grey-5 !default; +$alert-warning--color: $orange !default; +$alert-success--color: $green !default; +$alert-info--color: $blue--dark !default; + +// molecules/key +$key__title-color: $grey-100 !default; +$key__title-hover-color: $green !default; +$key__tick-color: $green; + +// molecules/value +$value-number__color: $green !default; +$value-number-alt-color__color: $green--darker !default; + +// molecules/stats +$stats-background-color: $grey-3 !default; +$stats-text-color: $grey-77 !default; +$stats-number-color: $green !default; +$stats-country-color: $green !default; + +// organisms/navbar +$navbar__bg-color: $green !default; +$navbar__bg-color--darker: $green--dark !default; +$navbar-element-dark__bg-color: $green--dark !default; +$navbar-element__color: $white !default; +$navbar-element-hover__bg-color: $green--light !default; +$navbar-element-active__bg-color: $green--dark !default; +$navbar-element-for-search-dropdown-is-active__color: $green !default; +$color--nav-bg: $green; +$color--nav-active-link: $green--dark; +$color--nav-link: $white; +$color--nav-hover-link: $green--dark; +$color--nav-border: $grey-33; + +// organisms/search-result +$search-result-title__color: $green !default; + +// organisms/filter-bar +$filter-bar-value-hover__bg-color: $grey-5 !default; +$filter-bar-value-active__bg-color: $grey-15 !default; + +// organisms/hero +$hero-title__color: $green !default; + +// organisms/fact +$fact-header__color: $grey-100 !default; +$fact-header__border-bottom-color: $grey-33 !default; +$fact-external-link__color: $green !default; + +// organisms/gallery +$gallery-controls__bg-color: $grey-5 !default; +$gallery-current-index__color: $white !default; +$gallery-current-index__bg-color: $green--dark !default; + +// organisms/info-box +$info-box__bg-color: $grey-5 !default; +$info-box-link__color: $green !default; +$info-box-link-icon__color: $green !default; +$info-box-row__border-bottom: $grey-33 !default; +$info-box__icon-color: $blue !default; + +// organisms/footer +$footer-element-with-separator__border-left-color: $green--dark !default; + +//organisms/tabs +$tabs__title-color: $grey-100; +$tabs__title-border-color: $grey-4; + +// organisms/vertical-nav +$vertical-nav-element-selected__color: $green !default; + +// scopes/article +$article-list-index__color: $green !default; + +// molecules/pa-card +$pa-card-border-bottom__color: $grey-4 !default; +$pa-card-detail-border-right__color: $grey-4 !default; +$pa-card-subtitle__color: $grey-44; +$pa-card-text__color: $grey-100; + +$color--base: $grey-77; +$color--base-btn-bg: $green; +$color--base-btn-hover-bg: $green--dark; +$color--base-btn-text: $white; + +$color--bg: $dark-blue; + +$color--leaflet-control: $dark-blue; +$color--leaflet-control-text: $white; +$color--leaflet-control-hover-bg: $white; +$color--leaflet-control-hover-text: $dark-blue; +$color--leaflet-control-border: $white; + +$color--leaflet-cluster-bg: $dark-blue; +$color--leaflet-cluster-border: $white; +$color--leaflet-cluster-text: $white; + + +$color--header-active-link: $grey-33; +$color--header-link: $grey-100; +$color--header-hover-link: $grey-33; + +$color--footer-bg: $dark-blue; +$color--footer: $grey-33; +$color--footer-link: $grey-33; + +$color--project-header-bg: $white; +$color--project-header-border: $grey-15; +$color--project-header-small: $grey-77; +$color--project-item-border: $grey-33; +$color--project-bg: $grey-33; +$color--project-item-bg: $white; +$color--project-dropdown-bg: $grey-33; +$color--project-dropdown-active: $grey-33; + +$color--pa-text: $grey-77; +$color--pa-header: $grey-77; +$color--pa-table-border: $grey-33; +$color--pa-table-attribute: $grey-100; +$color--pa-infographic-bg: $dark-blue; +$color--pa-infographic-text: $white; +$color--pa-infographic-border: $grey-15; + +$color--home-filters-bg: $white; +$color--home-filters-hover-bg: $grey-33; +$color--home-filters-border: $grey-33; +$color--home-filters-child-border: $grey-33; +$color--home-filters-text: $grey-77; + +$color--map-disclaimer-bg: $grey-5; +$color--map-disclaimer-text: $grey-77; + +$color--search-download-bg: $white; +$color--search-download-text: $grey-100; +$color--search-download-border: $grey-33; + +$color--search-bar-bg: $white; +$color--search-input-bg: $grey-33; +$color--search-input-bg-hover: $grey-15; +$color--search-input-text: $grey-100; + +$color--search-header-bg: $white; +$color--search-filters-bg: $white; +$color--search-filters-header: $dark-blue; +$color--search-filters-active: $green--dark; +$color--search-filters-text: $white; +$color--search-switch-border: $white; +$color--search-filters-border: $grey-33; +$color--search-result-small-text: $grey-33; + +$color--download-modal-text: $grey-77; +$color--download-modal-overlay-bg: rgba(0, 0, 0, .5); +$color--download-modal-input-bg: $grey-33; \ No newline at end of file diff --git a/app/assets/stylesheets/variables/fonts.scss b/app/assets/stylesheets/variables/fonts.scss new file mode 100644 index 000000000..93ce9cd4a --- /dev/null +++ b/app/assets/stylesheets/variables/fonts.scss @@ -0,0 +1,69 @@ +$x-thin: 100; +$thin: 300; +$normal: 500; +$bold: 700; +$x-bold: 900; + + +$weights: ( + x-thin: $x-thin, + thin: $thin, + normal: $normal, + bold: $bold, + x-bold: $x-bold +); + +$form-factors: ( + xxxxlarge: ( + font-size: rem-calc(77), line-height: rem-calc(75) + ), + xxxlarge: ( + font-size: rem-calc(64), line-height: rem-calc(64) + ), + xxlarge: ( + font-size: rem-calc(51), line-height: rem-calc(57) + ), + xlarge: ( + font-size: rem-calc(38), line-height: rem-calc(43) + ), + large: ( + font-size: rem-calc(26), line-height: rem-calc(32) + ), + medium: ( + font-size: rem-calc(22), line-height: rem-calc(32) + ), + headline: ( + font-size: rem-calc(20), line-height: rem-calc(27) + ), + body: ( + font-size: rem-calc(16), line-height: rem-calc(21) + ), + small: ( + font-size: rem-calc(13), line-height: rem-calc(21) + ), +); + +@function weight($name) { + @return map-get($weights, $name); +} + +@function form-factor($name, $property: null) { + $form-factor: map-get($form-factors, $name); + + @if($property) { + @return map-get($form-factor, $property); + } @else { + @return $form-factor; + } +} + +@mixin form-factor($name) { + @each $property, $value in form-factor($name) { + #{$property}: #{$value}; + } +} + +// atoms/leaflet-control +$leaflet-control__font-size: form-factor(body, line-height) !default; + +$fontAwesome: normal normal normal 14px/1 FontAwesome; \ No newline at end of file diff --git a/app/models/concerns/geometry_concern.rb b/app/models/concerns/geometry_concern.rb index b6cdfca65..afdb803b0 100644 --- a/app/models/concerns/geometry_concern.rb +++ b/app/models/concerns/geometry_concern.rb @@ -12,14 +12,16 @@ def geometry_columns end def bounds - rgeo_factory = RGeo::Geos.factory srid: 4326 - bounds = RGeo::Cartesian::BoundingBox.new rgeo_factory - bounds.add bounding_box + # rgeo_factory = RGeo::Geos.factory srid: 4326 + # bounds = RGeo::Cartesian::BoundingBox.new rgeo_factory + # bounds.add bounding_box - [ - [bounds.min_y, bounds.min_x], - [bounds.max_y, bounds.max_x] - ] + # [ + # [bounds.min_y, bounds.min_x], + # [bounds.max_y, bounds.max_x] + # ] + + [ [0,0], [0,0] ] end def geojson geo_properties=nil diff --git a/app/views/country/pdf/facts/_coverage_stats.html.erb b/app/views/country/pdf/facts/_coverage_stats.html.erb index 0b9207b54..fea79bb92 100644 --- a/app/views/country/pdf/facts/_coverage_stats.html.erb +++ b/app/views/country/pdf/facts/_coverage_stats.html.erb @@ -9,8 +9,12 @@

Area terrestrial

+
-
+
+
+
+

<%= @presenter.percentage_pa_land_cover.round(2) %>%

coverage @@ -23,6 +27,10 @@

<%= commaify @presenter.land_area %> km2

Total Land Area
+
+

<%= commaify @presenter.land_area %>%

+ 5th National Report Coverage +
diff --git a/app/views/shared/stats/facts/_coverage_stats.html.erb b/app/views/shared/stats/facts/_coverage_stats.html.erb index aa2080193..27c78e3b2 100644 --- a/app/views/shared/stats/facts/_coverage_stats.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats.html.erb @@ -3,115 +3,29 @@ Protected areas coverage (Ref 1 ↓ ) -
-
-
- "/> -

Area terrestrial

-
- -
-
- -
-
-
-

<%= @presenter.percentage_pa_land_cover.round(2) %>%

- coverage -
-
-

<%= commaify @presenter.pa_land_area.round(0) %> km2

- Land Area Protected -
-
-

<%= commaify @presenter.land_area.round(0) %> km2

- Total Land Area -
-
- - <% if has_pame_statistics_for(@presenter, :land) %> -
-
-
-

- - <%= @presenter.pame_statistic.pame_percentage_pa_land_cover.round(2) %>%

- with management effectiveness evaluation -
-
-

<%= commaify @presenter.pame_statistic.pame_pa_land_area %> km2

- Area Assessed -
-
-
- <% end %> -
-
-
+
+ <%= render partial: 'shared/stats/facts/coverage_stats_land' %> -
-
- "/> -

Area marine

-
-
-
- -
-
-
-

<%= @presenter.percentage_pa_marine_cover.round(2) %>%

- coverage -
-
-

<%= commaify @presenter.pa_marine_area.round(0) %> km2

- Marine Area Protected -
-
-

<%= commaify @presenter.marine_area.round(0) %> km2

- Total Marine Area -
-
- - <% if has_pame_statistics_for(@presenter, :marine) %> -
-
-
-

- - <%= @presenter.pame_statistic.pame_percentage_pa_marine_cover.round(2) %>% -

- with management effectiveness evaluation -
-
-

<%= commaify @presenter.pame_statistic.pame_pa_marine_area %> km2

- Area Assessed -
-
-
- <% end %> -
-
-
+ <%= render partial: 'shared/stats/facts/coverage_stats_marine' %>
-

- Warning: These statistics might differ from those reported officially by - countries due to difference in methodologies and datasets used to assess - protected area coverage and differences in the base maps used to measure - terrestrial and marine area of a country or territory. - - <% if is_japan? %> - Download Japan’s fifth national report (pdf). - <% end %> -

- <% if has_restricted_sites? %> -

- Part of the protected areas dataset for <%= @country.name %> is restricted. -

+

+ Warning: These statistics might differ from those reported officially by + countries due to difference in methodologies and datasets used to assess + protected area coverage and differences in the base maps used to measure + terrestrial and marine area of a country or territory. + + <% if is_japan? %> + Download Japan’s fifth national report (pdf). <% end %> -

- Learn how we calculate protected area coverage statistics +

+ <% if has_restricted_sites? %> +

+ Part of the protected areas dataset for <%= @country.name %> is restricted.

+ <% end %> +

+ Learn how we calculate protected area coverage statistics +

diff --git a/app/views/shared/stats/facts/_coverage_stats_land.html.erb b/app/views/shared/stats/facts/_coverage_stats_land.html.erb new file mode 100644 index 000000000..0543f95eb --- /dev/null +++ b/app/views/shared/stats/facts/_coverage_stats_land.html.erb @@ -0,0 +1,62 @@ +
+
+ "/> +

Area terrestrial

+
+ +
+
+
+
+ +
+
+

+ + <%= @presenter.percentage_pa_land_cover.round(2) %>% + + coverage +

+
+ +
+

+ + <%= commaify @presenter.pa_land_area.round(0) %> km2 + + Land Area Protected +

+

+ + <%= commaify @presenter.land_area.round(0) %> km2 + + Total Land Area +

+

+ + <%#= commaify @presenter.percentage_nr_land_cover.round(0) %>XX% + + <%#= @presenter.nr_version %>Xth National Report Coverage +

+
+ + <% if has_pame_statistics_for(@presenter, :land) %> +
+

+ + + <%= @presenter.pame_statistic.pame_percentage_pa_land_cover.round(2) %>% + + with management effectiveness evaluation +

+

+ + <%= commaify @presenter.pame_statistic.pame_pa_land_area %> km2 + + Area Assessed +

+
+ <% end %> +
+
+
\ No newline at end of file diff --git a/app/views/shared/stats/facts/_coverage_stats_marine.html.erb b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb new file mode 100644 index 000000000..7adbed792 --- /dev/null +++ b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb @@ -0,0 +1,62 @@ +
+
+ "/> +

Area marine

+
+ +
+
+
+
+ +
+
+

+ + <%= @presenter.percentage_pa_marine_cover.round(2) %>% + + coverage +

+
+ +
+

+ + <%= commaify @presenter.pa_marine_area.round(0) %> km2 + + Marine Area Protected +

+

+ + <%= commaify @presenter.marine_area.round(0) %> km2 + + Total Marine Area +

+

+ + <%#= commaify @presenter.percentage_nr_marine_cover.round(0) %>XX% + + <%#= @presenter.nr_version %>Xth National Report Coverage +

+
+ + <% if has_pame_statistics_for(@presenter, :marine) %> +
+

+ + + <%= @presenter.pame_statistic.pame_percentage_pa_marine_cover.round(2) %>% + + with management effectiveness evaluation +

+

+ + <%= commaify @presenter.pame_statistic.pame_pa_marine_area %> km2 + + Area Assessed +

+
+ <% end %> +
+
+
\ No newline at end of file diff --git a/db b/db index 7f586c13f..2e23d0c56 160000 --- a/db +++ b/db @@ -1 +1 @@ -Subproject commit 7f586c13fad86e3440ad9f8081b9b76f09c0cdd8 +Subproject commit 2e23d0c561fe92b45c31368dcad98c094cda8f23 From 3f8839447cb91748e2c90d1d3301036eabe1dae4 Mon Sep 17 00:00:00 2001 From: stacytalbot Date: Tue, 30 Jul 2019 14:50:22 +0100 Subject: [PATCH 02/25] Mobile styling --- .../stylesheets/organisms/stats-card.scss | 43 ++--- .../resources/_base-variables.scss | 159 ++++++++++++++++++ .../stats/facts/_coverage_stats_land.html.erb | 4 +- 3 files changed, 178 insertions(+), 28 deletions(-) create mode 100644 app/assets/stylesheets/resources/_base-variables.scss diff --git a/app/assets/stylesheets/organisms/stats-card.scss b/app/assets/stylesheets/organisms/stats-card.scss index 4f72250d4..41f6fea3b 100644 --- a/app/assets/stylesheets/organisms/stats-card.scss +++ b/app/assets/stylesheets/organisms/stats-card.scss @@ -9,30 +9,11 @@ $stat-colour-marine-light: lighten($blue--light, 15%); //-------------------------------------------------- // mixins //-------------------------------------------------- -@mixin card-row() { - display: flex; - @include flex-column; - @include flex-wrap; - - @include breakpoint($small){ - @include flex-row; - @include flex-nowrap; - @include flex-h-between; - } -} - -@mixin card-element() { - margin: rem-calc(0 0 10 0); - width: 30%; - - &:last-child { - @include breakpoint($small) { margin-right: auto; } - } -} - @mixin card-infographic($size, $bg-color: $grey-100, $fill-color: $green) { @include flex-h-start(); + @include flex-no-shrink(); background-color: $bg-color; + margin-bottom: rem-calc(16); width: rem-calc($size); height: rem-calc($size); position: relative; @@ -76,7 +57,8 @@ $stat-colour-marine-light: lighten($blue--light, 15%); &__body { @include flex-h-start; - @include flex-nowrap; + @include flex-wrap; + @include responsive-styles(flex-wrap, wrap, wrap, nowrap); display: flex; } @@ -86,14 +68,23 @@ $stat-colour-marine-light: lighten($blue--light, 15%); } &__row { - @include card-row(); + display: flex; + @include flex-column; + @include flex-wrap; + + @include breakpoint($small){ + @include flex-row; + @include flex-nowrap; + @include flex-h-between; + } } &__element { - @include card-element(); + @include responsive-styles(width, 100%, 30%, 30%); + margin: rem-calc(0 0 10 0); - &--push-right { - margin-right: rem-calc(40); + &:last-child { + @include breakpoint($small) { margin-right: auto; } } } diff --git a/app/assets/stylesheets/resources/_base-variables.scss b/app/assets/stylesheets/resources/_base-variables.scss new file mode 100644 index 000000000..7beec773d --- /dev/null +++ b/app/assets/stylesheets/resources/_base-variables.scss @@ -0,0 +1,159 @@ +//-------------------------------------------------- +// variables +//-------------------------------------------------- +// - borders +// - colours +// - buttons +// - shadows +// - fonts +// - breakpoints +// - z-indices +// - dimensions +// - padding +// - tables +// - topbars and footers +// - branding + +//-------------------------------------------------- +// borders +//-------------------------------------------------- +// $border-width-thin: rem-calc(1); +// $border-width-regular: rem-calc(2); + +// $border-thin: solid $border-width-thin; +// $border-regular: solid $border-width-regular; + +//-------------------------------------------------- +// colours +//-------------------------------------------------- +// $white: #ffffff; +// $black: #000000; + +// $grey-light: #e1e1e1; +// $grey: #bdbcbc; + +// $blue-xdark: #002034; +// $blue-dark: #002944; +// $blue: #033250; +// $blue-light: #2B678D; +// $blue-grey: #264152; + +// $green: #71BE63; + +// $primary: $blue-dark; + +// $accent-light: lighten($green, 15%); +// $accent: $green; + +//-------------------------------------------------- +// buttons +//-------------------------------------------------- +// $button-radius: 2em; +// $button-font-size: rem-calc(25); +// $button-default-color: $grey; + +// $button-padding-small: rem-calc(12 15); +// $button-padding-medium: rem-calc(20 30); + +//-------------------------------------------------- +// shadows +//-------------------------------------------------- +// $shadow-light: rem-calc(0 1 2 1) rgba($black, 0.3); +// $shadow-dark: rem-calc(2 3 3 2) rgba($black, 0.5); + +//-------------------------------------------------- +// fonts +//-------------------------------------------------- +// $body-font: 'Open Sans', sans-serif; +// $body-font-color: $black; + +// $thin: 100; +// $light: 300; +// $regular: 400; +// $bold: 500; +// $semi-bold: 600; +// $bolder: 700; + +// $line-height-headings: 1.25; +// $line-height-p: 1.3; + +//-------------------------------------------------- +// breakpoints +//-------------------------------------------------- +// must be in px not rem! +$small: 720; +$medium: 1024; //ipad +$large: 1440; + +@mixin responsive-styles ($property, $mobile, $tablet, $laptop) { + #{$property}: $mobile; + + @include breakpoint($small) { #{$property}: $tablet; } + @include breakpoint($medium) { #{$property}: $laptop; } +} + +//-------------------------------------------------- +// z-indices +//-------------------------------------------------- +// $z-100: 100; +// $z-200: 200; +// $z-300: 300; + +//-------------------------------------------------- +// padding +//-------------------------------------------------- +// $gutter-small: rem-calc(16); +// $gutter-medium: rem-calc(24); +// $gutter-large: rem-calc(32); + +// $container-width-small: rem-calc(600); +// $container-width-medium: rem-calc(1120); +// $container-width-large: rem-calc(800); + +// $page-padding-top-small: rem-calc(16); +// $page-padding-top-medium: rem-calc(24); +// $page-padding-top-large: rem-calc(100); + +// $page-padding-bottom-small: rem-calc(32); +// $page-padding-bottom-medium: rem-calc(60); +// $page-padding-bottom-large: rem-calc(80); + +// $section-padding-top-small: rem-calc(20); +// $section-padding-top-medium: rem-calc(40); +// $section-padding-top-large: rem-calc(40); + +// $section-padding-bottom-small: rem-calc(30); +// $section-padding-bottom-medium: rem-calc(60); +// $section-padding-bottom-large: rem-calc(60); + +// $item-spacing-small: rem-calc(14); +// $item-spacing-medium: rem-calc(20); +// $item-spacing-large: rem-calc(32); +// $item-spacing-xlarge: rem-calc(56); + +//-------------------------------------------------- +// dimensions +//-------------------------------------------------- +// $site-width-min: rem-calc(1440); //13" macbook +// $site-width: $large; +// $site-width-medium-tablet: 80%; +// $site-width-medium-laptop: 78%; +// $site-width-medium-desktop: 62%; + +//-------------------------------------------------- +// tables +//-------------------------------------------------- +// $collapse-table-borders: true; +// $table-cell-padding: rem-calc(8); + +//-------------------------------------------------- +// topbars and footers +//-------------------------------------------------- +// $navbar-height-small: rem-calc(90); +// $topbar-height-laptop: rem-calc(90); +// $topbar-height-desktop: rem-calc(118); + +//-------------------------------------------------- +// branding +//-------------------------------------------------- +// $unepwcmc-w-to-h-ratio: 118/27; diff --git a/app/views/shared/stats/facts/_coverage_stats_land.html.erb b/app/views/shared/stats/facts/_coverage_stats_land.html.erb index 0543f95eb..f0a25ed3c 100644 --- a/app/views/shared/stats/facts/_coverage_stats_land.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats_land.html.erb @@ -9,7 +9,7 @@
-
+

@@ -18,7 +18,7 @@ coverage

- +

From 42f404454006bf847c2005c8c08c4f4bddf8fba9 Mon Sep 17 00:00:00 2001 From: stacytalbot Date: Tue, 30 Jul 2019 15:01:14 +0100 Subject: [PATCH 03/25] Add in link for national report --- app/assets/stylesheets/helpers/_helpers.scss | 148 ++++++++++++++++++ app/helpers/countries_helper.rb | 4 - .../stats/facts/_coverage_stats.html.erb | 6 +- 3 files changed, 149 insertions(+), 9 deletions(-) create mode 100644 app/assets/stylesheets/helpers/_helpers.scss diff --git a/app/assets/stylesheets/helpers/_helpers.scss b/app/assets/stylesheets/helpers/_helpers.scss new file mode 100644 index 000000000..3a20ab483 --- /dev/null +++ b/app/assets/stylesheets/helpers/_helpers.scss @@ -0,0 +1,148 @@ +//-------------------------------------------------- +// helpers +//-------------------------------------------------- +// - fouc +// - font +// - lists +// - display +// - dimensions +// - positioning +// - margin & padding +// - backgrounds +// - user interaction +// - shapes +// +//-------------------------------------------------- +// fouc (flash of unstyled content) +//-------------------------------------------------- +[v-cloak] { display: none; } + +//-------------------------------------------------- +// font +//-------------------------------------------------- +.red { color: red; } +.bold { font-weight: bold; } + +//-------------------------------------------------- +// lists +//-------------------------------------------------- +.ul--inline li { display: inline-block; } + +//-------------------------------------------------- +// display +//-------------------------------------------------- +.block { display: block; } +.inline-block { display: inline-block; } + +.full-height { + height: 100vh; +} + +//-------------------------------------------------- +// positioning +//-------------------------------------------------- +.text-center { text-align: center; } +.text-right { text-align: right; } +.text-left { text-align: left; } + +.relative { position: relative; } + +.bottom-right { + position: absolute; + bottom: 0; + right: 0; +} + +.center-right { + position: absolute; + top: 50%; + right: 0; + + transform: translate(0, -50%); +} + +.top-right { + position: absolute; + top: 0; + right: 0; +} + +//-------------------------------------------------- +// margin & padding +//-------------------------------------------------- +.no-margin--top { margin-top: 0; } +.no-margin { margin: 0; } +.margin-center { margin: 0 auto; } + +.margin-space--right { margin-right: rem-calc(14); } +.margin-space--left { margin-left: rem-calc(14); } + +//-------------------------------------------------- +// backgrounds +//-------------------------------------------------- +$image-placeholder: black; + +.bg-img { + background-color: $image-placeholder; + background-size: cover; + background-position: center; +} + +.bg-image-overlay { + position: relative; + z-index: 1; + + &:before { + background-color: rgba(black, 0.4); + content: ''; + position: absolute; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: -1; + } +} + +//-------------------------------------------------- +// screen overlay +//-------------------------------------------------- +.screen-overlay { + background: rgba(black, 0.5); + + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + z-index: 300; +} + +//-------------------------------------------------- +// user interaction +//-------------------------------------------------- +.no-select { + -webkit-touch-callout: none; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.hover--pointer { + &:hover { + cursor: pointer; + } +} + +.screen-reader { + border: 0; + clip: rect(0 0 0 0); + height: rem-calc(1); + margin: rem-calc(-1); + overflow: hidden; + padding: 0; + position: absolute; + white-space: nowrap; + width: rem-calc(1); +} diff --git a/app/helpers/countries_helper.rb b/app/helpers/countries_helper.rb index b44599664..98000f6f7 100644 --- a/app/helpers/countries_helper.rb +++ b/app/helpers/countries_helper.rb @@ -3,10 +3,6 @@ def is_malaysia? @country && @country.iso_3 == "MYS" end - def is_japan? - @country && @country.iso_3 == "JPN" - end - def has_restricted_sites? restricted_iso3 = ["RUS", "EST", "CHN", "GBR"] diff --git a/app/views/shared/stats/facts/_coverage_stats.html.erb b/app/views/shared/stats/facts/_coverage_stats.html.erb index 27c78e3b2..22f5bd978 100644 --- a/app/views/shared/stats/facts/_coverage_stats.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats.html.erb @@ -14,11 +14,7 @@ Warning: These statistics might differ from those reported officially by countries due to difference in methodologies and datasets used to assess protected area coverage and differences in the base maps used to measure - terrestrial and marine area of a country or territory. - - <% if is_japan? %> - Download Japan’s fifth national report (pdf). - <% end %> + terrestrial and marine area of a country or territory. @FERDI UNCOMMENT THIS LINK WHEN YOU HAVE THE CSV <%#= link_to "Download the country's latest national report (pdf)", @country.name, title: "Dowload the national report for #{@country.name}", class: 'link-with-icon bold' %>

<% if has_restricted_sites? %>

From a463f8113466c1081e31b8149babc4d5a87b1b4c Mon Sep 17 00:00:00 2001 From: stacytalbot Date: Tue, 30 Jul 2019 16:39:31 +0100 Subject: [PATCH 04/25] Update other sections of the page that are affected by the styles that have been changed --- app/assets/stylesheets/application.scss | 6 +- app/assets/stylesheets/helpers/_helpers.scss | 2 + .../stylesheets/organisms/stats-card.scss | 59 +++++++++---------- .../resources/_base-variables.scss | 12 ++-- .../stylesheets/utilities/responsive.scss | 40 ++++++++----- app/assets/stylesheets/variables/colors.scss | 2 - .../country/facts/_pame_statistics.html.erb | 30 ---------- .../stats/facts/_coverage_stats_land.html.erb | 14 ++--- .../facts/_coverage_stats_marine.html.erb | 14 ++--- .../stats/facts/_number_of_pas.html.erb | 14 ++++- .../facts/_polygons_points_ratio.html.erb | 22 ++++--- 11 files changed, 103 insertions(+), 112 deletions(-) delete mode 100644 app/views/country/facts/_pame_statistics.html.erb diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index e87219433..eb7ab57bf 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -22,12 +22,10 @@ @import './variables/*'; -@import './helpers/*'; - @import './utilities/*'; @import './atoms/*'; -// @import './molecules/*'; +@import './organisms/*'; -@import './organisms/*'; \ No newline at end of file +@import './helpers/*'; \ No newline at end of file diff --git a/app/assets/stylesheets/helpers/_helpers.scss b/app/assets/stylesheets/helpers/_helpers.scss index 3a20ab483..da108fa72 100644 --- a/app/assets/stylesheets/helpers/_helpers.scss +++ b/app/assets/stylesheets/helpers/_helpers.scss @@ -77,6 +77,8 @@ .margin-space--right { margin-right: rem-calc(14); } .margin-space--left { margin-left: rem-calc(14); } +.no-padding { padding: 0; } + //-------------------------------------------------- // backgrounds //-------------------------------------------------- diff --git a/app/assets/stylesheets/organisms/stats-card.scss b/app/assets/stylesheets/organisms/stats-card.scss index 41f6fea3b..4b3fc82a6 100644 --- a/app/assets/stylesheets/organisms/stats-card.scss +++ b/app/assets/stylesheets/organisms/stats-card.scss @@ -6,6 +6,18 @@ $stat-colour-land-light: lighten($brown, 15%); $stat-colour-marine: $blue--light; $stat-colour-marine-light: lighten($blue--light, 15%); +$card-number-config: ( + (primary, $primary, xxxxlarge, bold), + (primary, $primary, xlarge, bold), + (primary-dark, $primary-dark, xlarge, bold), + (land, $stat-colour-land, medium, bold), + (land, $stat-colour-land, xxlarge, bold), + (land-light, $stat-colour-land-light, medium, bold), + (marine, $stat-colour-marine, xxlarge, bold), + (marine, $stat-colour-marine, medium, bold), + (marine-light, $stat-colour-marine-light, medium, bold) +); + //-------------------------------------------------- // mixins //-------------------------------------------------- @@ -27,12 +39,19 @@ $stat-colour-marine-light: lighten($blue--light, 15%); } } -@mixin card-number($color: $grey-66, $font-size: medium, $font-weight: bold) { - @include text--alt($font-size, $font-weight); - color: $color; - display: block; +@mixin card-numbers ($config) { + @each $name, $colour, $font-size, $font-weight in $config { + + &__number--#{$font-size}-#{$name} { + color: $colour; + @include text--alt($font-size, $font-weight); + + display: block; + } + } } + //-------------------------------------------------- // classes //-------------------------------------------------- @@ -51,10 +70,6 @@ $stat-colour-marine-light: lighten($blue--light, 15%); } .card { - &--land { - - } - &__body { @include flex-h-start; @include flex-wrap; @@ -67,6 +82,10 @@ $stat-colour-marine-light: lighten($blue--light, 15%); margin-right: rem-calc(16); } + &__column-2 { + flex-grow: 1; + } + &__row { display: flex; @include flex-column; @@ -96,29 +115,7 @@ $stat-colour-marine-light: lighten($blue--light, 15%); @include card-infographic(100, $bg-color: $grey-15, $fill-color: $stat-colour-marine); } - &__number--land { - @include card-number($stat-colour-land); - } - - &__number--land-light { - @include card-number($stat-colour-land-light); - } - - &__number--marine { - @include card-number($stat-colour-marine); - } - - &__number--marine-light { - @include card-number($stat-colour-marine-light); - } - - &__number--large-land { - @include card-number($stat-colour-land, xxlarge, bold); - } - - &__number--large-marine { - @include card-number($stat-colour-marine, xxlarge, bold); - } + @include card-numbers($card-number-config); } } } \ No newline at end of file diff --git a/app/assets/stylesheets/resources/_base-variables.scss b/app/assets/stylesheets/resources/_base-variables.scss index 7beec773d..73de861b0 100644 --- a/app/assets/stylesheets/resources/_base-variables.scss +++ b/app/assets/stylesheets/resources/_base-variables.scss @@ -38,9 +38,11 @@ // $blue-light: #2B678D; // $blue-grey: #264152; -// $green: #71BE63; +$green: #71a32b; +$green--darker: #415519; -// $primary: $blue-dark; +$primary: $green; +$primary-dark: $green--darker; // $accent-light: lighten($green, 15%); // $accent: $green; @@ -81,9 +83,9 @@ // breakpoints //-------------------------------------------------- // must be in px not rem! -$small: 720; -$medium: 1024; //ipad -$large: 1440; +$small: 628; //mobile +$medium: 763; //tablet portrait +$large: 1024; //tablet landscape @mixin responsive-styles ($property, $mobile, $tablet, $laptop) { #{$property}: $mobile; diff --git a/app/assets/stylesheets/utilities/responsive.scss b/app/assets/stylesheets/utilities/responsive.scss index baca993bd..9d9c9be74 100644 --- a/app/assets/stylesheets/utilities/responsive.scss +++ b/app/assets/stylesheets/utilities/responsive.scss @@ -1,3 +1,27 @@ +//-------------------------------------------------- +// mixins +//-------------------------------------------------- +@mixin breakpoint($breakpoint) { + @media screen and (min-width: $breakpoint + 1px) { + @content; + } +} + +@mixin breakpoint-down($breakpoint) { + @media screen and (max-width: $breakpoint) { + @content; + } +} + +@mixin between($breakpoint_1, $breakpoint_2) { + @media screen and (max-width: $breakpoint_2) and (min-width: $breakpoint_1 + 1px) { + @content; + } +} + +//-------------------------------------------------- +// mixins - old +//-------------------------------------------------- //keep old responsive mixins with old breakpoints to avoid breaking styles across the existing site @mixin only-mobile { @@ -10,20 +34,4 @@ @media only screen and (min-width: 768px) { @content; } -} - -//---------------------------------------- -// breakpoint variables -//---------------------------------------- -$small: rem-calc(628); //mobile -$medium: rem-calc(763); //tablet portrait -$large: rem-calc(1024); //tablet landscape - -//---------------------------------------- -// responsive mixins -//---------------------------------------- -@mixin breakpoint($breakpoint){ - @media only screen and (min-width: $breakpoint + 1) { - @content; - } } \ No newline at end of file diff --git a/app/assets/stylesheets/variables/colors.scss b/app/assets/stylesheets/variables/colors.scss index 31c9c2876..b543949e7 100644 --- a/app/assets/stylesheets/variables/colors.scss +++ b/app/assets/stylesheets/variables/colors.scss @@ -3,9 +3,7 @@ $grey-blue: #848184; $blue: #317fce; // green palette -$green: #71a32b; $green--dark: #699728; -$green--darker: #415519; $green--light: #83af46; $green--lighter: #e3edd5; $brown: #702412; diff --git a/app/views/country/facts/_pame_statistics.html.erb b/app/views/country/facts/_pame_statistics.html.erb deleted file mode 100644 index 325eefb29..000000000 --- a/app/views/country/facts/_pame_statistics.html.erb +++ /dev/null @@ -1,30 +0,0 @@ -

-

- Protected Area Management Effectiveness (PAME) - (Ref 2 ↓ ) -

-
-
-

<%= "#{(@pame_statistics.average_score*100).round(1)}%" rescue "N/A" %>

- - Overall average score. This is an average against 36 separate indicators of management effectiveness. - -
- -
-
-

<%= "#{(@pame_statistics.total_area_assessed).round(2)}km2" rescue "N/A" %>

- of land assessed -
-
-

<%= @pame_statistics.assessments || "N/A" %>

- PAME assessments undertaken -
-
-

<%= @pame_statistics.assessed_pas || "N/A" %>

- Protected areas assessed -
-
-
-
- diff --git a/app/views/shared/stats/facts/_coverage_stats_land.html.erb b/app/views/shared/stats/facts/_coverage_stats_land.html.erb index f0a25ed3c..6302faddf 100644 --- a/app/views/shared/stats/facts/_coverage_stats_land.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats_land.html.erb @@ -9,10 +9,10 @@
-
+

- + <%= @presenter.percentage_pa_land_cover.round(2) %>% coverage @@ -21,19 +21,19 @@

- + <%= commaify @presenter.pa_land_area.round(0) %> km2 Land Area Protected

- + <%= commaify @presenter.land_area.round(0) %> km2 Total Land Area

- + <%#= commaify @presenter.percentage_nr_land_cover.round(0) %>XX% <%#= @presenter.nr_version %>Xth National Report Coverage @@ -43,14 +43,14 @@ <% if has_pame_statistics_for(@presenter, :land) %>

- + <%= @presenter.pame_statistic.pame_percentage_pa_land_cover.round(2) %>% with management effectiveness evaluation

- + <%= commaify @presenter.pame_statistic.pame_pa_land_area %> km2 Area Assessed diff --git a/app/views/shared/stats/facts/_coverage_stats_marine.html.erb b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb index 7adbed792..59e5c2866 100644 --- a/app/views/shared/stats/facts/_coverage_stats_marine.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb @@ -9,10 +9,10 @@

-
+

- + <%= @presenter.percentage_pa_marine_cover.round(2) %>% coverage @@ -21,19 +21,19 @@

- + <%= commaify @presenter.pa_marine_area.round(0) %> km2 Marine Area Protected

- + <%= commaify @presenter.marine_area.round(0) %> km2 Total Marine Area

- + <%#= commaify @presenter.percentage_nr_marine_cover.round(0) %>XX% <%#= @presenter.nr_version %>Xth National Report Coverage @@ -43,14 +43,14 @@ <% if has_pame_statistics_for(@presenter, :marine) %>

- + <%= @presenter.pame_statistic.pame_percentage_pa_marine_cover.round(2) %>% with management effectiveness evaluation

- + <%= commaify @presenter.pame_statistic.pame_pa_marine_area %> km2 Area Assessed diff --git a/app/views/shared/stats/facts/_number_of_pas.html.erb b/app/views/shared/stats/facts/_number_of_pas.html.erb index ca2311204..856414e4a 100644 --- a/app/views/shared/stats/facts/_number_of_pas.html.erb +++ b/app/views/shared/stats/facts/_number_of_pas.html.erb @@ -1,7 +1,15 @@

Number of Protected areas

-

<%= spaceify(location.protected_areas.count) %>

-

<%= spaceify(location.protected_areas.with_pame_evaluations.count) %>

- with management effectiveness evaluations +
+

<%= spaceify(location.protected_areas.count) %>

+ +

+ + + <%= spaceify(location.protected_areas.with_pame_evaluations.count) %> + + with management effectiveness evaluations +

+
diff --git a/app/views/shared/stats/facts/_polygons_points_ratio.html.erb b/app/views/shared/stats/facts/_polygons_points_ratio.html.erb index 676fe7dcf..1861e9caa 100644 --- a/app/views/shared/stats/facts/_polygons_points_ratio.html.erb +++ b/app/views/shared/stats/facts/_polygons_points_ratio.html.erb @@ -1,16 +1,24 @@

Polygons/Points ratio

-
+
-
-

<%= @presenter.geometry_ratio[:polygons] %>%

- Polygons +
+

+ + <%= @presenter.geometry_ratio[:polygons] %>% + + Polygons +

-
-

<%= @presenter.geometry_ratio[:points] %>%

- Points +
+

+ + <%= @presenter.geometry_ratio[:points] %>% + + Points +

From 44de1cb97f9a1a44f6818256fc3ba7bd5d9a4b90 Mon Sep 17 00:00:00 2001 From: stacytalbot Date: Wed, 31 Jul 2019 13:47:28 +0100 Subject: [PATCH 05/25] Fix up PDF components for the country page --- app/controllers/country_controller.rb | 1 + app/views/country/_hero.html.erb | 37 +++++++---- app/views/country/pdf.html.erb | 2 +- app/views/country/pdf/_factsheet.html.erb | 9 +-- app/views/country/pdf/_hero.html.erb | 8 --- .../pdf/facts/_coverage_stats.html.erb | 65 ------------------- .../country/pdf/facts/_number_of_pas.html.erb | 4 -- .../pdf/facts/_polygons_points_ratio.html.erb | 17 ----- .../stats/facts/_coverage_stats.html.erb | 12 ++-- 9 files changed, 37 insertions(+), 118 deletions(-) delete mode 100644 app/views/country/pdf/_hero.html.erb delete mode 100644 app/views/country/pdf/facts/_coverage_stats.html.erb delete mode 100644 app/views/country/pdf/facts/_number_of_pas.html.erb delete mode 100644 app/views/country/pdf/facts/_polygons_points_ratio.html.erb diff --git a/app/controllers/country_controller.rb b/app/controllers/country_controller.rb index fe2d8ed62..ddbe98246 100644 --- a/app/controllers/country_controller.rb +++ b/app/controllers/country_controller.rb @@ -17,6 +17,7 @@ def show end def pdf + @for_pdf = true end def codes diff --git a/app/views/country/_hero.html.erb b/app/views/country/_hero.html.erb index 253e48f21..d53074008 100644 --- a/app/views/country/_hero.html.erb +++ b/app/views/country/_hero.html.erb @@ -1,19 +1,29 @@ -
-
"> -

"> - <%= @country.name %>, - - <%= link_to @country.region.name, region_path(@country.region.iso) %> - +<% if @for_pdf %> + +
+

+ <%= @country.name %>, + <%= @country.region.name %>

- <% unless @for_pdf %> +
+ +<% else %> + +
+
+

+ <%= @country.name %>, + + <%= link_to @country.region.name, region_path(@country.region.iso) %> + +

+ - <% end %> -
- <% unless @for_pdf %> +

+
@@ -23,5 +33,6 @@ city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries.
- <% end %> -
+
+ +<% end %> \ No newline at end of file diff --git a/app/views/country/pdf.html.erb b/app/views/country/pdf.html.erb index c681d2637..7ff73942d 100644 --- a/app/views/country/pdf.html.erb +++ b/app/views/country/pdf.html.erb @@ -1,5 +1,5 @@
- <%= render "country/pdf/hero" %> + <%= render "country/hero" %> <%= render "country/pdf/factsheet" %> <%= render "country/pdf/info_box" %>
diff --git a/app/views/country/pdf/_factsheet.html.erb b/app/views/country/pdf/_factsheet.html.erb index b759e39a3..b36443cd7 100644 --- a/app/views/country/pdf/_factsheet.html.erb +++ b/app/views/country/pdf/_factsheet.html.erb @@ -1,9 +1,9 @@
- <%= render "country/pdf/facts/number_of_pas" %> + <%= render "shared/stats/facts/number_of_pas", {location: @country} %>
- <%= render "country/pdf/facts/polygons_points_ratio" %> + <%= render "shared/stats/facts/polygons_points_ratio" %>
@@ -17,10 +17,7 @@
- <%= render "country/pdf/facts/coverage_stats" %> - <% if @pame_statistics && Rails.application.secrets.show_pame_statistics %> - <%= render "country/pdf/facts/pame_statistics" %> - <% end %> + <%= render "shared/stats/facts/coverage_stats" %> <%= render "country/pdf/facts/related_countries" %>
diff --git a/app/views/country/pdf/_hero.html.erb b/app/views/country/pdf/_hero.html.erb deleted file mode 100644 index d5da9ba91..000000000 --- a/app/views/country/pdf/_hero.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -
-
-

- <%= @country.name %>, <%= @country.region.name %> -

-
-
- diff --git a/app/views/country/pdf/facts/_coverage_stats.html.erb b/app/views/country/pdf/facts/_coverage_stats.html.erb deleted file mode 100644 index fea79bb92..000000000 --- a/app/views/country/pdf/facts/_coverage_stats.html.erb +++ /dev/null @@ -1,65 +0,0 @@ -
-

- Protected areas coverage - (Ref 1 ↓ ) -

-
- -
-
-

Area terrestrial

-
- -
-
-
-
- -
-

<%= @presenter.percentage_pa_land_cover.round(2) %>%

- coverage -
-
-

<%= commaify @presenter.pa_land_area %> km2

- Land Area Protected -
-
-

<%= commaify @presenter.land_area %> km2

- Total Land Area -
-
-

<%= commaify @presenter.land_area %>%

- 5th National Report Coverage -
-
-
- -
-
-

Area marine

-
-
-
-
-

<%= @presenter.percentage_pa_marine_cover.round(2) %>%

- coverage -
-
-

<%= commaify @presenter.pa_marine_area %> km2

- Marine Area Protected -
-
-

<%= commaify @presenter.marine_area %> km2

- Total Marine Area -
-
-
- -

- Warning: These statistics might differ from those reported officially by - countries due to difference in methodologies and datasets used to assess - protected area coverage and differences in the base maps used to measure - terrestrial and marine area of a country or territory. -

-
-
diff --git a/app/views/country/pdf/facts/_number_of_pas.html.erb b/app/views/country/pdf/facts/_number_of_pas.html.erb deleted file mode 100644 index 2c143b18e..000000000 --- a/app/views/country/pdf/facts/_number_of_pas.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -
-

Number of Protected areas

-

<%= spaceify(@country.protected_areas.count) %>

-
diff --git a/app/views/country/pdf/facts/_polygons_points_ratio.html.erb b/app/views/country/pdf/facts/_polygons_points_ratio.html.erb deleted file mode 100644 index 329ff20d2..000000000 --- a/app/views/country/pdf/facts/_polygons_points_ratio.html.erb +++ /dev/null @@ -1,17 +0,0 @@ -
-

Polygons/Points ratio

- -
-
-
-
-

<%= @presenter.geometry_ratio[:polygons] %>%

- Polygons -
-
-

<%= @presenter.geometry_ratio[:points] %>%

- Points -
-
-
-
diff --git a/app/views/shared/stats/facts/_coverage_stats.html.erb b/app/views/shared/stats/facts/_coverage_stats.html.erb index 22f5bd978..dc366352c 100644 --- a/app/views/shared/stats/facts/_coverage_stats.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats.html.erb @@ -14,14 +14,18 @@ Warning: These statistics might differ from those reported officially by countries due to difference in methodologies and datasets used to assess protected area coverage and differences in the base maps used to measure - terrestrial and marine area of a country or territory. @FERDI UNCOMMENT THIS LINK WHEN YOU HAVE THE CSV <%#= link_to "Download the country's latest national report (pdf)", @country.name, title: "Dowload the national report for #{@country.name}", class: 'link-with-icon bold' %> + terrestrial and marine area of a country or territory. <% unless @for_pdf %>@FERDI UNCOMMENT THIS LINK WHEN YOU HAVE THE CSV <%#= link_to "Download the country's latest national report (pdf)", @country.name, title: "Dowload the national report for #{@country.name}", class: 'link-with-icon bold' %><% end %>

+ <% if has_restricted_sites? %>

Part of the protected areas dataset for <%= @country.name %> is restricted.

<% end %> -

- Learn how we calculate protected area coverage statistics -

+ + <% unless @for_pdf %> +

+ Learn how we calculate protected area coverage statistics +

+ <% end %>
From 535bc14f78f515d6039e1d782a08bbc6fd3b8c1a Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Thu, 1 Aug 2019 15:36:36 +0100 Subject: [PATCH 06/25] Dynamically add methods to fetch nr fields --- app/presenters/statistic_presenter.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/presenters/statistic_presenter.rb b/app/presenters/statistic_presenter.rb index 53e1d71d1..b4e47809d 100644 --- a/app/presenters/statistic_presenter.rb +++ b/app/presenters/statistic_presenter.rb @@ -31,10 +31,12 @@ def method_missing method @model.send(method) rescue (@statistic.send(method) || 0) rescue 0 end - ["land", "marine"].each do |type| - stat = "percentage_pa_#{type}_cover".to_sym - define_method(stat) do - (@statistic.send(stat) && @statistic.send(stat) > 100.0) ? 100.0 : (@statistic.send(stat) || 0) rescue 0 + ["land", "marine"].each do |land_type| + ["pa", "nr"].each do |field_type| + stat = "percentage_#{field_type}_#{land_type}_cover".to_sym + define_method(stat) do + (@statistic.send(stat) && @statistic.send(stat) > 100.0) ? 100.0 : (@statistic.send(stat) || 0) rescue 0 + end end end From 349d5f3257306cd75267ba2e3af2ce01d61a9c80 Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Thu, 1 Aug 2019 16:46:45 +0100 Subject: [PATCH 07/25] Update views to use the stats presenter --- .../shared/stats/facts/_coverage_stats.html.erb | 4 ++-- .../shared/stats/facts/_coverage_stats_land.html.erb | 12 ++++++------ .../stats/facts/_coverage_stats_marine.html.erb | 6 +++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/app/views/shared/stats/facts/_coverage_stats.html.erb b/app/views/shared/stats/facts/_coverage_stats.html.erb index dc366352c..31617f87b 100644 --- a/app/views/shared/stats/facts/_coverage_stats.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats.html.erb @@ -5,7 +5,7 @@
- <%= render partial: 'shared/stats/facts/coverage_stats_land' %> + <%= render partial: 'shared/stats/facts/coverage_stats_land' %> <%= render partial: 'shared/stats/facts/coverage_stats_marine' %>
@@ -14,7 +14,7 @@ Warning: These statistics might differ from those reported officially by countries due to difference in methodologies and datasets used to assess protected area coverage and differences in the base maps used to measure - terrestrial and marine area of a country or territory. <% unless @for_pdf %>@FERDI UNCOMMENT THIS LINK WHEN YOU HAVE THE CSV <%#= link_to "Download the country's latest national report (pdf)", @country.name, title: "Dowload the national report for #{@country.name}", class: 'link-with-icon bold' %><% end %> + terrestrial and marine area of a country or territory. <% unless @for_pdf %> <%= link_to "Download the country's latest national report (pdf)", @presenter.nr_report_url, title: "Dowload the national report for #{@country.name}", class: 'link-with-icon bold' %><% end %>

<% if has_restricted_sites? %> diff --git a/app/views/shared/stats/facts/_coverage_stats_land.html.erb b/app/views/shared/stats/facts/_coverage_stats_land.html.erb index 6302faddf..610266b9c 100644 --- a/app/views/shared/stats/facts/_coverage_stats_land.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats_land.html.erb @@ -21,22 +21,22 @@

- + <%= commaify @presenter.pa_land_area.round(0) %> km2 Land Area Protected

- + <%= commaify @presenter.land_area.round(0) %> km2 Total Land Area

- - <%#= commaify @presenter.percentage_nr_land_cover.round(0) %>XX% + + <%= commaify @presenter.percentage_nr_land_cover.round(0) %>% - <%#= @presenter.nr_version %>Xth National Report Coverage + <%= @presenter.nr_version %>th National Report Coverage

@@ -59,4 +59,4 @@ <% end %>
-
\ No newline at end of file +
diff --git a/app/views/shared/stats/facts/_coverage_stats_marine.html.erb b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb index 59e5c2866..2a0998b4c 100644 --- a/app/views/shared/stats/facts/_coverage_stats_marine.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb @@ -34,9 +34,9 @@

- <%#= commaify @presenter.percentage_nr_marine_cover.round(0) %>XX% + <%= commaify @presenter.percentage_nr_marine_cover.round(0) %>% - <%#= @presenter.nr_version %>Xth National Report Coverage + <%= @presenter.nr_version %>th National Report Coverage

@@ -59,4 +59,4 @@ <% end %>
-
\ No newline at end of file +
From 9b048689a2553d5e1afad7fd110d27b6a0d6d2b0 Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Thu, 1 Aug 2019 16:48:56 +0100 Subject: [PATCH 08/25] Commit db changes --- db | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db b/db index 2e23d0c56..4286a2fe6 160000 --- a/db +++ b/db @@ -1 +1 @@ -Subproject commit 2e23d0c561fe92b45c31368dcad98c094cda8f23 +Subproject commit 4286a2fe61ba9228fb4bdf27a884f075e612631c From ddcdd839ae85c4ca5cbef5fedb026fb0f7d627f3 Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Thu, 1 Aug 2019 16:49:30 +0100 Subject: [PATCH 09/25] Temporarily reference new db branch --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 162f95637..d5564d827 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "db"] path = db url = https://github.com/unepwcmc/protectedplanet-db.git - branch = develop + branch = feature/nr-stats From 884efe30617194be9bc309cdddd1cdd12c6ffee2 Mon Sep 17 00:00:00 2001 From: stacytalbot Date: Fri, 2 Aug 2019 10:03:30 +0100 Subject: [PATCH 10/25] Add if statement for regional pages --- app/helpers/application_helper.rb | 4 ++++ .../shared/stats/facts/_coverage_stats.html.erb | 2 +- .../stats/facts/_coverage_stats_land.html.erb | 15 +++++++++------ .../stats/facts/_coverage_stats_marine.html.erb | 15 +++++++++------ 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index b3c64c69c..34fd318eb 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -161,4 +161,8 @@ def download_dropdown item_id, download_type, types end.join.html_safe end end + + def is_regional_page controller_name + controller_name == 'region' + end end diff --git a/app/views/shared/stats/facts/_coverage_stats.html.erb b/app/views/shared/stats/facts/_coverage_stats.html.erb index 31617f87b..70d41b648 100644 --- a/app/views/shared/stats/facts/_coverage_stats.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats.html.erb @@ -14,7 +14,7 @@ Warning: These statistics might differ from those reported officially by countries due to difference in methodologies and datasets used to assess protected area coverage and differences in the base maps used to measure - terrestrial and marine area of a country or territory. <% unless @for_pdf %> <%= link_to "Download the country's latest national report (pdf)", @presenter.nr_report_url, title: "Dowload the national report for #{@country.name}", class: 'link-with-icon bold' %><% end %> + terrestrial and marine area of a country or territory. <% unless @for_pdf || is_regional_page(controller_name) %> <%= link_to "Download the country's latest national report (pdf)", @presenter.nr_report_url, title: "Dowload the national report for #{@country.name}", class: 'link-with-icon bold' %><% end %>

<% if has_restricted_sites? %> diff --git a/app/views/shared/stats/facts/_coverage_stats_land.html.erb b/app/views/shared/stats/facts/_coverage_stats_land.html.erb index 610266b9c..9788a3a97 100644 --- a/app/views/shared/stats/facts/_coverage_stats_land.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats_land.html.erb @@ -32,12 +32,15 @@ Total Land Area

-

- - <%= commaify @presenter.percentage_nr_land_cover.round(0) %>% - - <%= @presenter.nr_version %>th National Report Coverage -

+ + <% unless is_regional_page(controller_name) %> +

+ + <%= commaify @presenter.percentage_nr_land_cover.round(0) %>% + + <%= @presenter.nr_version %>th National Report Coverage +

+ <% end %>
<% if has_pame_statistics_for(@presenter, :land) %> diff --git a/app/views/shared/stats/facts/_coverage_stats_marine.html.erb b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb index 2a0998b4c..a1767bd69 100644 --- a/app/views/shared/stats/facts/_coverage_stats_marine.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb @@ -32,12 +32,15 @@ Total Marine Area

-

- - <%= commaify @presenter.percentage_nr_marine_cover.round(0) %>% - - <%= @presenter.nr_version %>th National Report Coverage -

+ + <% unless is_regional_page(controller_name) %> +

+ + <%= commaify @presenter.percentage_nr_marine_cover.round(0) %>% + + <%= @presenter.nr_version %>th National Report Coverage +

+ <% end %> <% if has_pame_statistics_for(@presenter, :marine) %> From 7ee67b9c6ec2be77aec64b2f78e493e295d009a1 Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Fri, 2 Aug 2019 11:04:07 +0100 Subject: [PATCH 11/25] Specify ubuntu 14.04 dist to be able to use ruby 2.1.2 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 2efb79094..cc349e4b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,4 @@ +dist: trusty language: ruby # Manually handle git submodules git: From 0105d685d084a40f6a829cff9afb2ac464f79b19 Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Fri, 2 Aug 2019 11:14:48 +0100 Subject: [PATCH 12/25] Uncomment geometry concerns code --- app/models/concerns/geometry_concern.rb | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/app/models/concerns/geometry_concern.rb b/app/models/concerns/geometry_concern.rb index afdb803b0..b6cdfca65 100644 --- a/app/models/concerns/geometry_concern.rb +++ b/app/models/concerns/geometry_concern.rb @@ -12,16 +12,14 @@ def geometry_columns end def bounds - # rgeo_factory = RGeo::Geos.factory srid: 4326 - # bounds = RGeo::Cartesian::BoundingBox.new rgeo_factory - # bounds.add bounding_box + rgeo_factory = RGeo::Geos.factory srid: 4326 + bounds = RGeo::Cartesian::BoundingBox.new rgeo_factory + bounds.add bounding_box - # [ - # [bounds.min_y, bounds.min_x], - # [bounds.max_y, bounds.max_x] - # ] - - [ [0,0], [0,0] ] + [ + [bounds.min_y, bounds.min_x], + [bounds.max_y, bounds.max_x] + ] end def geojson geo_properties=nil From 5268dc27c445cc771f1da7095441f190f1a38f8b Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Fri, 2 Aug 2019 11:59:19 +0100 Subject: [PATCH 13/25] Define nr report url method to manage field correctly and fix test --- app/presenters/statistic_presenter.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/presenters/statistic_presenter.rb b/app/presenters/statistic_presenter.rb index b4e47809d..41708765e 100644 --- a/app/presenters/statistic_presenter.rb +++ b/app/presenters/statistic_presenter.rb @@ -27,6 +27,10 @@ def percentage_total_pa_cover percentage_pa_land_cover + percentage_pa_marine_cover end + def nr_report_url + @statistic.send(:nr_report_url) || '' + end + def method_missing method @model.send(method) rescue (@statistic.send(method) || 0) rescue 0 end From 157bfb906e1e6878c9cb837ceee755d46a21ac03 Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Tue, 6 Aug 2019 10:35:22 +0100 Subject: [PATCH 14/25] Update country_statistics CSV file with nr fields --- lib/data/seeds/country_statistics.csv | 493 +++++++++++++------------- 1 file changed, 248 insertions(+), 245 deletions(-) diff --git a/lib/data/seeds/country_statistics.csv b/lib/data/seeds/country_statistics.csv index 192a776f0..eee4a520d 100644 --- a/lib/data/seeds/country_statistics.csv +++ b/lib/data/seeds/country_statistics.csv @@ -1,245 +1,248 @@ -"iso3","pa_land_area","pa_marine_area","land_area","marine_area","percentage_pa_land_cover","percentage_pa_marine_cover" -"ABW",35.833833,0.026514,189.420844,25213.94735,18.91757646,0.000105156 -"AFG",673.16062,0,642899.1342,0,0.104707035,0 -"AGO",87506.59243,24.341169,1255217.852,493753.373,6.971426695,0.004929823 -"AIA",6.274344,32.219534,85.524417,92653.59144,7.336318937,0.034774188 -"ALA",41.035664,503.943526,0,0,0,0 -"ALB",5098.516663,304.392513,28746.5563,11199.39919,17.73609544,2.717936094 -"AND",126.120308,0,471.870724,0,26.72772469,0 -"ARE",12733.89139,6166.123302,70921.45739,54711.04352,17.95492064,11.2703449 -"ARG",235365.9451,41249.95469,2785327.721,1083150.624,8.450206536,3.808330418 -"ARM",6860.446492,0,29685.40559,0,23.1105028,0 -"ASM",33.371984,35457.57732,210.578755,406816.029,15.84774494,8.715875183 -"ATA",0,4774.711754,0,0,0,0 -"ATF",7851.080041,1702574.614,7855.43,2277432,99.94462481,74.7585269 -"ATG",84.536207,196.917827,455.237976,108492.3833,18.56967377,0.181503826 -"AUS",1487710.336,3014429.414,7722102.022,7432133.367,19.26561359,40.5594096 -"AUT",23829.38774,0,83912.25912,0,28.3979814,0 -"AZE",8798.362587,345.314137,86639.62334,79032.11878,10.15512562,0.436928862 -"BDI",2065.705682,0,27210.87243,0,7.591471709,0 -"BEL",7634.045734,1270.104582,30683.07213,3465.140147,24.8803174,36.65377238 -"BEN",34369.0025,0,116095.3632,0,29.60411298,0 -"BES",91.577774,2755.525866,322.852496,25112.35272,28.36520551,10.97279055 -"BFA",41157.73236,0,276403.7182,0,14.89044092,0 -"BGD",6455.725173,4530.200776,140160.1678,84563.21214,4.605962787,5.357176793 -"BGR",44996.29738,2851.951552,110862.7479,35171.8505,40.58739138,8.108619568 -"BHR",45.481965,94.820117,686.857403,7632.763476,6.621747804,1.24227768 -"BHS",4930.158571,47355.48699,13458.00624,597705.1345,36.63364754,7.922884422 -"BIH",714.847791,0,51225.15128,0,1.395501571,0 -"BLM",5.112058,4243.89095,25.109707,4317.87991,20.35889148,98.28645165 -"BLR",19383.06277,0,207228.0654,0,9.353493086,0 -"BLZ",8401.656832,3653.592271,22297.76618,36249.83866,37.67936557,10.07892009 -"BMU",1.507493,0.254821,72.478422,451643.6848,2.079919731,5.64208E-05 -"BOL",336405.5463,0,1089908.94,0,30.86547269,0 -"BRA",2509320.934,977792.6843,8529399.243,3672584.326,29.41966794,26.62410437 -"BRB",5.640151,10.321249,444.068519,185019.8485,1.270108274,0.005578455 -"BRN",2794.368916,51.679209,5961.686662,25698.41824,46.87211983,0.201098793 -"BTN",19171.20958,0,39933.48814,0,48.00785122,0 -"BVT",43.986608,13.870359,50.639751,440224.3515,86.86181731,0.003150748 -"BWA",169369.7355,0,581162.9215,0,29.14324526,0 -"CAF",112827.1168,0,624568.0306,0,18.06482422,0 -"CAN",1060937.776,165665.3985,9955032.941,5698082.708,10.65730051,2.907388449 -"CCK",0,26.294478,0,470116.606,0,0.005593182 -"CHE",4131.851172,0,41355.27022,0,9.991111531,0 -"CHL",155154.8153,1506502.331,759820.962,3657313.03,20.41991772,41.19150641 -"CHN",1461511.266,47491.66492,9361608.881,878364.0892,15.61175311,5.406831347 -"CIV",74170.95794,130.372645,324107.7064,174842.1752,22.88466348,0.074565902 -"CMR",51220.8022,1685.49771,469428.0915,14704.2551,10.91132021,11.4626528 -"COD",324289.6838,31.363659,2344275.114,13265.40707,13.83326052,0.236431938 -"COG",140031.5994,1280.313272,343736.7395,39863.59306,40.73803678,3.211735756 -"COK",67.100582,1981949.229,258.141911,1972842.358,25.99367989,100 -"COL",169544.5158,124670.6807,1145032.899,730741.8263,14.80695585,17.06083821 -"COM",172.688456,37.464378,1701.123719,165505.135,10.15143426,0.022636384 -"CPV",120.123431,5.423162,4148.996795,801065.1343,2.89524039,0.000676994 -"CRI",14608.17403,15061.6931,51636.14199,576110.183,28.2905993,2.614377171 -"CUB",18480.57139,15818.76605,111643.2783,365755.7493,16.55323246,4.324953491 -"CUW",71.009581,11.656382,450.975385,30535.00449,15.74577757,0.038173834 -"CXR",87.649012,0.753516,142.416955,330035.5,61.54394468,0.000228314 -"CYM",31.133127,92.901287,289.266866,119605.4547,10.76276984,0.077673119 -"CYP",3386.08814,120.958963,9063.433945,98279.50173,37.35988104,0.123076492 -"CZE",17265.28518,0,77916.89786,0,22.15858903,0 -"DEU",135390.2648,25562.51049,357584.3854,56357.93768,37.86246558,45.35742708 -"DJI",343.960179,11.802761,21843.65212,7031.12303,1.57464593,0.167864521 -"DMA",168.469169,10.012306,766.22784,28749.1828,21.98682431,0.034826402 -"DNK",8202.821875,17932.88012,45314.39778,100469.7507,18.10202116,17.84903415 -"DOM",12727.3973,48625.33917,48509.80547,270774.1738,26.23675188,17.95789402 -"DZA",174218.6183,110.267218,2324458.588,128992.9935,7.495019239,0.085483106 -"ECU",55980.25872,144125.4431,258138.6687,1079901.071,21.68611893,13.34617096 -"EGY",129389.8156,11715.81678,984997.4881,236612.0565,13.13605538,4.951487659 -"ERI",5936.248417,0,121834.4031,0,4.872390938,0 -"ESH",15269.8993,3709.987384,268339.2162,252024.2549,5.690520946,1.472075529 -"ESP",142399.1621,84225.04305,507013.405,1005717.296,28.08587715,8.374624099 -"EST",9211.086637,6767.85611,45416.48284,36346.36825,20.28137377,18.62044665 -"ETH",200073.9748,0,1135429.227,0,17.62099919,0 -"FIN",50901.51811,8352.242381,337725.5344,79467.83379,15.07185952,10.51021776 -"FJI",1036.512388,11959.01476,19154.95614,1293034.72,5.411196874,0.924879632 -"FLK",61.100176,52.093517,12400.947,549091.6441,0.492705727,0.009487217 -"FRA",142596.2051,154901.8964,548954.0701,343866.3878,25.97598103,45.04711771 -"FRO",33.786873,28.889108,1450.644909,266720.4336,2.329093274,0.010831232 -"FSM",0.401738,475.050992,817.158681,3011916.98,0.049162789,0.01577238 -"GAB",59707.74205,55720.61869,266044.6066,193292.3301,22.44275605,28.82712349 -"GBR",70356.30986,208871.0228,245247.5873,723404.7034,28.68787034,28.87332939 -"GEO",5831.181965,152.96289,69971.96837,22907.00911,8.333597154,0.667755835 -"GGY",3.42847,33.480134,85.559741,8672.655691,4.007106567,0.386042467 -"GHA",36153.44505,220.877347,240329.9832,226758.5827,15.04325202,0.097406389 -"GIB",2.426334,54.748777,7.483277,426.745945,32.42341557,12.8293608 -"GIN",87841.7778,583.248819,246426.8074,110136.2872,35.64619398,0.529570075 -"GLP",1170.201835,90957.91428,1678.541217,91039.08888,69.71540664,99.91083544 -"GMB",441.86625,15.848759,10757.9084,22745.53308,4.107362078,0.069678556 -"GNB",5667.921785,10660.72491,34015.72123,106506.6285,16.66265356,10.00944736 -"GNQ",5228.231143,729.714996,27136.01782,310365.4119,19.26675896,0.235114793 -"GRC",46842.05396,22326.02504,133012.2689,494172.4508,35.21634083,4.517861125 -"GRD",36.525372,22.668297,373.565244,26281.5155,9.777508102,0.086251864 -"GRL",886455.3706,102325.3573,2154016.464,2264467.117,41.15360237,4.518738935 -"GTM",22038.6271,1065.193983,109922.2585,118336.3927,20.0492852,0.900140657 -"GUF",44030.25688,1365.477582,83034.50925,136563.8487,53.02645524,0.999882176 -"GUM",126.105991,18.36469,561.240901,202535.0554,22.46913772,0.009067413 -"GUY",18453.59558,17.404509,211200.2683,136909.9886,8.73748681,0.012712373 -"HKG",461.758922,77.63466,1102.47934,0,41.88368029,0 -"HMD",391.198904,70453.52882,391.198904,416110.9534,100,16.93142856 -"HND",27060.29621,9144.343173,113291.4823,219971.1738,23.88555225,4.157064317 -"HRV",21752.31657,4737.056345,56855.88522,55462.35822,38.25868946,8.541029442 -"HTI",534.077665,0,27390.24191,0,1.94988298,0 -"HUN",21049.06125,0,93142.45067,0,22.59878401,0 -"IDN",231945.909,181848.1746,1906555.047,5947954.167,12.16570743,3.057323064 -"IMN",31.751404,419.422876,582.226592,0,5.45344449,0 -"IND",182646.7039,3928.327395,3061193.496,2301226.499,5.966519401,0.170705813 -"IOT",68.952846,642270.8732,68.952846,642744.6863,100,99.92628284 -"IRL",10127.42256,9945.099192,70128.37704,426441.7422,14.44126185,2.332112035 -"IRN",140225.7775,1808.644138,1627857.17,224800.6295,8.614132743,0.804554748 -"IRQ",6713.746023,0,437830.5052,0,1.533412118,0 -"ISL",18571.902,2863.10312,102301.7663,752783.5116,18.15403846,0.380335525 -"ISR",4180.414797,9.067342,20958.0329,27855.0403,19.94659907,0.03255189 -"ITA",64904.81984,47394.46738,301335.3097,538880.953,21.53906885,8.794979135 -"JAM",1760.198539,1859.991697,11058.94539,246488.4991,15.91651352,0.754595733 -"JEY",22.230737,185.03376,125.218467,2962.105951,17.75356106,6.246696204 -"JOR",2773.578439,33.455456,89689.84024,93.665949,3.092410948,35.71784235 -"JPN",109936.6645,332694.3839,374092.7945,4040612.297,29.38753863,8.233761604 -"KAZ",90083.02894,1249.454686,2719827.869,119085.0237,3.312085664,1.049212275 -"KEN",72544.48541,903.902773,586770.0015,112400.4482,12.36335962,0.804180755 -"KGZ",13402.50902,0,199957.0236,0,6.7026948,0 -"KHM",47503.40656,89.107039,182510.8526,47966.8519,26.0277161,0.185767953 -"KIR",230.885727,408796.5464,1032.564654,3459130.413,22.36041357,11.81789923 -"KNA",8.982278,17.436922,270.825058,10262.9088,3.316634755,0.169902338 -"KOR",11637.6153,5309.233026,99712.88376,324993.7978,11.67112499,1.633641338 -"KWT",3048.24619,175.974631,17417.87587,11895.81218,17.50067697,1.479299004 -"LAO",38581.96123,0,231276.1399,0,16.68220563,0 -"LBN",268.277274,40.839545,10329.04876,19315.84107,2.597308622,0.211430322 -"LBR",3914.960977,256.049624,96634.42399,247767.6811,4.051310926,0.103342624 -"LBY",3437.476191,2277.750889,1622615.431,357895.3125,0.211847868,0.636429372 -"LCA",116.653527,34.007036,622.311137,15560.30791,18.7452096,0.218549891 -"LIE",70.47938,0,167.064349,0,42.18696593,0 -"LKA",19897.4988,398.564426,66631.50337,534085.0497,29.8619989,0.074625647 -"LSO",79.71045,0,30494.99377,0,0.261388642,0 -"LTU",11013.35321,1567.706297,64696.51583,6125.653875,17.02310096,25.59247272 -"LUX",1332.387109,0,2603.081524,0,51.18499351,0 -"LVA",11720.84665,4631.301701,64501.94768,28879.55287,18.17130656,16.03661152 -"MAF",7.609068,1030.536085,59.578286,1068.741983,12.77154566,96.42515232 -"MAR",125351.1669,717.910689,407280.495,276136.4075,30.7776013,0.259984077 -"MCO",0.528888,283.522868,1.595194,284.22031,33.1550896,99.75461219 -"MDA",1409.67766,0,33963.76161,0,4.15053455,0 -"MDG",33242.1381,8997.672125,594718.7259,1205824.849,5.589556315,0.746184003 -"MDV",3.683705,474.933082,304.666095,922109.9914,1.209095814,0.051505036 -"MEX",284175.3495,707942.1699,1965284.828,3284659.67,14.4597539,21.5529839 -"MHL",33.593723,5388.396257,281.928035,2004587.264,11.91570856,0.268803277 -"MKD",2686.961324,0,25443.14057,0,10.56065118,0 -"MLI",103445.3359,0,1256684.114,0,8.231610053,0 -"MLT",98.095341,3495.870104,324.970466,55696.65564,30.18592496,6.276624806 -"MMR",42878.48881,11964.44587,673078.5676,514147.2175,6.370502772,2.327046702 -"MNE",1456.773173,10.436511,13847.56188,7459.237226,10.52006978,0.139913917 -"MNG",277375.3288,0,1565864.159,0,17.71388196,0 -"MNP",38.441128,257249.9205,501.224059,773667.8566,7.669449882,33.25069257 -"MOZ",170662.3039,12821.00808,791081.8731,574409.6185,21.57327954,2.232032276 -"MRT",6507.878372,6487.581027,1046302.522,156197.8626,0.621988214,4.153437775 -"MSR",11.182345,0.000273,100.664381,7628.258983,11.10854196,3.5788E-06 -"MTQ",1280.73635,47915.67266,1149.925062,47644.30608,100,100 -"MUS",97.460291,49.64392,2062.481937,1280068.317,4.725388827,0.003878224 -"MWI",27190.40907,0,118859.7323,0,22.87604771,0 -"MYS",63418.8825,6977.70038,331700.5726,451741.5382,19.11931656,1.544622265 -"MYT",44.436011,68829.33301,396.377408,63362.33751,11.2105307,100 -"NAM",313534.3576,9646.27499,827465.4339,562727.6243,37.89093112,1.714199654 -"NCL",10413.51706,1325070.398,19141.03171,1371803.153,54.40415763,96.59333378 -"NER",206090.4852,0,1190098.655,0,17.31709252,0 -"NFK",19.957518,189084.3131,42.778966,432638.0836,46.65264233,43.7049627 -"NGA",127359.0344,30.555979,914306.1122,182868.1867,13.92958361,0.016709292 -"NIC",48104.12746,6660.345162,129222.3127,223935.2389,37.22586792,2.974228261 -"NIU",53.434436,36.900176,267.755527,318243.6931,19.95642689,0.011594943 -"NLD",3958.425448,17126.39853,35205.61182,64204.97933,11.24373429,26.67456435 -"NOR",55973.90611,7696.958098,325287.8156,926317.7348,17.20750161,0.830919868 -"NPL",34897.91838,0,147709.5419,0,23.62604199,0 -"NZL",88464.44129,1249447.107,269651.6705,4106953.859,32.80693242,30.42272082 -"OMN",7985.072834,663.989764,310373.1429,538980.1915,2.572733181,0.123193723 -"PAK",98288.08094,1707.397433,798143.6542,222743.9199,12.31458528,0.76652931 -"PAN",15773.05824,5593.115449,75497.94621,332643.4965,20.89203618,1.681414339 -"PCN",37.035971,839648.6171,45.589943,839478.9503,81.23715136,100 -"PER",279619.4414,4036.819355,1298537.038,838329.5928,21.53342055,0.481531296 -"PHL",45762.33428,21269.12928,298774.9046,1835028.192,15.31665932,1.159062808 -"PLW",140.309346,504690.9119,501.101386,608152.4889,28.00019116,82.98756005 -"PNG",14330.33788,4585.469187,467405.9203,2407381.818,3.065929904,0.19047536 -"POL",123906.7111,7210.775928,311923.5191,31945.64308,39.7234269,22.57201682 -"PRI",657.215588,3077.928815,9041.14294,176163.0606,7.269164887,1.747204439 -"PRK",2975.649808,25.611911,122186.1412,115967.2688,2.435341504,0.022085465 -"PRT",21114.47368,285578.3431,92141.09473,1724156.15,22.91537098,16.56336887 -"PRY",57473.44474,0,401498.4235,0,14.31473734,0 -"PSE",516.767863,0,6181.987004,0,8.35925185,0 -"PYF",73.831954,206.943116,3780.061341,4795468.095,1.9531946,0.004315389 -"QAT",1512.836196,538.143058,11435.55274,31987.65323,13.22923544,1.682346167 -"REU",1600.443036,40.854528,2536.304619,316498.9308,63.10137292,0.012908267 -"ROU",58126.49915,6865.607617,237452.8706,29726.44952,24.47917307,23.09595572 -"RUS",1641400.88,228247.3371,16874835.52,7673314.113,9.726914839,2.974560062 -"RWA",2319.729861,0,25452.13068,0,9.114089071,0 -"SAU",92063.63591,5495.452494,1934058.339,220338.2086,4.760127141,2.494098744 -"SDN",42697.53496,10661.95429,1871251.813,66785.64454,2.281763185,15.9644402 -"SEN",50179.21798,1766.175004,197923.9723,158426.4028,25.3527743,1.114823649 -"SGP",33.585431,0.100552,604.646128,762.68502,5.55455984,0.013183948 -"SGS",3971.692688,1065900.045,3971.692688,1445886.657,100,73.71947451 -"SHN",157.137807,453612.5594,434.343214,1647745.112,36.17825764,27.52929177 -"SJM",40092.18364,82714.05977,61261.11552,1081582.098,65.44474957,7.647506364 -"SLB",514.977904,1879.382668,29191.64527,1609756.547,1.764127712,0.116749497 -"SLE",6824.701851,862.533185,72709.02892,160452.5672,9.386319626,0.53756272 -"SLV",1805.57217,664.798852,20573.30437,94238.04744,8.776286673,0.705446335 -"SPM",7.163126,7.021851,237.589267,12367.3281,3.014919862,0.05677743 -"SRB",6687.228547,0,88509.11514,0,7.555412272,0 -"SSD",98214.50384,0,633580.4791,0,15.50150409,0 -"STP",289.416981,35.280222,989.259888,131709.1714,29.25590985,0.026786458 -"SUR",21425.69156,1980.928256,147558.4488,128362.9877,14.52013878,1.543223862 -"SVK",18395.3999,0,48941.21743,0,37.58672315,0 -"SVN",10889.59482,396.970655,20308.54692,186.314047,53.62074827,100 -"SWE",65905.78265,23604.86049,449390.1761,154980.4918,14.66560378,15.23085919 -"SWZ",738.207109,0,17335.867,0,4.258264723,0 -"SXM",0.000136,43.282473,36.455424,497.533856,0.000373058,8.699402559 -"SYC",241.673419,209929.3831,486.864575,1340839.459,49.63873558,15.65656363 -"SYR",1292.567557,25.201794,188612.6151,10203.61673,0.685302813,0.246988834 -"TCA",451.737848,149.820284,1018.174578,154242.1775,44.36742556,0.097133149 -"TCD",259841.8715,0,1276585.969,0,20.3544358,0 -"TGO",15876.86929,30.987414,57480.648,15520.93847,27.6212427,0.1996491 -"THA",97391.375,5773.799574,517786.6125,306890.539,18.80917209,1.881387283 -"TJK",31690.1072,0,142244.2178,0,22.27866109,0 -"TKL",0.998313,9.510634,15.181307,321242.5226,6.575935787,0.002960578 -"TKM",15336.26559,2331.770078,472137.5437,77885.16348,3.248262247,2.993856562 -"TLS",1959.473342,584.110567,15006.53549,42501.27223,13.05746648,1.374336664 -"TON",121.971897,10055.15988,766.502265,668054.6083,15.91279016,1.505140411 -"TTO",1594.834426,37.071977,5213.102096,75798.46305,30.59281013,0.048908613 -"TUN",12286.01772,1042.360893,155230.8391,100660.5035,7.914675845,1.035521239 -"TUR",1709.103181,270.18272,782238.8742,255925.9584,0.218488653,0.105570659 -"TUV",0.815638,62.087748,41.785977,731900.0274,1.951941916,0.008483091 -"TWN",7145.88111,3846.48539,36245.33119,342996.9472,19.71531471,1.121434293 -"TZA",361593.9275,7330.445298,947252.6908,243129.5958,38.17291109,3.015036189 -"UGA",39058.65252,0,243144.8535,0,16.06394376,0 -"UKR",23854.95145,4606.122845,598828.7966,134873.1664,3.983601255,3.41515141 -"UMI",363.497911,1278997.392,363.495,1964384.514,100.0008008,65.10931964 -"URY",6150.088128,931.553409,178459.889,130097.9744,3.446201924,0.716039902 -"USA",1233169.29,3527444.441,9490391.294,8591493.148,12.99387193,41.05740853 -"UZB",15200.69742,0,450362.5106,0,3.375213759,0 -"VCT",91.899504,80.359651,409.906569,36510.93366,22.41962217,0.220097497 -"VEN",496701.1417,16499.94342,917367.6523,473325.0963,54.14417442,3.485964202 -"VGB",15.995538,3.314329,175.605042,80529.47601,9.108814769,0.004115672 -"VIR",51.815838,306.278747,375.62477,36030.25521,13.7945743,0.850059888 -"VNM",24994.30956,3630.264972,329880.371,647232.2216,7.576779875,0.560890643 -"VUT",528.222229,47.509867,12575.12729,622073.2227,4.200531866,0.007637343 -"WLF",0.301679,0,180.605517,0,0.167037533,0 -"WSM",212.692968,114.846969,2893.945283,132305.5976,7.349584985,0.086804316 -"YEM",3519.593039,2562.368242,455938.919,548013.9807,0.77194398,0.467573517 -"ZAF",101336.4817,186106.9994,1224384.577,1542559.897,8.276523866,12.0648151 -"ZMB",286161.0949,0,755640.3907,0,37.87001045,0 -"ZWE",106837.168,0,392573.2003,0,27.21458517,0 +iso3,pa_land_area,pa_marine_area,land_area,marine_area,percentage_pa_land_cover,percentage_pa_marine_cover,percentage_nr_land_cover,percentage_nr_marine_cover,nr_version,nr_report_url +ABNJ,0,2608397.416,0,13945571.19,0,18.7041275,na,na,na, +ABW,35.833833,0.026514,189.420844,25213.94735,18.91757646,0.000105156,na,na,na, +AFG,673.16062,0,642899.1342,0,0.104707035,0,na,na,,No information found in 5th National Report +AGO,87506.59246,24.341169,1255217.852,493753.373,6.971426697,0.004929823,12.5,na,5,https://www.cbd.int/doc/world/ao/ao-nr-05-en.pdf +AIA,6.274344,32.219534,85.524417,92653.59144,7.336318937,0.034774188,na,na,na, +ALA,26.105068,503.943526,0,0,0,0,na,na,na, +ALB,5098.51665,304.392513,28746.5563,11199.39919,17.7360954,2.717936094,15.83,na,5,https://www.cbd.int/doc/world/al/al-nr-05-en.pdf +AND,126.120308,0,471.870724,0,26.72772469,0,35.7,0,6,https://chm.cbd.int/pdf/documents/nationalReport6/241228/1 +ARE,12733.89139,6166.123302,70921.45739,54711.04352,17.95492064,11.2703449,na,na,, +ARG,235910.9544,41249.95469,2785327.721,1083150.624,8.469773688,3.808330418,na,na,, +ARM,6860.44649,0,29685.40559,0,23.1105028,0,13.1,na,5,https://www.cbd.int/doc/world/am/am-nr-05-en.pdf +ASM,33.371984,35457.57732,210.578755,406816.029,15.84774494,8.715875183,na,na,, +ATA,0,4774.711754,0,0,0,0,na,na,, +ATF,7851.080041,1702574.614,7855.43,2277432,99.94462481,74.7585269,na,na,, +ATG,84.536207,196.917827,455.237976,108492.3833,18.56967377,0.181503826,na,na,5,https://www.cbd.int/doc/world/ag/ag-nr-05-en.pdf +AUS,1487710.95,3014429.414,7722102.022,7432133.367,19.26562154,40.5594096,16.25,36.2,5,https://www.cbd.int/doc/world/au/au-nr-05-en.pdf +AUT,23936.60836,0,83912.25912,0,28.52575847,0,27,na,5,https://www.cbd.int/doc/world/at/at-nr-05-en.pdf +AZE,8798.362587,345.314137,86639.62334,79032.11878,10.15512562,0.436928862,10.3,na,5,https://www.cbd.int/doc/world/az/az-nr-05-en.pdf +BDI,2065.705683,0,27210.87243,0,7.591471713,0,na,na,5,https://www.cbd.int/doc/world/bi/bi-nr-05-fr.pdf +BEL,7633.716165,1270.104582,30683.07213,3465.140147,24.87924329,36.65377238,12.77,35.85,6,https://chm.cbd.int/database/record/190C2BA4-9F5C-AD89-32B5-778480AB2C5B +BEN,34369.00255,0,116095.3632,0,29.60411302,0,20.16,na,5,https://www.cbd.int/doc/world/bj/bj-nr-05-fr.pdf +BES,91.577774,2755.525866,322.852496,25112.35272,28.36520551,10.97279055,na,na,, +BFA,41157.73345,0,276403.7182,0,14.89044131,0,na,na,, +BGD,6455.725175,4530.200776,140160.1678,84563.21214,4.605962789,5.357176793,1.8,2.05,5,https://www.cbd.int/doc/world/bd/bd-nr-05-en.pdf +BGR,44996.29746,2851.951552,110862.7479,35171.8505,40.58739145,8.108619568,34,na,5,https://www.cbd.int/doc/world/bg/bg-nr-05-en.pdf +BHR,45.481965,94.820117,686.857403,7632.763476,6.621747804,1.24227768,na,na,5,https://www.cbd.int/doc/world/bh/bh-nbsap-v2-en.pdf +BHS,4930.158571,47355.48699,13458.00624,597705.1345,36.63364754,7.922884422,na,na,, +BIH,714.847791,0,51225.15128,0,1.395501571,0,2,na,5,https://www.cbd.int/doc/world/ba/ba-nr-05-en.pdf +BLM,5.112058,4243.89095,25.109707,4317.87991,20.35889148,98.28645165,na,na,, +BLR,19383.06377,0,207228.0654,0,9.353493568,0,8.72,0,6,https://chm.cbd.int/pdf/documents/nationalReport6/241352/1 +BLZ,8401.612777,3653.592271,22297.76618,36249.83866,37.67916799,10.07892009,36.6,19.8,6,https://chm.cbd.int/database/record/7E3D234F-E8AD-520C-C92B-490CE2806718 +BMU,1.507493,0.254821,72.478422,451643.6848,2.079919731,0.0000564,na,na,, +BOL,336406.5863,0,1089908.94,0,30.86556811,0,23,na,5,https://www.cbd.int/doc/world/bo/bo-nr-05-es.pdf +BRA,2509320.851,977792.6843,8529399.243,3672584.326,29.41966695,26.62410437,16,1.5,5,https://www.cbd.int/doc/world/br/br-nr-05-en.pdf +BRB,5.640151,10.321249,444.068519,185019.8485,1.270108274,0.005578455,na,na,, +BRN,2794.368892,51.679209,5961.686662,25698.41824,46.87211943,0.201098793,41,na,5,https://www.cbd.int/doc/world/bn/bn-nr-05-en.pdf +BTN,19171.20945,0,39933.48814,0,48.00785092,0,51.44,na,6,https://chm.cbd.int/database/record/780672FC-714D-DCB8-463B-8C13757C89D1 +BVT,43.986608,13.870359,50.639751,440224.3515,86.86181731,0.003150748,na,na,, +BWA,169369.804,0,581162.9215,0,29.14325703,0,29.1,na,6,https://chm.cbd.int/database/record/79991C85-C09A-E604-22B4-60A04E4C873D +CAF,112827.1169,0,624568.0306,0,18.06482422,0,41,na,5,https://www.cbd.int/doc/world/cf/cf-nr-05-fr.pdf +CAN,1060926.045,165665.3985,9955032.941,5698082.708,10.65718267,2.907388449,10.5,7.7,6,https://chm.cbd.int/database/record/C54338B1-F853-7542-B2AD-34985A78BE08 +CCK,0,26.294478,0,470116.606,0,0.005593182,na,na,, +CHE,4131.851171,0,41355.27022,0,9.991111529,0,12.5,0,6,https://chm.cbd.int/database/record/79437B02-8838-F9E7-B0BB-571AB9CB6F30 +CHL,155154.8192,1506502.331,759820.962,3657313.03,20.41991824,41.19150641,20,4.3,5,https://www.cbd.int/doc/world/cl/cl-nr-05-es.pdf +CHN,1461511.275,47491.66492,9361608.881,878364.0892,15.61175321,5.406831347,14.86,na,6,https://chm.cbd.int/database/record/C7B6BC32-C06D-B09C-BFF8-7D265F24DBE6 +CIV,74170.95795,130.372645,324107.7064,174842.1752,22.88466349,0.074565902,na,na,6,https://chm.cbd.int/database/record/6C5CE2DC-C057-ADCB-6424-0F485C7DEFEA +CMR,51220.80277,1685.49771,469428.0915,14704.2551,10.91132033,11.4626528,22,na,6,https://chm.cbd.int/database/record/9AC174A3-DA9D-FD8C-764C-E2691FA90EE8 +COD,324289.6789,31.363659,2344275.114,13265.40707,13.83326031,0.236431938,11,na,5,https://www.cbd.int/doc/world/cd/cd-nr-05-fr.pdf +COG,140031.6065,1280.313272,343736.7395,39863.59306,40.73803886,3.211735756,13.2,,, +COK,67.100582,1981949.229,258.141911,1972842.358,25.99367989,100.4616117,1,na,5,https://www.cbd.int/doc/world/ck/ck-nr-05-en.pdf +COL,169544.5157,124670.6807,1145032.899,730741.8263,14.80695584,17.06083821,11.27,1.5,"National Biodiversity Strategy and Action Plan (v.3) +",https://www.cbd.int/doc/world/co/co-nbsap-v3-es.pdf +COM,172.688456,37.464378,1701.123719,165505.135,10.15143426,0.022636384,22,na,5,https://www.cbd.int/doc/world/km/km-nr-05-fr.pdf +CPV,120.123431,5.423162,4148.996795,801065.1343,2.89524039,0.000676994,na,na,, +CRI,14608.17371,15061.6931,51636.14199,576110.183,28.29059869,2.614377171,26,2.7,6,https://chm.cbd.int/database/record/158F6797-D2D0-91DF-E1D1-55EF84D295E0 +CUB,18480.57139,15818.76605,111643.2783,365755.7493,16.55323246,4.324953491,na,na,, +CUW,71.009581,11.656382,450.975385,30535.00449,15.74577757,0.038173834,na,na,na, +CXR,87.649012,0.753516,142.416955,330035.5,61.54394468,0.000228314,na,na,na, +CYM,31.133127,92.901287,289.266866,119605.4547,10.76276984,0.077673119,na,na,na, +CYP,3386.076946,120.958963,9063.433945,98279.50173,37.35975753,0.123076492,na,na,5,https://www.cbd.int/doc/world/cy/cy-nr-05-en.pdf +CZE,17265.28518,0,77916.89786,0,22.15858903,0,na,na,6,https://chm.cbd.int/database/record/C94184E8-C30E-C894-DD41-0F1C62E7AD6A +DEU,135401.4928,25562.51049,357584.3854,56357.93768,37.86560554,45.35742708,na,,5,https://www.cbd.int/doc/world/de/de-nr-05-en.pdf +DJI,343.960179,11.802761,21843.65212,7031.12303,1.57464593,0.167864521,na,na,, +DMA,168.469169,10.012306,766.22784,28749.1828,21.98682431,0.034826402,na,20,5,https://www.cbd.int/doc/world/dm/dm-nbsap-v2-en.pdf +DNK,8318.121999,17932.88012,45314.39778,100469.7507,18.35646595,17.84903415,na,18,5,https://www.cbd.int/doc/world/dk/dk-nr-05-en.pdf +DOM,12727.39737,48625.33917,48509.80547,270774.1738,26.23675203,17.95789402,26,9.6,6,https://chm.cbd.int/database/record/4CAD6958-68E8-A0AB-E856-852720AD7CF8 +DZA,174218.6183,110.267218,2324458.588,128992.9935,7.495019239,0.085483106,na,na,6,https://chm.cbd.int/pdf/documents/nationalReport6/241357/1 +ECU,55980.13776,144125.4431,258138.6687,1079901.071,21.68607208,13.34617096,19.6,na,6,https://chm.cbd.int/database/record/6120BF7A-BD24-5225-9DEF-4D4BE3AD3799 +EGY,129389.8156,11715.81678,984997.4881,236612.0565,13.13605538,4.951487659,14.6,na,, +ERI,5936.248417,0,121834.4031,0,4.872390938,0,na,na,, +ESH,15269.89945,3709.987384,268339.2162,252024.2549,5.690521001,1.472075529,na,na,, +ESP,142393.4623,84225.04305,507013.405,1005717.296,28.08475297,8.374624099,27.3,8,, +EST,9211.085571,6767.85611,45416.48284,36346.36825,20.28137142,18.62044665,18.8,27,6,https://chm.cbd.int/database/record/E23CB1F7-405F-D3C8-C1A5-8D2912E49CCE +ETH,200073.9753,0,1135429.227,0,17.62099923,0,14,na,6,https://chm.cbd.int/database/record/86A4EACE-5D8E-479D-CD33-319D77EA9032 +FIN,44785.69749,8352.242381,337725.5344,79467.83379,13.26097464,10.51021776,13.8,17,6,https://chm.cbd.int/database/record/8BC90B3F-3587-ED1A-0BE5-FBA1287318A4 +FJI,1036.512388,11959.01476,19154.95614,1293034.72,5.411196874,0.924879632,2.7,na,5,https://www.cbd.int/doc/world/fj/fj-nr-05-en.pdf +FLK,61.100176,52.093517,12400.947,549091.6441,0.492705727,0.009487217,na,na,, +FRA,142640.6248,154901.8964,548954.0701,343866.3878,25.98407273,45.04711771,29.5,22.91,6,https://chm.cbd.int/database/record/C838741D-098B-3BAC-AE88-3EDACDB092EA +FRO,33.786873,28.889108,1450.644909,266720.4336,2.329093274,0.010831232,na,na,, +FSM,0.401738,475.050992,817.158681,3011916.98,0.049162789,0.01577238,na,na,5,https://www.cbd.int/doc/world/fm/fm-nr-05-en.pdf +GAB,59707.74205,55720.61869,266044.6066,193292.3301,22.44275605,28.82712349,na,na,, +GBR,70364.52325,208871.0228,245247.5873,723404.7034,28.69121936,28.87332939,28,24,6,https://chm.cbd.int/database/record/A8D6330F-38E5-1E72-50A3-406ABFBB9612 +GEO,5831.181959,152.96289,69971.96837,22907.00911,8.333597146,0.667755835,8.62,na,5,https://www.cbd.int/doc/world/ge/ge-nr-05-en.pdf +GGY,3.42847,33.480134,85.559741,8672.655691,4.007106567,0.386042467,na,na,, +GHA,36153.44517,220.877347,240329.9832,226758.5827,15.04325207,0.097406389,20.66,na,National Biodiversity Strategy and Action Plan (v.2),https://www.cbd.int/doc/world/gh/gh-nbsap-v2-en.pdf +GIB,0.350582,54.748777,7.483277,426.745945,4.684872683,12.8293608,na,na,, +GIN,87841.77901,583.248819,246426.8074,110136.2872,35.64619447,0.529570075,15,na,5,https://www.cbd.int/doc/world/gn/gn-nr-05-fr.pdf +GLP,1170.201833,90957.91428,1678.541217,91039.08888,69.71540652,99.91083544,na,na,, +GMB,441.86625,15.848759,10757.9084,22745.53308,4.107362078,0.069678556,6.4,7.4,6,https://chm.cbd.int/database/record/72F99C09-A17F-497F-7B00-EE38CDE69E5D +GNB,5667.921785,10660.72491,34015.72123,106506.6285,16.66265356,10.00944736,13.75,12.63,National Biodiversity Strategy and Action Plan (v.2),https://www.cbd.int/doc/world/gw/gw-nbsap-v2-en.pdf +GNQ,5228.231142,729.714996,27136.01782,310365.4119,19.26675895,0.235114793,na,na,, +GRC,46842.05403,22326.02504,133012.2689,494172.4508,35.21634088,4.517861125,21,6,5,https://www.cbd.int/doc/world/gr/gr-nr-05-en.pdf +GRD,36.525372,22.668297,373.565244,26281.5155,9.777508102,0.086251864,na,na,5,https://www.cbd.int/doc/world/gd/gd-nr-05-en.pdf +GRL,885647.6174,102325.3573,2154016.464,2264467.117,41.11610251,4.518738935,na,na,, +GTM,22038.64399,1065.193983,109922.2585,118336.3927,20.04930056,0.900140657,31.06,na,5,https://www.cbd.int/doc/world/gt/gt-nr-05-es.pdf +GUF,44030.25688,1365.477582,83034.50925,136563.8487,53.02645524,0.999882176,na,na,, +GUM,126.105991,18.36469,561.240901,202535.0554,22.46913772,0.009067413,na,na,, +GUY,18453.5957,17.404509,211200.2683,136909.9886,8.737486868,0.012712373,8.6,na,,https://www.cbd.int/doc/world/gy/gy-nbsap-v3-en.pdf +HKG,461.758922,77.63466,1102.47934,0,41.88368029,0,na,na,, +HMD,391.198904,70453.52882,391.198904,416110.9534,100,16.93142856,na,na,, +HND,27060.29625,9144.343173,113291.4823,219971.1738,23.88555229,4.157064317,27,,,https://www.cbd.int/doc/world/hn/hn-nbsap-v2-es.pdf +HRV,21752.31666,4737.056345,56855.88522,55462.35822,38.25868962,8.541029442,12.2,1.94,5,https://www.cbd.int/doc/world/hr/hr-nr-05-en.pdf +HTI,534.077665,0,27390.24191,0,1.94988298,0,6.28,na,5,https://www.cbd.int/doc/world/ht/ht-nr-05-fr.pdf +HUN,21049.06124,0,93142.45067,0,22.598784,0,22.2,0,5,https://www.cbd.int/doc/world/hu/hu-nr-05-en.pdf +IDN,231945.6876,181848.1746,1906555.047,5947954.167,12.16569581,3.057323064,22,na,5,https://www.cbd.int/doc/world/id/id-nr-05-en.pdf +IMN,31.751404,419.422876,582.226592,0,5.45344449,0,na,na,, +IND,182646.7039,3928.327395,3061193.496,2301226.499,5.966519403,0.170705813,na,na,6,https://chm.cbd.int/database/record/93FF87C5-5D5D-B150-2A0F-5D3AF67E77C9 +IOT,68.952846,642270.8732,68.952846,642744.6863,100,99.92628284,na,na,, +IRL,10125.44075,9945.099192,70128.37704,426441.7422,14.43843587,2.332112035,14,1.4,5,https://www.cbd.int/doc/world/ie/ie-nr-05-en.pdf +IRN,140225.7781,1808.644138,1627857.17,224800.6295,8.614132779,0.804554748,10.4,na,5,https://www.cbd.int/doc/world/ir/ir-nr-05-en.pdf +IRQ,6713.746023,0,437830.5052,0,1.533412118,0,na,na,, +ISL,18571.902,2863.10312,102301.7663,752783.5116,18.15403846,0.380335525,na,na,,https://chm.cbd.int/database/record/BF781FE9-A0CB-A201-0EAA-F59EC1EC1EFA +ISR,4180.414799,9.067342,20958.0329,27855.0403,19.94659908,0.03255189,21,na,5,https://www.cbd.int/doc/world/il/il-nr-05-en.pdf +ITA,64904.81993,47394.46738,301335.3097,538880.953,21.53906888,8.794979135,21,19.1,6,https://chm.cbd.int/database/record/075ADA4C-96AD-4864-9C6C-D252F644A314 +JAM,1760.198539,1859.991697,11058.94539,246488.4991,15.91651352,0.754595733,18,15,5,https://www.cbd.int/doc/world/jm/jm-nr-05-en.pdf +JEY,22.230736,185.03376,125.218467,2962.105951,17.75356026,6.246696204,na,na,, +JOR,2773.578439,33.455456,89689.84024,93.665949,3.092410948,35.71784235,1.6,25,6,https://chm.cbd.int/database/record/E3AD5C2C-E18B-0515-2B13-B5906FB9C971 +JPN,109936.665,332694.3839,374092.7945,4040612.297,29.38753876,8.233761604,na,8.3,6,https://chm.cbd.int/database/record/134290A2-76E8-AF7A-E322-14E20399677D +KAZ,90083.03007,1249.454686,2719827.869,119085.0237,3.312085705,1.049212275,8.96,na,6,https://chm.cbd.int/database/record/104097C9-32D6-85B6-4630-6D69CC6DC2EF +KEN,72544.60101,903.902773,586770.0015,112400.4482,12.36337932,0.804180755,8,na,5,https://www.cbd.int/doc/world/ke/ke-nr-05-en.pdf +KGZ,13402.50539,0,199957.0236,0,6.702692985,0,7.38,na,6,https://chm.cbd.int/database/record/411B9A5E-1A4D-858E-3E40-643E17C4E9CC +KHM,47503.40661,89.107039,182510.8526,47966.8519,26.02771612,0.185767953,18,na,5,https://www.cbd.int/doc/world/kh/kh-nr-05-en.pdf +KIR,230.885727,408796.5464,1032.564654,3459130.413,22.36041357,11.81789923,na,na,, +KNA,62.014371,17.436922,270.825058,10262.9088,22.89831357,0.169902338,na,na,6,https://chm.cbd.int/database/record/C0A7116F-F642-2089-08C4-81605C16F1BC +KOR,11637.6153,5309.233026,99712.88376,324993.7978,11.671125,1.633641338,11.57,1.4,6,https://chm.cbd.int/database/record/37C38AFC-AF9F-168E-B555-2EBA21CF2DCD +KWT,3048.243171,175.974631,17417.87587,11895.81218,17.50065963,1.479299004,20,3,5,https://www.cbd.int/doc/world/kw/kw-nr-05-ar.pdf +LAO,38581.9612,0,231276.1399,0,16.68220562,0,18,na,, +LBN,268.277274,40.839545,10329.04876,19315.84107,2.597308622,0.211430322,na,na,, +LBR,3914.960978,256.049624,96634.42399,247767.6811,4.051310927,0.103342624,na,na,5,https://www.cbd.int/doc/world/lr/lr-nr-05-en.pdf +LBY,3437.476191,2277.750889,1622615.431,357895.3125,0.211847868,0.636429372,na,na,, +LCA,116.653527,34.007036,622.311137,15560.30791,18.7452096,0.218549891,na,na,, +LIE,70.47938,0,167.064349,0,42.18696593,0,12.3,0,5,https://www.cbd.int/doc/world/li/li-nr-05-en.pdf +LKA,19897.4988,398.564426,66631.50337,534085.0497,29.8619989,0.074625647,28,na,5,https://www.cbd.int/doc/world/lk/lk-nr-05-en.pdf +LSO,79.710462,0,30494.99377,0,0.261388681,0,na,na,, +LTU,11020.11574,1567.706297,64696.51583,6125.653875,17.03355367,25.59247272,na,na,, +LUX,1332.387111,0,2603.081524,0,51.18499358,0,27,na,6,https://chm.cbd.int/database/record/7C393CC4-D665-CE1D-B971-CD4271602FB8 +LVA,11720.8467,4631.301701,64501.94768,28879.55287,18.17130664,16.03661152,17,na,5,https://www.cbd.int/doc/world/lv/lv-nr-05-en.pdf +MAF,7.609068,1030.536085,59.578286,1068.741983,12.77154566,96.42515232,na,na,, +MAR,125351.1662,717.910689,407280.495,276136.4075,30.77760111,0.259984077,16.2,na,6,https://chm.cbd.int/database/record/650BA56F-8B7E-91A7-6622-56AEEEDD28CE +MCO,0.528888,283.522868,1.595194,284.22031,33.1550896,99.75461219,na,na,5,https://www.cbd.int/doc/world/mc/mc-nr-05-fr.pdf +MDA,1409.67766,0,33963.76161,0,4.15053455,0,5.8,0,6,https://chm.cbd.int/database/record/7320428F-D31E-FD33-F7FE-48CC53E2EB23 +MDG,33242.1381,8997.672125,594718.7259,1205824.849,5.589556314,0.746184003,na,na,5,https://www.cbd.int/doc/world/mg/mg-nr-05-en.pdf +MDV,3.683705,474.933082,304.666095,922109.9914,1.209095814,0.051505036,na,na,5,https://www.cbd.int/doc/world/mv/mv-nr-05-en.pdf +MEX,284178.223,707942.1699,1965284.828,3284659.67,14.45990011,21.5529839,12.9,21,6,https://www.cbd.int/doc/world/mx/mx-nr-05-es.pdf +MHL,33.593723,5388.396257,281.928035,2004587.264,11.91570856,0.268803277,16,18,5, +MKD,2686.96127,0,25443.14057,0,10.56065096,0,na,0,, +MLI,103445.3359,0,1256684.114,0,8.231610053,0,na,na,, +MLT,97.945322,3495.870104,324.970466,55696.65564,30.13976107,6.276624806,13,na,5,https://www.cbd.int/doc/world/mt/mt-nr-05-en.pdf +MMR,42878.48876,11964.44587,673078.5676,514147.2175,6.370502765,2.327046702,8.7,na,6,https://chm.cbd.int/database/record/F7636AF4-F0E7-CAAE-ED0A-CE0E9F3A7F9C +MNE,1456.773173,10.436511,13847.56188,7459.237226,10.52006978,0.139913917,9.05,na,5,https://www.cbd.int/doc/world/me/me-nr-05-en.pdf +MNG,277375.263,0,1565864.159,0,17.71387775,0,17.4,0,5,https://www.cbd.int/doc/world/mn/mn-nr-05-en.pdf +MNP,38.441128,257249.9205,501.224059,773667.8566,7.669449882,33.25069257,na,na,na, +MOZ,170662.332,12821.00808,791081.8731,574409.6185,21.5732831,2.232032276,26,na,5,https://www.cbd.int/doc/world/mz/mz-nr-05-en.pdf +MRT,6507.878451,6487.581027,1046302.522,156197.8626,0.621988222,4.153437775,na,na,5,https://www.cbd.int/doc/world/mr/mr-nr-05-fr.pdf +MSR,11.182345,0.000273,100.664381,7628.258983,11.10854196,0.00000358,na,na,na, +MTQ,1280.736358,47915.67266,1149.925062,47644.30608,100,100,na,na,na, +MUS,97.460291,49.64392,2062.481937,1280068.317,4.725388827,0.003878224,7.6,na,5,https://www.cbd.int/doc/world/mu/mu-nr-05-en.pdf +MWI,27190.40931,0,118859.7323,0,22.87604791,0,na,na,5,https://www.cbd.int/doc/world/mw/mw-nr-05-en.pdf +MYS,63418.88193,6977.70038,331700.5726,451741.5382,19.11931638,1.544622265,na,1.4,5,https://www.cbd.int/doc/world/my/my-nr-05-en.pdf +MYT,44.436011,68829.33301,396.377408,63362.33751,11.2105307,100,na,na,, +NAM,313534.3569,9646.27499,827465.4339,562727.6243,37.89093104,1.714199654,16.7,na,5,https://www.cbd.int/doc/world/na/na-nr-05-en.pdf +NCL,10413.51706,1325070.398,19141.03171,1371803.153,54.40415763,96.59333378,na,na,na, +NER,206090.4851,0,1190098.655,0,17.31709251,0,15.21,0,6,https://chm.cbd.int/database/record/AB3C2537-889F-115F-3B85-E42EA3C3B1EC +NFK,19.957518,189084.3131,42.778966,432638.0836,46.65264233,43.7049627,na,na,na, +NGA,127359.0343,30.555979,914306.1122,182868.1867,13.92958361,0.016709292,6,na,5,https://www.cbd.int/doc/world/ng/ng-nr-05-en.pdf +NIC,48104.12745,6660.345162,129222.3127,223935.2389,37.22586791,2.974228261,na,na,, +NIU,53.434436,36.900176,267.755527,318243.6931,19.95642689,0.011594943,23,na,5,https://www.cbd.int/doc/world/nu/nu-nr-05-en.pdf +NLD,3958.425269,17126.39853,35205.61182,64204.97933,11.24373378,26.67456435,21.7,19,5,https://www.cbd.int/doc/world/nl/nl-nr-05-en.pdf +NOR,55973.89254,7696.958098,325287.8156,926317.7348,17.20749744,0.830919868,17.2,3.1,6,https://chm.cbd.int/database/record/D874F120-974C-0CFE-32C4-6BCBE13146B5 +NPL,34897.91838,0,147709.5419,0,23.62604199,0,23.39,0,6,https://chm.cbd.int/database/record/A6B3AF62-55F8-F0D0-7106-76D42630A951 +NZL,88464.44129,1249447.107,269651.6705,4106953.859,32.80693242,30.42272082,36.73,7,5,https://www.cbd.int/doc/world/nz/nz-nr-05-en.pdf +OMN,7985.072834,663.989764,310373.1429,538980.1915,2.572733181,0.123193723,na,na,5,https://www.cbd.int/doc/world/om/om-nr-05-en.pdf +PAK,98288.08094,1707.397433,798143.6542,222743.9199,12.31458528,0.76652931,12,0,5,https://www.cbd.int/doc/world/pk/pk-nr-05-en.pdf +PAN,15773.05873,5593.115449,75497.94621,332643.4965,20.89203683,1.681414339,31.8,13.5,6,https://chm.cbd.int/database/record/05B386D2-5BCD-A52D-6097-F853803CC619 +PCN,37.035971,839648.6171,45.589943,839478.9503,81.23715136,100.020211,na,na,, +PER,279619.5731,4036.819355,1298537.038,838329.5928,21.53343069,0.481531296,17.3,0.3,6,https://chm.cbd.int/database/record/90F134F5-E726-C4E5-77FD-F2E103B0F872 +PHL,45762.33428,21269.12928,298774.9046,1835028.192,15.31665932,1.159062808,12.8,na,PBSAP 2015-2028,https://www.cbd.int/doc/world/ph/ph-nbsap-v3-en.pdf +PLW,140.309346,504690.9119,501.101386,608152.4889,28.00019116,82.98756005,na,na,,https://www.cbd.int/doc/world/pw/pw-nr-05-en.pdf +PNG,14330.32953,4585.469187,467405.9203,2407381.818,3.065928118,0.19047536,na,na,, +POL,123892.6648,7210.775928,311923.5191,31945.64308,39.71892379,22.57201682,19.6,24,6,https://chm.cbd.int/database/record/4ACD5165-ABFA-57D0-CAB0-4FC82FB386DD +PRI,657.215588,3077.928815,9041.14294,176163.0606,7.269164887,1.747204439,na,na,, +PRK,2975.649808,25.611911,122186.1412,115967.2688,2.435341504,0.022085465,7.2,na,5,https://www.cbd.int/doc/world/kp/kp-nr-05-en.pdf +PRT,21114.4737,285578.3431,92141.09473,1724156.15,22.91537099,16.56336887,22,na,5,https://www.cbd.int/doc/world/pt/pt-nr-05-pt.pdf +PRY,57473.37524,0,401498.4235,0,14.31472003,0,15,0,6,https://chm.cbd.int/database/record/4406F62E-6E7A-1826-E2B9-082208FCC685 +PSE,516.767863,0,6181.987004,0,8.35925185,0,9,0,5,https://www.cbd.int/doc/world/ps/ps-nr-05-en.pdf +PYF,73.831954,206.943116,3780.061341,4795468.095,1.9531946,0.004315389,na,na,, +QAT,1512.836196,538.143058,11435.55274,31987.65323,13.22923544,1.682346167,na,na,,https://www.cbd.int/doc/world/qa/qa-nr-05-ar.pdf +REU,1600.443036,40.854528,2536.304619,316498.9308,63.10137292,0.012908267,na,na,, +ROU,58224.53787,6865.607617,237452.8706,29726.44952,24.52046072,23.09595572,33,na,5,https://www.cbd.int/doc/world/ro/ro-nr-05-en.pdf +RUS,1641400.741,228247.3371,16874835.52,7673314.113,9.726914016,2.974560062,11.8,na,5,https://www.cbd.int/doc/world/ru/ru-nr-05-ru.pdf +RWA,2319.729895,0,25452.13068,0,9.114089205,0,10.3,0,5,https://www.cbd.int/doc/world/rw/rw-nr-05-en.pdf +SAU,92063.63578,5495.452494,1934058.339,220338.2086,4.760127134,2.494098744,na,na,,https://www.cbd.int/doc/world/sa/sa-nr-05-ar.pdf +SDN,42697.53551,10661.95429,1871251.813,66785.64454,2.281763214,15.9644402,5.8,10,6,https://chm.cbd.int/database/record/2748B1C1-31BC-F7AF-54E0-FC64E251AA3D +SEN,50179.21798,1766.175004,197923.9723,158426.4028,25.3527743,1.114823649,na,2.44,6,https://chm.cbd.int/database/record/58DAD993-C79B-6275-8330-99B6F44BA483 +SGP,33.585431,0.100552,604.646128,762.68502,5.55455984,0.013183948,4.7,na,5,https://www.cbd.int/doc/world/sg/sg-nr-05-en.pdf +SGS,3971.692688,1065900.045,3971.692688,1445886.657,100,73.71947451,na,na,, +SHN,157.137807,453612.5594,434.343214,1647745.112,36.17825764,27.52929177,na,na,, +SJM,40092.18364,82714.05977,61261.11552,1081582.098,65.44474957,7.647506364,na,na,, +SLB,514.977904,1879.382668,29191.64527,1609756.547,1.764127712,0.116749497,5,6,5,https://www.cbd.int/doc/world/sb/sb-nr-05-en.pdf +SLE,6824.701851,862.533185,72709.02892,160452.5672,9.386319626,0.53756272,4,na,5,https://www.cbd.int/doc/world/sl/sl-nr-05-en.pdf +SLV,1805.57217,664.798852,20573.30437,94238.04744,8.776286673,0.705446335,na,na,, +SOM,,,,,,,0.8,,5,https://www.cbd.int/doc/world/so/so-nr-05-en.pdf +SPM,7.163126,7.021851,237.589267,12367.3281,3.014919862,0.05677743,na,na,, +SRB,6687.228546,0,88509.11514,0,7.555412271,0,6,na,5,https://www.cbd.int/doc/world/rs/rs-nr-05-en.pdf +SSD,98214.48596,0,633580.4791,0,15.50150126,0,13,0,5,https://www.cbd.int/doc/world/ss/ss-nr-05-en.pdf +STP,289.416981,35.280222,989.259888,131709.1714,29.25590985,0.026786458,30,na,5,https://www.cbd.int/doc/world/st/st-nr-05-fr.pdf +SUR,21425.69157,1980.928256,147558.4488,128362.9877,14.52013879,1.543223862,na,na,, +SVK,18395.39989,0,48941.21743,0,37.58672313,0,23.3,0,5,https://www.cbd.int/doc/world/sk/sk-nr-05-en.pdf +SVN,10877.50335,396.970655,20308.54692,186.314047,53.56120946,100,13,0.4,5,https://www.cbd.int/doc/world/si/si-nr-05-en.pdf +SWE,64033.65777,23604.86049,449390.1761,154980.4918,14.24901148,15.23085919,14.5,10,6,https://chm.cbd.int/database/record/060FF276-745E-F718-DC53-A1A48915D17E +SWZ,738.20711,0,17335.867,0,4.258264729,0,3.9,,5,https://www.cbd.int/doc/world/sz/sz-nr-05-en.pdf +SXM,0.000136,43.282473,36.455424,497.533856,0.000373058,8.699402559,na,na,, +SYC,241.673419,209929.3831,486.864575,1340839.459,49.63873558,15.65656363,46.6,0.03,5,https://www.cbd.int/doc/world/sc/sc-nr-05-en.pdf +SYR,1292.567557,25.201794,188612.6151,10203.61673,0.685302813,0.246988834,na,na,, +TCA,451.737848,149.820284,1018.174578,154242.1775,44.36742556,0.097133149,na,na,, +TCD,259841.8709,0,1276585.969,0,20.35443575,0,12.3,na,5,https://www.cbd.int/doc/world/td/td-nr-05-fr.pdf +TGO,15876.86929,30.987414,57480.648,15520.93847,27.6212427,0.1996491,na,na,,https://chm.cbd.int/database/record/77EEB058-F6CE-9107-7EE8-1F96B95E6314 +THA,97391.37501,5773.799574,517786.6125,306890.539,18.80917209,1.881387283,na,20,6,https://chm.cbd.int/database/record/46D5C83F-588E-181B-D5F7-80C3E0A7552E +TJK,31690.1072,0,142244.2178,0,22.27866109,0,na,0,, +TKL,0.998313,9.510634,15.181307,321242.5226,6.575935787,0.002960578,na,na,, +TKM,15336.26559,2331.770078,472137.5437,77885.16348,3.248262248,2.993856562,4,na,5,https://www.cbd.int/doc/world/tm/tm-nr-05-ru.pdf +TLS,1959.473342,584.110567,15006.53549,42501.27223,13.05746648,1.374336664,na,na,, +TON,121.971897,10055.15988,766.502265,668054.6083,15.91279016,1.505140411,na,na,, +TTO,1594.834874,37.071977,5213.102096,75798.46305,30.59281872,0.048908613,32,0.1,5,https://chm.cbd.int/api/v2013/documents/C7EFE124-DEAA-B14C-3D98-D0B9E66D99DE/attachments/TT%20Fifth%20National%20Report%20to%20the%20CBD_FINAL.pdf +TUN,12286.01772,1042.360893,155230.8391,100660.5035,7.914675845,1.035521239,17,10,6,https://chm.cbd.int/database/record/5DAF5DAA-D4D2-F800-CA8C-9462C5D56858 +TUR,1709.103181,270.18272,782238.8742,255925.9584,0.218488653,0.105570659,na,na,5,https://www.cbd.int/doc/world/tr/tr-nr-05-en.pdf +TUV,0.815638,62.087748,41.785977,731900.0274,1.951941916,0.008483091,na,na,,No information in 5th national report +TWN,7145.881111,3846.48539,36245.33119,342996.9472,19.71531471,1.121434293,na,na,, +TZA,361593.899,7330.445298,947252.6908,243129.5958,38.17290808,3.015036189,54.6,6.5,6,https://chm.cbd.int/database/record/57914673-CF81-82CF-0808-C76D810BAB97 +UGA,39058.6568,0,243144.8535,0,16.06394552,0,18,0,5,https://www.cbd.int/doc/world/ug/ug-nr-05-en.pdf +UKR,23854.95209,4606.122845,598828.7966,134873.1664,3.983601361,3.41515141,6.05,na,5,https://www.cbd.int/doc/world/ua/ua-nr-05-en.pdf +UMI,363.497911,1278997.392,363.495,1964384.514,100,65.10931964,na,na,, +URY,6150.088211,931.553409,178459.889,130097.9744,3.44620197,0.716039902,8.6,na,6,https://chm.cbd.int/database/record/50CCF748-F428-8010-744B-D5B1BD5F3A66 +USA,1233174.536,3527444.441,9490391.294,8591493.148,12.9939272,41.05740853,,,, +UZB,15200.69725,0,450362.5106,0,3.37521372,0,5,0,5,https://www.cbd.int/doc/world/uz/uz-nr-05-en.pdf +VCT,91.899504,80.359651,409.906569,36510.93366,22.41962217,0.220097497,na,8.5,5,https://www.cbd.int/doc/world/vc/vc-nr-05-en.pdf +VEN,496700.9958,16499.94342,917367.6523,473325.0963,54.14415851,3.485964202,na,na,5,https://www.cbd.int/doc/world/ve/ve-nr-05-es.pdf +VGB,15.995538,3.314329,175.605042,80529.47601,9.108814769,0.004115672,na,na,na, +VIR,51.815838,306.278747,375.62477,36030.25521,13.7945743,0.850059888,na,na,na, +VNM,24994.31244,3630.264972,329880.371,647232.2216,7.576780747,0.560890643,7,na,5,https://www.cbd.int/doc/world/vn/vn-nr-05-en.pdf +VUT,528.222229,47.509867,12575.12729,622073.2227,4.200531866,0.007637343,na,na,na, +WLF,0.301679,0,180.605517,0,0.167037533,0,na,na,na, +WSM,212.692968,114.846969,2893.945283,132305.5976,7.349584985,0.086804316,na,na,5,https://www.cbd.int/doc/world/ws/ws-nr-05-en.pdf +YEM,3519.593039,2562.368242,455938.919,548013.9807,0.77194398,0.467573517,na,na,5,https://www.cbd.int/doc/world/ye/ye-nr-05-en.pdf +ZAF,101336.4951,186106.9994,1224384.577,1542559.897,8.276524958,12.0648151,12.96,10,6,https://chm.cbd.int/database/record/33303CBE-1BB9-9034-35F8-283CC0A1D63F +ZMB,286161.093,0,755640.3907,0,37.87001019,0,37.8,0,6,https://chm.cbd.int/database/record/AB99C119-FDF3-C589-9CBB-B0B2C39A58C8 +ZWE,106837.168,0,392573.2003,0,27.21458519,0,28,0,5,https://www.cbd.int/doc/world/zw/zw-nr-05-en.pdf From aab2cd78b7d6fb5e858fa489c7f3e953cbb05c6f Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Tue, 6 Aug 2019 11:16:27 +0100 Subject: [PATCH 15/25] nil is allowed for not applicable percentages --- app/presenters/statistic_presenter.rb | 13 ++++++++----- .../stats/facts/_coverage_stats_land.html.erb | 2 +- .../stats/facts/_coverage_stats_marine.html.erb | 2 +- lib/modules/stats/country_statistics_importer.rb | 2 ++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/presenters/statistic_presenter.rb b/app/presenters/statistic_presenter.rb index 41708765e..61ddf1b9b 100644 --- a/app/presenters/statistic_presenter.rb +++ b/app/presenters/statistic_presenter.rb @@ -36,11 +36,14 @@ def method_missing method end ["land", "marine"].each do |land_type| - ["pa", "nr"].each do |field_type| - stat = "percentage_#{field_type}_#{land_type}_cover".to_sym - define_method(stat) do - (@statistic.send(stat) && @statistic.send(stat) > 100.0) ? 100.0 : (@statistic.send(stat) || 0) rescue 0 - end + stat = "percentage_pa_#{land_type}_cover".to_sym + define_method(stat) do + (@statistic.send(stat) && @statistic.send(stat) > 100.0) ? 100.0 : (@statistic.send(stat) || 0) rescue 0 + end + + stat = "percentage_nr_#{land_type}_cover".to_sym + define_method(stat) do + (@statistic.send(stat) && @statistic.send(stat) > 100.0) ? 100.0 : @statistic.send(stat).round(0) rescue nil end end diff --git a/app/views/shared/stats/facts/_coverage_stats_land.html.erb b/app/views/shared/stats/facts/_coverage_stats_land.html.erb index 9788a3a97..8ad0527fa 100644 --- a/app/views/shared/stats/facts/_coverage_stats_land.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats_land.html.erb @@ -36,7 +36,7 @@ <% unless is_regional_page(controller_name) %>

- <%= commaify @presenter.percentage_nr_land_cover.round(0) %>% + <%= commaify @presenter.percentage_nr_land_cover %>% <%= @presenter.nr_version %>th National Report Coverage

diff --git a/app/views/shared/stats/facts/_coverage_stats_marine.html.erb b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb index a1767bd69..85459d3b8 100644 --- a/app/views/shared/stats/facts/_coverage_stats_marine.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb @@ -36,7 +36,7 @@ <% unless is_regional_page(controller_name) %>

- <%= commaify @presenter.percentage_nr_marine_cover.round(0) %>% + <%= commaify @presenter.percentage_nr_marine_cover %>% <%= @presenter.nr_version %>th National Report Coverage

diff --git a/lib/modules/stats/country_statistics_importer.rb b/lib/modules/stats/country_statistics_importer.rb index 3be54c162..01d433473 100644 --- a/lib/modules/stats/country_statistics_importer.rb +++ b/lib/modules/stats/country_statistics_importer.rb @@ -11,6 +11,8 @@ def self.import_stats path, model CSV.foreach(path, headers: true) do |row| country_iso3 = row.delete('iso3').last + # If the value is na (not applicable) use nil + row.each { |key, value| row[key] = nil if value && value.downcase == 'na' } attrs = {country_id: countries[country_iso3]}.merge(row) model.create(attrs) From 4d19154640d4c657666b9c5eee35b47b4cdb7842 Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Tue, 6 Aug 2019 11:35:16 +0100 Subject: [PATCH 16/25] Hide stats if NA --- app/views/shared/stats/facts/_coverage_stats.html.erb | 8 +++++++- .../shared/stats/facts/_coverage_stats_land.html.erb | 2 +- .../shared/stats/facts/_coverage_stats_marine.html.erb | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/app/views/shared/stats/facts/_coverage_stats.html.erb b/app/views/shared/stats/facts/_coverage_stats.html.erb index 70d41b648..fa2955749 100644 --- a/app/views/shared/stats/facts/_coverage_stats.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats.html.erb @@ -14,7 +14,13 @@ Warning: These statistics might differ from those reported officially by countries due to difference in methodologies and datasets used to assess protected area coverage and differences in the base maps used to measure - terrestrial and marine area of a country or territory. <% unless @for_pdf || is_regional_page(controller_name) %> <%= link_to "Download the country's latest national report (pdf)", @presenter.nr_report_url, title: "Dowload the national report for #{@country.name}", class: 'link-with-icon bold' %><% end %> + terrestrial and marine area of a country or territory. + <% unless @for_pdf || is_regional_page(controller_name) %> + <% if @presenter.nr_report_url.present? %> + + <%= link_to "Download the country's latest national report (pdf)", @presenter.nr_report_url, title: "Dowload the national report for #{@country.name}", class: 'link-with-icon bold' %> + <% end %> + <% end %>

<% if has_restricted_sites? %> diff --git a/app/views/shared/stats/facts/_coverage_stats_land.html.erb b/app/views/shared/stats/facts/_coverage_stats_land.html.erb index 8ad0527fa..898b1620a 100644 --- a/app/views/shared/stats/facts/_coverage_stats_land.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats_land.html.erb @@ -33,7 +33,7 @@ Total Land Area

- <% unless is_regional_page(controller_name) %> + <% if !is_regional_page(controller_name) && @presenter.percentage_nr_land_cover %>

<%= commaify @presenter.percentage_nr_land_cover %>% diff --git a/app/views/shared/stats/facts/_coverage_stats_marine.html.erb b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb index 85459d3b8..bd7e16274 100644 --- a/app/views/shared/stats/facts/_coverage_stats_marine.html.erb +++ b/app/views/shared/stats/facts/_coverage_stats_marine.html.erb @@ -33,7 +33,7 @@ Total Marine Area

- <% unless is_regional_page(controller_name) %> + <% if !is_regional_page(controller_name) && @presenter.percentage_nr_marine_cover %>

<%= commaify @presenter.percentage_nr_marine_cover %>% From 2168c769d1f08e2e9d34c600ec420b4de9311f28 Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Tue, 6 Aug 2019 13:18:00 +0100 Subject: [PATCH 17/25] Rescue when data is not ready in the db --- app/presenters/statistic_presenter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/presenters/statistic_presenter.rb b/app/presenters/statistic_presenter.rb index 61ddf1b9b..ac04efe11 100644 --- a/app/presenters/statistic_presenter.rb +++ b/app/presenters/statistic_presenter.rb @@ -28,7 +28,7 @@ def percentage_total_pa_cover end def nr_report_url - @statistic.send(:nr_report_url) || '' + (@statistic.send(:nr_report_url) || '') rescue '' end def method_missing method From df8ee4e0ce369c9b545d94c0de91f4aeb2df8a8c Mon Sep 17 00:00:00 2001 From: stacytalbot Date: Tue, 6 Aug 2019 15:14:15 +0100 Subject: [PATCH 18/25] Test on staging with a different db --- config/database.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.yml b/config/database.yml index 2bb6242cf..348fdb67b 100644 --- a/config/database.yml +++ b/config/database.yml @@ -20,4 +20,4 @@ production: staging: <<: *default - database: pp_staging + database: feature/nr-stats From 9e7ed83d1c8d2462f92c5fcf963c8a091d1cdd4d Mon Sep 17 00:00:00 2001 From: stacytalbot Date: Mon, 12 Aug 2019 12:14:41 +0100 Subject: [PATCH 19/25] Change staging repo to point to develop branch db --- config/database.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/database.yml b/config/database.yml index 348fdb67b..5805f3737 100644 --- a/config/database.yml +++ b/config/database.yml @@ -20,4 +20,4 @@ production: staging: <<: *default - database: feature/nr-stats + database: develop From a92a0ec026d5270d9811eccce07790c4b7233c61 Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Mon, 12 Aug 2019 14:37:29 +0100 Subject: [PATCH 20/25] Make sure to use correct method name --- app/presenters/statistic_presenter.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/presenters/statistic_presenter.rb b/app/presenters/statistic_presenter.rb index ac04efe11..899cd6482 100644 --- a/app/presenters/statistic_presenter.rb +++ b/app/presenters/statistic_presenter.rb @@ -41,9 +41,9 @@ def method_missing method (@statistic.send(stat) && @statistic.send(stat) > 100.0) ? 100.0 : (@statistic.send(stat) || 0) rescue 0 end - stat = "percentage_nr_#{land_type}_cover".to_sym - define_method(stat) do - (@statistic.send(stat) && @statistic.send(stat) > 100.0) ? 100.0 : @statistic.send(stat).round(0) rescue nil + nr_stat = "percentage_nr_#{land_type}_cover".to_sym + define_method(nr_stat) do + (@statistic.send(nr_stat) && @statistic.send(nr_stat) > 100.0) ? 100.0 : @statistic.send(nr_stat).round(0) rescue nil end end From 28c0be6f3da64d7af3f2c79146b70b8ba0182f40 Mon Sep 17 00:00:00 2001 From: stacytalbot Date: Mon, 12 Aug 2019 16:50:13 +0100 Subject: [PATCH 21/25] Update stats for Germany --- lib/data/seeds/country_statistics.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/data/seeds/country_statistics.csv b/lib/data/seeds/country_statistics.csv index eee4a520d..043722e6f 100644 --- a/lib/data/seeds/country_statistics.csv +++ b/lib/data/seeds/country_statistics.csv @@ -60,7 +60,7 @@ CXR,87.649012,0.753516,142.416955,330035.5,61.54394468,0.000228314,na,na,na, CYM,31.133127,92.901287,289.266866,119605.4547,10.76276984,0.077673119,na,na,na, CYP,3386.076946,120.958963,9063.433945,98279.50173,37.35975753,0.123076492,na,na,5,https://www.cbd.int/doc/world/cy/cy-nr-05-en.pdf CZE,17265.28518,0,77916.89786,0,22.15858903,0,na,na,6,https://chm.cbd.int/database/record/C94184E8-C30E-C894-DD41-0F1C62E7AD6A -DEU,135401.4928,25562.51049,357584.3854,56357.93768,37.86560554,45.35742708,na,,5,https://www.cbd.int/doc/world/de/de-nr-05-en.pdf +DEU,135401.4928,25562.51049,357584.3854,56357.93768,37.86560554,45.35742708,4.2,na,5,https://www.cbd.int/doc/world/de/de-nr-05-en.pdf DJI,343.960179,11.802761,21843.65212,7031.12303,1.57464593,0.167864521,na,na,, DMA,168.469169,10.012306,766.22784,28749.1828,21.98682431,0.034826402,na,20,5,https://www.cbd.int/doc/world/dm/dm-nbsap-v2-en.pdf DNK,8318.121999,17932.88012,45314.39778,100469.7507,18.35646595,17.84903415,na,18,5,https://www.cbd.int/doc/world/dk/dk-nr-05-en.pdf From 39d8a333c17bdb75efe258a09583155d887a6d5d Mon Sep 17 00:00:00 2001 From: stacytalbot Date: Tue, 13 Aug 2019 08:34:35 +0100 Subject: [PATCH 22/25] Update ESP row in country stats CSV --- lib/data/seeds/country_statistics.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/data/seeds/country_statistics.csv b/lib/data/seeds/country_statistics.csv index 043722e6f..4dfab7765 100644 --- a/lib/data/seeds/country_statistics.csv +++ b/lib/data/seeds/country_statistics.csv @@ -70,7 +70,7 @@ ECU,55980.13776,144125.4431,258138.6687,1079901.071,21.68607208,13.34617096,19.6 EGY,129389.8156,11715.81678,984997.4881,236612.0565,13.13605538,4.951487659,14.6,na,, ERI,5936.248417,0,121834.4031,0,4.872390938,0,na,na,, ESH,15269.89945,3709.987384,268339.2162,252024.2549,5.690521001,1.472075529,na,na,, -ESP,142393.4623,84225.04305,507013.405,1005717.296,28.08475297,8.374624099,27.3,8,, +ESP,142393.4623,84225.04305,507013.405,1005717.296,28.08475297,8.374624099,27.3,8,6,https://chm.cbd.int/database/record?documentID=241911 EST,9211.085571,6767.85611,45416.48284,36346.36825,20.28137142,18.62044665,18.8,27,6,https://chm.cbd.int/database/record/E23CB1F7-405F-D3C8-C1A5-8D2912E49CCE ETH,200073.9753,0,1135429.227,0,17.62099923,0,14,na,6,https://chm.cbd.int/database/record/86A4EACE-5D8E-479D-CD33-319D77EA9032 FIN,44785.69749,8352.242381,337725.5344,79467.83379,13.26097464,10.51021776,13.8,17,6,https://chm.cbd.int/database/record/8BC90B3F-3587-ED1A-0BE5-FBA1287318A4 From 73f350bb7caaf590552dfa129d6a88c89a84f08f Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Tue, 13 Aug 2019 09:39:12 +0100 Subject: [PATCH 23/25] Submodule to point to develop branch --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index d5564d827..162f95637 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "db"] path = db url = https://github.com/unepwcmc/protectedplanet-db.git - branch = feature/nr-stats + branch = develop From 3fdd515de9c152fc712c368758625fedd5ce448c Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Tue, 13 Aug 2019 09:41:48 +0100 Subject: [PATCH 24/25] Update submodule --- .gitmodules | 2 +- db | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 162f95637..37ae0a64d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "db"] path = db url = https://github.com/unepwcmc/protectedplanet-db.git - branch = develop + branch = master diff --git a/db b/db index 4286a2fe6..f89580eb1 160000 --- a/db +++ b/db @@ -1 +1 @@ -Subproject commit 4286a2fe61ba9228fb4bdf27a884f075e612631c +Subproject commit f89580eb14f3e416472ea68996280e5ffc7e6444 From ece8921d17378f2e928eb5f198384c584f4dafcf Mon Sep 17 00:00:00 2001 From: Ferdinando Primerano Date: Tue, 13 Aug 2019 09:42:00 +0100 Subject: [PATCH 25/25] Update CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index efd85b42c..0fa57e723 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +### 2.6.0 + +* Add National Report stats to countries +* Update country_statistics csv structure to include National Report stats + ### 2.5.3 * Add country, pame_country and marine stats (WDPA August 2019 release).