{ "$schema": "https://vega.github.io/schema/vega-lite/v5.json", "config": {"view": {"strokeOpacity": 0}}, "title": { "text": "GDP and Life Expectancy", "subtitle": [ "Life expectancy: in years. Source: UN Population Prospects 2022", "GDP: per capita PPP (international $). Source: World Bank", "" ], "subtitleFontStyle": "normal", "subtitleFontSize": 12, "anchor": "start", "fontSize": 16 }, "data": { "url": "https://raw.githubusercontent.com/EconomicsObservatory/courses/main/datasets/simple/UN_living_standards.csv" }, "mark": {"type": "circle", "size": 150, "opacity": 0.8}, "height": 300, "width": 400, "encoding": { "x": { "field": "GDP per capita (PPP)", "type": "quantitative", "title": "GDP (log scale)", "scale": {"type": "log", "domain": [1000, 140000]}, "axis": { "values": [1000, 2000, 5000, 10000, 20000, 40000, 100000], "format": "$,", "gridOpacity": 0.3, "tickSize": 3, "labelFontSize": 11, "ticks": false, "labelPadding": 5, "titleFontWeight": "bold", "titlePadding": 6 } }, "y": { "field": "Life Expectancy", "type": "quantitative", "title": "Life Expectancy", "scale": {"domain": [50, 87]}, "axis": { "values": [55, 60, 65, 70, 75, 80, 85], "ticks": false, "labelFontSize": 11, "labelPadding": 5, "titleFontWeight": "bold", "gridOpacity": 0.3, "titlePadding": 6 } }, "color": { "field": "Continent", "type": "nominal", "title": null, "legend": { "orient": "none", "direction": "horizontal", "legendX": 5, "legendY": 0, "title": null, "offset": 10, "labelFontSize": 11 } }, "size": { "field": "Population", "type": "quantitative", "scale": {"range": [12, 600]}, "legend": null }, "tooltip": [ {"field": "Country"}, {"field": "Population", "format": ",d"}, { "field": "GDP per capita (PPP)", "title": "GDP per capita", "format": "$,d" }, {"field": "Life Expectancy", "format": "d"} ] }, "autosize": {"type": "pad", "contains": "padding", "resize": true} }