-
Notifications
You must be signed in to change notification settings - Fork 626
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
GitHub Actions Bot
committed
Oct 5, 2020
1 parent
cd49275
commit f860216
Showing
1,269 changed files
with
102 additions
and
79,369 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,245 +0,0 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega/v5.json", | ||
"description": "An interactive visualization of connections among major U.S. airports in 2008. Based on a U.S. airports example by Mike Bostock.", | ||
"background": "white", | ||
"padding": 5, | ||
"width": 900, | ||
"height": 500, | ||
"style": "cell", | ||
"data": [ | ||
{"name": "org_store"}, | ||
{ | ||
"name": "source_0", | ||
"url": "data/us-10m.json", | ||
"format": {"type": "topojson", "feature": "states"} | ||
}, | ||
{ | ||
"name": "source_1", | ||
"url": "data/flights-airport.csv", | ||
"format": {"type": "csv"} | ||
}, | ||
{"name": "source_2", "url": "data/airports.csv", "format": {"type": "csv"}}, | ||
{ | ||
"name": "data_0", | ||
"source": "source_1", | ||
"transform": [ | ||
{"type": "filter", "expr": "(vlSelectionTest(\"org_store\", datum))"}, | ||
{ | ||
"type": "lookup", | ||
"from": "source_2", | ||
"key": "iata", | ||
"fields": ["origin"], | ||
"values": ["latitude", "longitude"] | ||
}, | ||
{ | ||
"type": "lookup", | ||
"from": "source_2", | ||
"key": "iata", | ||
"fields": ["destination"], | ||
"values": ["latitude", "longitude"], | ||
"as": ["lat2", "lon2"] | ||
}, | ||
{ | ||
"type": "geojson", | ||
"fields": ["longitude", "latitude"], | ||
"signal": "layer_1_geojson_0" | ||
}, | ||
{ | ||
"type": "geojson", | ||
"fields": ["lon2", "lat2"], | ||
"signal": "layer_1_geojson_1" | ||
}, | ||
{ | ||
"type": "geopoint", | ||
"projection": "projection", | ||
"fields": ["longitude", "latitude"], | ||
"as": ["layer_1_x", "layer_1_y"] | ||
}, | ||
{ | ||
"type": "geopoint", | ||
"projection": "projection", | ||
"fields": ["lon2", "lat2"], | ||
"as": ["layer_1_x2", "layer_1_y2"] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "data_1", | ||
"source": "source_1", | ||
"transform": [ | ||
{ | ||
"type": "aggregate", | ||
"groupby": ["origin"], | ||
"ops": ["count"], | ||
"fields": [null], | ||
"as": ["routes"] | ||
}, | ||
{ | ||
"type": "lookup", | ||
"from": "source_2", | ||
"key": "iata", | ||
"fields": ["origin"], | ||
"values": ["state", "latitude", "longitude"] | ||
}, | ||
{ | ||
"type": "filter", | ||
"expr": "datum.state !== 'PR' && datum.state !== 'VI'" | ||
}, | ||
{ | ||
"type": "geojson", | ||
"fields": ["longitude", "latitude"], | ||
"signal": "layer_2_geojson_0" | ||
}, | ||
{ | ||
"type": "geopoint", | ||
"projection": "projection", | ||
"fields": ["longitude", "latitude"], | ||
"as": ["layer_2_x", "layer_2_y"] | ||
}, | ||
{ | ||
"type": "filter", | ||
"expr": "isValid(datum[\"routes\"]) && isFinite(+datum[\"routes\"])" | ||
} | ||
] | ||
} | ||
], | ||
"projections": [ | ||
{ | ||
"name": "projection", | ||
"size": {"signal": "[width, height]"}, | ||
"fit": { | ||
"signal": "[data('source_0'), layer_1_geojson_0, layer_1_geojson_1, layer_2_geojson_0]" | ||
}, | ||
"type": "albersUsa" | ||
} | ||
], | ||
"signals": [ | ||
{ | ||
"name": "unit", | ||
"value": {}, | ||
"on": [ | ||
{"events": "mousemove", "update": "isTuple(group()) ? group() : unit"} | ||
] | ||
}, | ||
{"name": "org", "update": "vlSelectionResolve(\"org_store\", \"union\")"}, | ||
{ | ||
"name": "org_tuple", | ||
"on": [ | ||
{ | ||
"events": [ | ||
{ | ||
"source": "scope", | ||
"type": "mouseover", | ||
"markname": "layer_2_voronoi" | ||
} | ||
], | ||
"update": "datum && item().mark.marktype !== 'group' ? {unit: \"layer_2\", fields: org_tuple_fields, values: [(item().isVoronoi ? datum.datum : datum)[\"origin\"]]} : null", | ||
"force": true | ||
}, | ||
{"events": [{"source": "scope", "type": "dblclick"}], "update": "null"} | ||
] | ||
}, | ||
{"name": "org_tuple_fields", "value": [{"type": "E", "field": "origin"}]}, | ||
{ | ||
"name": "org_modify", | ||
"on": [ | ||
{ | ||
"events": {"signal": "org_tuple"}, | ||
"update": "modify(\"org_store\", org_tuple, true)" | ||
} | ||
] | ||
} | ||
], | ||
"marks": [ | ||
{ | ||
"name": "layer_0_marks", | ||
"type": "shape", | ||
"style": ["geoshape"], | ||
"interactive": false, | ||
"from": {"data": "source_0"}, | ||
"encode": { | ||
"update": { | ||
"fill": {"value": "#ddd"}, | ||
"stroke": {"value": "#fff"}, | ||
"strokeWidth": {"value": 1}, | ||
"ariaRoleDescription": {"value": "geoshape"} | ||
} | ||
}, | ||
"transform": [{"type": "geoshape", "projection": "projection"}] | ||
}, | ||
{ | ||
"name": "layer_1_marks", | ||
"type": "rule", | ||
"style": ["rule"], | ||
"interactive": false, | ||
"from": {"data": "data_0"}, | ||
"encode": { | ||
"update": { | ||
"opacity": {"value": 0.35}, | ||
"stroke": {"value": "#000"}, | ||
"description": { | ||
"signal": "\"latitude: \" + (format(datum[\"latitude\"], \"\")) + \"; longitude: \" + (format(datum[\"longitude\"], \"\")) + \"; lat2: \" + (format(datum[\"lat2\"], \"\")) + \"; lon2: \" + (format(datum[\"lon2\"], \"\"))" | ||
}, | ||
"x": {"field": "layer_1_x"}, | ||
"x2": {"field": "layer_1_x2"}, | ||
"y": {"field": "layer_1_y"}, | ||
"y2": {"field": "layer_1_y2"} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "layer_2_marks", | ||
"type": "symbol", | ||
"style": ["circle"], | ||
"sort": {"field": ["datum[\"routes\"]"], "order": ["descending"]}, | ||
"interactive": true, | ||
"from": {"data": "data_1"}, | ||
"encode": { | ||
"update": { | ||
"opacity": {"value": 0.7}, | ||
"fill": {"value": "#4c78a8"}, | ||
"ariaRoleDescription": {"value": "circle"}, | ||
"description": { | ||
"signal": "\"latitude: \" + (format(datum[\"latitude\"], \"\")) + \"; longitude: \" + (format(datum[\"longitude\"], \"\")) + \"; routes: \" + (format(datum[\"routes\"], \"\"))" | ||
}, | ||
"x": {"field": "layer_2_x"}, | ||
"y": {"field": "layer_2_y"}, | ||
"size": {"scale": "size", "field": "routes"}, | ||
"shape": {"value": "circle"} | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "layer_2_voronoi", | ||
"type": "path", | ||
"interactive": true, | ||
"from": {"data": "layer_2_marks"}, | ||
"encode": { | ||
"update": { | ||
"fill": {"value": "transparent"}, | ||
"strokeWidth": {"value": 0.35}, | ||
"stroke": {"value": "transparent"}, | ||
"isVoronoi": {"value": true} | ||
} | ||
}, | ||
"transform": [ | ||
{ | ||
"type": "voronoi", | ||
"x": {"expr": "datum.datum.x || 0"}, | ||
"y": {"expr": "datum.datum.y || 0"}, | ||
"size": [{"signal": "width"}, {"signal": "height"}] | ||
} | ||
] | ||
} | ||
], | ||
"scales": [ | ||
{ | ||
"name": "size", | ||
"type": "linear", | ||
"domain": {"data": "data_1", "field": "routes"}, | ||
"range": [0, 1000], | ||
"zero": true | ||
} | ||
], | ||
"config": {"style": {"cell": {"stroke": null}}} | ||
} | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +0,0 @@ | ||
{ | ||
"$schema": "https://vega.github.io/schema/vega/v5.json", | ||
"description": "A simple donut chart with embedded data.", | ||
"background": "white", | ||
"padding": 5, | ||
"width": 200, | ||
"height": 200, | ||
"style": "cell", | ||
"encode": {"update": {"stroke": {"value": null}}}, | ||
"data": [ | ||
{ | ||
"name": "source_0", | ||
"values": [ | ||
{"category": 1, "value": 4}, | ||
{"category": 2, "value": 6}, | ||
{"category": 3, "value": 10}, | ||
{"category": 4, "value": 3}, | ||
{"category": 5, "value": 7}, | ||
{"category": 6, "value": 8} | ||
] | ||
}, | ||
{ | ||
"name": "data_0", | ||
"source": "source_0", | ||
"transform": [ | ||
{ | ||
"type": "stack", | ||
"groupby": [], | ||
"field": "value", | ||
"sort": {"field": ["category"], "order": ["ascending"]}, | ||
"as": ["value_start", "value_end"], | ||
"offset": "zero" | ||
}, | ||
{ | ||
"type": "filter", | ||
"expr": "isValid(datum[\"value\"]) && isFinite(+datum[\"value\"])" | ||
} | ||
] | ||
} | ||
], | ||
"marks": [ | ||
{ | ||
"name": "marks", | ||
"type": "arc", | ||
"style": ["arc"], | ||
"from": {"data": "data_0"}, | ||
"encode": { | ||
"update": { | ||
"innerRadius": {"value": 50}, | ||
"fill": {"scale": "color", "field": "category"}, | ||
"description": { | ||
"signal": "\"value: \" + (format(datum[\"value\"], \"\")) + \"; category: \" + (isValid(datum[\"category\"]) ? datum[\"category\"] : \"\"+datum[\"category\"])" | ||
}, | ||
"x": {"signal": "width", "mult": 0.5}, | ||
"y": {"signal": "height", "mult": 0.5}, | ||
"outerRadius": {"signal": "min(width,height)/2"}, | ||
"startAngle": {"scale": "theta", "field": "value_end"}, | ||
"endAngle": {"scale": "theta", "field": "value_start"} | ||
} | ||
} | ||
} | ||
], | ||
"scales": [ | ||
{ | ||
"name": "theta", | ||
"type": "linear", | ||
"domain": {"data": "data_0", "fields": ["value_start", "value_end"]}, | ||
"range": [0, 6.283185307179586], | ||
"zero": true | ||
}, | ||
{ | ||
"name": "color", | ||
"type": "ordinal", | ||
"domain": {"data": "data_0", "field": "category", "sort": true}, | ||
"range": "category" | ||
} | ||
], | ||
"legends": [{"fill": "color", "symbolType": "circle", "title": "category"}] | ||
} | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.