User:Kumkum/Brouillon

Exemples

Diagrammes
{ "version": 1, "width": 500, "height": 200, "padding": {"top": 10, "left": 30, "bottom": 30, "right": 10}, "data": [ {     "name": "table", "values": [ {"x" : 1999,  "y" : 3},   {"x": 2000,   "y" : 3.8},   {"x": 2002,   "y" : 3.5},   {"x": 2003,   "y" : 4.7},   {"x": 2004,   "y" : 3.7},   {"x": 2005,   "y" : 3.7},   {"x": 2006,   "y" : 4.2},   {"x": 2007,   "y" : 4},   {"x": 2008,   "y" : 2.9},   {"x": 2009,   "y" : -2},   {"x": 2010,   "y" : -4.5},   {"x": 2011,   "y" : -6.9},   {"x": 2012,   "y" : -7},   {"x": 2013,   "y" : -3.9},   {"x": 2014,   "y" : -0.6} ]   }  ],  "scales": [ {     "name": "x", "type": "ordinal", "range": "width", "zero": false, "domain": {"data": "table", "field": "data.x"} },   {      "name": "y", "type": "linear", "range": "height", "nice": true, "domain": {"data": "table", "field": "data.y"} } ],  "axes": [ {"type": "x", "scale": "x", "ticks": 20}, {"type": "y", "scale": "y"} ], "marks": [ {     "type": "area", "from": {"data": "table"}, "properties": { "enter": { "interpolate": {"value": "monotone"}, "x": {"scale": "x", "field": "data.x"}, "y": {"scale": "y", "field": "data.y"}, "y2": {"scale": "y", "value": 0}, "fill": {"value": "steelblue"} },       "update": { "fillOpacity": {"value": 1} },       "hover": { "fillOpacity": {"value": 0.5} }     }    }  ] }

Taux de croissance annuel moyen du PIB grec sources : Indexmundi et CIA FB

{ "version": 1, "width": 500, "height": 200, "padding": {"top": 10, "left": 30, "bottom": 30, "right": 10}, "data": [ {     "name": "table", "values": [ {"x" : 1999,  "y" : 3},   {"x": 2000,   "y" : 3.8},   {"x": 2002,   "y" : 3.5},   {"x": 2003,   "y" : 4.7},   {"x": 2004,   "y" : 3.7},   {"x": 2005,   "y" : 3.7},   {"x": 2006,   "y" : 4.2},   {"x": 2007,   "y" : 4},   {"x": 2008,   "y" : 2.9},   {"x": 2009,   "y" : -2},   {"x": 2010,   "y" : -4.5},   {"x": 2011,   "y" : -6.9},   {"x": 2012,   "y" : -7},   {"x": 2013,   "y" : -3.9},   {"x": 2014,   "y" : -0.6} ]   }  ],  "scales": [ {     "name": "x", "type": "ordinal", "range": "width", "domain": {"data": "table", "field": "data.x"} },   {      "name": "y", "range": "height", "nice": true, "domain": {"data": "table", "field": "data.y"} } ],  "axes": [ {"type": "x", "scale": "x"}, {"type": "y", "scale": "y"} ], "marks": [ {     "type": "rect", "from": {"data": "table"}, "properties": { "enter": { "x": {"scale": "x", "field": "data.x"}, "width": {"scale": "x", "band": true, "offset": -1}, "y": {"scale": "y", "field": "data.y"}, "y2": {"scale": "y", "value": 0} },       "update": { "fill": {"value": "steelblue"} },       "hover": { "fill": {"value": "red"} }     }    }  ] }

Taux de croissance annuel moyen du PIB grec sources : Indexmundi et CIA FB

Mahcin 3
{ "version": 1, "width": 500, "height": 200, "padding": {"top": 10, "left": 30, "bottom": 30, "right": 10}, "data": [ {     "name": "table", "values": [ {"x": 0, "y": 28, "c":0}, {"x": 0, "y": 55, "c":1}, {"x": 1, "y": 43, "c":0}, {"x": 1, "y": 91, "c":1}, {"x": 2, "y": 81, "c":0}, {"x": 2, "y": 53, "c":1}, {"x": 3, "y": 19, "c":0}, {"x": 3, "y": 87, "c":1}, {"x": 4, "y": 52, "c":0}, {"x": 4, "y": 48, "c":1}, {"x": 5, "y": 24, "c":0}, {"x": 5, "y": 49, "c":1}, {"x": 6, "y": 87, "c":0}, {"x": 6, "y": 66, "c":1}, {"x": 7, "y": 17, "c":0}, {"x": 7, "y": 27, "c":1}, {"x": 8, "y": 68, "c":0}, {"x": 8, "y": 16, "c":1}, {"x": 9, "y": 49, "c":0}, {"x": 9, "y": 15, "c":1} ]   },    {      "name": "stats", "source": "table", "transform": [ {"type": "facet", "keys": ["data.x"]}, {"type": "stats", "value": "data.y"} ]   }  ],  "scales": [ {     "name": "x", "type": "linear", "range": "width", "zero": false, "domain": {"data": "table", "field": "data.x"} },   {      "name": "y", "type": "linear", "range": "height", "nice": true, "domain": {"data": "stats", "field": "sum"} },   {      "name": "color", "type": "ordinal", "range": "category10" } ],  "axes": [ {"type": "x", "scale": "x"}, {"type": "y", "scale": "y"} ], "marks": [ {     "type": "group", "from": { "data": "table", "transform": [ {"type": "facet", "keys": ["data.c"]}, {"type": "stack", "point": "data.x", "height": "data.y"} ]     },      "marks": [ {         "type": "area", "properties": { "enter": { "interpolate": {"value": "monotone"}, "x": {"scale": "x", "field": "data.x"}, "y": {"scale": "y", "field": "y"}, "y2": {"scale": "y", "field": "y2"}, "fill": {"scale": "color", "field": "data.c"} },           "update": { "fillOpacity": {"value": 1} },           "hover": { "fillOpacity": {"value": 0.5} }         }        }      ]    }      ] }

Cartes
{   "version": 1, "width": , "height": , "data": [ {           "name": "highlights", "values": },       {            "name": "countries", "url": "/wiki/Extension:Graph/Demo/RawData:WorldMap-iso2-json?action=raw", "format": {"type": "topojson", "feature": "countries"}, "transform": [ {                   "type": "geopath", "value": "data", "scale": , "translate":[0,0], "projection": "equirectangular" },               {                    "type": "zip", "key": "data.id", "with": "highlights", "withKey": "data.id", "as": "zipped", "default": { "data": { "v": "" }                   }                }            ]        }    ],    "marks": [ {           "type": "path", "from": { "data": "countries" },           "properties": { "enter": { "path": { "field": "path" }               },                "update": { "fill": { "field": "zipped.data.v"                   } },               "hover": { "fill": { "value": "#989898" }               }            }        }    ] }

La géopolitique mondiale vue par un hamster neurasthénique