diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..11ebdf9
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,16 @@
+# EditorConfig is awesome: http://EditorConfig.org
+
+# top-most EditorConfig file
+root = true
+
+# Unix-style newlines with a newline ending every file
+[*]
+end_of_line = lf
+insert_final_newline = true
+
+# Matches multiple files with brace expansion notation
+# Set default charset
+[*.{js}]
+charset = utf-8
+indent_style = space
+indent_size = 2
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4eb8312
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,16 @@
+_site/
+.sass-cache/
+.jekyll-metadata
+.DS_Store
+.Rproj.user
+.Rhistory
+.spyproject/
+*__pycache__/
+*.Rproj
+Gemfile.lock
+deploy_key*
+deploy_key*.pub
+*.keybase
+data/edges/
+data/headlines/
+data/json/
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..f0f2d19
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,30 @@
+language: ruby
+rvm:
+- 2.4.0
+dist: trusty
+sudo: false
+branches:
+ only:
+ - master
+ - develop
+env:
+ global:
+ - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
+# Build. _site directory is the artifact
+before_script:
+- chmod +x ./scripts/*.sh
+- chmod +x ./scripts/deploy/*.sh
+script:
+- scripts/cibuild.sh
+# Deploy. Staging goes back to gh-pages here and prod to external repo
+deploy:
+- provider: script
+ script: scripts/deploy/deploy_staging.sh
+ skip_cleanup: true
+ on:
+ branch: develop
+- provider: script
+ script: scripts/deploy/deploy.sh
+ skip_cleanup: true
+ on:
+ branch: master
diff --git a/.vscode/settings.json b/.vscode/settings.json
new file mode 100644
index 0000000..bf80ba7
--- /dev/null
+++ b/.vscode/settings.json
@@ -0,0 +1,5 @@
+// Place your settings in this file to overwrite default and user settings.
+{
+ "editor.detectIndentation": false,
+ "editor.tabSize": 2
+}
diff --git a/Gemfile b/Gemfile
new file mode 100644
index 0000000..cd764e5
--- /dev/null
+++ b/Gemfile
@@ -0,0 +1,4 @@
+source "https://rubygems.org"
+
+gem "jekyll", "3.5.1"
+gem "html-proofer"
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..751915a
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2018 Office for National Statistics
+
+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.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..9d26068
--- /dev/null
+++ b/README.md
@@ -0,0 +1,7 @@
+# Sustainable Development Goal indicators
+
+[](https://travis-ci.org/ONSdigital/sdg-indicators) [](http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/)
+
+This is a development website for collecting and disseminating UK data for the Sustainable Development Goal global indicators. This is a collaboration between the [ONS Sustainable Development Goals](https://www.ons.gov.uk/aboutus/whatwedo/programmesandprojects/sustainabledevelopmentgoals) team and the [ONS Data Science Campus](https://www.ons.gov.uk/aboutus/whatwedo/datasciencecampushttps://www.ons.gov.uk/aboutus/whatwedo/datasciencecampushttps://www.ons.gov.uk/aboutus/whatwedo/datasciencecampushttps://www.ons.gov.uk/aboutus/whatwedo/datasciencecampushttps://www.ons.gov.uk/aboutus/whatwedo/datasciencecampus), building on the earlier work of the [US GSA](https://github.com/GSA/sdg-indicators).
+
+For any guidance on how to use the website or develop it further for your own country, please refer to the [wiki](https://github.com/ONSdigital/sdg-indicators/wiki). Please send any comments and feedback to sustainabledevelopment@ons.gov.uk
diff --git a/_config.yml b/_config.yml
new file mode 100755
index 0000000..422a0ad
--- /dev/null
+++ b/_config.yml
@@ -0,0 +1,69 @@
+# Welcome to Jekyll!
+#
+# This config file is meant for settings that affect your whole blog, values
+# which you are expected to set up once and rarely need to edit after that.
+# For technical reasons, this file is *NOT* reloaded automatically when you use
+# 'jekyll serve'. If you change this file, please restart the server process.
+
+# Site settings
+title: U.K. Indicators For The Sustainable Development Goals
+description: Data Platform Prototype
+baseurl: "/sdg-indicators" # the subpath of your site, e.g. /blog
+url: ""
+data_dir: data
+environment: staging
+remotedatabaseurl: "https://ONSdigital.github.io/sdg-data"
+# permalink: /news/:year/:month/:day/:title.html
+
+jekyll_get_data:
+ - data: meta
+ json: 'https://ONSdigital.github.io/sdg-data/meta/all.json'
+ # cache: true
+ # directory: 'remotedata'
+ - data: headlines
+ json: 'https://ONSdigital.github.io/sdg-data/headline/all.json'
+ # cache: true
+ # directory: 'remotedata'
+ - data: schema
+ json: 'https://ONSdigital.github.io/sdg-data/meta/schema.json'
+
+analytics:
+ ga_prod: ''
+
+###################################################################################################
+email_contacts:
+ questions: sustainabledevelopment@ons.gov.uk
+ suggestions: sustainabledevelopment@ons.gov.uk
+ functional: sustainabledevelopment@ons.gov.uk
+###################################################################################################
+
+# Github Repo for Data
+repo_name: sdg-data
+branch: develop
+org_name: ONSdigital
+
+# Build settings
+markdown: kramdown
+
+# Travis Support
+exclude: [vendor, scripts, remotedata]
+
+# International Support
+# Eg name: Australia and adjective: Australian
+country:
+ name: UK
+ adjective: UK
+
+# Pages
+collections:
+ pages:
+ output: true
+ permalink: /:path/
+ posts:
+ output: true
+ permalink: /news/:year/:month/:day/:title.html
+ indicators:
+ output: true
+ goals:
+ output: true
+
\ No newline at end of file
diff --git a/_config_prod.yml b/_config_prod.yml
new file mode 100755
index 0000000..1a42e6c
--- /dev/null
+++ b/_config_prod.yml
@@ -0,0 +1,68 @@
+# Welcome to Jekyll!
+#
+# This config file is meant for settings that affect your whole blog, values
+# which you are expected to set up once and rarely need to edit after that.
+# For technical reasons, this file is *NOT* reloaded automatically when you use
+# 'jekyll serve'. If you change this file, please restart the server process.
+
+# Site settings
+title: U.K. Indicators For The Sustainable Development Goals
+description: Data Platform Prototype
+baseurl: "" # the subpath of your site, e.g. /blog
+url: ""
+data_dir: data
+environment: production
+remotedatabaseurl: "https://sustainabledevelopment-uk.github.io/sdg-data"
+# permalink: /news/:year/:month/:day/:title.html
+
+jekyll_get_data:
+ - data: meta
+ json: 'https://sustainabledevelopment-uk.github.io/sdg-data/meta/all.json'
+ # cache: true
+ # directory: 'remotedata'
+ - data: headlines
+ json: 'https://sustainabledevelopment-uk.github.io/sdg-data/headline/all.json'
+ # cache: true
+ # directory: 'remotedata'
+ - data: schema
+ json: 'https://sustainabledevelopment-uk.github.io/sdg-data/meta/schema.json'
+
+analytics:
+ ga_prod: 'UA-108503280-1'
+
+###################################################################################################
+email_contacts:
+ questions: sustainabledevelopment@ons.gov.uk
+ suggestions: sustainabledevelopment@ons.gov.uk
+ functional: sustainabledevelopment@ons.gov.uk
+###################################################################################################
+
+# Github Repo for Data
+repo_name: sdg-data
+branch: develop
+org_name: ONSdigital
+
+# Build settings
+markdown: kramdown
+
+# Travis Support
+exclude: [vendor, scripts, remotedata]
+
+# International Support
+# Eg name: Australia and adjective: Australian
+country:
+ name: UK
+ adjective: UK
+
+# Pages
+collections:
+ pages:
+ output: true
+ permalink: /:path/
+ posts:
+ output: true
+ permalink: /news/:year/:month/:day/:title.html
+ indicators:
+ output: true
+ goals:
+ output: true
diff --git a/_goals/01_no-poverty.md b/_goals/01_no-poverty.md
new file mode 100644
index 0000000..de60cdd
--- /dev/null
+++ b/_goals/01_no-poverty.md
@@ -0,0 +1,9 @@
+---
+title: End poverty in all its forms everywhere
+short: No Poverty
+permalink: /no-poverty/
+sdg_goal: '1'
+color: '#e5243b'
+layout: goal
+---
+
diff --git a/_goals/02_zero-hunger.md b/_goals/02_zero-hunger.md
new file mode 100644
index 0000000..447fdac
--- /dev/null
+++ b/_goals/02_zero-hunger.md
@@ -0,0 +1,10 @@
+---
+title: End hunger, achieve food security and improved nutrition and promote sustainable
+ agriculture
+short: Zero Hunger
+permalink: /zero-hunger/
+sdg_goal: '2'
+color: '#e5b735'
+layout: goal
+---
+
diff --git a/_goals/03_good-health-and-well-being.md b/_goals/03_good-health-and-well-being.md
new file mode 100644
index 0000000..7f59fbb
--- /dev/null
+++ b/_goals/03_good-health-and-well-being.md
@@ -0,0 +1,9 @@
+---
+title: Ensure healthy lives and promote well-being for all at all ages
+short: Good Health and Well-being
+permalink: /good-health-and-well-being/
+sdg_goal: '3'
+color: '#4c9f38'
+layout: goal
+---
+
diff --git a/_goals/04_quality-education.md b/_goals/04_quality-education.md
new file mode 100644
index 0000000..a008099
--- /dev/null
+++ b/_goals/04_quality-education.md
@@ -0,0 +1,10 @@
+---
+title: Ensure inclusive and equitable quality education and promote lifelong learning
+ opportunities for all
+short: Quality Education
+permalink: /quality-education/
+sdg_goal: '4'
+color: '#c5192d'
+layout: goal
+---
+
diff --git a/_goals/05_gender-equality.md b/_goals/05_gender-equality.md
new file mode 100644
index 0000000..9e412ac
--- /dev/null
+++ b/_goals/05_gender-equality.md
@@ -0,0 +1,9 @@
+---
+title: Achieve gender equality and empower all women and girls
+short: Gender Equality
+permalink: /gender-equality/
+sdg_goal: '5'
+color: '#ff3a21'
+layout: goal
+---
+
diff --git a/_goals/06_clean-water-and-sanitation.md b/_goals/06_clean-water-and-sanitation.md
new file mode 100644
index 0000000..ecdf32c
--- /dev/null
+++ b/_goals/06_clean-water-and-sanitation.md
@@ -0,0 +1,10 @@
+---
+title: Ensure availability and sustainable management of water and sanitation for
+ all
+short: Clean water and sanitation
+permalink: /clean-water-and-sanitation/
+sdg_goal: '6'
+color: '#26bde2'
+layout: goal
+---
+
diff --git a/_goals/07_affordable-and-clean-energy.md b/_goals/07_affordable-and-clean-energy.md
new file mode 100644
index 0000000..ce585ea
--- /dev/null
+++ b/_goals/07_affordable-and-clean-energy.md
@@ -0,0 +1,9 @@
+---
+title: Ensure access to affordable, reliable, sustainable and modern energy for all
+short: Affordable and clean energy
+permalink: /affordable-and-clean-energy/
+sdg_goal: '7'
+color: '#fcc30b'
+layout: goal
+---
+
diff --git a/_goals/08_decent-jobs-and-economic-growth.md b/_goals/08_decent-jobs-and-economic-growth.md
new file mode 100644
index 0000000..2be7314
--- /dev/null
+++ b/_goals/08_decent-jobs-and-economic-growth.md
@@ -0,0 +1,10 @@
+---
+title: Promote sustained, inclusive and sustainable economic growth, full and productive
+ employment and decent work for all
+short: Decent jobs and economic growth
+permalink: /decent-jobs-and-economic-growth/
+sdg_goal: '8'
+color: '#a21942'
+layout: goal
+---
+
diff --git a/_goals/09_industry-innovation-and-infrastructure.md b/_goals/09_industry-innovation-and-infrastructure.md
new file mode 100644
index 0000000..645eadf
--- /dev/null
+++ b/_goals/09_industry-innovation-and-infrastructure.md
@@ -0,0 +1,10 @@
+---
+title: Build resilient infrastructure, promote inclusive and sustainable industrialization
+ and foster innovation
+short: Industry, innovation and infrastructure
+permalink: /industry-innovation-and-infrastructure/
+sdg_goal: '9'
+color: '#fd6925'
+layout: goal
+---
+
diff --git a/_goals/10_reduced-inequalities.md b/_goals/10_reduced-inequalities.md
new file mode 100644
index 0000000..c111266
--- /dev/null
+++ b/_goals/10_reduced-inequalities.md
@@ -0,0 +1,9 @@
+---
+title: Reduce inequality within and among countries
+short: Reduced inequalities
+permalink: /reduced-inequalities/
+sdg_goal: '10'
+color: '#dd1367'
+layout: goal
+---
+
diff --git a/_goals/11_sustainable-cities-communities.md b/_goals/11_sustainable-cities-communities.md
new file mode 100644
index 0000000..62653f0
--- /dev/null
+++ b/_goals/11_sustainable-cities-communities.md
@@ -0,0 +1,9 @@
+---
+title: Make cities and human settlements inclusive, safe, resilient and sustainable
+short: Sustainable Cities & Communities
+permalink: /sustainable-cities-communities/
+sdg_goal: '11'
+color: '#fd9d24'
+layout: goal
+---
+
diff --git a/_goals/12_responsible-consumption-and-production.md b/_goals/12_responsible-consumption-and-production.md
new file mode 100644
index 0000000..8f84688
--- /dev/null
+++ b/_goals/12_responsible-consumption-and-production.md
@@ -0,0 +1,9 @@
+---
+title: Ensure sustainable consumption and production patterns
+short: Responsible consumption and production
+permalink: /responsible-consumption-and-production/
+sdg_goal: '12'
+color: '#c9992d'
+layout: goal
+---
+
diff --git a/_goals/13_climate-action.md b/_goals/13_climate-action.md
new file mode 100644
index 0000000..35a09c4
--- /dev/null
+++ b/_goals/13_climate-action.md
@@ -0,0 +1,9 @@
+---
+title: Take urgent action to combat climate change and its impacts
+short: Climate action
+permalink: /climate-action/
+sdg_goal: '13'
+color: '#3f7e44'
+layout: goal
+---
+
diff --git a/_goals/14_life-below-water.md b/_goals/14_life-below-water.md
new file mode 100644
index 0000000..0c3f338
--- /dev/null
+++ b/_goals/14_life-below-water.md
@@ -0,0 +1,10 @@
+---
+title: Conserve and sustainably use the oceans, seas and marine resources for sustainable
+ development
+short: Life below water
+permalink: /life-below-water/
+sdg_goal: '14'
+color: '#0a97d9'
+layout: goal
+---
+
diff --git a/_goals/15_life-on-land.md b/_goals/15_life-on-land.md
new file mode 100644
index 0000000..8d5c4ea
--- /dev/null
+++ b/_goals/15_life-on-land.md
@@ -0,0 +1,11 @@
+---
+title: Protect, restore and promote sustainable use of terrestrial ecosystems, sustainably
+ manage forests, combat desertification, and halt and reverse land degradation and
+ halt biodiversity loss
+short: Life on land
+permalink: /life-on-land/
+sdg_goal: '15'
+color: '#56c02b'
+layout: goal
+---
+
diff --git a/_goals/16_peace-and-justice-strong-institutions.md b/_goals/16_peace-and-justice-strong-institutions.md
new file mode 100644
index 0000000..7e38b4d
--- /dev/null
+++ b/_goals/16_peace-and-justice-strong-institutions.md
@@ -0,0 +1,11 @@
+---
+title: Promote peaceful and inclusive societies for sustainable development, provide
+ access to justice for all and build effective, accountable and inclusive institutions
+ at all levels
+short: Peace and justice - strong institutions
+permalink: /peace-and-justice-strong-institutions/
+sdg_goal: '16'
+color: '#00689d'
+layout: goal
+---
+
diff --git a/_goals/17_partnerships-for-the-goals.md b/_goals/17_partnerships-for-the-goals.md
new file mode 100644
index 0000000..b610162
--- /dev/null
+++ b/_goals/17_partnerships-for-the-goals.md
@@ -0,0 +1,10 @@
+---
+title: Strengthen the means of implementation and revitalize the global partnership
+ for sustainable development
+short: Partnerships for the goals
+permalink: /partnerships-for-the-goals/
+sdg_goal: '17'
+color: '#19486a'
+layout: goal
+---
+
diff --git a/_includes/components/breadcrumb.html b/_includes/components/breadcrumb.html
new file mode 100644
index 0000000..4be8eee
--- /dev/null
+++ b/_includes/components/breadcrumb.html
@@ -0,0 +1,9 @@
+
+ - Home
+ {% if goal_href %}
+ - Goal {{ goal_number }}
+ - Indicator {{ page.indicator }}
+ {% else %}
+ - Goal {{ goal_number }}
+ {% endif %}
+
\ No newline at end of file
diff --git a/_includes/components/charts/bar.html b/_includes/components/charts/bar.html
new file mode 100644
index 0000000..fecdef8
--- /dev/null
+++ b/_includes/components/charts/bar.html
@@ -0,0 +1,28 @@
+{% assign id = page.indicator | slugify %}
+{% assign unit_label = page.variable_unit_label %}
+
+
diff --git a/_includes/components/charts/chart.html b/_includes/components/charts/chart.html
new file mode 100644
index 0000000..f45a612
--- /dev/null
+++ b/_includes/components/charts/chart.html
@@ -0,0 +1,19 @@
+{% if meta.graph_type == 'bar' or meta.graph_type == 'line' %}
+ {% assign graph_type = meta.graph_type %}
+ {% if meta.graph_type == 'longitudinal' %}
+ {% assign graph_type = 'line' %}
+ {% endif %}
+
+
+ There are too many datasets to show on the chart. Not all will be shown until you remove some selections.
+
+
+ {% assign graph_template = 'components/charts/' | append: graph_type | append: '.html' %}
+
+ {% include {{graph_template}} data=include.data %}
+
+
+
+
+
+{% endif %}
diff --git a/_includes/components/charts/line.html b/_includes/components/charts/line.html
new file mode 100644
index 0000000..ae5a156
--- /dev/null
+++ b/_includes/components/charts/line.html
@@ -0,0 +1,2 @@
+{% assign unit_label = page.variable_unit_label %}
+
\ No newline at end of file
diff --git a/_includes/components/dev-disclaimer.html b/_includes/components/dev-disclaimer.html
new file mode 100644
index 0000000..8b82b2d
--- /dev/null
+++ b/_includes/components/dev-disclaimer.html
@@ -0,0 +1,6 @@
+
+
+
Alpha This is a development website. We welcome your
+
feedback.
+
+
\ No newline at end of file
diff --git a/_includes/components/fields-template.html b/_includes/components/fields-template.html
new file mode 100644
index 0000000..b893b19
--- /dev/null
+++ b/_includes/components/fields-template.html
@@ -0,0 +1,29 @@
+
diff --git a/_includes/components/headline.html b/_includes/components/headline.html
new file mode 100644
index 0000000..4eec3a9
--- /dev/null
+++ b/_includes/components/headline.html
@@ -0,0 +1,55 @@
+{% capture headline_name %}{{page.indicator | slugify }}{% endcapture %}
+{% assign sdg_headline_data = site.data.headlines[headline_name] %}
+
+
\ No newline at end of file
diff --git a/_includes/components/loading.html b/_includes/components/loading.html
new file mode 100644
index 0000000..9e55eee
--- /dev/null
+++ b/_includes/components/loading.html
@@ -0,0 +1,3 @@
+
+

+
diff --git a/_includes/components/metadata.html b/_includes/components/metadata.html
new file mode 100644
index 0000000..e4a9b35
--- /dev/null
+++ b/_includes/components/metadata.html
@@ -0,0 +1,30 @@
+
+ {% for indicator_metadata in site.data.schema %}
+ {% if indicator_metadata.field.scope == include.scope %}
+ {% unless indicator_metadata.name contains "_url_text" or indicator_metadata.name contains "_link_text" %}
+
+ {{ indicator_metadata.field.label }} |
+
+ {% if indicator_metadata.name contains "_url" or indicator_metadata.name contains "_link" %}
+ {% assign url_text_name = indicator_metadata.name | replace_first:'_url','_url_text' %}
+ {% assign url_text_name = url_text_name | replace_first:'_link','_link_text' %}
+ {% assign url_text = meta[url_text_name] %}
+ {% unless url_text %}
+ {% assign url_text = 'Link' %}
+ {% endunless %}
+
+ {% if meta[indicator_metadata.name] contains "http" or meta[indicator_metadata.name] contains "mailto" %}
+
+ {{ url_text }} opens in a new window
+
+ {% endif %}
+
+ {% else %}
+ {{ meta[indicator_metadata.name] }}
+ {% endif %}
+ |
+
+ {% endunless %}
+ {% endif %}
+ {% endfor %}
+
diff --git a/_includes/components/post-categories.html b/_includes/components/post-categories.html
new file mode 100644
index 0000000..d2338bc
--- /dev/null
+++ b/_includes/components/post-categories.html
@@ -0,0 +1,11 @@
+
\ No newline at end of file
diff --git a/_includes/components/sources.html b/_includes/components/sources.html
new file mode 100644
index 0000000..bef6b16
--- /dev/null
+++ b/_includes/components/sources.html
@@ -0,0 +1,23 @@
+
+{% assign n_sources = 0 %}
+{% for i in (1..12) %}
+ {% assign src_active = "source_active_" | append: i %}
+ {% if meta[src_active] == true %}
+ {% assign n_sources = n_sources | plus: 1 %}
+ {% endif %}
+{% endfor %}
+
+{% if n_sources > 0 %}
+
+ {% for i in (1..n_sources) %}
+ {% assign src_active = "source_active_" | append: i %}
+ {% assign src_scope = "source_" | append: i %}
+
+ {% if n_sources > 1 %}
+
Source {{ i }}
+ {% endif %}
+ {% include components/metadata.html scope=src_scope %}
+
+ {% endfor %}
+
+{% endif %}
diff --git a/_includes/components/units-template.html b/_includes/components/units-template.html
new file mode 100644
index 0000000..e3d30c6
--- /dev/null
+++ b/_includes/components/units-template.html
@@ -0,0 +1,8 @@
+
diff --git a/_includes/footer.html b/_includes/footer.html
new file mode 100755
index 0000000..6968e05
--- /dev/null
+++ b/_includes/footer.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+{% include scripts.html %}
+