This repository contains a commented code-example of using data from StatBank Greenland (http://bank.stat.gl/pxweb/en/Greenland/) for data visualisations.
Live example: http://www.stat.gl/demo
What is this repository for?
- Data visualisations
- The code examples use google visualization, but you are free to use any data visualisation framework you feel comfortable with.
How do I get set up?
- Copy the contents of the app-folder to a server or run it locally.
External libraries documentation
- Google Charts: https://developers.google.com/chart/
- Pure.css for basic styling: http://purecss.io/ (may be omitted).
The data needs to be of the format JSONstat. Data-feeds are can be created at http://bank.stat.gl/
To use the visualisations "as is" the data should have at least 2 dimensions:
time (e.g. year, numeric)
and one dimension with multiple categories (2-6 values looks nice)
from other dimensions in a datacube 0 or 1 value can be selected
Sortorder is calculated from the role ‘time’ found in the JSON-STAT file
Not all files in the Greenlandic Statbank can be used. If this is to be used with other PX-Web based Statbanks CORS must be enabled on the server as well as ‘saved queries’, JSON-STAT and TIMEVAL must be declared