Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (51 sloc) 1.32 KB
{
"$schema": "https://vega.github.io/schema/vega-lite/v2.json",
"description": "USA | FIREARM DEATHS BY STATE",
"title": {
"text": "USA | Firearm deaths and income, by state",
"anchor": "start"},
"data": {
"url": "https://raw.githubusercontent.com/RDeconomist/vega/master/US%20firearm%20deaths.csv"
},
"config":{
"background": "#FAFAFA"
},
"height": 500,
"width": 500,
"mark": {
"type": "point",
"opacity": "1",
"XYZinterpolate": "",
"color": "red",
"size":"250",
"XYZpoint": {
"color": "black",
"size": "50"}
},
"encoding": {
"x": {
"field": "Death Rate",
"type": "quantitative",
"axis": {"title": "Annual deaths per 100,000 people"}
},
"y": {
"field": "Med income",
"type": "quantitative",
"axis": {"title": "Median income"},
"scale": {"domain": [35000, 80000]}
},
"color": {
"field": "Division",
"type": "nominal"
},
"size": {
"field": "Imprisonment rates",
"type": "quantitative"
},
"tooltip": [
{"field": "State", "type": "ordinal", "format": "%Y"},
{"field": "Death Rate", "type": "ordinal"},
{"field": "Med income", "type": "quantitative", "format": "$,"}
]
}
}