Skip to content
This repository

Access an index of World Goverment datasets collected and published by the Guardian newspaper through their API

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 includes
Octocat-spinner-32 README
Octocat-spinner-32 index.php

This PHP class is an 'all-in-one' function that will replicate the dataset search that appears at:


~ Function json_decode - (Included in PHP v5.2 onwards, look at the Zend_JSON framework if your using an older version of PHP -

~ CSS: YUI Grids are used along with CSS that is embedded in the index.php file, you of course can use your own CSS styling and edit the function to suit your HTML needs


All you need to do to invoke it is the following php lines:


$guardianapi = new worldDataStore;

// Change '/index.php' to whatever page your using this function on)

echo $guardianapi->guardian_world_data_store('/index.php', $_GET['q'], $_GET['facet_country'], $_GET['facet_department'], $_GET['facet_year'], $_GET['facet_format'], $_GET['page']);
Something went wrong with that request. Please try again.