Skip to content

Commit

Permalink
simple mapbox viz
Browse files Browse the repository at this point in the history
use react-map-gl

superclustering of long/lat points

Added hook for map style, huge performance boost from bounding box fix, added count text on clusters

variable gradient size based on metric count

Ability to aggregate over any point property

This needed a change in the supercluster npm module, a PR was placed here:
mapbox/supercluster#12

Aggregator function option in explore, tweaked visual defaults

better radius size management

clustering radius, point metric/unit options

scale cluster labels that don't fit, non-numeric labels for points

Minor fixes, label field affects points, text changes

serve mapbox apikey for slice

global opacity, viewport saves (hacky), bug in point labels

fixing mapbox-gl dependency

mapbox_api_key in config

expose row_limit, fix minor bugs

Add renderWhileDragging flag, groupby. Only show numerical columns for point radius

Implicitly group by lng/lat columns and error when label doesn't match groupby

'Fix' radius in miles problem, still some jankiness

derived fields cannot be typed as of now -> reverting numerical number change

better grouping error checking, expose count(*) for labelling

Custom colour for clusters/points + smart text colouring

Fixed bad positioning and overflow in explore view + small bugs + added thumbnail
  • Loading branch information
georgeke committed Jun 24, 2016
1 parent 914f234 commit 6a48734
Show file tree
Hide file tree
Showing 15 changed files with 742 additions and 4 deletions.
Binary file added caravel/assets/images/viz_thumbnails/mapbox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion caravel/assets/javascripts/modules/caravel.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ var sourceMap = {
world_map: 'world_map.js',
treemap: 'treemap.js',
cal_heatmap: 'cal_heatmap.js',
horizon: 'horizon.js'
horizon: 'horizon.js',
mapbox: 'mapbox.jsx'
};

var color = function () {
Expand Down
12 changes: 11 additions & 1 deletion caravel/assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"homepage": "https://github.com/airbnb/caravel#readme",
"dependencies": {
"autobind-decorator": "^1.3.3",
"babel-loader": "^6.2.1",
"babel-polyfill": "^6.3.14",
"babel-preset-es2015": "^6.3.13",
Expand All @@ -43,6 +44,7 @@
"bootstrap-datepicker": "^1.6.0",
"bootstrap-toggle": "^2.2.1",
"brace": "^0.7.0",
"brfs": "^1.4.3",
"cal-heatmap": "3.5.4",
"css-loader": "^0.23.1",
"d3": "^3.5.14",
Expand All @@ -58,20 +60,28 @@
"imports-loader": "^0.6.5",
"jquery": "^2.2.1",
"jquery-ui": "^1.10.5",
"json-loader": "^0.5.4",
"less": "^2.6.1",
"less-loader": "^2.2.2",
"mapbox-gl": "^0.20.0",
"mustache": "^2.2.1",
"nvd3": "1.8.3",
"react": "^0.14.7",
"react-bootstrap": "^0.28.3",
"react-dom": "^0.14.7",
"react-grid-layout": "^0.12.3",
"react-map-gl": "^1.0.0-beta-10",
"react-resizable": "^1.3.3",
"select2": "3.5",
"select2-bootstrap-css": "^1.4.6",
"style-loader": "^0.13.0",
"supercluster": "Pending PR at https://github.com/mapbox/supercluster/pull/12",
"supercluster": "https://github.com/georgeke/supercluster/tarball/ac3492737e7ce98e07af679623aad452373bbc40",
"topojson": "^1.6.22",
"webpack": "^1.12.12"
"transform-loader": "^0.2.3",
"viewport-mercator-project": "^2.1.0",
"webpack": "^1.12.12",
"webworkify-webpack": "1.0.6"
},
"devDependencies": {
"eslint": "^2.2.0",
Expand Down
16 changes: 16 additions & 0 deletions caravel/assets/visualizations/mapbox.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
div.widget .slice_container {
cursor: grab;
cursor: -moz-grab;
cursor: -webkit-grab;
overflow: hidden;
}

div.widget .slice_container:active {
cursor: grabbing;
cursor: -moz-grabbing;
cursor: -webkit-grabbing;
}

.slice_container div {
padding-top: 0px;
}
Loading

0 comments on commit 6a48734

Please sign in to comment.