Skip to content

Instantly share code, notes, and snippets.

@aaizemberg
Last active December 13, 2019 15:26
Show Gist options
  • Save aaizemberg/d49f02f01e336dabad91c1d03d33d31b to your computer and use it in GitHub Desktop.
Save aaizemberg/d49f02f01e336dabad91c1d03d33d31b to your computer and use it in GitHub Desktop.
makeovermonday, w50, vega-lite
<!DOCTYPE html>
<html>
<head>
<title>makeovermonday - w50</title>
<meta charset="utf-8" />
<script src="https://cdn.jsdelivr.net/npm/vega@5.9.0"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4.0.2"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6.2.1"></script>
<style media="screen">
/* Add space between Vega-Embed links */
.vega-actions a {
margin-right: 5px;
}
</style>
</head>
<body>
<h1>Fast Food Nation</h1>
<div id="vis"></div>
<script>
var vlSpec = {
$schema: 'https://vega.github.io/schema/vega-lite/v4.json',
"width": 400,
"height": 300,
"data": {
"url": "https://download.data.world/s/zdepjdaxjthd3vfuhtqq2fhabdsr42",
"format": {
"type": "csv"
}
},
"mark": {
"type": "point",
"tooltip": {
"content": "data"
}
},
"encoding": {
"x": {
"field": "loc",
type: 'quantitative'
},
"y": {
"field": "sales",
type: 'quantitative'
},
"size": {
"field": "vpl",
type: 'quantitative'
}
}
};
vegaEmbed('#vis', vlSpec);
</script>
</body>
</html>
rank chain sales loc vpl
8 Chick-fil-A 9000000000 2225 4044944.0
22 Whataburger 2300000000 821 2801462.0
1 McDonald's 37500000000 14036 2671701.0
25 Zaxby's 2100000000 890 2359551.0
11 Panera Bread 4500000000 2043 2202643.0
28 Culver's 1400000000 643 2177294.0
12 Chipotle 4500000000 2371 1897933.0
29 Bojangles' 1300000000 764 1701571.0
6 Wendy's 9300000000 5769 1612064.0
18 Jack in the Box 3500000000 2251 1554865.0
5 Taco Bell 9300000000 6446 1442755.0
19 Popeye's 3200000000 2231 1434334.0
4 Burger King 9800000000 7226 1356214.0
26 Carl's Jr. 1500000000 1156 1297578.0
14 Sonic Drive-In 4400000000 3593 1224603.0
23 Hardee's 2200000000 1864 1180258.0
21 Panda Express 2300000000 2011 1143710.0
13 KFC 4400000000 4019 1094800.0
30 Wingstop 1100000000 1027 1071081.0
27 Five Guys 1400000000 1321 1059803.0
9 Domino's 5900000000 5587 1056023.0
16 Arby's 3600000000 3415 1054173.0
2 Starbucks 13200000000 13930 947595.0
20 Papa John's 3100000000 3314 935425.0
15 Dairy Queen 3600000000 4455 808081.0
17 Little Caesars 3500000000 4332 807941.0
24 Jimmy John's 2100000000 2755 762250.0
10 Pizza Hut 5500000000 7522 731189.0
7 Dunkin' Donuts 5900000000 12538 470569.0
3 Subway 10800000000 25908 416860.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment