Profile

Cover photo
JSON-stat
2,592 followers|169,899 views
AboutPosts

Stream

JSON-stat

Shared publicly  - 
 
Easter Egg: The JSON-stat Table Browser

A (beta) dynamic table browser for JSON-stat responses:

http://json-stat.org/format/browser/

Type the address of a JSON-stat document and see the result.

Or try it with the Canada sample:

http://json-stat.org/format/browser/?uri=http%3A%2F%2Fjson-stat.org%2Fsamples%2Foecd-canada.json&ds=1
JSON-stat is a simple lightweight standard best suited for data visualization, mobile apps or open data initiatives, that has been designed for all kinds of disseminators.
4
1
Xavier Badosa's profile photo
Add a comment...

JSON-stat

Shared publicly  - 
 
 
Improved fromTable() again: it now supports values AND statuses

The code at

http://bl.ocks.org/cb78feee21435cb62146

has been updated.

In this experiment, we retrieve the OECD +JSON-stat sample (432 data), create a JSON table with the toTable() method and then import this table into JSON-stat using the new improved fromTable() function. Finally, we compare the 432 data (values and statuses) in the two JSON-stat documents. This is done three times: one per JSON table type.
View original post
1
Add a comment...

JSON-stat

Shared publicly  - 
 
A Javascript JSON-stat write function from common JSON tables...
 
* +JSON-stat fromTable(), a Javascript function to create JSON-stat documents from array-object tables*

In reply to +Jonathon Broughton :

https://plus.google.com/+JonathonBroughtonUK/posts/dttu6o5CfDz

function fromTable(r){var e=r.vfield||"value",a=r.table,n=a.length,f=[],i=[],t=[],v={},o={},u=function(r,e){for(var a=1,n=0,f=0;s>f;f++)a*=f>0?e[s-f]:1,n+=a*r[s-f-1];return n};for(var l in a[0])if(l!==e){f.push(l),v[l]=[];for(var d=0;n>d;d++){var h=a[d][l];-1===v[l].indexOf(h)&&v[l].push(h)}i.push(v[l].length),o[l]={category:{index:v[l]}}}for(var s=f.length,g=0;n>g;g++){for(var p=[],c=0;s>c;c++){var x=f[c];p.push(v[x].indexOf(a[g][x]))}t[u(p,i)]=a[g][e]}return o.id=f,o.size=i,{dataset:{value:t,dimension:o}}}

/* For IE<9 support, include the Array.indefOf polyfill (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) */

With json-stat.js +the fromTable() function, you should be able to:

//Get some JSON-stat data
var oecd1=JSONstat("http://json-stat.org/samples/oecd-canada.json").Dataset(0);
//and convert it to an arrobj table
var oecdtbl1=oecd1.toTable({type: "arrobj", content: "id"});

//Use the fromTable function above to convert it back into basic JSON-stat
var oecd2=JSONstat( fromTable({table: oecdtbl1}) ).Dataset(0);
//and create a new table equivalent to oecdtbl1
var oecdtbl2=oecd2.toTable({type: "arrobj", content: "id"});

//Test oecdtbl1 and oecdtbl2 have same values (order is not preserved, though)
function test(o){ return oecd1.Data(o).value===oecd2.Data(o).value; }
function log(o){ console.log( test(o) ); }

log({area: "AU", year: "2003"}); //true
log({area: "AU", year: "2004"}); //true
log({area: "CA", year: "2000"}); //true
log({area: "GR", year: "2002"}); //true

Current limitations:

1) Input must be an "arrobj": that is, an array of objects, where each property describes a dimension and property "value" contains the value (property "vfield" can be set externally to point to a different value name). 

2) No status support.

I'm trying to decide is this belongs to json-stat.js or if, once improved, it should be offered in a separate write library.

Opinions are welcome.
1 comment on original post
2
1
Nilesh Rawale's profile photo
Add a comment...

JSON-stat

Shared publicly  - 
 
+JSON-stat will begin 2015 with 2,504 followers! Thank you all and best wishes for 2015!
1
Shanker Prajapati's profile photo
 
Nice and Congrats. This tool will also useful for view json data @ http://codebeautify.org/jsonviewer #json   #tools   #viewer   #formatter   #validator  
Add a comment...

JSON-stat

Shared publicly  - 
 
 
Statistics Denmark supports +jsonstat: here are two data visualization examples using Idescat Visual:

http://bl.ocks.org/badosa/d41084140fe9a466895a
http://bl.ocks.org/badosa/7058b47db2f3b1f9b0dc

#dataviz   #opendata   #api   #stats   #denmark  
View original post
1
1
Roberio Praciano's profile photo
Add a comment...

JSON-stat

Shared publicly  - 
1
Add a comment...
Have them in circles
2,592 people
O.A. MOMOLESHO Isaac's profile photo
sanidhya chaudhary's profile photo
Muhammad Nauman Bashir's profile photo
Dustin Deus's profile photo
David McClain's profile photo
Kenton Russell's profile photo
Paolo Maresca's profile photo
Ivan Atanasov's profile photo
Tarek Siala's profile photo

JSON-stat

Shared publicly  - 
 
The future of standards in statistics

+Xavier Badosa will be talking about JSON-stat in a Discussion Panel in the Session “The future of standards in statistics” of the Workshop on International Collaboration for Standards-Based Modernisation, hosted by the United Nations Economic Commission for Europe (UNECE).

http://www.unece.org/index.php?id=37345#/
List of Meetings and Events on {{selectedDate | date:'fullDate'}}. List of meetings for {{search.year}}. List of Meetings and Events - All. {{meeting.year}}. {{meeting.title}} ({{meeting.rd}}), {{meeting.venue}}. Workshop of the Modernisation Committee on Standards: International Collaboration ...
1
2
Ricky Moore-Daniels's profile photoJSON-stat's profile photoXavier Badosa's profile photochristian jensen's profile photo
2 comments
 
;-)
Add a comment...

JSON-stat

Shared publicly  - 
 
 
Improved fromTable(): now it supports all the JSON table formats supported by toTable()

And here is the proof:

http://bl.ocks.org/cb78feee21435cb62146

In this experiment, we retrieve the OECD +JSON-stat sample (432 data), create a JSON table with the toTable() method and then import this table into JSON-stat using the new improved fromTable() function. Finally, we compare the 432 data in the two JSON-stat documents. This is done three times: once per JSON table type.
View original post
4
Add a comment...

JSON-stat

Shared publicly  - 
 
 
​Is there an inverse function to .toTable({type: 'arrobj'}) to generate +JSON-stat by ingesting a preexisting source?
5 comments on original post
1
Add a comment...

JSON-stat

Shared publicly  - 
 
Another JSON-stat example from another statistical office that supports the format, the last day of the year!
 
Last visualization of the year: registered unemployment in Galicia by sex.

It's a simple line chart automatically built using  the Statistical Institute of Galicia's API, Idescat Visual and +JSON-stat .

http://bl.ocks.org/9974deedb4fb34d0cbc3

#dataviz   #json   #opendata   #stats   #api   #galicia   #unemployment   #jsonstat  
View original post
1
Add a comment...

JSON-stat

Shared publicly  - 
 
US GSP maps made with +jsonstat and Visual updated and simplified to remove rawgithub dependency.

http://bl.ocks.org/badosa/7217742
http://bl.ocks.org/badosa/7234976

#dataviz #stats    #opendata  
1
Add a comment...

JSON-stat

Shared publicly  - 
 
This test suite is using the updated oecd-canada.json sample file.
 
JSON-stat Javascript Toolkit Test Suite, updated

Tests for some of the new +jsonstat 1.01 have been added like

* note
* link
* extension

http://json-stat.com/test/

#stats   #json   #testsuite   #test   #javascript   #js   #cube   #opendata  
View original post
1
Add a comment...
Story
Tagline
A simple light standard for all kinds of data disseminators
Introduction
The main statistical standards for data and metadata exchange are XML-based: they are usually complicated and verbose: probably not best suited as an exchange format for apps.

JSON-stat (json-stat.org) is a simple lightweight JSON format to disseminate data using a cube (=tabular) model.