Ferrol
Demografía
{	"width": 600, "height": 400, "data": [ {			"name": "pop2017", "values": [ {					"year": 2017, "age": 0, "sex": 1, "people": 1059 },				{					"year": 2017, "age": 0, "sex": 2, "people": 938 },				{					"year": 2017, "age": 5, "sex": 1, "people": 1390 },				{					"year": 2017, "age": 5, "sex": 2, "people": 1217 },				{					"year": 2017, "age": 10, "sex": 1, "people": 1368 },				{					"year": 2017, "age": 10, "sex": 2, "people": 1352 },				{					"year": 2017, "age": 15, "sex": 1, "people": 1365 },				{					"year": 2017, "age": 15, "sex": 2, "people": 1223 },				{					"year": 2017, "age": 20, "sex": 1, "people": 1366 },				{					"year": 2017, "age": 20, "sex": 2, "people": 1346 },				{					"year": 2017, "age": 25, "sex": 1, "people": 1540 },				{					"year": 2017, "age": 25, "sex": 2, "people": 1452 },				{					"year": 2017, "age": 30, "sex": 1, "people": 1965 },				{					"year": 2017, "age": 30, "sex": 2, "people": 1800 },				{					"year": 2017, "age": 35, "sex": 1, "people": 2322 },				{					"year": 2017, "age": 35, "sex": 2, "people": 2246 },				{					"year": 2017, "age": 40, "sex": 1, "people": 2535 },				{					"year": 2017, "age": 40, "sex": 2, "people": 2573 },				{					"year": 2017, "age": 45, "sex": 1, "people": 2359 },				{					"year": 2017, "age": 45, "sex": 2, "people": 2500 },				{					"year": 2017, "age": 50, "sex": 1, "people": 2489 },				{					"year": 2017, "age": 50, "sex": 2, "people": 2765 },				{					"year": 2017, "age": 55, "sex": 1, "people": 2441 },				{					"year": 2017, "age": 55, "sex": 2, "people": 2732 },				{					"year": 2017, "age": 60, "sex": 1, "people": 2230 },				{					"year": 2017, "age": 60, "sex": 2, "people": 2640 },				{					"year": 2017, "age": 65, "sex": 1, "people": 2051 },				{					"year": 2017, "age": 65, "sex": 2, "people": 2593 },				{					"year": 2017, "age": 70, "sex": 1, "people": 1838 },				{					"year": 2017, "age": 70, "sex": 2, "people": 2421 },				{					"year": 2017, "age": 75, "sex": 1, "people": 1268 },				{					"year": 2017, "age": 75, "sex": 2, "people": 1836 },				{					"year": 2017, "age": 80, "sex": 1, "people": 1199 },				{					"year": 2017, "age": 80, "sex": 2, "people": 2062 },				{					"year": 2017, "age": 85, "sex": 1, "people": 649 },				{					"year": 2017, "age": 85, "sex": 2, "people": 1421 },				{					"year": 2017, "age": 90, "sex": 1, "people": 210 },				{					"year": 2017, "age": 90, "sex": 2, "people": 573 },				{					"year": 2017, "age": 95, "sex": 1, "people": 41 },				{					"year": 2017, "age": 95, "sex": 2, "people": 169 },				{					"year": 2017, "age": 100, "sex": 1, "people": 7 },				{					"year": 2017, "age": 100, "sex": 2, "people": 18 }			],			"transform": [ {					"type": "filter", "test": "datum.year == 2017" }			]		}	],	"scales": [ {			"name": "g", "type": "ordinal", "domain": [ 2,				1			],			"range": "width" },		{			"name": "y", "type": "ordinal", "range": "height", "reverse": true, "domain": { "data": "pop2017", "field": "age" }		},		{			"name": "c", "type": "ordinal", "domain": [ 1,				2			],			"range": [ "#1f77b4", "#e377c2" ]		}	],	"legends": [ {			"fill": "c", "values": [ "Homes", "Mulleres" ],			"offset": -200 }	],	"marks": [ {			"type": "text", "interactive": false, "from": { "data": "pop2017", "transform": [ {						"type": "aggregate", "groupby": [ "age" ]					}				]			},			"properties": { "enter": { "x": { "field": { "group": "width" },						"mult": 0.5, "offset": -15 },					"y": { "scale": "y", "field": "age", "offset": 11 },					"text": { "field": "age" },					"baseline": { "value": "middle" },					"align": { "value": "center" },					"fill": { "value": "#000" }				}			}		},		{			"type": "group", "from": { "data": "pop2017", "transform": [ {						"type": "facet", "groupby": [ "sex" ]					},					{						"type": "formula", "field": "reverse", "expr": "datum.key==2" }				]			},			"properties": { "update": { "x": { "scale": "g", "field": "key" },					"y": { "value": 0 },					"width": { "scale": "g", "band": true, "offset": -30 },					"height": { "field": { "group": "height" }					}				}			},			"scales": [ {					"name": "x", "type": "linear", "range": "width", "reverse": { "field": "reverse" },					"nice": true, "domain": { "data": "pop2017", "field": "people" }				}			],			"axes": [ {					"type": "x", "scale": "x", "format": "d", "ticks": 5 }			],			"marks": [ {					"type": "rect", "properties": { "enter": { "x": { "scale": "x", "field": "people" },							"x2": { "scale": "x", "value": 0 },							"y": { "scale": "y", "field": "age" },							"height": { "scale": "y", "band": true, "offset": -1 },							"fillOpacity": { "value": 0.6 },							"fill": { "scale": "c", "field": "sex" }						}					}				}			]		}	] } Pirámide poboacional de Ferrol no ano 2017. (Fonte: Censos de población INE ). )