Skip to content

Greenlandic data in your app (api light) Version 2018

Lars Pedersen edited this page Jan 5, 2018 · 2 revisions

300 detailed datasets are today available directly from our Statbank, where you can slice and dice cubes as you please.

The methods that can be used to access our data are similar to methods you use to get statistical data from the other Nordic countries (and more) as the engine of the Statbank is a program is PX-Web.

Over the past 25 years this program has been developed by Statistics Sweden in cooperation with national statistical offices all over the world. For more information, see: http://www.scb.se/PC-Axis/

For fast integration

Our Statbank offers many ways to re-use data. From simple downloads of a table in formats for either PC-Axis, Excel, delimited text-files, HTML, JSON or charts in png, gif or jpg.

More importantly you have an opportunity to ‘save your query’ to get a link that can return an always updated table, holding your extraction and manipulations ready to use in your programs.

This is meant not only for it-specialists, but for everyone who needs to include updated data on Greenland in their presentations, calculations etc.

You simply use the Statbank web-interphase to find the table you need by following these steps:

  1. Find your table, by selecting
    a. Subject, Table
    b. Variables/Values
  2.  Get table  
    
  3. Perhaps add some calculations
  4. Perhaps show as graphs
  5. Save your query
    a. Select what action to take, when data is updated
    b. Select how you want response to query (on screen, file etc)

This will return a unique link to your table. http://bank.stat.gl/sq/9915a75b-1dff-4a7b-b920-a378355fdce6

This link give you a table on screen, but if output has been chosen as JSON-STAT it would have returned a file. A chart or a table can be integrated on a web-site, in a document or spreadsheet.

Getting started

www.tourismstat.gl presents data directly from our Statbank. Greenland Tourism has defined their users needs and webby award winning Kathart.dk has implemented their visions on the website.

To harvest the ideas and lower the bar for others to reuse our data in new and exciting apps, websites etc Kathart.dk has documented an ‘open source’ version of their program, which demonstrates how data from bank.stat.gl can be visualized.

See http://www.stat.gl/demo

The code is also available for free on GitHub

The example will run on any dataset that fulfills a few criterias one has to secure when defining a table in the Statbank.

a. Select all values from variable holding 'time'
b. Select one variable with 2-6 values (to look nice)
c. Select zero or one value from other variables

Like this:

Also remember to have results in JSON-STAT format

The server running the statbank is required to:
a. Allow saved queries
b. Allow JSON-STAT output
c. Http response header must allow CORS
d. TIMEVAL must be defined for tables that can be used, as this defines a role (time) to a variable e. Also define GEO if JSON-STAT output should define role

http://bank.stat.gl/sq/6c6608b5-a3cb-4ec9-ad46-0d3985827306

For ambitious integration

The Statbank can be fully integrated in other solutions by it-specialist using our public API. Look to these resources:

Sweden: www.scb.se/api
Finland: http://pxnet2.stat.fi/api1.html
Samples: http://www.ssb.no/omssb/tjenester-og-verktoy/api/px-api/eksempler-pa-kode

And with a twist
Denmark: www.dst.dk/api
Norway: http://data.ssb.no/api

And an example with access to all Nordic statistics
See : www.stat2go.com