Created
February 23, 2016 08:32
-
-
Save matallo/2836a8aca5cde2131bbc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var vizJSON = { | |
"title": "On-Time Performance Rating", | |
"description": "Data from <a href=\"http://www.flightstats.com/go/Home/home.do\">FlightStats</a> and <a href=\"http://openflights.org/data.html\">OpenFlights</a>", | |
"user": { | |
"fullname": "Carlos Matallín", | |
"avatar_url": "https://s3.amazonaws.com/com.cartodb.users-assets.production/production/matallo/assets/20150603150130matallo.jpg" | |
}, | |
"updated_at": "2016-02-23T07:56:47+00:00", | |
"widgets": [ | |
{ | |
"id": "avg-rating-formula", | |
"type": "formula", | |
"title": "Avg rating", | |
"layer_id": "a4cbe904-fc9a-4d58-bafe-50f3554faaaa", | |
"options": { | |
"column": "allstars", | |
"operation": "avg", | |
"suffix": " stars" | |
} | |
}, { | |
"id": "rating-histogram", | |
"type": "histogram", | |
"title": "Rating", | |
"layer_id": "a4cbe904-fc9a-4d58-bafe-50f3554faaaa", | |
"options": { | |
"column": "allstars", | |
"bins": 5 | |
} | |
}, { | |
"id": "max-delay-formula", | |
"type": "formula", | |
"title": "Max delay", | |
"layer_id": "a4cbe904-fc9a-4d58-bafe-50f3554faaaa", | |
"options": { | |
"column": "delaymax", | |
"operation": "max", | |
"suffix": " minutes", | |
"description": "Maximum delay value observed." | |
} | |
}, { | |
"id": "avg-delay-formula", | |
"type": "formula", | |
"title": "Avg mean delay", | |
"layer_id": "a4cbe904-fc9a-4d58-bafe-50f3554faaaa", | |
"options": { | |
"column": "delaymean", | |
"operation": "avg", | |
"suffix": " minutes", | |
"description": "Average of mean delays." | |
} | |
}, { | |
"id": "departure-category", | |
"type": "category", | |
"title": "Departure city", | |
"layer_id": "a4cbe904-fc9a-4d58-bafe-50f3554faaaa", | |
"options": { | |
"column": "departurecity", | |
"aggregation": "count", | |
"show_stats": true | |
} | |
}, { | |
"id": "airline-category", | |
"type": "category", | |
"title": "Airline", | |
"layer_id": "a4cbe904-fc9a-4d58-bafe-50f3554faaaa", | |
"options": { | |
"column": "name", | |
"aggregation": "count", | |
"show_stats": true | |
} | |
}, { | |
"id": "arrival-category", | |
"type": "category", | |
"title": "Arrival city", | |
"layer_id": "a4cbe904-fc9a-4d58-bafe-50f3554faaaa", | |
"options": { | |
"column": "arrivalcity", | |
"aggregation": "count", | |
"show_stats": true | |
} | |
} | |
], | |
"datasource": { | |
"user_name": "matallo", | |
"maps_api_template": "https://{user}.cartodb.com:443", | |
"force_cors": true, // This is sometimes set in the editor, | |
"stat_tag": "71d401dc-d9b6-11e5-9076-0e3ff518bd15" | |
}, | |
"id": "71d401dc-d9b6-11e5-9076-0e3ff518bd15", | |
"version": "0.1.0", | |
"likes": 0, | |
"scrollwheel": false, | |
"legends": true, | |
"url": null, | |
"map_provider": "leaflet", | |
"bounds": [ | |
[ | |
-10.3967, | |
-80.6479 | |
], | |
[ | |
60.2137, | |
45.1867 | |
] | |
], | |
"center": "[40.7127, -74.0059]", | |
"zoom": 4, | |
"updated_at": "2015-10-26T11:50:30+00:00", | |
"layers": [ | |
{ | |
"options":{ | |
"visible":true, | |
"type":"Tiled", | |
"name":"Dark matter (lite)", | |
"className":"httpscartodbbasemapssglobalsslfastlynetdark_nolabelszxypng", | |
"base_type":"default", | |
"urlTemplate":"https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_nolabels/{z}/{x}/{y}.png", | |
"minZoom":"0", | |
"maxZoom":"18", | |
"attribution":"© <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a> contributors © <a href=\"http://cartodb.com/attributions\">CartoDB</a>", | |
"subdomains":"abcd", | |
"style":null, | |
"read_only":true, | |
"category":"CartoDB", | |
"order":0, | |
"id":"4b130c82-280c-4b76-9d45-29dc4b9ee395" | |
}, | |
"infowindow":null, | |
"tooltip":null, | |
"id":"4b130c82-280c-4b76-9d45-29dc4b9ee395", | |
"order":0, | |
"type":"tiled" | |
}, { | |
"type": "layergroup", | |
"options": { | |
"user_name": "matallo", | |
"maps_api_template": "https://{user}.cartodb.com:443", | |
"layer_definition": { | |
"stat_tag": "71d401dc-d9b6-11e5-9076-0e3ff518bd15", | |
"version": "1.0.1", | |
"layers":[ | |
{ | |
"id":"a4cbe904-fc9a-4d58-bafe-50f3554faaaa", | |
"type":"CartoDB", | |
"infowindow":{ | |
"fields":[ | |
], | |
"template_name":"table/views/infowindow_light", | |
"template":"<div class=\"cartodb-popup v2\">\n <a href=\"#close\" class=\"cartodb-popup-close-button close\">x</a>\n <div class=\"cartodb-popup-content-wrapper\">\n <div class=\"cartodb-popup-content\">\n {{#content.fields}}\n {{#title}}<h4>{{title}}</h4>{{/title}}\n {{#value}}\n <p {{#type}}class=\"{{ type }}\"{{/type}}>{{{ value }}}</p>\n {{/value}}\n {{^value}}\n <p class=\"empty\">null</p>\n {{/value}}\n {{/content.fields}}\n </div>\n </div>\n <div class=\"cartodb-popup-tip-container\"></div>\n</div>\n", | |
"alternative_names":{ | |
}, | |
"width":226, | |
"maxHeight":180 | |
}, | |
"tooltip":{ | |
"fields":[ | |
], | |
"template_name":"tooltip_light", | |
"template":"<div class=\"cartodb-tooltip-content-wrapper\">\n <div class=\"cartodb-tooltip-content\">\n {{#fields}}\n {{#title}}\n <h4>{{title}}</h4>\n {{/title}}\n <p>{{{ value }}}</p>\n {{/fields}}\n </div>\n</div>", | |
"alternative_names":{ | |
}, | |
"maxHeight":180 | |
}, | |
"legend":{ | |
"type":"none", | |
"show_title":false, | |
"title":"", | |
"template":"", | |
"visible":true | |
}, | |
"order":1, | |
"visible":true, | |
"options":{ | |
"sql":"select * from ratings_copy_1", | |
"layer_name":"ratings_copy_1", | |
"cartocss":"/** simple visualization */\n\n#ratings_copy_1{\n line-color: #0F3B82;\n line-width: 1;\n line-opacity: 0.1;\n}\n\n#ratings_copy_1{\n polygon-opacity: 0;\n line-color: #d73027;\n line-width: 1;\n line-opacity: 0.8;\n}\n#ratings_copy_1 [ allstars <= 4.9499998] {\n line-color: #1a9850;\n}\n#ratings_copy_1 [ allstars <= 4.5999999] {\n line-color: #8cce8a;\n}\n#ratings_copy_1 [ allstars <= 4.25] {\n line-color: #d2ecb4;\n}\n#ratings_copy_1 [ allstars <= 3.7] {\n line-color: #fff2cc;\n}\n#ratings_copy_1 [ allstars <= 3.3] {\n line-color: #fed6b0;\n}\n#ratings_copy_1 [ allstars <= 2.5] {\n line-color: #f79272;\n}\n#ratings_copy_1 [ allstars <= 1.5] {\n line-color: #d73027;\n}","cartocss_version":"2.1.1", | |
"interactivity":"cartodb_id", | |
"table_name":"\"\"." | |
} | |
}, | |
{ | |
"id":"e130c8bf-c830-4497-932e-788787f54304", | |
"type":"CartoDB", | |
"interactivity": "cartodb_id,city", | |
"infowindow":{ | |
"fields":[ | |
], | |
"template_name":"table/views/infowindow_light", | |
"template":"<div class=\"cartodb-popup v2\">\n <a href=\"#close\" class=\"cartodb-popup-close-button close\">x</a>\n <div class=\"cartodb-popup-content-wrapper\">\n <div class=\"cartodb-popup-content\">\n {{#content.fields}}\n {{#title}}<h4>{{title}}</h4>{{/title}}\n {{#value}}\n <p {{#type}}class=\"{{ type }}\"{{/type}}>{{{ value }}}</p>\n {{/value}}\n {{^value}}\n <p class=\"empty\">null</p>\n {{/value}}\n {{/content.fields}}\n </div>\n </div>\n <div class=\"cartodb-popup-tip-container\"></div>\n</div>\n", | |
"alternative_names":{ | |
}, | |
"width":226, | |
"maxHeight":180 | |
}, | |
"tooltip":{ | |
"fields":[ | |
{ | |
"name":"city", | |
"title":true, | |
"position":5 | |
} | |
], | |
"template_name":"tooltip_light", | |
"template": "<div class=\"CDB-Tooltip CDB-Tooltip--isLight\">\n <div class=\"cartodb-tooltip-content\">\n {{#fields}}\n {{#title}}\n <h4>{{title}}</h4>\n {{/title}}\n <p>{{{ value }}}</p>\n {{/fields}}\n </div>\n</div>", | |
"alternative_names":{ | |
}, | |
"maxHeight":180 | |
}, | |
"legend":{ | |
"type":"none", | |
"show_title":false, | |
"title":"", | |
"template":"", | |
"visible":true | |
}, | |
"order":2, | |
"visible":true, | |
"options":{ | |
"sql":"select * from airports", | |
"layer_name":"airports", | |
"cartocss":"/** simple visualization */\n\n#airports{\n marker-fill-opacity: 0.9;\n marker-line-color: #FFF;\n marker-line-width: 1;\n marker-line-opacity: 1;\n marker-placement: point;\n marker-type: ellipse;\n marker-width: 3;\n marker-fill: #FFFFFF;\n marker-allow-overlap: true;\n}", | |
"cartocss_version":"2.1.1", | |
"interactivity":"cartodb_id,city", | |
"table_name":"\"\"." | |
} | |
} | |
] | |
}, | |
"attribution": "" | |
} | |
} | |
], | |
"overlays": [ | |
{ | |
"type": "search", | |
"order": 3, | |
"options": { | |
"display": true, | |
"x": 60, | |
"y": 20 | |
}, | |
"template": "" | |
}, { | |
"type": "zoom", | |
"order": 6, | |
"options": { | |
"display": true, | |
"x": 20, | |
"y": 20 | |
}, | |
"template": "<div class=\"CDB-Overlay\"><button class=\"CDB-Zoom-action CDB-Zoom-action--out js-zoomOut\"></button><button class=\"CDB-Zoom-action CDB-Zoom-action--in js-zoomIn\"></button></div><div class=\"CDB-Zoom-info js-zoomInfo\">1</div>" | |
}, { | |
"type": "loader", | |
"order": 8, | |
"options": { | |
"display": true, | |
"x": 20, | |
"y": 150 | |
}, | |
"template": "" | |
} | |
], | |
"prev": null, | |
"next": null, | |
"transition_options": { | |
"time": 0 | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment