How to use Json

Data tools and advice

Today in class we learnt how to extract data using JavaScript Object Notation (Json), a  format that is easier to read than xml. Data that comes in a Json format is also easy to collect, which is why it maybe worthwhile to learn for data enthusiasts.

There are simple steps to using Json and I outline them below.

Our class example was the UK postoffice API. A google search of UK postoffice API will lead to this url: http://www.uk-postcodes.com/api

The url has an example API, which is listed on the section written as Return data for postcode. Copy the link

Paste the link onto a different webpage.

Then remove square brackets encircling postcode and (no space). Also remove the square brackets encircling xml, csv, Json and leave Json leaving.

Add your postcode. Some browsers will only allow you to open as a notepad.

If it opens in a browser copy and paste to a notepad.

When it downloads onto the notepad it will appear in linear format as in below

In the notepad a colon (:) denotes pairs so you have to separate the data into pairs

To do that press enter after the first comma

Press enter after geo and press the space tab to indent

Repeat process for the following pairs. New properties such as administrative don’t need to be indented.

Your notepad should end up something like this

Live blog of Making it Count, a conference on big data

The stories

Four international organisations held meeting on big data today. The meeting, which took place in London, sought to find solutions to overcoming challenges facing big data. Among these are the need to ensure that the public “engages” research data.

SciDev.Net, an online science publication; the  International Development Research Centre, a Canadian funder; the British Council and UKCDS, a group of UK government departments and funders involved in international development, organised the meeting.

I liveblogged the event. Click slide show in tweet below for more details: