-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscatterplots.html
More file actions
51 lines (47 loc) · 26.3 KB
/
scatterplots.html
File metadata and controls
51 lines (47 loc) · 26.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!DOCTYPE html>
<html>
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-5D1T5Z04D7"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-5D1T5Z04D7');
</script>
<meta charset="UTF-8">
<style>
#vis.vega-embed {
width: 100%;
display: flex;
}
#vis.vega-embed details,
#vis.vega-embed details summary {
position: relative;
}
</style>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vega@5"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vega-lite@5.20.1"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script>
</head>
<body>
<div id="vis"></div>
<script>
(function(vegaEmbed) {
var spec = {"config": {"view": {"continuousWidth": 300, "continuousHeight": 300}}, "vconcat": [{"hconcat": [{"layer": [{"mark": {"type": "circle", "size": 80}, "encoding": {"color": {"field": "route", "legend": null, "scale": {"domain": ["acela", "adirondack", "autotrain", "berkshire_flyer", "borealis", "california_zephyr", "capitol_corridor", "cardinal", "carolinian", "cascades", "city_of_new_orleans", "coast_starlight", "crescent", "downeaster", "empire_builder", "empire_service", "ethan_allen_express", "floridian", "gold_runner", "hartford", "heartland_flyer", "hiawatha", "illinois_service", "keystone_service", "lakeshore_limited", "lincoln_service", "maple_leaf", "mardi_gras", "michigan_service", "missouri_river", "northeast_regional", "pacific_surfliner", "pennsylvanian", "piedmont", "silver_meteor_palmetto", "southwest_chief", "sunset_limited", "texas_eagle", "valley_flyer", "vermonter"], "range": ["#F5BD23", "#AE8A27", "#A4A1B8", "#4ECC93", "#4987C9", "#F27435", "#530F0F", "#A01919", "#D31BD9", "#2750AE", "#12AE68", "#CC0F48", "#004CC7", "#9C8585", "#2BBCCF", "#2BBCCF", "#4A4A4A", "#4A4A4A", "#B2AC3D", "#D16935", "#4A4A4A", "#9830A0", "#FF4EAD", "#FE78A7", "#5E5E94", "#A67979", "#DE2323", "#5C359B", "#82C634", "#A67979", "#FD6F2C", "#2377DE", "#2EC5B3", "#FF80C0", "#70DC55", "#2AC1B0", "#F5CB0E", "#B03AD2", "#4987C9", "#E72177"]}, "type": "nominal"}, "tooltip": [{"field": "route_label", "type": "nominal"}, {"field": "time", "type": "quantitative"}, {"field": "frequency", "type": "nominal"}, {"field": "miles_approx", "type": "quantitative"}, {"field": "n_stations_approx", "type": "quantitative"}], "x": {"field": "miles_approx", "title": "Distance (mi)", "type": "quantitative"}, "y": {"field": "time", "title": "Duration (hrs)", "type": "quantitative"}}}, {"mark": {"type": "circle", "fillOpacity": 0, "size": 200, "strokeWidth": 3}, "encoding": {"stroke": {"condition": {"param": "route", "empty": false, "field": "route", "type": "nominal", "legend": null}, "value": "transparent"}, "x": {"field": "miles_approx", "title": "Distance (mi)", "type": "quantitative"}, "y": {"field": "time", "title": "Duration (hrs)", "type": "quantitative"}}, "name": "view_97", "title": {"text": {"expr": "route.route ? 'Route: '+route.route_label : 'Select a route'"}}}], "height": 250, "width": 250}, {"layer": [{"mark": {"type": "circle", "size": 80}, "encoding": {"color": {"field": "route", "legend": null, "scale": {"domain": ["acela", "adirondack", "autotrain", "berkshire_flyer", "borealis", "california_zephyr", "capitol_corridor", "cardinal", "carolinian", "cascades", "city_of_new_orleans", "coast_starlight", "crescent", "downeaster", "empire_builder", "empire_service", "ethan_allen_express", "floridian", "gold_runner", "hartford", "heartland_flyer", "hiawatha", "illinois_service", "keystone_service", "lakeshore_limited", "lincoln_service", "maple_leaf", "mardi_gras", "michigan_service", "missouri_river", "northeast_regional", "pacific_surfliner", "pennsylvanian", "piedmont", "silver_meteor_palmetto", "southwest_chief", "sunset_limited", "texas_eagle", "valley_flyer", "vermonter"], "range": ["#F5BD23", "#AE8A27", "#A4A1B8", "#4ECC93", "#4987C9", "#F27435", "#530F0F", "#A01919", "#D31BD9", "#2750AE", "#12AE68", "#CC0F48", "#004CC7", "#9C8585", "#2BBCCF", "#2BBCCF", "#4A4A4A", "#4A4A4A", "#B2AC3D", "#D16935", "#4A4A4A", "#9830A0", "#FF4EAD", "#FE78A7", "#5E5E94", "#A67979", "#DE2323", "#5C359B", "#82C634", "#A67979", "#FD6F2C", "#2377DE", "#2EC5B3", "#FF80C0", "#70DC55", "#2AC1B0", "#F5CB0E", "#B03AD2", "#4987C9", "#E72177"]}, "type": "nominal"}, "tooltip": [{"field": "route_label", "type": "nominal"}, {"field": "time", "type": "quantitative"}, {"field": "frequency", "type": "nominal"}, {"field": "miles_approx", "type": "quantitative"}, {"field": "n_stations_approx", "type": "quantitative"}], "x": {"field": "miles_approx", "title": "Distance (mi)", "type": "quantitative"}, "y": {"field": "n_stations_approx", "title": "# of Stations", "type": "quantitative"}}, "title": {"text": {"expr": "route.route ? 'Route: '+route.route_label : 'Select a route'"}}}, {"mark": {"type": "circle", "fillOpacity": 0, "size": 200, "strokeWidth": 3}, "encoding": {"stroke": {"condition": {"param": "route", "empty": false, "field": "route", "type": "nominal", "legend": null}, "value": "transparent"}, "x": {"field": "miles_approx", "title": "Distance (mi)", "type": "quantitative"}, "y": {"field": "n_stations_approx", "title": "# of Stations", "type": "quantitative"}}, "name": "view_98", "title": {"text": {"expr": "route.route ? 'Route: '+route.route_label : 'Select a route'"}}}], "height": 250, "width": 250}, {"layer": [{"mark": {"type": "circle", "size": 80}, "encoding": {"color": {"field": "route", "legend": null, "scale": {"domain": ["acela", "adirondack", "autotrain", "berkshire_flyer", "borealis", "california_zephyr", "capitol_corridor", "cardinal", "carolinian", "cascades", "city_of_new_orleans", "coast_starlight", "crescent", "downeaster", "empire_builder", "empire_service", "ethan_allen_express", "floridian", "gold_runner", "hartford", "heartland_flyer", "hiawatha", "illinois_service", "keystone_service", "lakeshore_limited", "lincoln_service", "maple_leaf", "mardi_gras", "michigan_service", "missouri_river", "northeast_regional", "pacific_surfliner", "pennsylvanian", "piedmont", "silver_meteor_palmetto", "southwest_chief", "sunset_limited", "texas_eagle", "valley_flyer", "vermonter"], "range": ["#F5BD23", "#AE8A27", "#A4A1B8", "#4ECC93", "#4987C9", "#F27435", "#530F0F", "#A01919", "#D31BD9", "#2750AE", "#12AE68", "#CC0F48", "#004CC7", "#9C8585", "#2BBCCF", "#2BBCCF", "#4A4A4A", "#4A4A4A", "#B2AC3D", "#D16935", "#4A4A4A", "#9830A0", "#FF4EAD", "#FE78A7", "#5E5E94", "#A67979", "#DE2323", "#5C359B", "#82C634", "#A67979", "#FD6F2C", "#2377DE", "#2EC5B3", "#FF80C0", "#70DC55", "#2AC1B0", "#F5CB0E", "#B03AD2", "#4987C9", "#E72177"]}, "type": "nominal"}, "tooltip": [{"field": "route_label", "type": "nominal"}, {"field": "time", "type": "quantitative"}, {"field": "frequency", "type": "nominal"}, {"field": "miles_approx", "type": "quantitative"}, {"field": "n_stations_approx", "type": "quantitative"}], "x": {"field": "n_stations_approx", "title": "# of Stations", "type": "quantitative"}, "y": {"field": "time", "title": "Duration (hrs)", "type": "quantitative"}}}, {"mark": {"type": "circle", "fillOpacity": 0, "size": 200, "strokeWidth": 3}, "encoding": {"stroke": {"condition": {"param": "route", "empty": false, "field": "route", "type": "nominal", "legend": null}, "value": "transparent"}, "x": {"field": "n_stations_approx", "type": "quantitative"}, "y": {"field": "time", "type": "quantitative"}}, "name": "view_99", "title": {"text": {"expr": "route.route ? 'Route: '+route.route_label : 'Select a route'"}}}], "height": 250, "width": 250}]}], "data": {"name": "data-8c176b3dc10ebb1b246ed1ae878233ca"}, "params": [{"name": "route", "select": {"type": "point", "fields": ["route", "route_label"], "on": "click"}, "views": ["view_97", "view_98", "view_99"]}], "$schema": "https://vega.github.io/schema/vega-lite/v5.20.1.json", "datasets": {"data-8c176b3dc10ebb1b246ed1ae878233ca": [{"route": "acela", "route_label": "Acela", "origin": "Boston", "destination": "Washington DC", "stop_summary": "Boston - New Haven - New York - Philadelphia - Wilmington - Washington", "n_stations_approx": 14, "n_stations_approx_label": "14 (min: 4, max: 14)", "time": 7.0, "time_label": "7hrs", "frequency": "nx Daily", "miles_approx": 460, "bikes": null, "_color": "#F5BD23", "link": "https://www.amtrak.com/routes/acela-train"}, {"route": "adirondack", "route_label": "Adirondack", "origin": "Montreal", "destination": "New York", "stop_summary": "Montreal - Westport - Saratoga Springs - Albany - New York", "n_stations_approx": 18, "n_stations_approx_label": 18, "time": 10.0, "time_label": "10hrs", "frequency": "Daily", "miles_approx": 380, "bikes": null, "_color": "#AE8A27", "link": "https://www.amtrak.com/routes/adirondack-train"}, {"route": "autotrain", "route_label": "Autotrain", "origin": "Lorton, VA (Washington DC)", "destination": "Sanford, FL (Orlando)", "stop_summary": "Lorton, VA (Washington, DC) - Sanford, FL (Orlando)", "n_stations_approx": 2, "n_stations_approx_label": 2, "time": 17.483333333333334, "time_label": "17hrs 29min", "frequency": "Daily", "miles_approx": 860, "bikes": "yes", "_color": "#A4A1B8", "link": "https://www.amtrak.com/routes/auto-train"}, {"route": "berkshire_flyer", "route_label": "Berkshire Flyer", "origin": "New York", "destination": "Pittsfield", "stop_summary": "New York - Poughkeepsie - Albany - Pittsfield", "n_stations_approx": 8, "n_stations_approx_label": 8, "time": 4.0, "time_label": "4hrs", "frequency": "Late June - Early Sept", "miles_approx": 190, "bikes": null, "_color": "#4ECC93", "link": "https://www.amtrak.com/routes/berkshire-flyer-train"}, {"route": "borealis", "route_label": "Borealis", "origin": "St. Paul / Minneapolis", "destination": "Chicago", "stop_summary": "St. Paul/Minneapolis - Milwaukee - Chicago", "n_stations_approx": 13, "n_stations_approx_label": 13, "time": 7.4, "time_label": "7hrs 24min", "frequency": "Daily", "miles_approx": 410, "bikes": null, "_color": "#4987C9", "link": "https://www.amtrak.com/routes/borealis-train"}, {"route": "california_zephyr", "route_label": "California Zephyr", "origin": "Chicago", "destination": "Emeryville (San Francisco)", "stop_summary": "Chicago - Omaha - Denver - Salt Lake City - Emeryville (San Francisco)", "n_stations_approx": 35, "n_stations_approx_label": 35, "time": 51.333333333333336, "time_label": "51hrs 20min", "frequency": "Daily", "miles_approx": 2440, "bikes": "yes", "_color": "#F27435", "link": "https://www.amtrak.com/routes/california-zephyr-train"}, {"route": "capitol_corridor", "route_label": "Capitol Corridor", "origin": "Auburn", "destination": "San Jose", "stop_summary": "Auburn - Sacramento - Emeryville (San Francisco) - Oakland - San Jose", "n_stations_approx": 18, "n_stations_approx_label": 18, "time": 3.25, "time_label": "3hrs 15min", "frequency": "nx Daily", "miles_approx": 170, "bikes": "yes", "_color": "#530F0F", "link": "https://www.amtrak.com/routes/capitol-corridor-train"}, {"route": "cardinal", "route_label": "Cardinal", "origin": "New York", "destination": "Chicago", "stop_summary": "New York - Washington - Charlottesville - Cincinnati - Indianapolis - Chicago", "n_stations_approx": 32, "n_stations_approx_label": 32, "time": 26.5, "time_label": "26hrs 30min", "frequency": "3 days a week", "miles_approx": 1150, "bikes": null, "_color": "#A01919", "link": "https://www.amtrak.com/routes/cardinal-train"}, {"route": "carolinian", "route_label": "Carolinian", "origin": "New York", "destination": "Charlotte", "stop_summary": "New York - Richmond - Raleigh - Charlotte", "n_stations_approx": 24, "n_stations_approx_label": 24, "time": 13.5, "time_label": "13hrs 30min", "frequency": "Daily", "miles_approx": 700, "bikes": null, "_color": "#D31BD9", "link": "https://www.amtrak.com/routes/carolinian-train"}, {"route": "cascades", "route_label": "Cascades", "origin": "Vancouver, BC", "destination": "Eugene", "stop_summary": "Vancouver, BC - Seattle - Tacoma - Portland - Salem - Eugene", "n_stations_approx": 18, "n_stations_approx_label": "18 unique stations (min: 8, max: 18)", "time": 10.416666666666666, "time_label": "10hrs 25min", "frequency": "nx Daily", "miles_approx": 470, "bikes": null, "_color": "#2750AE", "link": "https://www.amtrak.com/routes/cascades-train"}, {"route": "city_of_new_orleans", "route_label": "City of New Orleans", "origin": "Chicago", "destination": "New Orleans", "stop_summary": "Chicago - Champaign-Urbana - Carbondale - Memphis - Jackson - New Orleans", "n_stations_approx": 20, "n_stations_approx_label": 20, "time": 19.0, "time_label": "19hrs", "frequency": "Daily", "miles_approx": 930, "bikes": "yes", "_color": "#12AE68", "link": "https://www.amtrak.com/routes/city-of-new-orleans-train"}, {"route": "coast_starlight", "route_label": "Coast Starlight", "origin": "Seattle", "destination": "Los Angeles", "stop_summary": "Seattle - Tacoma - Portland - Sacramento - San Francisco area - Los Angeles", "n_stations_approx": 28, "n_stations_approx_label": 28, "time": 35.0, "time_label": "35hrs", "frequency": "Daily", "miles_approx": 1380, "bikes": "yes", "_color": "#CC0F48", "link": "https://www.amtrak.com/routes/coast-starlight-train"}, {"route": "crescent", "route_label": "Crescent", "origin": "New York", "destination": "New Orleans", "stop_summary": "New York - Washington - Charlottesville - Charlotte - Atlanta - Birmingham - New Orleans", "n_stations_approx": 33, "n_stations_approx_label": 33, "time": 30.0, "time_label": "30hrs", "frequency": "Daily", "miles_approx": 1380, "bikes": "yes", "_color": "#004CC7", "link": "https://www.amtrak.com/routes/crescent-train"}, {"route": "downeaster", "route_label": "Downeaster", "origin": "Brunswick", "destination": "Boston", "stop_summary": "Brunswick - Freeport - Portland - Saco - Exeter - Boston", "n_stations_approx": 11, "n_stations_approx_label": 11, "time": 3.4166666666666665, "time_label": "3hrs 25min", "frequency": "nx Daily", "miles_approx": 150, "bikes": null, "_color": "#9C8585", "link": "https://www.amtrak.com/routes/downeaster-train"}, {"route": "empire_builder", "route_label": "Empire Builder", "origin": "Chicago", "destination": "Portland/Seattle", "stop_summary": "Chicago - Milwaukee - St. Paul/Minneapolis - Minot - Spokane - Portland/Seattle", "n_stations_approx": 46, "n_stations_approx_label": 46, "time": 46.0, "time_label": "46hrs", "frequency": "Daily", "miles_approx": 2200, "bikes": "yes", "_color": "#2BBCCF", "link": "https://www.amtrak.com/routes/empire-builder-train"}, {"route": "empire_service", "route_label": "Empire Service", "origin": "Niagara Falls", "destination": "New York", "stop_summary": "Niagara Falls - Buffalo - Rochester - Syracuse - Albany - New York\u00a0", "n_stations_approx": 16, "n_stations_approx_label": "16 unique stations (min: 5, max: 16)", "time": 7.333333333333333, "time_label": "7hrs 20min", "frequency": "nx Daily", "miles_approx": 460, "bikes": null, "_color": "#2BBCCF", "link": "https://www.amtrak.com/routes/empire-service-train"}, {"route": "ethan_allen_express", "route_label": "Ethan Allen Express", "origin": "Burlington", "destination": "New York", "stop_summary": "Burlington - Rutland - Saratoga Springs - Albany - New York", "n_stations_approx": 15, "n_stations_approx_label": 15, "time": 7.566666666666666, "time_label": "7hrs 34min", "frequency": "Daily", "miles_approx": 270, "bikes": null, "_color": "#4A4A4A", "link": "https://www.amtrak.com/routes/ethan-allen-express-train"}, {"route": "floridian", "route_label": "Floridian", "origin": "Chicago", "destination": "Tampa / Miami", "stop_summary": "Chicago - Pittsburgh - Washington, DC - Savannah - Tampa/Miami", "n_stations_approx": 46, "n_stations_approx_label": 46, "time": 47.0, "time_label": "47hrs", "frequency": "Daily", "miles_approx": 1100, "bikes": null, "_color": "#4A4A4A", "link": "https://www.amtrak.com/routes/floridian-train"}, {"route": "gold_runner", "route_label": "Gold Runner", "origin": "San Francisco / Sacramento", "destination": "Bakersfield", "stop_summary": "San Francisco Bay Area/Sacramento - Bakersfield/Southern California", "n_stations_approx": 18, "n_stations_approx_label": 18, "time": 6.25, "time_label": "6hrs 15min", "frequency": "nx Daily", "miles_approx": 400, "bikes": null, "_color": "#B2AC3D", "link": "https://www.amtrak.com/routes/gold-runner-train"}, {"route": "hartford", "route_label": "Hartford", "origin": "New Haven", "destination": "Springfield", "stop_summary": "New Haven - Hartford - Windsor Locks - Springfield", "n_stations_approx": 9, "n_stations_approx_label": 9, "time": 1.4, "time_label": "1hr 24min", "frequency": "nx Daily", "miles_approx": 60, "bikes": null, "_color": "#D16935", "link": "https://www.amtrak.com/routes/amtrak-hartford-line-train"}, {"route": "heartland_flyer", "route_label": "Heartland Flyer", "origin": "Oklahoma City", "destination": "Fort Worth", "stop_summary": "Oklahoma City - Fort Worth", "n_stations_approx": 7, "n_stations_approx_label": 7, "time": 4.233333333333333, "time_label": "4hrs 14min", "frequency": "Daily", "miles_approx": 200, "bikes": "yes", "_color": "#4A4A4A", "link": "https://www.amtrak.com/routes/heartland-flyer-train"}, {"route": "hiawatha", "route_label": "Hiawatha", "origin": "Milwaukee", "destination": "Chicago", "stop_summary": "Milwaukee - Glenview - Chicago", "n_stations_approx": 5, "n_stations_approx_label": 5, "time": 1.4833333333333334, "time_label": "1hr 29min", "frequency": "nx Daily", "miles_approx": 90, "bikes": "yes", "_color": "#9830A0", "link": "https://www.amtrak.com/routes/hiawatha-train"}, {"route": "illinois_service", "route_label": "Illinois Service", "origin": "Chicago", "destination": "Carbondale", "stop_summary": "Chicago - Galesburg - Quincy/Springfield - St. Louis/Champaign-Urbana - Carbondale", "n_stations_approx": 26, "n_stations_approx_label": "26 unique stations: Zephyr/Carl Sandburg: 10 (Chicago - Quincy), Saluki/Illini: 11 (Chicago - Carbondale), Lincoln: 11 (Chicago - St Louis)", "time": 5.5, "time_label": "5hrs 30min", "frequency": "nx Daily", "miles_approx": 350, "bikes": "yes", "_color": "#FF4EAD", "link": "https://www.amtrak.com/routes/illinois-services-train"}, {"route": "keystone_service", "route_label": "Keystone Service", "origin": "New York", "destination": "Harrisburg", "stop_summary": "New York - Philadelphia - Paoli - Downingtown - Lancaster - Harrisburg", "n_stations_approx": 21, "n_stations_approx_label": "21 unique stations (min: 8, max: 17)", "time": 3.8333333333333335, "time_label": "3hrs 50min", "frequency": "nx Daily", "miles_approx": 200, "bikes": "yes", "_color": "#FE78A7", "link": "https://www.amtrak.com/routes/keystone-service-train"}, {"route": "lakeshore_limited", "route_label": "Lakeshore Limited", "origin": "New York / Boston", "destination": "Chicago", "stop_summary": "New York/Boston - Albany - Buffalo - Cleveland - Toledo - Chicago", "n_stations_approx": 26, "n_stations_approx_label": 26, "time": 19.0, "time_label": "19hrs", "frequency": "Daily", "miles_approx": 960, "bikes": "yes", "_color": "#5E5E94", "link": "https://www.amtrak.com/routes/lake-shore-limited-train"}, {"route": "lincoln_service", "route_label": "Lincoln Service ", "origin": "Chicago", "destination": "Kansas City", "stop_summary": "Chicago - St. Louis - Kansas City, MO", "n_stations_approx": 20, "n_stations_approx_label": 20, "time": 11.75, "time_label": "11hrs 45min", "frequency": "Daily", "miles_approx": 200, "bikes": "yes", "_color": "#A67979", "link": "https://www.amtrak.com/routes/lincoln-service-missouri-river-runner-train"}, {"route": "maple_leaf", "route_label": "Maple Leaf", "origin": "Toronto", "destination": "New York", "stop_summary": "Toronto - Niagara Falls - Buffalo - Rochester - Syracuse - Albany - New York", "n_stations_approx": 22, "n_stations_approx_label": 22, "time": 12.5, "time_label": "12hrs 30min", "frequency": "Daily", "miles_approx": 550, "bikes": null, "_color": "#DE2323", "link": "https://www.amtrak.com/routes/maple-leaf-train"}, {"route": "mardi_gras", "route_label": "Mardi Gras", "origin": "New Orleans", "destination": "Mobile", "stop_summary": "New Orleans - Gulfport - Mobile", "n_stations_approx": 6, "n_stations_approx_label": 6, "time": 3.716666666666667, "time_label": "3hrs 43min", "frequency": "2x Daily", "miles_approx": 150, "bikes": null, "_color": "#5C359B", "link": "https://www.amtrak.com/routes/amtrak-mardi-gras-service"}, {"route": "michigan_service", "route_label": "Michigan Service", "origin": "Chicago", "destination": "Grand Rapids / Lansing (Pere Marquette), Port Huron / Ann Arbor (Wolverine) , Detroit / Pontiac (Blue Water)", "stop_summary": "Chicago - Grand Rapids/Lansing- Port Huron/Ann Arbor - Detroit - Pontiac", "n_stations_approx": 28, "n_stations_approx_label": "28 unique stations (Pere Marquette: 5, Blue Water: 11, Wolverine: 15)", "time": 6.5, "time_label": "6hrs 30min", "frequency": "nx Daily", "miles_approx": 350, "bikes": null, "_color": "#82C634", "link": "https://www.amtrak.com/routes/michigan-services-train"}, {"route": "missouri_river", "route_label": "Missouri River", "origin": "St. Louis", "destination": "Kansas City", "stop_summary": "St. Louis - Washington - Sedalia - Independence - Kansas City, MO", "n_stations_approx": 10, "n_stations_approx_label": 10, "time": 5.666666666666667, "time_label": "5hrs 40min", "frequency": "Daily", "miles_approx": 240, "bikes": null, "_color": "#A67979", "link": "https://www.amtrak.com/routes/missouri-river-runner-train"}, {"route": "northeast_regional", "route_label": "Northeast Regional", "origin": "Boston / Springfield", "destination": "Roanoke / Norfolk / Newport News", "stop_summary": "Boston/Springfield - New York - Philadelphia - Washington - Roanoke/Norfolk/Newport News", "n_stations_approx": 25, "n_stations_approx_label": "25 unique stations (min: 3, max: 25)", "time": 12.5, "time_label": "12hrs 30min", "frequency": "nx Daily", "miles_approx": 460, "bikes": "yes", "_color": "#FD6F2C", "link": "https://www.amtrak.com/routes/northeast-regional-train"}, {"route": "pacific_surfliner", "route_label": "Pacific Surfliner", "origin": "San Luis Obispo", "destination": "San Diego", "stop_summary": "San Luis Obispo - Santa Barbara - Los Angeles - Anaheim - San Diego", "n_stations_approx": 29, "n_stations_approx_label": "29 unique stations (min: 9, max: 29)", "time": 9.0, "time_label": "9hrs", "frequency": "nx Daily", "miles_approx": 350, "bikes": "yes", "_color": "#2377DE", "link": "https://www.amtrak.com/routes/pacific-surfliner-train"}, {"route": "pennsylvanian", "route_label": "Pennsylvanian", "origin": "New York", "destination": "Pittsburgh", "stop_summary": "New York - Philadelphia - Lancaster - Harrisburg - Altoona - Pittsburgh", "n_stations_approx": 18, "n_stations_approx_label": 18, "time": 9.333333333333334, "time_label": "9hrs 20min", "frequency": "Daily", "miles_approx": 340, "bikes": "yes", "_color": "#2EC5B3", "link": "https://www.amtrak.com/routes/pennsylvanian-train"}, {"route": "piedmont", "route_label": "Piedmont", "origin": "Raleigh", "destination": "Charlotte", "stop_summary": "Raleigh - Durham - Greensboro - High Point - Charlotte", "n_stations_approx": 9, "n_stations_approx_label": 9, "time": 3.1666666666666665, "time_label": "3hrs 10min", "frequency": "Daily", "miles_approx": 170, "bikes": "yes", "_color": "#FF80C0", "link": "https://www.amtrak.com/routes/piedmont-train"}, {"route": "silver_meteor_palmetto", "route_label": "Silver Meteor / Palmetto", "origin": "New York", "destination": "Tampa / Miami", "stop_summary": "New York - Washington - Charleston - Savannah - Jacksonville - Orlando - Tampa/Miami", "n_stations_approx": 32, "n_stations_approx_label": "Palmetto: 23, Silver: 32", "time": 28.0, "time_label": "<28hrs", "frequency": "Daily", "miles_approx": "1400 / 800", "bikes": "yes", "_color": "#70DC55", "link": "https://www.amtrak.com/routes/silver-service-palmetto-train"}, {"route": "southwest_chief", "route_label": "Southwest Chief", "origin": "Chicago", "destination": "Los Angeles", "stop_summary": "Chicago - Kansas City, MO - La Junta - Albuquerque - Flagstaff - Los Angeles", "n_stations_approx": 33, "n_stations_approx_label": 33, "time": 40.0, "time_label": "40+hrs", "frequency": "Daily", "miles_approx": 2270, "bikes": null, "_color": "#2AC1B0", "link": "https://www.amtrak.com/routes/southwest-chief-train"}, {"route": "sunset_limited", "route_label": "Sunset Limited", "origin": "New Orleans", "destination": "Los Angeles", "stop_summary": "New Orleans - Houston - San Antonio - El Paso - Tucson - Palm Springs - \u00a0Los Angeles", "n_stations_approx": 22, "n_stations_approx_label": 22, "time": 48.0, "time_label": "48hrs", "frequency": "3 days a week", "miles_approx": 2000, "bikes": "yes", "_color": "#F5CB0E", "link": "https://www.amtrak.com/routes/sunset-limited-train"}, {"route": "texas_eagle", "route_label": "Texas Eagle", "origin": "Chicago", "destination": "Los Angeles", "stop_summary": "Chicago - St. Louis - Little Rock - Dallas - San Antonio - Tucson - Los Angeles", "n_stations_approx": 43, "n_stations_approx_label": 43, "time": 32.416666666666664, "time_label": "32hrs 25min", "frequency": "Daily", "miles_approx": 1300, "bikes": "yes", "_color": "#B03AD2", "link": "https://www.amtrak.com/routes/texas-eagle-train"}, {"route": "valley_flyer", "route_label": "Valley Flyer", "origin": "New Haven", "destination": "Greenfield", "stop_summary": "New Haven - Springfield - Northampton - Greenfield", "n_stations_approx": 12, "n_stations_approx_label": 12, "time": 2.8, "time_label": "2hrs 48min", "frequency": "nx Daily", "miles_approx": 90, "bikes": null, "_color": "#4987C9", "link": "https://www.amtrak.com/routes/valley-flyer-train"}, {"route": "vermonter", "route_label": "Vermonter", "origin": "St. Albans", "destination": "Washington DC", "stop_summary": "St. Albans - Essex Jct. (Burlington) - Springfield - New York - Washington", "n_stations_approx": 30, "n_stations_approx_label": 30, "time": 13.75, "time_label": "13hrs 45min", "frequency": "Daily", "miles_approx": 610, "bikes": "yes", "_color": "#E72177", "link": "https://www.amtrak.com/routes/vermonter-train"}]}};
var embedOpt = {"mode": "vega-lite"};
function showError(el, error){
el.innerHTML = ('<div style="color:red;">'
+ '<p>JavaScript Error: ' + error.message + '</p>'
+ "<p>This usually means there's a typo in your chart specification. "
+ "See the javascript console for the full traceback.</p>"
+ '</div>');
throw error;
}
const el = document.getElementById('vis');
vegaEmbed("#vis", spec, embedOpt)
.catch(error => showError(el, error));
})(vegaEmbed);
</script>
</body>
</html>