Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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

Failed to load latest commit information.
includes add first files
README
index.php

README

ABOUT
------

This PHP class is an 'all-in-one' function that will replicate the dataset search that appears at: http://www.guardian.co.uk/world-government-data

DEPENDENCIES
------------

~ Function json_decode - (Included in PHP v5.2 onwards, look at the Zend_JSON framework if your using an older version of PHP - http://framework.zend.com/manual/en/zend.json.html)

~ 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

USAGE
-----

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

<?php 
include('includes/worlddatastore.class.php')l

$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.