User:Zache/temp

Yksi
{	 "version": 2, "width": 500, "height": 250, "padding": "auto", "data" : [ {	     "name": "table", "values": [ {"year": 2005,"population": 6, "photo" : 6 }, {"year": 2006,"population": 15, "photo" : 17}, {"year": 2007,"population": 16, "photo" : 21}, {"year": 2008,"population": 22, "photo" : 28}, {"year": 2009,"population": 19, "photo" : 25}, {"year": 2010,"population": 25, "photo" : 50}, {"year": 2011,"population": 18, "photo" : 33}, {"year": 2012,"population": 22, "photo" : 67}, {"year": 2013,"population": 34, "photo" : 174}, {"year": 2014,"population": 17, "photo" : 183}, {"year": 2015,"population": 22, "photo" : 206}, {"year": 2016,"population": 30, "photo" : 338}, {"year": 2017,"population": 31, "photo" : 1102}, {"year": 2018,"population": 48, "photo" : 2008}, {"year": 2019,"population": 48, "photo" : 2008}, ]	   },	    {	      "name": "annotation", "values": [ {"start": 2013,"end": 2014,"text": "Wiki Loves Public Art"}, {"start": 2016,"end": 2019,"text": "Public art project"} ]	   }	  ],        "layer": [ {     "mark": "bar", "encoding": { "x": { "timeUnit": "month", "field": "date", "type": "ordinal" },       "y": { "aggregate": "mean", "field": "precipitation", "type": "quantitative", "axis": { "grid": false }       }      }    },    {      "mark": "line", "encoding": { "x": { "timeUnit": "month", "field": "date", "type": "ordinal" },       "y": { "aggregate": "mean", "field": "temp_max", "type": "quantitative", "axis": { "grid": false },         "scale": {"zero": false} },       "color": {"value": "firebrick"} }   }  ],  "resolve": {"scale": {"y": "independent"}} } }

Kaksi
{	 "version": 2, "width": 500, "height": 250, "padding": "auto", "data": [ {	     "name": "table", "values": [ {"year": 2005,"population": 6, "photo" : 6 }, {"year": 2006,"population": 15, "photo" : 17}, {"year": 2007,"population": 16, "photo" : 21}, {"year": 2008,"population": 22, "photo" : 28}, {"year": 2009,"population": 19, "photo" : 25}, {"year": 2010,"population": 25, "photo" : 50}, {"year": 2011,"population": 18, "photo" : 33}, {"year": 2012,"population": 22, "photo" : 67}, {"year": 2013,"population": 34, "photo" : 174}, {"year": 2014,"population": 17, "photo" : 183}, {"year": 2015,"population": 22, "photo" : 206}, {"year": 2016,"population": 30, "photo" : 338}, {"year": 2017,"population": 31, "photo" : 1102}, {"year": 2018,"population": 48, "photo" : 2008}, {"year": 2019,"population": 48, "photo" : 2008}, ]	   },	    {	      "name": "annotation", "values": [ {"start": 2013,"end": 2014,"text": "Wiki Loves Public Art"}, {"start": 2016,"end": 2019,"text": "Public art project"} ]	   }	  ],	  "scales": [ {	     "name": "x", "type": "linear", "range": "width", "zero": false, "domain": {"data": "table","field": "year"} },	   {	      "name": "y", "type": "linear", "range": "height", "nice": true, "domain": {"data": "table","field": "population"} },	   {	      "name": "color", "type": "ordinal", "domain": {"data": "annotation","field": "text"}, "range": ["black","red"] }	 ],	  "axes": [ {	     "type": "x", "scale": "x", "format": "d", "title": "Year", "ticks": 15 },	   {	      "type": "y", "scale": "y", "title": "Population", "grid": true, "layer": "back" },	   {	      "type": "y", "scale": "y", "title": "Photos", "grid": false, "layer": "back" }       	  ],	  "marks": [ {	     "type": "rect", "from": {"data": "annotation"}, "properties": { "enter": { "x": {"scale": "x","field": "start"}, "y": {"value": 0}, "x2": {"scale": "x","field": "end"}, "y2": {"signal": "height"}, "fill": {"scale": "color","field": "text"}, "opacity": {"value": 0.2} }	     }	    },	    {	      "type": "line", "from": {"data": "table"}, "properties": { "enter": { "interpolate": {"value": "monotone"}, "x": {"scale": "x","field": "year"}, "y": {"scale": "y","field": "population"}, "stroke": {"value": "steelblue"}, "strokeWidth": {"value": 3}, "interpolate": {"value": "step-after"} }	     }	    },	    {	      "type": "symbol", "from": {"data": "table"}, "properties": { "enter": { "x": {"scale": "x","field": "year"}, "y": {"scale": "y","field": "population"}, "stroke": {"value": "steelblue"}, "fill": {"value": "white"}, "size": {"value": 30} }	     }	    },	    {	      "type": "text", "from": { "data": "table", "transform": [ {	           "type": "aggregate", "summarize": {"year": ["min","max"]} }	       ]	      },	      "properties": { "enter": { "x": {"signal": "width","mult": 0.5}, "y": {"value": -10}, "text": { "template": "Population of Falkensee from \u007b{datum.min_year}\u007d to \u007b{datum.max_year}\u007d" },	         "fill": {"value": "black"}, "fontSize": {"value": 16}, "align": {"value": "center"}, "fontWeight": {"value": "bold"} }	     }	    }	  ],	  "legends": [ {	     "fill": "color", "title": "Period", "properties": { "symbols": { "strokeWidth": {"value": 0}, "shape": {"value": "square"}, "opacity": {"value": 0.3} },	       "legend": { "x": {"value": 10}, "y": {"value": 5}, "fill": {"value": "white"} }	     }	    }	  ]	}