Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
GitBook: [master] 115 pages modified
Giuseppe Macrì10e9238bd14f
diff --git a/CHANGELOG.md b/CHANGELOG.mddeleted file mode 100644index 2dad83698..000000000--- a/CHANGELOG.md+++ /dev/null@@ -1,347 +0,0 @@-# Change Log--All notable changes to kepler.gl will be documented in this file.--<!---Each version should:- List its release date in the above format.- Group changes to describe their impact on the project, as follows:- Added for new features.- Changed for changes in existing functionality.- Deprecated for once-stable features removed in upcoming releases.- Removed for deprecated features removed in this release.- Fixed for any bug fixes.- Security to invite users to upgrade in case of vulnerabilities.-Ref: http://keepachangelog.com/en/0.3.0/--->-## [2.0.0] - Feb 25 2020-- [Enhancement] Independently customize Geojson layer fill stroke opacity (#966)-- [Bug] Fix text collision on toggle input (#973)-- [Chore] upgrade prettier to 1.19 to better handle single line function compositions (#971)-- [Style] run prettier and lint on tests (#968)-- [Bug] Select dataset filter bug (#965)-- [Bug] fix hexagon layer hover crash (#964)-- [Style] run prettier (#963)-- [Feat] Allow adding custom side panel tabs-- [Chore] Fix prettier update config (#767)-- [Bug] Fixed json map export and added tests (#956)-- [Bug] Resolve deck luma version conflict (#955)-- [Feat] upgrade to deck.gl@8 (#889)-- [Feat] UI for save map to backend storage (#906)-- [Bug] Fixed geo-filter extra layer issue (#936)-- [Bug] Fix low projection accuracy in higher zoom level (#946)-- [Bug] fix hexagon layer hover cause app crash (#933)-- [Bug] fix heatmap crash when there is no filter (#934)-- [Bug] should add redux devtools in demo app by default (#932)-- [Feat] Gpu data filter (#878)-- [Feat] Global export of image export constants (#923)-- [Bug] Fix mix int/float column interpreted as sting (#927)-- [Chore] Correctly update the copy changes to actions.js (#914)-- [Enhancement] Hide data modal in export map (#920)-- [Chore] remove action to publish to github package repo (#919)-- [Feat] Geo-Operations: create and apply polygon filters (#595)-- [Bug] Fix h3 layer projection error at edge of world map (#918)--## [1.1.13] - Jan 17 2020-- [Enhancement] added coordinate to tooltip export configuration (#876)-- [Bug] mapState not applied in exported map html (#913)-- [Chore] Update grammar, cleanup whitespace, fix broken link (#912)-- [Docs] add Upgrade-guide-- [Docs] Remove hyperlink with "Advanced Usage" (#903)-- [Docs] add initial cloud provider api (#868)-- [Enhancement] treat type-analyzer type: NUMBER as strings (#891)-- [Bug] remove argument.length check in injector (#899)-- [Enhancement] add disabled to layer-configurator group (#897)-- [Bug] Fix a bug in file-drop.js that causes error in server side render (#896)-- [Bug] Ensure all colors returned from get3DBuildingColor are RGB arrays (#871)-- [Chore] License 2020 (#883)-- [Bug] Correctly copy over field.filterProps when merging multiple filters (#884)-- [Bug] Fix newDateEntries typo and formatting fixes (#870)-- [Bug] Fix multiple geojson layer found when properties contain object and array (#872)-- [Bug] fix demo-app resolve react-redux (#866)--## [1.1.12] - Dec 14 2019-- [Bug] Remove sqrt, log from default color aggregation for count (#856)-- [Bug] fix cluster point count, cluster layer failed to render on export image (#855)-- [Style] Remove extra semicolon (#850)-- [Docs] Update api-reference overview links-- [Bug] Don't merge domain when update filter name (#841)-- [Enhancement] React 17: replace componentWillReceiveProps and componentWillMount (#745)-- [Bug] Fixed delete dataset action (#835)-- [Chore] Github action to publish npm package (#825)-- [Enhancement] Demo App Cloud provider refactor (#831)--## [1.1.11] - Nov 13 2019-- [Bug] Correctly save filterProps to field while merging filter from config (#829)-- [Docs] fixing api reference broken link (#812)-- [Bug] fix empty geometry causing trip layer detection to fail (#826)-- [Docs] update a-add-data-to-the-map.md with embed geometries in CSV--## [1.1.10] - Oct 30 2019-- [Docs] Add instructions for image and weblink in tooltip (#797)-- [Enhancement] Add Bug Report User Guides to demo app panel header (#787)-- [Docs] Fix typos in add-data-workflow-user-guide (#807)-- [Feat] add stdev and variance aggregators to aggregation layer (#809)-- [Feat] Multiple datasets per filter (#773)-- [Bug] Fixed loading urls with query params (#780)-- [Jupyter] Publish keplergl jupyter 0.1.2 (#784)--## [1.1.9] - Oct 11 2019-- [Enhancement] improve Geojson processing performance and error handling (#781)-- [Enhancement] add file format instruction to file upload (#770)-- [Bug] Filter invalid H3 IDs (#775)-- [Bug] fix readonly in addDataToMap (#783)-- [Enhancement] Expose LayerHoverInfoFactory and CoordinateInfoFactory (#769)-- [Bug] Fixed dropbox upload in Firefox. Passing explicit file name to upload function-- [Enhancement] Demo app sample info (#758)-- [Enhancement] Generate custom map style icon from style url (#762)-- [Jupyter] [Bug] fix lab widget window responsiveness, add version to header (#771)-- [Jupyter] [Docs] add installation instruction to jupyter widget user guide-- [Docs] Update add data to map docs-- [Jupyter] Publish keplergl-jupyter for Jupyter labs (#764)-- [Jupyter] [Bug] fix flashing html export when open in window (#756)-- [Enhancement] Add logo and GA to exported html (#757)-- [Docs] update Trip Layer md--## [1.1.8] - Sep 30 2019-- [Bug] Fix saving animation speed (#752)-- [Feat] Add Trip Layer - Final (#699)-- [Feat] add custom color editor (#601)-- [Chore] add coverall (#748)-- [Docs] mapboxApiUrl usage examples (#737)-- [Feat] Support Policy page (#724)--## [1.1.7] - Sep 11 2019-- [Enhancement] Create more factories from SourceDataCatalog, add onClickTitle (#720)-- [Enhancement] Express example (#704)-- [Bug] check new layers based on new dataset id (#721)-- [Feat] Add Log and Sqrt scale (#670)-- [Chore] Add a script to automatically edit kepler.gl version (#714)--## [1.1.6] - Sep 5 2019-- [Bug] Upgrade to deck 7.1.11 (#715)--## [1.1.5] - Sep 4 2019-- [Bug] Unlock luma.gl version (#713)-- [Bug] fix heatmap getBounds (#711)-- [Feat] HTML Export: provide read only mode (#709)--## [1.1.4] - Sep 3 2019-- [Bug] Lock deck.gl to version 7.1.5 (#688)-- [Enhancement] add keepExistingConfig option to addDataToMap (#619)-- [Bug] Fixed issue with geojson fields (#683)-- [Enhancement] Switch from callback refs to createRef (#622)-- [Bug] Fix uglify error compiling dom-to-image in prod (#682)-- [Enhancement] pass set useDevicePixels to deck.gl to plot container (#663)-- [jupyter] Upgrade to kepler.gl v1.1.3 (#660)-- [Chore] use xvfb as a service in travis-ci (#669)--## [1.1.3] - Aug 5 2019-- [Enhancement] Use preserved state to apply keplerGlInit. when mint=false (#649)-- [Enhancement] Replace react-data-grid with react-virtualized (#629)--## [1.1.2] - Aug 1 2019-- [Bug] Fix issue in Layer.registerVisConfig preventing custom boolean properties-- [Enhancement] Simplify map layer visible logic in splitMaps and deck, mapbox overlay renders (#642)-- Netlify badge (#641)-- [Enhancement] Add 3d building color editor (#633)-- [Enhancement] Update mapbox-gl css version (#634)-- [Bug] fix SolidPolygonLayer import causing 3d building layer crash (#625)-- [Bug] Don't show null for labels if there is no data (#626)-- [Bug] add deckGlProps to pass preserveDrawingBuffer to plot container (#624)-- [Enhancement] DemoApp: explicitly pass window.fetch to Dropbox to suppress warning (#621)-- [Enhancement] Use theme in histogram plot color (#607)-- [Enhancement] Bump supercluster version (#590)-- [Feat] Add mapboxApiUrl to `KeplerGL` (#554)-- [Docs] Update link to the GitHub repo (#589)-- Fixed python3 compatiability and wrong variable in string format (#587)-- [Bug] Remove isMouseOver state from MapPopover (#577)-- [Docs] fix: Correct Custom Theme Example Link (#578)-- [Bug] [Jupyter] Replacing print statement with () to make it Python 3 compatible (#582)-- Update build command: remove yarn since netlify runs yarn by default (#585)-- [Jupyter] cleanup examples (#574)-- [Feat] Publish keplergl jupyter 0.1.0a5 (#572)-- [Chore] Add issue template for kepler.gl Jupyter-- [Bug] Solve issue #547 avoid crash application (#564)--## [1.1.1] - Jun 24 2019-- [Bug] Fix radius rendering when value = 0 (#551)-- [Docs] Updating Layer User Guides (#373)-- [Feat] Display mouse coordinate (#550)-- [Docs] Replace CLA with DCO (162a9f7)-- [Style] fix README typo (c1fafbf)-- [Docs] Add jupyter widget user guide link o README (17d3ec8)-- [Chore] Add jupyter widget issue templates (a40c1fe)-- [Feat] Bump deck.gl to v7.1.5 (#568)-- [Feat] Add ScenegraphLayer (#540)-- [Feat] Add kepler.gl-jupyter python package (#543)--## [1.1.0] - Jun 15 2019-- Upgrade to deck.gl 7.1 (#559)-- [Docs] update user documentation with newer layers and features (#552)-- Upgrade to deck.gl 7 and luma.gl 7 (#544)-- [Bug] Display color legend for stroke color scale (#546)-- [Enhancement] Image export error handling (#538)-- [Bug] Fix typo on layer-configurator.js (#549)--## [1.0.0] - May 23 2019-- [Enhancement] Detecting mapbox token validity (#513)-- [Enhancement] Netlify webpack optimization (#525)-- [Feat] More control over point label (#515)-- [Enhancement] Applied changes for enable netlify deployment (#516)-- [Enhancement] Refactored modal dialog to be more responsive (#501)-- [Bug] fix side panel unnecessary rerender (#512)-- [Feat] Upgrade deck.gl to 6.4 (#456)-- [BUG] Fixed layer list sorting dnd effect (#509)-- [Feat] add onViewStateChange callback to KeplerGl (#506)-- [Enhancement] More granular speed control (#500)-- [Docs] update all uber links to keplergl org (#502)--## [1.0.0-2] - May 2 2019-- [Bug] Fix missing default map styles after loading custom map style from saved json (#490)-- [Bug] Fix `fix radius` in point layer unclickable (#491)-- [Bug] fix image export doesnt get called when map rendered (#494)-- [Enhancement] Merge export config and map into one interaction (#488)--## [1.0.0-1] - Apr 23 2019-- [Bug] Fix point layer brushing and highlight (#487)-- [Feat] Add a light theme to KeplerGl Prop (#489)-- [Bug] Fix browse for file upload (#486)-- [Enhancement] Cleanup load map style tasks (#472)-- [Enhancement] load svg icons from aws, add bundle analyzer, reduce bundle size -1mb (#479)-- [Bug] upgrade kepler.gl version in examples-- [Docs] Fixed link to addDataToMap (#459)-- [Enhancement] expand bottom widget to full length if in read only mode(#465)--## [1.0.0-0] - Apr 2 2019-- [Enhancement] Replace react anything sortable with React-Sortable-Hoc-- [Enhancement] Replaced DI object storage with an actual Map-- [Feat] Able to overwrite custom theme-- [Chore] Upgraded waypoint library to support react16-- [Chore] Dropbox UI enhancements-- [Bug] Fix points disappear while panning across 180th meridian-- [Chore] Tweak save and export documentation-- [Chore] Add oss header and middleware.js-- [Chore] Added file header for user-guide.js-- [Feat] Single map page export-- [Chore] Upgraded libraries: react, styled-components--##### BREAKING CHANGES-- React 15 is no longer supported-- Style components v4+ is now required because is now a peer dependency--## [0.2.4] - Mar 13 2019-- [Enhancement] Slider: use clientX to calculate delta to support windows IE and Tableau kepler.gl (#431)-- [Bug] Range slider: correctly setting ranch brush selection when mount (#433)-- [Feat] Add getMapboxRef prop (#372)-- [Enhancement] Automatically loading custom dependencies when inject custom component factor (#430)-- [Bug] Range brush width change should not trigger onBrush callback (#432)-- [Bug] fix processor export, support previous (#428)--## [0.2.3] - Mar 3 2019-- [Docs] Export processors and Add Docs (#421)-- [Docs] Add docs for actions and updaters (#368)-- [Bug] Fix image export component failed to render (#418)--## [0.2.2] - Feb 26 2019-- (HEAD -> master, origin/master, origin/HEAD) [Bug] Fixed web doc link (#369)-- [Bug]: Fixed example dependencies (#362)-- [Bug] Fix missing 3d building layer in image export (#361)-- [Bug] fix 3d building layer missing mapbox token, fix image export (#360)-- [Docs] Add API Docs (#279)-- [Feature] UMD module in unpkg (#349)-- Disabled banner (#352)--## [0.2.1] - Feb 6 2019-- (HEAD -> master, origin/master) [Feature] Collapsible layer group (#350)-- [Enhancement] Added default feature flags to disable dropbox (#338)-- [Bug]: fix alias and module resolve in webpack.config.local (#348)-- [Enhancement] Upgraded Webpack, Babel and Eslint (#342)-- [Feature] Notification systems with new UI panel and helpers to generate messages (#333)-- GitHub browser history (#321)-- [Bug] Fix Maximum call stack size exceeded when double click (#323)-- [Docs] Export identity actions individually and add JSDocs (#290)-- [Docs] Edit PR guidance in contribution guidelines (#320)-- [Docs] Add Contribution Guidelines (#261)-- (overide-style) [Enhancement] Upgrade type-analyzer to pass 0/1 as integer (#317)-- [Typo] Misspellings in comments (#314)-- [Housekeeping] Update Copyright header to 2019, Happy New Year (#316)-- Feat: Implemented Dropbox integration (#312)--## [0.2.1-beta.1] - Dec 17 2018-- [Feature] Added a Tiled 3D Building Deck.gl Layer (#270)-- [Enhancement] Fossa Integration (#309)-- [Enhancement] Change BottomWidget to pure functional component (#249)-- [Docs]: updated docs for better readability(alignments) (#255)-- [Enhancement] export processKeplerglJSON from processors (#299)-- [website] BugFix: missing tracking payload (#311)-- [Enhancement] Hexbin Layer: smaller radius step and dynamic hover (#310)-- [Bug] remove unpm from yarn.lock (#303)-- [Enhancement] use mapbox style url for default (published) uber map styles (#292)-- [Feature] Load data and kepler.gl file using URLs (#260)--## [0.2.1-beta.0] - Nov 16 2018-- [Bug] Fixing global color issue #130 for the heat map (#277)-- [Enhancement] More exports (#284)--## [0.2.0] - Nov 16 2018-- [Enhancement] Export side panel component factories (#282)-- [Feature] Upgrade to deck.gl v6 (#272)-- [Refactor] Small update of readability (#250)-- [website] Click logo should go to kepler.gl website (#251)-- [Enhancement] Add contribution guidelines on contributing.md file (#108)-- [Enhancement] Scan through all text labels to get the entire character set (#245)--## [0.1.6] - Oct 3 2018-- [Enhancement] save and load text label config (#242)--## [0.1.5] - Oct 2 2018-- [Enhancement] Fix z-fighting issue between text label and scatter plot (#234)-- [Bug] Sort color steps (#241)-- [Bug] fix a bug where field is valid is always false (#240)--## [0.1.4] - Sep 15 2018-- [Enhancement] Null check for missing arc column (#235)--## [0.1.3] - Sep 10 2018-- [Enhancement] Add H3 layer (#217) (#198)-- [Enhancement] Add text label in Point layer (#166)--## [0.1.2] - Aug 24 2018-- [Bug] Fix server render error, remove react-ace (#206)--## [0.1.1] - Aug 24 2018-- [Enhancement] Bump [email protected] (#215)--## [0.1.0] - Aug 21 2018-- Upgrade to Deck.gl v5.3.4 (#153)--## [0.0.28] - Aug 8 2018-- Fix cluster layer label rendering--## [0.0.27] - Aug 3 2018-- Fix unable to fetch external stylesheets when taking the screenshot (#187)-- [Bug] Avoid repeatedly calling HIDE_EXPORT_DROPDOWN (#180)--## [0.0.26] - Aug 3 2018-- [Bug] fix mapStyles loaded as an empty object after load map from config (#169)--## [0.0.25] - Jul 10 2018-- [Bug] Create ellipsis when dataset name is a long name (#109)-- [Enhancement] Save custom reducer initialState, add custom-reducer example (#159)--## [0.0.24] - Jul 5 2018-- [Bug] fix image export failing (#155)-- [Enhancement] Add default map styles to mapStyle reducer initial state (#147)--## [0.0.23] - Jun 28 2018-- [Enhancement] Consider all mew layers when calculating the map bounds (#142)-- [Bug] Fix icon layer instructions (#131)-- [Website] add banner to demo app for survey (#117)--## [0.0.22] - Jun 10 2018-- [Bug] new filter shouldn't be enlarged if there is already an enlarged filter (#93)-- [Enhancement] Enable ordinal aggregation in aggregation layer (hex, grid, cluster) (#29)--## [0.0.21][0.0.20] - Jun 4 2018-- [Bug] TimeRangeSlider should not cache props.onChange (#100)diff --git a/README.md b/README.mdindex b0f890411..2cdf85e12 100644--- a/README.md+++ b/README.md@@ -1,84 +1,62 @@-<p align="right">- <a href="https://npmjs.org/package/kepler.gl">- <img src="https://img.shields.io/npm/v/kepler.gl.svg?style=flat" alt="version" />- </a>- <a href="https://travis-ci.com/keplergl/kepler.gl">- <img src="https://api.travis-ci.com/keplergl/kepler.gl.svg?branch=master" alt="build" />- </a>- <a href="https://github.com/keplergl/kepler.gl">- <img src="https://img.shields.io/github/stars/keplergl/kepler.gl.svg?style=flat" alt="stars" />- </a>- <a href='https://opensource.org/licenses/MIT'>- <img src='https://img.shields.io/badge/License-MIT-blue.svg' alt='MIT License' />- </a>- <a href='https://app.fossa.com/projects/custom%2B4458%2Fgithub.com%2Fkeplergl%2Fkepler.gl?ref=badge_shield'>- <img src='https://app.fossa.com/api/projects/custom%2B4458%2Fgithub.com%2Fkeplergl%2Fkepler.gl.svg?type=shield' alt='Fossa' />- </a>- <a href="https://app.netlify.com/sites/keplergl/deploys" alt="Netlify Status">- <img src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fdeveloper.oswaldlabs.com%2Fnetlify-status%2F0c9b895c-acd0-43fd-8af7-fe960181b686?style=flat" />- </a>-</p>--<h1 align="center">kepler.gl | <a href="http://kepler.gl">Website</a> |-<a href="http://kepler.gl/#/demo">Demo App</a>-</h1>-<h3></h3>--[<img width="120" alt="Kepler.gl" src="https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/website/icons/kepler.gl-logo.png">](http://kepler.gl)--[<img width="600" alt="Kepler.gl Demo" src="https://eng.uber.com/wp-content/uploads/2018/05/image4-3-768x493.png">](http://kepler.gl/#/demo)--[Kepler.gl][web] is a data-agnostic, high-performance web-based application for visual exploration of large-scale geolocation data sets. Built on top of [Mapbox GL](https://www.mapbox.com) and [deck.gl](http://uber.github.io/deck.gl/#/), kepler.gl can render millions of points representing thousands of trips and perform spatial aggregations on the fly.--Kepler.gl is also a React component that uses [Redux](https://redux.js.org/) to manage its state and data flow. It can be embedded into other React-Redux applications and is highly customizable. For information on how to embed kepler.gl in your app take a look at this step-by-step [tutorial][vis-academy] on vis.academy.+# README++ [](https://npmjs.org/package/kepler.gl) [](https://travis-ci.com/keplergl/kepler.gl) [](https://github.com/keplergl/kepler.gl) [](https://opensource.org/licenses/MIT) [](https://app.fossa.com/projects/custom%2B4458%2Fgithub.com%2Fkeplergl%2Fkepler.gl?ref=badge_shield) [](https://app.netlify.com/sites/keplergl/deploys)++kepler.gl \| [Website](http://kepler.gl) \| [Demo App](http://kepler.gl/#/demo)++[](http://kepler.gl)++[](http://kepler.gl/#/demo)++[Kepler.gl](http://www.kepler.gl/) is a data-agnostic, high-performance web-based application for visual exploration of large-scale geolocation data sets. Built on top of [Mapbox GL](https://www.mapbox.com) and [deck.gl](http://uber.github.io/deck.gl/#/), kepler.gl can render millions of points representing thousands of trips and perform spatial aggregations on the fly.++Kepler.gl is also a React component that uses [Redux](https://redux.js.org/) to manage its state and data flow. It can be embedded into other React-Redux applications and is highly customizable. For information on how to embed kepler.gl in your app take a look at this step-by-step [tutorial](http://vis.academy/#/kepler.gl/) on vis.academy.## Links-- [Website][web]-- [Demo][demo-app]-- [Examples][examples]-- [Get Started][get-started]-- [App User Guide][user-guide]-- [Jupyter Widget User Guide][user-guide-jupyter]-- [Tutorial][vis-academy]-- [Stack Overflow][stack]-- [Contribution Guidelines][contributing]-- [Api Reference][api-reference]-- [Roadmap][roadmap]+* [Website](http://www.kepler.gl/)+* [Demo](http://kepler.gl/#/demo)+* [Examples](https://github.com/keplergl/kepler.gl/tree/master/examples)+* [Get Started](docs/api-reference/get-started.md)+* [App User Guide](docs/user-guides/a-introduction.md)+* [Jupyter Widget User Guide](docs/keplergl-jupyter/user-guide.md)+* [Tutorial](http://vis.academy/#/kepler.gl/)+* [Stack Overflow](https://stackoverflow.com/questions/tagged/kepler.gl)+* [Contribution Guidelines](contributing/contributing.md)+* [Api Reference]()+* [Roadmap](https://github.com/keplergl/kepler.gl/wiki/Kepler.gl-2019-Roadmap)## Env-Use Node 8.15.0 and above, older node versions have not been tested.-For best results, use [nvm](https://github.com/creationix/nvm) `nvm install`.+Use Node 8.15.0 and above, older node versions have not been tested. For best results, use [nvm](https://github.com/creationix/nvm) `nvm install`.## Install kepler.gl-Install node (`> 8.15.0`), yarn, and project dependencies+Install node \(`> 8.15.0`\), yarn, and project dependencies-```sh+```bashnpm install --save kepler.gl// oryarn add kepler.gl```-kepler.gl is built upon [mapbox][mapbox]. You will need a [Mapbox Access Token][mapbox-token] to use it.+kepler.gl is built upon [mapbox](https://www.mapbox.com). You will need a [Mapbox Access Token](https://www.mapbox.com/help/define-access-token/) to use it.-If you don't use a module bundler, it's also fine. Kepler.gl npm package includes precompiled production UMD builds in the (umd folder)[https://unpkg.com/kepler.gl/umd].-You can add the script tag to your html file as it follows:+If you don't use a module bundler, it's also fine. Kepler.gl npm package includes precompiled production UMD builds in the \(umd folder\)\[[https://unpkg.com/kepler.gl/umd](https://unpkg.com/kepler.gl/umd)\]. You can add the script tag to your html file as it follows:-```html+```markup<script src="https://unpkg.com/kepler.gl/umd/keplergl.min.js"></script>```or if you would like, you can load a specific version-```html+```markup<script src="https://unpkg.com/[email protected]/umd/keplergl.min.js"></script>```## Develop kepler.gl-Take a look at the [development guide][developers] to develop kepler.gl locally.+Take a look at the [development guide](contributing/developers.md) to develop kepler.gl locally.## Basic Usage@@ -86,12 +64,11 @@ Here are the basic steps to import kepler.gl into your app. You also take a look### 1. Mount reducer-Kepler.gl uses Redux to manage its internal state, along with [react-palm][react-palm] middleware to handle side effects.+Kepler.gl uses Redux to manage its internal state, along with [react-palm](https://github.com/btford/react-palm) middleware to handle side effects.-You need to add `taskMiddleware` of `react-palm` to your store too. We are actively working on a solution where-`react-palm` will not be required, however it is still a very lightweight side effects management tool that is easier to test than react-thunk.+You need to add `taskMiddleware` of `react-palm` to your store too. We are actively working on a solution where `react-palm` will not be required, however it is still a very lightweight side effects management tool that is easier to test than react-thunk.-```js+```javascriptimport {createStore, combineReducers, applyMiddleware, compose} from 'redux';import keplerGlReducer from 'kepler.gl/reducers';import {enhanceReduxMiddleware} from 'kepler.gl/middleware';@@ -119,7 +96,7 @@ export default createStore(Or if use enhancer:-```js+```javascript// using enhancersconst initialState = {};const middlewares = enhanceReduxMiddleware([@@ -130,15 +107,13 @@ const enhancers = [applyMiddleware(...middlewares)];export default createStore(reducer, initialState, compose(...enhancers));```-If you mount kepler.gl reducer in another address instead of `keplerGl`, or the kepler.gl reducer is not-mounted at root of your state, you will need to specify the path to it when you mount the component-with the `getState` prop.+If you mount kepler.gl reducer in another address instead of `keplerGl`, or the kepler.gl reducer is not mounted at root of your state, you will need to specify the path to it when you mount the component with the `getState` prop.-Read more about [Reducers][reducers].+Read more about [Reducers](docs/api-reference/reducers/overview.md).### 2. Mount Component-```js+```javascriptimport KeplerGl from 'kepler.gl';const Map = props => (@@ -153,123 +128,118 @@ const Map = props => (#### Props-##### `id` (String, required)+**id \(String, required\)**-- Default: `map`+* Default: `map`-The id of this KeplerGl instance. `id` is required if you have multiple-KeplerGl instances in your app. It defines the prop name of the KeplerGl state that is-stored in the KeplerGl reducer. For example, the state of the KeplerGl component with id `foo` is-stored in `state.keplerGl.foo`.+The id of this KeplerGl instance. `id` is required if you have multiple KeplerGl instances in your app. It defines the prop name of the KeplerGl state that is stored in the KeplerGl reducer. For example, the state of the KeplerGl component with id `foo` is stored in `state.keplerGl.foo`.-In case you create multiple kepler.gl instances using the same id, the kepler.gl state defined by the entry will be-overridden by the latest instance and reset to a blank state.+In case you create multiple kepler.gl instances using the same id, the kepler.gl state defined by the entry will be overridden by the latest instance and reset to a blank state.-##### `mapboxApiAccessToken` (String, required)+**mapboxApiAccessToken \(String, required\)**-- Default: `undefined`+* Default: `undefined`-You can create a free account at [mapbox][mapbox] and create a token at [www.mapbox.com/account/access-tokens][mapbox-token]+You can create a free account at [mapbox](https://www.mapbox.com) and create a token at [www.mapbox.com/account/access-tokens](https://www.mapbox.com/help/define-access-token/)-##### `getState` (Function, optional)+**getState \(Function, optional\)**-- Default: `state => state.keplerGl`+* Default: `state => state.keplerGl`The path to the root keplerGl state in your reducer.-##### `width` (Number, optional)+**width \(Number, optional\)**-- Default: `800`+* Default: `800`Width of the KeplerGl UI.-##### `height` (Number, optional)+**height \(Number, optional\)**-- Default: `800`+* Default: `800`-##### `appName` (String, optional)+**appName \(String, optional\)**-- Default: `Kepler.Gl`+* Default: `Kepler.Gl`App name displayed in side panel header-##### `version` (String, optional)+**version \(String, optional\)**-- Default: `v1.0`+* Default: `v1.0`version displayed in side panel header-##### `onSaveMap` (Function, optional)+**onSaveMap \(Function, optional\)**-- Default: `undefined`+* Default: `undefined`Action called when click Save Map Url in side panel header.-##### `onViewStateChange` (Function, optional)+**onViewStateChange \(Function, optional\)**-- Default: `undefined`-- Parameter: `viewState` - An updated view state object containing parameters such as longitude, latitude, zoom etc+* Default: `undefined`+* Parameter: `viewState` - An updated view state object containing parameters such as longitude, latitude, zoom etcAction triggered when map viewport is updated.-##### `getMapboxRef(mapbox, index)` (Function, optional)+**getMapboxRef\(mapbox, index\) \(Function, optional\)**-- Default: `undefined`+* Default: `undefined`Function called when `KeplerGL` adds or removes a `MapContainer` component having an inner Mapbox map.The `mapbox` argument is an [`InteractiveMap`](https://uber.github.io/react-map-gl/#/Documentation/api-reference/interactive-map) when added or `null` when removed.-The `index` argument is 0 for a single map or 1 for an additional map (since `KeplerGL` supports an optional split map view).+The `index` argument is 0 for a single map or 1 for an additional map \(since `KeplerGL` supports an optional split map view\).-##### `actions` (Object, optional)+**actions \(Object, optional\)**-- Default: `{}`+* Default: `{}`Actions creators to replace default kepler.gl action creator. Only use custom action when you want to modify action payload.-##### `mint` (Boolean, optional)+**mint \(Boolean, optional\)**-- Default: `true`+* Default: `true`-Whether to load a fresh empty state when component is mounted. when parse `mint: true` kepler.gl component will always load a fresh state when re-mount the same component, state inside this component will be destroyed once its unmounted.-By Parsing `mint: false` kepler.gl will keep the component state in the store even when it is unmounted, and use it as initial state when re-mounted again. This is useful when mounting kepler.gl in a modal, and keep the same map when re-open.+Whether to load a fresh empty state when component is mounted. when parse `mint: true` kepler.gl component will always load a fresh state when re-mount the same component, state inside this component will be destroyed once its unmounted. By Parsing `mint: false` kepler.gl will keep the component state in the store even when it is unmounted, and use it as initial state when re-mounted again. This is useful when mounting kepler.gl in a modal, and keep the same map when re-open.-Read more about [Components][components].+Read more about [Components](docs/api-reference/components/overview.md).-##### `theme` (Object | String, optional)+**theme \(Object \| String, optional\)**-- default: `null`+* default: `null`You can pass theme name or object used to customize Kepler.gl style. Kepler.gl provide an `'light'` theme besides the default 'dark' theme. When pass in a theme object Kepler.gl will use the value passed as input to override values from [theme](https://github.com/keplergl/kepler.gl/blob/master/src/styles/base.js).-#### `mapboxApiUrl` (String, optional)+#### `mapboxApiUrl` \(String, optional\)-- Default: `https://api.mapbox.com`+* Default: `https://api.mapbox.com`If you are using your own mapbox tile server, you can pass in your own tile server api url.-#### `mapStylesReplaceDefault` (Boolean, optional)+#### `mapStylesReplaceDefault` \(Boolean, optional\)-- Default: `false`+* Default: `false`kepler.gl provide 4 map styles to choose from. Pass `true` if you want to supply your own `mapStyles`. See Below.-#### `mapStyles` (Array, optional)+#### `mapStyles` \(Array, optional\)-- Default: `[]`+* Default: `[]`You can supply additional map styles to be displayed in [map style selection panel](https://github.com/keplergl/kepler.gl/blob/master/docs/user-guides/f-map-styles/1-base-map-styles.md). By default, additional map styles will be added to default map styles. If pass `mapStylesReplaceDefault: true`, they will replace the default ones. kepler.gl will attempt to group layers of your style based on its `id` naming convention and use it to allow toggle visibility of [base map layers](https://github.com/keplergl/kepler.gl/blob/master/docs/user-guides/f-map-styles/2-map-layers.md). Supply your own `layerGroups` to override default for more accurate layer grouping.Each `mapStyles` should has the following properties:-- `id` (String, required) unique string that should **not** be one of these reserved `dark` `light` `muted`. `muted_night`-- `label` (String, required) name to be displayed in map style selection panel-- `url` (String, required) mapbox style url or a url pointing to the map style json object-- `icon` (String, optional) image icon of the style, it can be a url, or an [image data url](https://flaviocopes.com/data-urls/#how-does-a-data-url-look)-- `layerGroups` (Array, optional)+* `id` \(String, required\) unique string that should **not** be one of these reserved `dark` `light` `muted`. `muted_night`+* `label` \(String, required\) name to be displayed in map style selection panel+* `url` \(String, required\) mapbox style url or a url pointing to the map style json object+* `icon` \(String, optional\) image icon of the style, it can be a url, or an [image data url](https://flaviocopes.com/data-urls/#how-does-a-data-url-look)+* `layerGroups` \(Array, optional\)-```js+```javascriptconst mapStyles = [{id: 'my_dark_map',@@ -295,19 +265,15 @@ const mapStyles = [### 3. Dispatch custom actions to `keplerGl` reducer.-One advantage of using the reducer over React component state to handle keplerGl state is the flexibility-to customize its behavior. If you only have one `KeplerGl` instance in your app or never intend to dispatch actions to KeplerGl from outside the component itself,-you don’t need to worry about forwarding dispatch and can move on to the next section. But life is full of customizations, and we want to make yours as enjoyable as possible.+One advantage of using the reducer over React component state to handle keplerGl state is the flexibility to customize its behavior. If you only have one `KeplerGl` instance in your app or never intend to dispatch actions to KeplerGl from outside the component itself, you don’t need to worry about forwarding dispatch and can move on to the next section. But life is full of customizations, and we want to make yours as enjoyable as possible.There are multiple ways to dispatch actions to a specific `KeplerGl` instance.-- In the root reducer, with reducer updaters.+* In the root reducer, with reducer updaters.-Each action is mapped to a reducer updater in kepler.gl. You can import the reducer updater corresponding to a specific action, and call it with the previous state and action payload to get the updated state.-e.g. `updateVisDataUpdater` is the updater for `ActionTypes.UPDATE_VIS_DATA` (take a look at each reducer `reducers/vis-state.js` for action to updater mapping).-Here is an example how you can listen to an app action `QUERY_SUCCESS` and call `updateVisDataUpdater` to load data into Kepler.Gl.+Each action is mapped to a reducer updater in kepler.gl. You can import the reducer updater corresponding to a specific action, and call it with the previous state and action payload to get the updated state. e.g. `updateVisDataUpdater` is the updater for `ActionTypes.UPDATE_VIS_DATA` \(take a look at each reducer `reducers/vis-state.js` for action to updater mapping\). Here is an example how you can listen to an app action `QUERY_SUCCESS` and call `updateVisDataUpdater` to load data into Kepler.Gl.-```js+```javascriptimport keplerGlReducer, {visStateUpdaters} from 'kepler.gl/reducers';// Root Reducer@@ -342,14 +308,13 @@ const composedReducer = (state, action) => {export default composedReducer;```-Read more about [using updaters to modify kepler.gl state][using-updaters]+Read more about [using updaters to modify kepler.gl state](docs/api-reference/advanced-usages/using-updaters.md)-- Using redux `connect`+* Using redux `connect`-You can add a dispatch function to your component that dispatches actions to a specific `keplerGl` component,-using connect.+You can add a dispatch function to your component that dispatches actions to a specific `keplerGl` component, using connect.-```js+```javascript// componentimport KeplerGl from 'kepler.gl';@@ -378,11 +343,11 @@ export default connect()(MapContainer);```-- Wrap action payload+* Wrap action payloadYou can also simply wrap an action into a forward action with the `wrapTo` helper-```js+```javascript// componentimport KeplerGl from 'kepler.gl';@@ -399,17 +364,16 @@ const MapContainer = ({dispatch}) => (/></div>);-```-Read more about [forward dispatching actions][forward-actions]+Read more about [forward dispatching actions](docs/api-reference/advanced-usages/forward-actions.md)### 4. Customize style.Kepler.gl implements css styling using [Styled-Components](https://www.styled-components.com/). By using said framework Kepler.gl offers the ability to customize its style/theme using the following approaches:-- Passing a Theme prop-- Styled-Components ThemeProvider+* Passing a Theme prop+* Styled-Components ThemeProviderThe available properties to customize are listed here [theme](https://github.com/keplergl/kepler.gl/blob/master/src/styles/base.js).@@ -470,10 +434,7 @@ return (### 5. Render Custom UI components.-Everyone wants the flexibility to render custom kepler.gl components. Kepler.gl has a dependency injection system that allow you to inject-components to KeplerGl replacing existing ones. All you need to do is to create a component factory for the one you want to replace, import the original component factory-and call `injectComponents` at the root component of your app where `KeplerGl` is mounted.-Take a look at `examples/demo-app/src/app.js` and see how it renders a custom side panel header in kepler.gl+Everyone wants the flexibility to render custom kepler.gl components. Kepler.gl has a dependency injection system that allow you to inject components to KeplerGl replacing existing ones. All you need to do is to create a component factory for the one you want to replace, import the original component factory and call `injectComponents` at the root component of your app where `KeplerGl` is mounted. Take a look at `examples/demo-app/src/app.js` and see how it renders a custom side panel header in kepler.gl```javascriptimport {injectComponents, PanelHeaderFactory} from 'kepler.gl/components';@@ -497,7 +458,7 @@ const MapContainer = () => (Using `withState` helper to add reducer state and actions to customized component as additional props.-```js+```javascriptimport {withState,injectComponents,@@ -531,32 +492,35 @@ const myCustomHeaderFactory = () =>)(CustomHeader);```-Read more about [replacing UI component][replace-ui-component]+Read more about [replacing UI component](docs/api-reference/advanced-usages/replace-ui-component.md)### 6. How to add data to map-To interact with a kepler.gl instance and add new data to it, you can dispatch the **`addDataToMap`** action from anywhere inside your app. It adds a dataset or multiple datasets to a kepler.gl instance and updates the full configuration (mapState, mapStyle, visState).+To interact with a kepler.gl instance and add new data to it, you can dispatch the **`addDataToMap`** action from anywhere inside your app. It adds a dataset or multiple datasets to a kepler.gl instance and updates the full configuration \(mapState, mapStyle, visState\).#### Parameters-- `data` **[Object][40]** **\*required**- - `datasets` **([Array][41]<[Object][40]> | [Object][40])** **\*required** datasets can be a dataset or an array of datasets+* `data` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) **\*required**+ * `datasets` **\(**[**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**> \|** [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**\)** **\*required** datasets can be a dataset or an array of datasets+Each dataset object needs to have `info` and `data` property.- - `datasets.info` **[Object][40]** \-info of a dataset- - `datasets.info.id` **[string][42]** id of this dataset. If config is defined, `id` should matches the `dataId` in config.- - `datasets.info.label` **[string][42]** A display name of this dataset- - `datasets.data` **[Object][40]** **\*required** The data object, in a tabular format with 2 properties `fields` and `rows`- - `datasets.data.fields` **[Array][41]<[Object][40]>** **\*required** Array of fields,- - `datasets.data.fields.name` **[string][42]** **\*required** Name of the field,- - `datasets.data.rows` **[Array][41]<[Array][41]>** **\*required** Array of rows, in a tabular format with `fields` and `rows`- - `options` **[Object][40]**-- - `options.centerMap` **[boolean][43]** `default: true` if `centerMap` is set to `true` kepler.gl will place the map view within the data points boundaries- - `options.readOnly` **[boolean][43]** `default: false` if `readOnly` is set to `true`++ * `datasets.info` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) -info of a dataset+ * `datasets.info.id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) id of this dataset. If config is defined, `id` should matches the `dataId` in config.+ * `datasets.info.label` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) A display name of this dataset+ * `datasets.data` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) **\*required** The data object, in a tabular format with 2 properties `fields` and `rows`+ * `datasets.data.fields` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>** **\*required** Array of fields,+ * `datasets.data.fields.name` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\*required** Name of the field,+ * `datasets.data.rows` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**>** **\*required** Array of rows, in a tabular format with `fields` and `rows`++ * `options` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `options.centerMap` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) `default: true` if `centerMap` is set to `true` kepler.gl will place the map view within the data points boundaries+ * `options.readOnly` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) `default: false` if `readOnly` is set to `true`+the left setting panel will be hidden- - `options.keepExistingConfig` **[boolean][43]** `default: false` whether to keep exiting map config, including layers, filters and splitMaps.-- `config` **[Object][40]** this object will contain the full kepler.gl instance configuration {mapState, mapStyle, visState}+ * `options.keepExistingConfig` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) `default: false` whether to keep exiting map config, including layers, filters and splitMaps.+* `config` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) this object will contain the full kepler.gl instance configuration {mapState, mapStyle, visState}Kepler.gl provides an easy API `KeplerGlSchema.getConfigToSave` to generate a json blob of the current kepler instance configuration.@@ -611,38 +575,5 @@ this.props.dispatch();```-Read more about [addDataToMap](./docs/api-reference/actions/actions.md#adddatatomap) and [Saving and loading maps with schema manager][saving-loading-w-schema].--[contributing]: contributing/CONTRIBUTING.md-[demo-app]: http://kepler.gl/#/demo-[github]: https://github.com/keplergl/kepler.gl-[github-pr]: https://help.github.com/articles/creating-a-pull-request/-[mapbox]: https://www.mapbox.com-[mapbox-token]: https://www.mapbox.com/help/define-access-token/-[developers]: contributing/DEVELOPERS.md-[examples]: https://github.com/keplergl/kepler.gl/tree/master/examples-[react-palm]: https://github.com/btford/react-palm-[roadmap]: https://github.com/keplergl/kepler.gl/wiki/Kepler.gl-2019-Roadmap-[stack]: https://stackoverflow.com/questions/tagged/kepler.gl-[web]: http://www.kepler.gl/-[vis-academy]: http://vis.academy/#/kepler.gl/-[user-guide]: ./docs/user-guides/a-introduction.md-[user-guide-jupyter]: ./docs/keplergl-jupyter/user-guide.md-[api-reference]: ./docs/api-reference/overview.md-[get-started]: ./docs/api-reference/get-started.md-[reducers]: ./docs/api-reference/reducers/overview.md-[components]: ./docs/api-reference/components/overview.md-[reducers]: ./docs/api-reference/reducers/overview.md-[actions-updaters]: ./docs/api-reference/actions/overview.md-[processors]: ./docs/api-reference/processors/overview.md-[schemas]: ./docs/api-reference/schemas/overview.md-[using-updaters]: ./docs/api-reference/advanced-usages/using-updaters.md-[forward-actions]: ./docs/api-reference/advanced-usages/forward-actions.md-[replace-ui-component]: ./docs/api-reference/advanced-usages/replace-ui-component.md-[saving-loading-w-schema]: ./docs/api-reference/advanced-usages/saving-loading-w-schema.md-[40]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object-[41]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array-[42]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String-[43]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean-[44]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number-[45]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function+Read more about [addDataToMap](docs/api-reference/actions/actions.md#adddatatomap) and [Saving and loading maps with schema manager](docs/api-reference/advanced-usages/saving-loading-w-schema.md).+diff --git a/SUMMARY.md b/SUMMARY.mdnew file mode 100644index 000000000..a823a1863--- /dev/null+++ b/SUMMARY.md@@ -0,0 +1,85 @@+# Table of contents++* [README](README.md)+* [kepler.gl](docs/README.md)+ * [User guides](docs/user-guides/README.md)+ * [Introduction](docs/user-guides/a-introduction.md)+ * [Get started](docs/user-guides/j-get-started.md)+ * [Kepler.gl workflow](docs/user-guides/b-kepler-gl-workflow/README.md)+ * [Add data layers](docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/README.md)+ * [Adding Data Layers](docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/a-adding-data-layers.md)+ * [Create a Layer](docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/b-create-a-layer.md)+ * [Blend and Rearrange Layers](docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/d-blend-and-rearrange-layers.md)+ * [Hide, Edit and Delete Layers](docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/c-hide-edit-and-delete-layers.md)+ * [Add data to the Map](docs/user-guides/b-kepler-gl-workflow/a-add-data-to-the-map.md)+ * [Types of layers](docs/user-guides/c-types-of-layers-1/README.md)+ * [Trip layer](docs/user-guides/c-types-of-layers-1/k.trip.md)+ * [Arc](docs/user-guides/c-types-of-layers-1/b-arc.md)+ * [Heatmap](docs/user-guides/c-types-of-layers-1/i-heatmap.md)+ * [H3](docs/user-guides/c-types-of-layers-1/j-h3.md)+ * [Grid](docs/user-guides/c-types-of-layers-1/d-grid.md)+ * [Hexbin](docs/user-guides/c-types-of-layers-1/h-hexbin.md)+ * [Polygon](docs/user-guides/c-types-of-layers-1/e-polygon.md)+ * [Cluster](docs/user-guides/c-types-of-layers-1/f-cluster.md)+ * [Line](docs/user-guides/c-types-of-layers-1/c-line.md)+ * [Icon](docs/user-guides/c-types-of-layers-1/g-icon.md)+ * [Point](docs/user-guides/c-types-of-layers-1/a-point.md)+ * [Layer attributes](docs/user-guides/d-layer-attributes.md)+ * [Layer color](docs/user-guides/l-color-attributes.md)+ * [Filters](docs/user-guides/e-filters.md)+ * [Map styles](docs/user-guides/f-map-styles.md)+ * [Interactions](docs/user-guides/g-interactions.md)+ * [Map settings](docs/user-guides/m-map-settings.md)+ * [Time playback](docs/user-guides/h-playback.md)+ * [Save and export](docs/user-guides/k-save-and-export.md)+ * [FAQ](docs/user-guides/i-faq.md)+ * [API References](docs/api-reference/README.md)+ * [Ecosystem](docs/api-reference/ecosystem.md)+ * [Get Started](docs/api-reference/get-started.md)+ * [Advanced usages](docs/api-reference/advanced-usages/README.md)+ * [Saving and Loading Maps with Schema Manager](docs/api-reference/advanced-usages/saving-loading-w-schema.md)+ * [Replace UI Component with Component Dependency Injection](docs/api-reference/advanced-usages/replace-ui-component.md)+ * [Forward Dispatch Actions](docs/api-reference/advanced-usages/forward-actions.md)+ * [Reducer Plugin](docs/api-reference/advanced-usages/reducer-plugin.md)+ * [Using Updaters](docs/api-reference/advanced-usages/using-updaters.md)+ * [Custom reducer initial state](docs/api-reference/advanced-usages/custom-initial-state.md)+ * [custom-mapbox-host](docs/api-reference/advanced-usages/custom-mapbox-host.md)+ * [Components](docs/api-reference/components/README.md)+ * [Components](docs/api-reference/components/overview.md)+ * [Reducers](docs/api-reference/reducers/README.md)+ * [reducers](docs/api-reference/reducers/reducers.md)+ * [map-style](docs/api-reference/reducers/map-style.md)+ * [map-state](docs/api-reference/reducers/map-state.md)+ * [combine](docs/api-reference/reducers/combine.md)+ * [overview](docs/api-reference/reducers/overview.md)+ * [ui-state](docs/api-reference/reducers/ui-state.md)+ * [vis-state](docs/api-reference/reducers/vis-state.md)+ * [Actions and updaters](docs/api-reference/actions/README.md)+ * [Actions](docs/api-reference/actions/actions.md)+ * [Processors](docs/api-reference/processors.md)+ * [Schemas](docs/api-reference/schemas/README.md)+ * [Schemas](docs/api-reference/schemas/overview.md)+ * [Cloud providers](docs/api-reference/cloud-providers/README.md)+ * [Cloud provider referecens](docs/api-reference/cloud-providers/cloud-provider.md)+ * [kepler.gl Jupyter](docs/keplergl-jupyter/README.md)+ * [user-guide](docs/keplergl-jupyter/user-guide.md)+* [Examples](examples/README.md)+ * [Node/Express](examples/node-app.md)+ * [Demo App](examples/demo-app.md)+ * [Open modal](examples/replace-component.md)+ * [Open modal](examples/open-modal.md)+ * [Umd client](examples/umd-client.md)+ * [Customize kepler.gl Theme](examples/custom-theme.md)+ * [Customize kepler.gl Reducer](examples/custom-reducer.md)+* [Change Log](changelog.md)+* [bindings](bindings/README.md)+ * [README](bindings/kepler.gl-jupyter/README.md)+ * [kperlgl-jupyter](bindings/kepler.gl-jupyter/js.md)+ * [Release a new version](bindings/kepler.gl-jupyter/release.md)+* [contributing](contributing/README.md)+ * [Contributing to kepler.gl](contributing/contributing.md)+ * [Developing Kepler.gl](contributing/developers.md)+ * [Contributor Covenant Code of Conduct](contributing/code_of_conduct.md)+* [Upgrade Guide](upgrade-guide.md)+* [TODO](todo.md)+diff --git a/TODO.md b/TODO.mddeleted file mode 100644index 6dc068ab6..000000000--- a/TODO.md+++ /dev/null@@ -1,22 +0,0 @@---### Bugs-- Time playback slider sticking out after resize-- Heatmap frozen--### Refactor Tasks-- Refactor Layer configurator component so it works better with the layer API [shan]--### Feature-- Re-implement file upload to use event streaming (no react-palm) [shan]-- Input map style from mapbox style url [shan]-- Map style API to add custom map style [shan]-- Field type editor [shan]-- Export map [javid, shan]--### Remaining UI Update-- Free form color picker [shan]-- Vis config by channel UI (add value switch) [shan]--### Design Request-- More map styles [erik]diff --git a/bindings/README.md b/bindings/README.mdnew file mode 100644index 000000000..b85f7b904--- /dev/null+++ b/bindings/README.md@@ -0,0 +1,2 @@+# bindings+diff --git a/bindings/kepler.gl-jupyter/README.md b/bindings/kepler.gl-jupyter/README.mdindex 32b7a1139..7b822ee03 100644--- a/bindings/kepler.gl-jupyter/README.md+++ b/bindings/kepler.gl-jupyter/README.md@@ -1,55 +1,60 @@-<h1>kepler.gl for Jupyter</h1>+# README-This is the [kepler.gl](http://kepler.gl) jupyter widget, an advanced geospatial visualization tool, to render large-scale interactive maps in Jupyter Notebook.+## kepler.gl for Jupyter-![Kepler.gl for Jupyter][jupyter_widget]+This is the [kepler.gl](http://kepler.gl) jupyter widget, an advanced geospatial visualization tool, to render large-scale interactive maps in Jupyter Notebook.-<!-- TOC -->-- [Installation](#installation)-- [Quick Start](#quick-start)-- [Demo Notebooks](#demo-notebooks)-- [Usage](#usage)-- [Local Development Setup](#local-development-setup)-- [FAQ & Troubleshoot](#faq--troubleshoot)-<!-- /TOC -->++* [Installation](./#installation)+* [Quick Start](./#quick-start)+* [Demo Notebooks](./#demo-notebooks)+* [Usage](./#usage)+* [Local Development Setup](./#local-development-setup)+* [FAQ & Troubleshoot](./#faq--troubleshoot)-<br></br>-# Installation+## Installation-### Prerequisites-- Python >= 2-- ipywidgets >= 7.0.0+#### Prerequisites+* Python >= 2+* ipywidgets >= 7.0.0To install use pip:- $ pip install keplergl-+```text+$ pip install keplergl+```If you on Mac used `pip install` and running Notebook 5.3 and above, you don't need to run the following- $ jupyter nbextension install --py --sys-prefix keplergl # can be skipped for notebook 5.3 and above+```text+$ jupyter nbextension install --py --sys-prefix keplergl # can be skipped for notebook 5.3 and above- $ jupyter nbextension enable --py --sys-prefix keplergl # can be skipped for notebook 5.3 and above+$ jupyter nbextension enable --py --sys-prefix keplergl # can be skipped for notebook 5.3 and above+```If you arr in JupyterLab, you will also need to install the JupyterLab extension. This require [node](https://nodejs.org/en/download/package-manager/#macos) `> 8.15.0`If you use [Homebrew](https://brew.sh/) on Mac:- $ brew install node@8+```text+$ brew install node@8+```Then install jupyter labextension.- $ jupyter labextension install @jupyter-widgets/jupyterlab-manager keplergl-jupyter+```text+$ jupyter labextension install @jupyter-widgets/jupyterlab-manager keplergl-jupyter+```**Prerequisites for JupyterLab:**-- Node > 8.15.0-- Python 3-- JupyterLab>=1.0.0-<br></br>-# Quick Start+* Node > 8.15.0+* Python 3+* JupyterLab>=1.0.0++## Quick Start```python# Load kepler.gl with an empty map@@ -74,87 +79,102 @@ map_1.config# save map to htmlmap_1.save_to_html(file_name='keplergl_map.html')```-<br></br>-# Demo Notebooks-- [Load kepler.gl](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/Load%20kepler.gl.ipynb): Load kepler.gl widget, add data and config-- [Geometry as String](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/Geometry%20as%20String.ipynb): Embed Polygon geometries as `GeoJson` and `WKT` inside a `CSV`-- [GeoJSON](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/GeoJSON.ipynb): Load GeoJSON to kepler.gl-- [DataFrame](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/DataFrame.ipynb): Load DataFrame to kepler.gl-- [GeoDataFrame](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/GeoDataFrame.ipynb): Load GeoDataFrame to kepler.gl--<br></br>-# Usage-- - [1. Load kepler.gl](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#1-load-keplergl)- - [`keplergl.KeplerGl()`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#keplerglkeplergl)- - [2. Add Data](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#2-add-data)- - [`.add_data()`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#add_data)- - [`.data`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#data)- - [3. Data Format](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#3-data-format)- - [`CSV`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#csv)- - [`GeoJSON`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#geojson)- - [`DataFrame`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#dataframe)- - [`GeoDataFrame`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#geodataframe)- - [`WKT`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#wkt)- - [4. Customize the map](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#4-customize-the-map)- - [5. Save and load config](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#5-save-and-load-config)- - [`.config`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#config)- - [6. Match config with data](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#6-match-config-with-data)- - [7. Save Map](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#7-save-map)- - [`.save_to_html()`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#save_to_html)--# Local Development Setup--## Environment Setup++## Demo Notebooks++* [Load kepler.gl](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/Load%20kepler.gl.ipynb): Load kepler.gl widget, add data and config+* [Geometry as String](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/Geometry%20as%20String.ipynb): Embed Polygon geometries as `GeoJson` and `WKT` inside a `CSV`+* [GeoJSON](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/GeoJSON.ipynb): Load GeoJSON to kepler.gl+* [DataFrame](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/DataFrame.ipynb): Load DataFrame to kepler.gl+* [GeoDataFrame](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/GeoDataFrame.ipynb): Load GeoDataFrame to kepler.gl++## Usage++* [1. Load kepler.gl](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#1-load-keplergl)+ * [`keplergl.KeplerGl()`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#keplerglkeplergl)+* [2. Add Data](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#2-add-data)+ * [`.add_data()`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#add_data)+ * [`.data`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#data)+* [3. Data Format](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#3-data-format)+ * [`CSV`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#csv)+ * [`GeoJSON`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#geojson)+ * [`DataFrame`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#dataframe)+ * [`GeoDataFrame`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#geodataframe)+ * [`WKT`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#wkt)+* [4. Customize the map](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#4-customize-the-map)+* [5. Save and load config](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#5-save-and-load-config)+ * [`.config`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#config)+* [6. Match config with data](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#6-match-config-with-data)+* [7. Save Map](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#7-save-map)+ * [`.save_to_html()`](https://github.com/keplergl/kepler.gl/blob/master/docs/keplergl-jupyter/user-guide.md#save_to_html)++## Local Development Setup++### Environment Setup+You will need to install node, yarn and Jupyter Notebook.-### 1. Node and Yarn-Install [node](https://nodejs.org/en/download/package-manager/#macos) `> 8.15.0`, and [yarn](https://yarnpkg.com/en/docs/install#mac-stable). Use [nvm](https://github.com/creationix/nvm) for better node version management e.g. `nvm install 8`.+#### 1. Node and Yarn+Install [node](https://nodejs.org/en/download/package-manager/#macos) `> 8.15.0`, and [yarn](https://yarnpkg.com/en/docs/install#mac-stable). Use [nvm](https://github.com/creationix/nvm) for better node version management e.g. `nvm install 8`.-### 2. Install Jupyter with pip+#### 2. Install Jupyter with pipPython 3- $ python3 -m pip install --upgrade pip- $ python3 -m pip install jupyter+```text+$ python3 -m pip install --upgrade pip+$ python3 -m pip install jupyter+```Python 2- $ python -m pip install --upgrade pip- $ python -m pip install jupyter+```text+$ python -m pip install --upgrade pip+$ python -m pip install jupyter+```++### Download and run keplergl in your local Jupyter Notebook++#### Clone Repo++```text+$ git clone https://github.com/keplergl/kepler.gl.git+```-## Download and run keplergl in your local Jupyter Notebook+#### Setup JS-### Clone Repo- $ git clone https://github.com/keplergl/kepler.gl.git+**1. Install Js module**-### Setup JS-#### 1. Install Js module-```sh+```bash$ cd bindings/kepler.gl-jupyter$ cd js$ yarn --ignore-engines```-#### 2. Load mapbox token+**2. Load mapbox token**+Add [Mapbox access token](https://docs.mapbox.com/help/how-mapbox-works/access-tokens/) to Node env.-```sh+```bashexport MapboxAccessTokenJupyter=<your_mapbox_token>```-#### 3. Build js module, start a local server to watch for changes- $ npm start+**3. Build js module, start a local server to watch for changes**++```text+$ npm start+```-You need to run step 2 and 3 to restart the js program. And step 1-3 if any js dependency has changed (Usually after pulling new changes from master).+You need to run step 2 and 3 to restart the js program. And step 1-3 if any js dependency has changed \(Usually after pulling new changes from master\).-### Setup jupyter+#### Setup jupyter++**1. Install python module and enable extension from local files**-#### 1. Install python module and enable extension from local filesThis command must be run **AFTER** the `js` setup, and folder `static/` was created. It only needs to be run once.-```sh+```bash# dev install from folder containing setup.py$ pip install -e .@@ -165,45 +185,55 @@ This command must be run **AFTER** the `js` setup, and folder `static/` was crea$ jupyter nbextension enable --py --sys-prefix keplergl```-#### 2. Start jupyter notebook- $ cd notebooks- $ jupyter notebook-+**2. Start jupyter notebook**+```text+$ cd notebooks+$ jupyter notebook+```-### Have fun!+#### Have fun!You can now start editing the .js and .py files to see changes reflected in your local notebook. After changing files in the js folder, the local start script will recompile the js files and put them in to `keplergl/static` folder. You need to reload the jupyter notebook page to reload the files.+## FAQ & Troubleshoot-# FAQ & Troubleshoot+**1. What about windows?**-#### 1. What about windows?keplergl is currently only published to PyPI, and unfortunately I use a Mac. If you encounter errors installing it on windows. [This issue](https://github.com/keplergl/kepler.gl/issues/557) might shed some light. Follow this issue for [conda](https://github.com/keplergl/kepler.gl/issues/646) support.-#### 2. Install keplergl-jupyter on Jupyter Lab failed?+**2. Install keplergl-jupyter on Jupyter Lab failed?**-Make sure you are using node 8.15.0. and you have installed `@jupyter-widgets/jupyterlab-manager`. Depends on your JupyterLab version. You might need to install the specific version of [jupyterlab-manager](https://github.com/jupyter-widgets/ipywidgets/tree/master/packages/jupyterlab-manager). with `jupyter labextension install @jupyter-widgets/[email protected]`. When use it in Jupyter lab, keplergl is only supported in JupyterLab > 1.0 and Python 3.+Make sure you are using node 8.15.0. and you have installed `@jupyter-widgets/jupyterlab-manager`. Depends on your JupyterLab version. You might need to install the specific version of [jupyterlab-manager](https://github.com/jupyter-widgets/ipywidgets/tree/master/packages/jupyterlab-manager). with `jupyter labextension install @jupyter-widgets/[email protected]`. When use it in Jupyter lab, keplergl is only supported in JupyterLab > 1.0 and Python 3.Run `jupyter labextension install keplergl-jupyter --debug` and copy console output before creating an issue.If you are running `install` and `uninstall` several times. You should run.-```++```textjupyter lab cleanjupyter lab build```-#### 2.1 JavaScript heap out of memory when installing lab extension+**2.1 JavaScript heap out of memory when installing lab extension**+If you see this error during install labextension- $ FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory+```text+$ FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory+```+run- $ export NODE_OPTIONS=--max-old-space-size=4096+```text+$ export NODE_OPTIONS=--max-old-space-size=4096+```++**3. Is my lab extension successfully installed?**++Run `jupyter labextension list` You should see below. \(Version may vary\)-#### 3. Is my lab extension successfully installed?-Run `jupyter labextension list` You should see below. (Version may vary)-```sh+```bashJupyterLab v1.1.4Known labextensions:app dir: /Users/xxx/jupyter-python3/ENV3/share/jupyter/lab@@ -211,37 +241,21 @@ Known labextensions:keplergl-jupyter v0.1.0 enabled OK```-#### 4. What's your python and node env+**4. What's your python and node env**Python-```++```textpython==3.7.4notebook==6.0.1jupyterlab==1.1.4ipywidgets==7.5.1```-Node (Only for JupyterLab)-```+Node \(Only for JupyterLab\)++```textnode==8.15.0yarn==1.7.0```-[jupyter_widget]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_widget.png-[empty_map]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_empty_map.png-[geodataframe_map]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_geodataframe.png-[map_interaction]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_custom_map.gif-[load_map_w_data]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_load_map_w_data.gif-[map_add_data]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_add_data.png-[connect_data_config]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_connect_data_w_config.png-[save_widget_state]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_save_state.png--[wkt]: https://dev.mysql.com/doc/refman/5.7/en/gis-data-formats.html#gis-wkt-format-[geojson]: https://tools.ietf.org/html/rfc7946-[feature_collection]: https://tools.ietf.org/html/rfc7946#section-3.3-[features]: https://tools.ietf.org/html/rfc7946#section-3.2-[data_frame]: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html-[geo_data_frame]: https://geopandas.readthedocs.io/en/latest/data_structures.html#geodataframe--[match-config-w-data]: #match-config-with-data-[data_format]: #3-data-formatdiff --git a/bindings/kepler.gl-jupyter/RELEASE.md b/bindings/kepler.gl-jupyter/RELEASE.mddeleted file mode 100644index 17eef6375..000000000--- a/bindings/kepler.gl-jupyter/RELEASE.md+++ /dev/null@@ -1,37 +0,0 @@--## Release a new version--To release a new version. You need publish both the js module in NPM and the python module on PyPI.-Version number of the js module **`kelergl-jupyter`** and the python module **`keplergl`** should match--### To release a new version of keplergl-jupyter on NPM:--- Go to the js folder-```-npm version patch | minor | major-git commit -am "keplergl-jupyter@<version>"-npm login-npm publish-```--### To release a new version of keplergl on PyPI:--- Update version number in keplergl/_version.py. in bindings/kepler.gl-jupyter folder.--```-git add keplergl/_version.py-git commit -am "keplergl==<version>"-```--- Remove dist, build and upload to PyPI-```-rm -r dist-python setup.py sdist-twine upload dist/*-```--### add tags-```-git tag -a <version>-jupyter -m "<version>-jupyter-git push origin master && git push origin <version>-jupyter-```diff --git a/bindings/kepler.gl-jupyter/js.md b/bindings/kepler.gl-jupyter/js.mdnew file mode 100644index 000000000..9c3c4524f--- /dev/null+++ b/bindings/kepler.gl-jupyter/js.md@@ -0,0 +1,16 @@+# kperlgl-jupyter++This is a simple jupyter widget for kepler.gl, an advanced geospatial visualization tool, to render large-scale interactive maps.++## Package Install++**Prerequisites**++* [node](http://nodejs.org/) >=8.15.0+* [yarn](https://yarnpkg.com/en/docs/install#mac-stable) >=1.6.0++**More links**++* [Jupyter Widget](https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Custom.html)+* [First Widget](https://github.com/ocoudray/first-widget)+diff --git a/bindings/kepler.gl-jupyter/js/README.md b/bindings/kepler.gl-jupyter/js/README.mddeleted file mode 100644index c0cb61dbb..000000000--- a/bindings/kepler.gl-jupyter/js/README.md+++ /dev/null@@ -1,14 +0,0 @@-# kperlgl-jupyter--This is a simple jupyter widget for kepler.gl, an advanced geospatial visualization tool, to render large-scale interactive maps.--Package Install------------------**Prerequisites**-- [node](http://nodejs.org/) >=8.15.0-- [yarn](https://yarnpkg.com/en/docs/install#mac-stable) >=1.6.0--**More links**-- [Jupyter Widget](https://ipywidgets.readthedocs.io/en/stable/examples/Widget%20Custom.html)-- [First Widget](https://github.com/ocoudray/first-widget)diff --git a/bindings/kepler.gl-jupyter/release.md b/bindings/kepler.gl-jupyter/release.mdnew file mode 100644index 000000000..1561b9266--- /dev/null+++ b/bindings/kepler.gl-jupyter/release.md@@ -0,0 +1,39 @@+# Release a new version++To release a new version. You need publish both the js module in NPM and the python module on PyPI. Version number of the js module **`kelergl-jupyter`** and the python module **`keplergl`** should match++## To release a new version of keplergl-jupyter on NPM:++* Go to the js folder++ ```text+ npm version patch | minor | major+ git commit -am "keplergl-jupyter@<version>"+ npm login+ npm publish+ ```++## To release a new version of keplergl on PyPI:++* Update version number in keplergl/\_version.py. in bindings/kepler.gl-jupyter folder.++```text+git add keplergl/_version.py+git commit -am "keplergl==<version>"+```++* Remove dist, build and upload to PyPI++ ```text+ rm -r dist+ python setup.py sdist+ twine upload dist/*+ ```++## add tags++```text+git tag -a <version>-jupyter -m "<version>-jupyter+git push origin master && git push origin <version>-jupyter+```+diff --git a/changelog.md b/changelog.mdnew file mode 100644index 000000000..9db28d6e6--- /dev/null+++ b/changelog.md@@ -0,0 +1,378 @@+# Change Log++All notable changes to kepler.gl will be documented in this file.++## \[2.0.0\] - Feb 25 2020++* \[Enhancement\] Independently customize Geojson layer fill stroke opacity \(\#966\)+* \[Bug\] Fix text collision on toggle input \(\#973\)+* \[Chore\] upgrade prettier to 1.19 to better handle single line function compositions \(\#971\)+* \[Style\] run prettier and lint on tests \(\#968\)+* \[Bug\] Select dataset filter bug \(\#965\)+* \[Bug\] fix hexagon layer hover crash \(\#964\)+* \[Style\] run prettier \(\#963\)+* \[Feat\] Allow adding custom side panel tabs+* \[Chore\] Fix prettier update config \(\#767\)+* \[Bug\] Fixed json map export and added tests \(\#956\)+* \[Bug\] Resolve deck luma version conflict \(\#955\)+* \[Feat\] upgrade to deck.gl@8 \(\#889\)+* \[Feat\] UI for save map to backend storage \(\#906\)+* \[Bug\] Fixed geo-filter extra layer issue \(\#936\)+* \[Bug\] Fix low projection accuracy in higher zoom level \(\#946\)+* \[Bug\] fix hexagon layer hover cause app crash \(\#933\)+* \[Bug\] fix heatmap crash when there is no filter \(\#934\)+* \[Bug\] should add redux devtools in demo app by default \(\#932\)+* \[Feat\] Gpu data filter \(\#878\)+* \[Feat\] Global export of image export constants \(\#923\)+* \[Bug\] Fix mix int/float column interpreted as sting \(\#927\)+* \[Chore\] Correctly update the copy changes to actions.js \(\#914\)+* \[Enhancement\] Hide data modal in export map \(\#920\)+* \[Chore\] remove action to publish to github package repo \(\#919\)+* \[Feat\] Geo-Operations: create and apply polygon filters \(\#595\)+* \[Bug\] Fix h3 layer projection error at edge of world map \(\#918\)++## \[1.1.13\] - Jan 17 2020++* \[Enhancement\] added coordinate to tooltip export configuration \(\#876\)+* \[Bug\] mapState not applied in exported map html \(\#913\)+* \[Chore\] Update grammar, cleanup whitespace, fix broken link \(\#912\)+* \[Docs\] add Upgrade-guide+* \[Docs\] Remove hyperlink with "Advanced Usage" \(\#903\)+* \[Docs\] add initial cloud provider api \(\#868\)+* \[Enhancement\] treat type-analyzer type: NUMBER as strings \(\#891\)+* \[Bug\] remove argument.length check in injector \(\#899\)+* \[Enhancement\] add disabled to layer-configurator group \(\#897\)+* \[Bug\] Fix a bug in file-drop.js that causes error in server side render \(\#896\)+* \[Bug\] Ensure all colors returned from get3DBuildingColor are RGB arrays \(\#871\)+* \[Chore\] License 2020 \(\#883\)+* \[Bug\] Correctly copy over field.filterProps when merging multiple filters \(\#884\)+* \[Bug\] Fix newDateEntries typo and formatting fixes \(\#870\)+* \[Bug\] Fix multiple geojson layer found when properties contain object and array \(\#872\)+* \[Bug\] fix demo-app resolve react-redux \(\#866\)++## \[1.1.12\] - Dec 14 2019++* \[Bug\] Remove sqrt, log from default color aggregation for count \(\#856\)+* \[Bug\] fix cluster point count, cluster layer failed to render on export image \(\#855\)+* \[Style\] Remove extra semicolon \(\#850\)+* \[Docs\] Update api-reference overview links+* \[Bug\] Don't merge domain when update filter name \(\#841\)+* \[Enhancement\] React 17: replace componentWillReceiveProps and componentWillMount \(\#745\)+* \[Bug\] Fixed delete dataset action \(\#835\)+* \[Chore\] Github action to publish npm package \(\#825\)+* \[Enhancement\] Demo App Cloud provider refactor \(\#831\)++## \[1.1.11\] - Nov 13 2019++* \[Bug\] Correctly save filterProps to field while merging filter from config \(\#829\)+* \[Docs\] fixing api reference broken link \(\#812\)+* \[Bug\] fix empty geometry causing trip layer detection to fail \(\#826\)+* \[Docs\] update a-add-data-to-the-map.md with embed geometries in CSV++## \[1.1.10\] - Oct 30 2019++* \[Docs\] Add instructions for image and weblink in tooltip \(\#797\)+* \[Enhancement\] Add Bug Report User Guides to demo app panel header \(\#787\)+* \[Docs\] Fix typos in add-data-workflow-user-guide \(\#807\)+* \[Feat\] add stdev and variance aggregators to aggregation layer \(\#809\)+* \[Feat\] Multiple datasets per filter \(\#773\)+* \[Bug\] Fixed loading urls with query params \(\#780\)+* \[Jupyter\] Publish keplergl jupyter 0.1.2 \(\#784\)++## \[1.1.9\] - Oct 11 2019++* \[Enhancement\] improve Geojson processing performance and error handling \(\#781\)+* \[Enhancement\] add file format instruction to file upload \(\#770\)+* \[Bug\] Filter invalid H3 IDs \(\#775\)+* \[Bug\] fix readonly in addDataToMap \(\#783\)+* \[Enhancement\] Expose LayerHoverInfoFactory and CoordinateInfoFactory \(\#769\)+* \[Bug\] Fixed dropbox upload in Firefox. Passing explicit file name to upload function+* \[Enhancement\] Demo app sample info \(\#758\)+* \[Enhancement\] Generate custom map style icon from style url \(\#762\)+* \[Jupyter\] \[Bug\] fix lab widget window responsiveness, add version to header \(\#771\)+* \[Jupyter\] \[Docs\] add installation instruction to jupyter widget user guide+* \[Docs\] Update add data to map docs+* \[Jupyter\] Publish keplergl-jupyter for Jupyter labs \(\#764\)+* \[Jupyter\] \[Bug\] fix flashing html export when open in window \(\#756\)+* \[Enhancement\] Add logo and GA to exported html \(\#757\)+* \[Docs\] update Trip Layer md++## \[1.1.8\] - Sep 30 2019++* \[Bug\] Fix saving animation speed \(\#752\)+* \[Feat\] Add Trip Layer - Final \(\#699\)+* \[Feat\] add custom color editor \(\#601\)+* \[Chore\] add coverall \(\#748\)+* \[Docs\] mapboxApiUrl usage examples \(\#737\)+* \[Feat\] Support Policy page \(\#724\)++## \[1.1.7\] - Sep 11 2019++* \[Enhancement\] Create more factories from SourceDataCatalog, add onClickTitle \(\#720\)+* \[Enhancement\] Express example \(\#704\)+* \[Bug\] check new layers based on new dataset id \(\#721\)+* \[Feat\] Add Log and Sqrt scale \(\#670\)+* \[Chore\] Add a script to automatically edit kepler.gl version \(\#714\)++## \[1.1.6\] - Sep 5 2019++* \[Bug\] Upgrade to deck 7.1.11 \(\#715\)++## \[1.1.5\] - Sep 4 2019++* \[Bug\] Unlock luma.gl version \(\#713\)+* \[Bug\] fix heatmap getBounds \(\#711\)+* \[Feat\] HTML Export: provide read only mode \(\#709\)++## \[1.1.4\] - Sep 3 2019++* \[Bug\] Lock deck.gl to version 7.1.5 \(\#688\)+* \[Enhancement\] add keepExistingConfig option to addDataToMap \(\#619\)+* \[Bug\] Fixed issue with geojson fields \(\#683\)+* \[Enhancement\] Switch from callback refs to createRef \(\#622\)+* \[Bug\] Fix uglify error compiling dom-to-image in prod \(\#682\)+* \[Enhancement\] pass set useDevicePixels to deck.gl to plot container \(\#663\)+* \[jupyter\] Upgrade to kepler.gl v1.1.3 \(\#660\)+* \[Chore\] use xvfb as a service in travis-ci \(\#669\)++## \[1.1.3\] - Aug 5 2019++* \[Enhancement\] Use preserved state to apply keplerGlInit. when mint=false \(\#649\)+* \[Enhancement\] Replace react-data-grid with react-virtualized \(\#629\)++## \[1.1.2\] - Aug 1 2019++* \[Bug\] Fix issue in Layer.registerVisConfig preventing custom boolean properties+* \[Enhancement\] Simplify map layer visible logic in splitMaps and deck, mapbox overlay renders \(\#642\)+* Netlify badge \(\#641\)+* \[Enhancement\] Add 3d building color editor \(\#633\)+* \[Enhancement\] Update mapbox-gl css version \(\#634\)+* \[Bug\] fix SolidPolygonLayer import causing 3d building layer crash \(\#625\)+* \[Bug\] Don't show null for labels if there is no data \(\#626\)+* \[Bug\] add deckGlProps to pass preserveDrawingBuffer to plot container \(\#624\)+* \[Enhancement\] DemoApp: explicitly pass window.fetch to Dropbox to suppress warning \(\#621\)+* \[Enhancement\] Use theme in histogram plot color \(\#607\)+* \[Enhancement\] Bump supercluster version \(\#590\)+* \[Feat\] Add mapboxApiUrl to `KeplerGL` \(\#554\)+* \[Docs\] Update link to the GitHub repo \(\#589\)+* Fixed python3 compatiability and wrong variable in string format \(\#587\)+* \[Bug\] Remove isMouseOver state from MapPopover \(\#577\)+* \[Docs\] fix: Correct Custom Theme Example Link \(\#578\)+* \[Bug\] \[Jupyter\] Replacing print statement with \(\) to make it Python 3 compatible \(\#582\)+* Update build command: remove yarn since netlify runs yarn by default \(\#585\)+* \[Jupyter\] cleanup examples \(\#574\)+* \[Feat\] Publish keplergl jupyter 0.1.0a5 \(\#572\)+* \[Chore\] Add issue template for kepler.gl Jupyter+* \[Bug\] Solve issue \#547 avoid crash application \(\#564\)++## \[1.1.1\] - Jun 24 2019++* \[Bug\] Fix radius rendering when value = 0 \(\#551\)+* \[Docs\] Updating Layer User Guides \(\#373\)+* \[Feat\] Display mouse coordinate \(\#550\)+* \[Docs\] Replace CLA with DCO \(162a9f7\)+* \[Style\] fix README typo \(c1fafbf\)+* \[Docs\] Add jupyter widget user guide link o README \(17d3ec8\)+* \[Chore\] Add jupyter widget issue templates \(a40c1fe\)+* \[Feat\] Bump deck.gl to v7.1.5 \(\#568\)+* \[Feat\] Add ScenegraphLayer \(\#540\)+* \[Feat\] Add kepler.gl-jupyter python package \(\#543\)++## \[1.1.0\] - Jun 15 2019++* Upgrade to deck.gl 7.1 \(\#559\)+* \[Docs\] update user documentation with newer layers and features \(\#552\)+* Upgrade to deck.gl 7 and luma.gl 7 \(\#544\)+* \[Bug\] Display color legend for stroke color scale \(\#546\)+* \[Enhancement\] Image export error handling \(\#538\)+* \[Bug\] Fix typo on layer-configurator.js \(\#549\)++## \[1.0.0\] - May 23 2019++* \[Enhancement\] Detecting mapbox token validity \(\#513\)+* \[Enhancement\] Netlify webpack optimization \(\#525\)+* \[Feat\] More control over point label \(\#515\)+* \[Enhancement\] Applied changes for enable netlify deployment \(\#516\)+* \[Enhancement\] Refactored modal dialog to be more responsive \(\#501\)+* \[Bug\] fix side panel unnecessary rerender \(\#512\)+* \[Feat\] Upgrade deck.gl to 6.4 \(\#456\)+* \[BUG\] Fixed layer list sorting dnd effect \(\#509\)+* \[Feat\] add onViewStateChange callback to KeplerGl \(\#506\)+* \[Enhancement\] More granular speed control \(\#500\)+* \[Docs\] update all uber links to keplergl org \(\#502\)++## \[1.0.0-2\] - May 2 2019++* \[Bug\] Fix missing default map styles after loading custom map style from saved json \(\#490\)+* \[Bug\] Fix `fix radius` in point layer unclickable \(\#491\)+* \[Bug\] fix image export doesnt get called when map rendered \(\#494\)+* \[Enhancement\] Merge export config and map into one interaction \(\#488\)++## \[1.0.0-1\] - Apr 23 2019++* \[Bug\] Fix point layer brushing and highlight \(\#487\)+* \[Feat\] Add a light theme to KeplerGl Prop \(\#489\)+* \[Bug\] Fix browse for file upload \(\#486\)+* \[Enhancement\] Cleanup load map style tasks \(\#472\)+* \[Enhancement\] load svg icons from aws, add bundle analyzer, reduce bundle size -1mb \(\#479\)+* \[Bug\] upgrade kepler.gl version in examples+* \[Docs\] Fixed link to addDataToMap \(\#459\)+* \[Enhancement\] expand bottom widget to full length if in read only mode\(\#465\)++## \[1.0.0-0\] - Apr 2 2019++* \[Enhancement\] Replace react anything sortable with React-Sortable-Hoc+* \[Enhancement\] Replaced DI object storage with an actual Map+* \[Feat\] Able to overwrite custom theme+* \[Chore\] Upgraded waypoint library to support react16+* \[Chore\] Dropbox UI enhancements+* \[Bug\] Fix points disappear while panning across 180th meridian+* \[Chore\] Tweak save and export documentation+* \[Chore\] Add oss header and middleware.js+* \[Chore\] Added file header for user-guide.js+* \[Feat\] Single map page export+* \[Chore\] Upgraded libraries: react, styled-components++### BREAKING CHANGES++* React 15 is no longer supported+* Style components v4+ is now required because is now a peer dependency++## \[0.2.4\] - Mar 13 2019++* \[Enhancement\] Slider: use clientX to calculate delta to support windows IE and Tableau kepler.gl \(\#431\)+* \[Bug\] Range slider: correctly setting ranch brush selection when mount \(\#433\)+* \[Feat\] Add getMapboxRef prop \(\#372\)+* \[Enhancement\] Automatically loading custom dependencies when inject custom component factor \(\#430\)+* \[Bug\] Range brush width change should not trigger onBrush callback \(\#432\)+* \[Bug\] fix processor export, support previous \(\#428\)++## \[0.2.3\] - Mar 3 2019++* \[Docs\] Export processors and Add Docs \(\#421\)+* \[Docs\] Add docs for actions and updaters \(\#368\)+* \[Bug\] Fix image export component failed to render \(\#418\)++## \[0.2.2\] - Feb 26 2019++* \(HEAD -> master, origin/master, origin/HEAD\) \[Bug\] Fixed web doc link \(\#369\)+* \[Bug\]: Fixed example dependencies \(\#362\)+* \[Bug\] Fix missing 3d building layer in image export \(\#361\)+* \[Bug\] fix 3d building layer missing mapbox token, fix image export \(\#360\)+* \[Docs\] Add API Docs \(\#279\)+* \[Feature\] UMD module in unpkg \(\#349\)+* Disabled banner \(\#352\)++## \[0.2.1\] - Feb 6 2019++* \(HEAD -> master, origin/master\) \[Feature\] Collapsible layer group \(\#350\)+* \[Enhancement\] Added default feature flags to disable dropbox \(\#338\)+* \[Bug\]: fix alias and module resolve in webpack.config.local \(\#348\)+* \[Enhancement\] Upgraded Webpack, Babel and Eslint \(\#342\)+* \[Feature\] Notification systems with new UI panel and helpers to generate messages \(\#333\)+* GitHub browser history \(\#321\)+* \[Bug\] Fix Maximum call stack size exceeded when double click \(\#323\)+* \[Docs\] Export identity actions individually and add JSDocs \(\#290\)+* \[Docs\] Edit PR guidance in contribution guidelines \(\#320\)+* \[Docs\] Add Contribution Guidelines \(\#261\)+* \(overide-style\) \[Enhancement\] Upgrade type-analyzer to pass 0/1 as integer \(\#317\)+* \[Typo\] Misspellings in comments \(\#314\)+* \[Housekeeping\] Update Copyright header to 2019, Happy New Year \(\#316\)+* Feat: Implemented Dropbox integration \(\#312\)++## \[0.2.1-beta.1\] - Dec 17 2018++* \[Feature\] Added a Tiled 3D Building Deck.gl Layer \(\#270\)+* \[Enhancement\] Fossa Integration \(\#309\)+* \[Enhancement\] Change BottomWidget to pure functional component \(\#249\)+* \[Docs\]: updated docs for better readability\(alignments\) \(\#255\)+* \[Enhancement\] export processKeplerglJSON from processors \(\#299\)+* \[website\] BugFix: missing tracking payload \(\#311\)+* \[Enhancement\] Hexbin Layer: smaller radius step and dynamic hover \(\#310\)+* \[Bug\] remove unpm from yarn.lock \(\#303\)+* \[Enhancement\] use mapbox style url for default \(published\) uber map styles \(\#292\)+* \[Feature\] Load data and kepler.gl file using URLs \(\#260\)++## \[0.2.1-beta.0\] - Nov 16 2018++* \[Bug\] Fixing global color issue \#130 for the heat map \(\#277\)+* \[Enhancement\] More exports \(\#284\)++## \[0.2.0\] - Nov 16 2018++* \[Enhancement\] Export side panel component factories \(\#282\)+* \[Feature\] Upgrade to deck.gl v6 \(\#272\)+* \[Refactor\] Small update of readability \(\#250\)+* \[website\] Click logo should go to kepler.gl website \(\#251\)+* \[Enhancement\] Add contribution guidelines on contributing.md file \(\#108\)+* \[Enhancement\] Scan through all text labels to get the entire character set \(\#245\)++## \[0.1.6\] - Oct 3 2018++* \[Enhancement\] save and load text label config \(\#242\)++## \[0.1.5\] - Oct 2 2018++* \[Enhancement\] Fix z-fighting issue between text label and scatter plot \(\#234\)+* \[Bug\] Sort color steps \(\#241\)+* \[Bug\] fix a bug where field is valid is always false \(\#240\)++## \[0.1.4\] - Sep 15 2018++* \[Enhancement\] Null check for missing arc column \(\#235\)++## \[0.1.3\] - Sep 10 2018++* \[Enhancement\] Add H3 layer \(\#217\) \(\#198\)+* \[Enhancement\] Add text label in Point layer \(\#166\)++## \[0.1.2\] - Aug 24 2018++* \[Bug\] Fix server render error, remove react-ace \(\#206\)++## \[0.1.1\] - Aug 24 2018++* \[Enhancement\] Bump [email protected] \(\#215\)++## \[0.1.0\] - Aug 21 2018++* Upgrade to Deck.gl v5.3.4 \(\#153\)++## \[0.0.28\] - Aug 8 2018++* Fix cluster layer label rendering++## \[0.0.27\] - Aug 3 2018++* Fix unable to fetch external stylesheets when taking the screenshot \(\#187\)+* \[Bug\] Avoid repeatedly calling HIDE\_EXPORT\_DROPDOWN \(\#180\)++## \[0.0.26\] - Aug 3 2018++* \[Bug\] fix mapStyles loaded as an empty object after load map from config \(\#169\)++## \[0.0.25\] - Jul 10 2018++* \[Bug\] Create ellipsis when dataset name is a long name \(\#109\)+* \[Enhancement\] Save custom reducer initialState, add custom-reducer example \(\#159\)++## \[0.0.24\] - Jul 5 2018++* \[Bug\] fix image export failing \(\#155\)+* \[Enhancement\] Add default map styles to mapStyle reducer initial state \(\#147\)++## \[0.0.23\] - Jun 28 2018++* \[Enhancement\] Consider all mew layers when calculating the map bounds \(\#142\)+* \[Bug\] Fix icon layer instructions \(\#131\)+* \[Website\] add banner to demo app for survey \(\#117\)++## \[0.0.22\] - Jun 10 2018++* \[Bug\] new filter shouldn't be enlarged if there is already an enlarged filter \(\#93\)+* \[Enhancement\] Enable ordinal aggregation in aggregation layer \(hex, grid, cluster\) \(\#29\)++## \[0.0.21\]\[0.0.20\] - Jun 4 2018++* \[Bug\] TimeRangeSlider should not cache props.onChange \(\#100\)+diff --git a/contributing/CODE_OF_CONDUCT.md b/contributing/CODE_OF_CONDUCT.mddeleted file mode 100644index e327d9aa5..000000000--- a/contributing/CODE_OF_CONDUCT.md+++ /dev/null@@ -1,75 +0,0 @@-# Contributor Covenant Code of Conduct--## Our Pledge--In the interest of fostering an open and welcoming environment, we as-contributors and maintainers pledge to making participation in our project and-our community a harassment-free experience for everyone, regardless of age,-body size, disability, ethnicity, gender identity and expression, level of-experience, nationality, personal appearance, race, religion, or sexual-identity and orientation.--## Our Standards--Examples of behavior that contributes to creating a positive environment-include:--* Using welcoming and inclusive language-* Being respectful of differing viewpoints and experiences-* Gracefully accepting constructive criticism-* Focusing on what is best for the community-* Showing empathy towards other community members--Examples of unacceptable behavior by participants include:--* The use of sexualized language or imagery and unwelcome sexual attention or- advances-* Trolling, insulting/derogatory comments, and personal or political attacks-* Public or private harassment-* Publishing others' private information, such as a physical or electronic- address, without explicit permission-* Other conduct which could reasonably be considered inappropriate in a- professional setting--## Our Responsibilities--Project maintainers are responsible for clarifying the standards of acceptable-behavior and are expected to take appropriate and fair corrective action in-response to any instances of unacceptable behavior.--Project maintainers have the right and responsibility to remove, edit, or-reject comments, commits, code, wiki edits, issues, and other contributions-that are not aligned to this Code of Conduct, or to ban temporarily or-permanently any contributor for other behaviors that they deem inappropriate,-threatening, offensive, or harmful.--## Scope--This Code of Conduct applies both within project spaces and in public spaces-when an individual is representing the project or its community. Examples of-representing a project or community include using an official project e-mail-address, posting via an official social media account, or acting as an-appointed representative at an online or offline event. Representation of a-project may be further defined and clarified by project maintainers.--## Enforcement--Instances of abusive, harassing, or otherwise unacceptable behavior may be-reported by contacting the project team at [email protected]. The project-team will review and investigate all complaints, and will respond in a way-that it deems appropriate to the circumstances. The project team is obligated-to maintain confidentiality with regard to the reporter of an incident.-Further details of specific enforcement policies may be posted separately.--Project maintainers who do not follow or enforce the Code of Conduct in good-faith may face temporary or permanent repercussions as determined by other-members of the project's leadership.--## Attribution--This Code of Conduct is adapted from the [Contributor Covenant][homepage],-version 1.4, available at-[http://contributor-covenant.org/version/1/4][version].--[homepage]: http://contributor-covenant.org-[version]: http://contributor-covenant.org/version/1/4/diff --git a/contributing/CONTRIBUTING.md b/contributing/CONTRIBUTING.mddeleted file mode 100644index 8cabf4151..000000000--- a/contributing/CONTRIBUTING.md+++ /dev/null@@ -1,106 +0,0 @@-# Contributing to kepler.gl--Great to have you here. Here are a few ways you can help make kepler.gl even better!--* [Developer Certification of Origin (DCO)](#dco)-* [Code of Conduct](#coc)-* [Questions and Problems](#question)-* [Issues and Bugs](#issue)-* [Feature Requests](#feature)-* [Improving Documentation](#docs)-* [Submitting Pull Request](#submit-pr)-* [Development Documentation][developers]--## <a name="dco"></a> Developer Certification of Origin (DCO)--When commiting code, kepler.gl requires [Developer Certificate of Origin (DCO)][dco] process to be followed.--The DCO is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO, reformatted for readability:-```-By making a contribution to this project, I certify that:--(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or--(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or--(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.--(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.-```-### DCO Sign-Off Methods-Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.-```-Signed-off-by: Shan He <[email protected]>-```-Use the `-s` or `--signoff` command line to append this automatically to your commit message:-```-$ git commit -s -m 'This is my commit message'-```--## <a name="coc"></a> Code of Conduct-Help us keep kepler.gl open and inclusive. Please read and follow our [Code of Conduct](./CODE_OF_CONDUCT.md).--## <a name="question"></a> Questions and Problems-We are trying to keep our Github page for issues, bugs and feature requests only. You've got much better chances of getting supports on [Stack Overflow][stack]. Many people including our engineers are ready to answer questions on Stack Overflow. Your question might already been answered there.--## <a name="issue"></a> Issues and Bugs-If you find a bug, you can help us by submitting an [Issue][git-iss] to our GitHub Repository. Please use the github [Bug Report Template][git-bug] and fill in as much as information as possible. Even better, you can submit a [Pull Request][git-pr] with a fix.--## <a name="feature"></a> Feature Requests--If you want to contribute or add new features, please use [Issue][git-iss] on github projects to start a new discussion using the [Feature Request Template][git-feature]. If this receive a Go ahead, you can submit your patch as PR to the repository.--If you would like to implement a new feature then consider what kind of change it is:--* **Take a look at our [roadmap][roadmap]** It lists out the items we are planning to work on-* **Pick your item** Pick an item to execute-* **Claim the item** Reply in the ticket linked in the roadmap to claim the item, one of the member of the technical team will respond-* **Major Changes** that you wish to contribute to the project should be discussed first in an- [GitHub issue][github-issues] that clearly outlines the changes and benefits of the feature.-* **Small Changes** can directly be crafted and submitted to the [GitHub Repository][github]- as a Pull Request. See the section about [Pull Request Submission Guidelines](#submit-pr), and- for detailed information the [core development documentation][developers].-* **Let's review your code** Create a pull request--## <a name="docs"></a> Improving Documentation--Questions about kepler.gl? you can checkout the examples and medium articles on [kepler.gl][website].--[User Guides][user-guide] and API Docs are saved in the [docs][api-docs] folder on Github. Help us improve documentation here by submitting a Pull Request.--## <a name="submit-pr"></a> Submitting Pull Request-<b>First, follow the [development documentation][developers] for detailed guidance on environment setup, code style, testing and commit message conventions.</b>--* Search [GitHub][git-pr] for an open or closed Pull Request- that relates to your submission. You don't want to duplicate effort.-* Create the [development environment][developers.setup]-* Make your changes in a new git branch:-- ```shell- git checkout -b my-fix-branch master- ```--* Create your patch commit, **including appropriate test cases**.-* If the changes affect public APIs, change or add relevant [documentation][developers.documentation].-* Run [tests][developers.tests], and ensure that all tests pass.-* Commit your changes using a descriptive commit message that follows our- [commit message conventions][developers.commits]. Adherence to the conventions is required, because release notes are automatically generated from these messages.--[cla]: https://cla-assistant.io/keplergl/kepler.gl-[github]: https://github.com/keplergl/kepler.gl-[git-iss]: https://github.com/keplergl/kepler.gl/issues-[git-pr]: https://github.com/keplergl/kepler.gl/pulls-[git-feature]: https://github.com/keplergl/kepler.gl/issues/new?template=feature_request.md-[git-bug]: https://github.com/keplergl/kepler.gl/issues/new?template=bug_report.md-[stack]: https://stackoverflow.com/questions/tagged/kepler.gl-[api-docs]: https://github.com/keplergl/kepler.gl/tree/master/docs-[website]: https://keplergl.github.io/kepler.gl-[user-guide]: https://github.com/keplergl/kepler.gl/blob/master/docs/a-introduction.md-[roadmap]: https://github.com/keplergl/kepler.gl/wiki/Roadmap-[developers]: DEVELOPERS.md-[developers.commits]: DEVELOPERS.md#commits-[developers.documentation]: DEVELOPERS.md#documentation-[developers.rules]: DEVELOPERS.md#rules-[developers.setup]: DEVELOPERS.md#setup-[developers.tests]: DEVELOPERS.md#tests-[dco]: https://probot.github.io/apps/dco/diff --git a/contributing/DEVELOPERS.md b/contributing/DEVELOPERS.mddeleted file mode 100644index 1c018391c..000000000--- a/contributing/DEVELOPERS.md+++ /dev/null@@ -1,281 +0,0 @@-# Developing Kepler.gl--* [Development Setup](#setup)-* [Running Tests](#tests)-* [Coding Rules](#rules)-* [Commit Message Guidelines](#commits)-* [Writing Documentation](#documentation)-* [Developing kepler.gl Website](#website)--## <a name="setup"> Development Setup--This document describes how to set up your development environment to build and test Kepler.gl, and-explains the basic mechanics of using `git`, `node`, `yarn`.--### Installing Dependencies--Before you can build Kepler.gl, you must install and configure the following dependencies on your-machine:--* [Git](http://git-scm.com/): The [Github Guide to- Installing Git][git-setup] is a good source of information.--* [Node.js ^6.x](http://nodejs.org): We use Node to generate the documentation, run a- development web server, run tests, and generate distributable files. Depending on your system,- you can install Node either from source or as a pre-packaged bundle.-- We recommend using [nvm](https://github.com/creationix/nvm) (or- [nvm-windows](https://github.com/coreybutler/nvm-windows))- to manage and install Node.js, which makes it easy to change the version of Node.js per project.--* [Yarn](https://yarnpkg.com): We use Yarn to install our Node.js module dependencies- (rather than using npm). See the detailed [installation instructions][yarn-install].--#### Fork Kepler.gl Repo-If you plan to contribute code to kepler.gl, you must have a [GitHub account](https://github.com/signup/free) so you can push code and open Pull Requests in the [GitHub Repository][github]. You must [fork](http://help.github.com/forking) the-[main kepler.gl repository][github] to [create a Pull Request][github-pr].---#### Developing kepler.gl--To develop features, debug code, run tests, we use webpack to start a local web server and serve the kepler.gl demo app from the src directory.--```shell-# Clone your kepler.gl fork repository:-git clone [email protected]:<github username>/kepler.gl.git--# Go to the kepler.gl directory:-cd kepler.gl--# Add the main kepler.gl repository as an upstream remote to your repository:-git remote add upstream "[email protected]:keplergl/kepler.gl.git"--# Install JavaScript dependencies:-yarn --ignore-engines--# Setup mapbox access token locally-export MapboxAccessToken=<insert_your_token>--# Start the kepler.gl demo app-npm start-```--An demo app will be served at--```text-http://localhost:8080/-```--This is the demo app we hosted on [http://kepler.gl/#/demo][demo-app]. By default, it serves non-minified source code inside the src directory.--#### Develop with deck.gl--When develop, upgrade, debug deck.gl, Demo app can load deck.gl directly from src-```-// load deck.gl from node_modules/deck.gl/src, sub-modules from node_modules/@deck.gl/<module>/src-npm run start:deck--// load deck.gl src from the deck.gl folder parallel to kepler.gl-npm run start:deck-src-```--## <a name="tests"> Running Tests--We write unit and browser tests with [Tape][tape] and [Enzyme][enzyme], and lint with [ESLint][eslint]. Make sure to run test before submitting your PR. To run all of the tests once with node:--```shell-yarn test-```--To run separately-```shell-# lint-yarn lint--# node tests-yarn test-node--# browser tests-yarn test-browser--# fast test (no linting)-yarn fast-test-```--To generate a coverage report-```shell-yarn cover-```--## <a name="rules"></a> Coding Rules--To ensure consistency throughout the source code, keep these rules in mind as you are working:--* All features or bug fixes **must be tested** by one or more [specs][unit-testing].-* All public API methods **must be documented** with using jsdoc. To see how we document our APIs, please check- out the existing source code and see the section about [writing documentation](#documentation)--This project use Eslint together Prettier. The linter should automatically inform you if you break any rules (like incorrect indenting, line breaking or if you forget a semicolon). Before doing a pull request, make sure to run the linter.--```shell-# To run the linter-yarn lint-```--## <a name="commits"></a> Git Commit Guidelines--To commit your changes, please follow our rules over how our git commit messages can be formatted. This leads to **more readable and unified messages** that are easy to follow. But also,-we use the git commit messages to **generate the kepler.gl change log**.--### Commit Message Format-Each commit message consists of a **header** and a **body**. The header has a special-format that includes a **type** and a **subject**. The **PR** # will be auto-generated once the PR is merged.--```shell-[<type>]<subject>(<pr>)-<BLANK LINE>-<body>--#e.g.-[Enhancement] Upgrade type-analyzer to pass 0/1 as integer (#317)--* Upgrade to [email protected]-* Add test-```--The **header** is mandatory and the **scope** of the header is optional.--Any line of the commit message cannot be longer 100 characters! This allows the message to be easier-to read on GitHub as well as in various git tools.--### Revert-If the commit reverts a previous commit, it should begin with `revert: `, followed by the header-of the reverted commit.-In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit-being reverted.-A commit with this format is automatically created by the [`git revert`][git-revert] command.--### Type-Must be one of the following, capitalized.--* **[Feat]**: A new feature-* **[Enhancement]**: An update of a existing feature-* **[Bug]**: A bug fix-* **[Docs]**: Documentation only changes-* **[Style]**: Changes that do not affect the meaning of the code (white-space, formatting, missing- semi-colons, typos, etc)-* **[Refactor]**: A code change that neither fixes a bug nor adds a feature-* **[Perf]**: A code change that improves performance-* **[Test]**: Adding missing or correcting existing tests-* **[Chore]**: Changes to the build process or auxiliary tools and libraries such as documentation- generation--### Subject-The subject contains succinct description of the change:--* use the imperative, present tense: "change" not "changed" nor "changes"-* don't capitalize first letter-* no dot (.) at the end--### Body-Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".-The body should include the motivation for the change and contrast this with previous behavior.--**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines.-The rest of the commit message is then used for this.--## <a name="documentation"></a> Writing Documentation (THIS PART IS NOT AVAILABLE YET)--The Kepler.gl project uses [jsdoc](http://usejsdoc.org/)--This means that all the docs are stored inline in the source code and so are kept in sync as it-changes.--There is also extra content (the developer guide, error pages, the tutorial,-and misceallenous pages) that live inside the Kepler.gl repository as markdown files.--This means that since we generate the documentation from the source code, we can easily provide-version-specific documentation by simply checking out a version of Kepler.gl and running the build.--### Building and viewing the docs locally-We build Api docs from scratch using [documentation.js][documentationjs]. It generates docs from jsdoc:--```shell-yarn docs-```--### Writing jsdoc-You can find JSDoc instructions [here][jsDoc]. Documentation.js is interested in the following block tags:--* `@param {type} name description` - describes a parameter of a function-* `@returns {type} description` - describes what a function returns-* `@property` - describes a property of an object-* `@description` - used to provide a description of a component in markdown--* `@example` - specifies an example.-* `@public` - Only methods with @public tag will be included in the docs--The `type` in `@param` and `@returns` must be wrapped in `{}` curly braces, e.g. `{Object|Array}`.-Parameters can be made optional by *either* appending a `=` to the type, e.g. `{Object=}`, *or* by-putting the `[name]` in square brackets.-Default values are only possible with the second syntax by appending `=<value>` to the parameter-name, e.g. `@param {boolean} [ownPropsOnly=false]`.---## <a name="website"></a> Develop The kepler.gl Website--Make sure to export mapbox token in the same terminal before start the server.-```sh- export MapboxAccessToken=<insert_your_token>-```--In order to start-```- yarn web-```--To checkout the build-```- cd website && yarn build-```--Publish on github pages __Authorized User Only__.--<b>important* Before publish. Copy the mapbox token at [this link](http://t.uber.com/kepler.gl-token). (Only accessible by Uber developer). Deploy will fail if token is missing</b>-```- export MapboxAccessToken=<insert_your_token>- yarn deploy-```--### <a name="gh-pages"></a> Testing environment using GH Pages-We currently host the demo-app on Github pages. We have provided a way to test github pages before pushing the branch to-the actual repo.-In order to test github pages with your changes, you need to satisfy the following requirements first:-- Make sure you have your own github pages (username.github.io) repo, [click here](https://pages.github.com/)-- In your local fork of kepler.gl, add your github pages repo to the list of git remotes by doing:--```bash-git remote add test [email protected]:<username>/<username>.github.io.git-```--With the above command, A new origin __test__ will be created, and your own testing copy of gh pages will be push to it.--When everything is set up, run the following command:--```bash-yarn deploy:test-```--The above command will build the website and push to your gh-pages branch.--[demo-app]: http://kepler.gl/#/demo-[documentationjs]: https://documentation.js.org/-[eslint]: https://eslint.org/-[enzyme]: https://airbnb.io/enzyme/-[git-revert]: https://git-scm.com/docs/git-revert-[git-setup]: https://help.github.com/articles/set-up-git-[github]: https://github.com/keplergl/kepler.gl-[github-pr]: https://help.github.com/articles/creating-a-pull-request/-[jsDoc]: http://usejsdoc.org/-[tape]: https://github.com/substack/tape-[yarn-install]: https://yarnpkg.com/en/docs/installdiff --git a/contributing/README.md b/contributing/README.mdnew file mode 100644index 000000000..e99d0a55a--- /dev/null+++ b/contributing/README.md@@ -0,0 +1,2 @@+# contributing+diff --git a/contributing/code_of_conduct.md b/contributing/code_of_conduct.mdnew file mode 100644index 000000000..48d4ac4d8--- /dev/null+++ b/contributing/code_of_conduct.md@@ -0,0 +1,52 @@+# Contributor Covenant Code of Conduct++## Our Pledge++In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.++## Our Standards++Examples of behavior that contributes to creating a positive environment include:++* Using welcoming and inclusive language+* Being respectful of differing viewpoints and experiences+* Gracefully accepting constructive criticism+* Focusing on what is best for the community+* Showing empathy towards other community members++Examples of unacceptable behavior by participants include:++* The use of sexualized language or imagery and unwelcome sexual attention or++ advances++* Trolling, insulting/derogatory comments, and personal or political attacks+* Public or private harassment+* Publishing others' private information, such as a physical or electronic++ address, without explicit permission++* Other conduct which could reasonably be considered inappropriate in a++ professional setting++## Our Responsibilities++Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.++Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.++## Scope++This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.++## Enforcement++Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.++Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.++## Attribution++This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.4, available at [http://contributor-covenant.org/version/1/4](http://contributor-covenant.org/version/1/4/).+diff --git a/contributing/contributing.md b/contributing/contributing.mdnew file mode 100644index 000000000..4248c0832--- /dev/null+++ b/contributing/contributing.md@@ -0,0 +1,106 @@+# Contributing to kepler.gl++Great to have you here. Here are a few ways you can help make kepler.gl even better!++* [Developer Certification of Origin \(DCO\)](contributing.md#dco)+* [Code of Conduct](contributing.md#coc)+* [Questions and Problems](contributing.md#question)+* [Issues and Bugs](contributing.md#issue)+* [Feature Requests](contributing.md#feature)+* [Improving Documentation](contributing.md#docs)+* [Submitting Pull Request](contributing.md#submit-pr)+* [Development Documentation](developers.md)++## Developer Certification of Origin \(DCO\)++When commiting code, kepler.gl requires [Developer Certificate of Origin \(DCO\)](https://probot.github.io/apps/dco/) process to be followed.++The DCO is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO, reformatted for readability:++```text+By making a contribution to this project, I certify that:++(a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or++(b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or++(c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.++(d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.+```++### DCO Sign-Off Methods++Contributors sign-off that they adhere to these requirements by adding a Signed-off-by line to commit messages.++```text+Signed-off-by: Shan He <[email protected]>+```++Use the `-s` or `--signoff` command line to append this automatically to your commit message:++```text+$ git commit -s -m 'This is my commit message'+```++## Code of Conduct++Help us keep kepler.gl open and inclusive. Please read and follow our [Code of Conduct](code_of_conduct.md).++## Questions and Problems++We are trying to keep our Github page for issues, bugs and feature requests only. You've got much better chances of getting supports on [Stack Overflow](https://stackoverflow.com/questions/tagged/kepler.gl). Many people including our engineers are ready to answer questions on Stack Overflow. Your question might already been answered there.++## Issues and Bugs++If you find a bug, you can help us by submitting an [Issue](https://github.com/keplergl/kepler.gl/issues) to our GitHub Repository. Please use the github [Bug Report Template](https://github.com/keplergl/kepler.gl/issues/new?template=bug_report.md) and fill in as much as information as possible. Even better, you can submit a [Pull Request](https://github.com/keplergl/kepler.gl/pulls) with a fix.++## Feature Requests++If you want to contribute or add new features, please use [Issue](https://github.com/keplergl/kepler.gl/issues) on github projects to start a new discussion using the [Feature Request Template](https://github.com/keplergl/kepler.gl/issues/new?template=feature_request.md). If this receive a Go ahead, you can submit your patch as PR to the repository.++If you would like to implement a new feature then consider what kind of change it is:++* **Take a look at our** [**roadmap**](https://github.com/keplergl/kepler.gl/wiki/Roadmap) It lists out the items we are planning to work on+* **Pick your item** Pick an item to execute+* **Claim the item** Reply in the ticket linked in the roadmap to claim the item, one of the member of the technical team will respond+* **Major Changes** that you wish to contribute to the project should be discussed first in an++ \[GitHub issue\]\[github-issues\] that clearly outlines the changes and benefits of the feature.++* **Small Changes** can directly be crafted and submitted to the [GitHub Repository](https://github.com/keplergl/kepler.gl)++ as a Pull Request. See the section about [Pull Request Submission Guidelines](contributing.md#submit-pr), and++ for detailed information the [core development documentation](developers.md).++* **Let's review your code** Create a pull request++## Improving Documentation++Questions about kepler.gl? you can checkout the examples and medium articles on [kepler.gl](https://keplergl.github.io/kepler.gl).++[User Guides](https://github.com/keplergl/kepler.gl/blob/master/docs/a-introduction.md) and API Docs are saved in the [docs](https://github.com/keplergl/kepler.gl/tree/master/docs) folder on Github. Help us improve documentation here by submitting a Pull Request.++## Submitting Pull Request++**First, follow the** [**development documentation**](developers.md) **for detailed guidance on environment setup, code style, testing and commit message conventions.**++* Search [GitHub](https://github.com/keplergl/kepler.gl/pulls) for an open or closed Pull Request++ that relates to your submission. You don't want to duplicate effort.++* Create the [development environment](developers.md#setup)+* Make your changes in a new git branch:++ ```text+ git checkout -b my-fix-branch master+ ```++* Create your patch commit, **including appropriate test cases**.+* If the changes affect public APIs, change or add relevant [documentation](developers.md#documentation).+* Run [tests](developers.md#tests), and ensure that all tests pass.+* Commit your changes using a descriptive commit message that follows our++ [commit message conventions](developers.md#commits). Adherence to the conventions is required, because release notes are automatically generated from these messages.+diff --git a/contributing/developers.md b/contributing/developers.mdnew file mode 100644index 000000000..cbe06f3e2--- /dev/null+++ b/contributing/developers.md@@ -0,0 +1,260 @@+# Developing Kepler.gl++* [Development Setup](developers.md#setup)+* [Running Tests](developers.md#tests)+* [Coding Rules](developers.md#rules)+* [Commit Message Guidelines](developers.md#commits)+* [Writing Documentation](developers.md#documentation)+* [Developing kepler.gl Website](developers.md#website)++## Development Setup++This document describes how to set up your development environment to build and test Kepler.gl, and explains the basic mechanics of using `git`, `node`, `yarn`.++### Installing Dependencies++Before you can build Kepler.gl, you must install and configure the following dependencies on your machine:++* [Git](http://git-scm.com/): The [Github Guide to Installing Git](https://help.github.com/articles/set-up-git) is a good source of information.+* [Node.js ^6.x](http://nodejs.org): We use Node to generate the documentation, run a development web server, run tests, and generate distributable files. Depending on your system, you can install Node either from source or as a pre-packaged bundle.++ We recommend using [nvm](https://github.com/creationix/nvm) \(or [nvm-windows](https://github.com/coreybutler/nvm-windows)\) to manage and install Node.js, which makes it easy to change the version of Node.js per project.++* [Yarn](https://yarnpkg.com): We use Yarn to install our Node.js module dependencies \(rather than using npm\). See the detailed [installation instructions](https://yarnpkg.com/en/docs/install).++#### Fork Kepler.gl Repo++If you plan to contribute code to kepler.gl, you must have a [GitHub account](https://github.com/signup/free) so you can push code and open Pull Requests in the [GitHub Repository](https://github.com/keplergl/kepler.gl). You must [fork](http://help.github.com/forking) the [main kepler.gl repository](https://github.com/keplergl/kepler.gl) to [create a Pull Request](https://help.github.com/articles/creating-a-pull-request/).++#### Developing kepler.gl++To develop features, debug code, run tests, we use webpack to start a local web server and serve the kepler.gl demo app from the src directory.++```text+# Clone your kepler.gl fork repository:+git clone [email protected]:<github username>/kepler.gl.git++# Go to the kepler.gl directory:+cd kepler.gl++# Add the main kepler.gl repository as an upstream remote to your repository:+git remote add upstream "[email protected]:keplergl/kepler.gl.git"++# Install JavaScript dependencies:+yarn --ignore-engines++# Setup mapbox access token locally+export MapboxAccessToken=<insert_your_token>++# Start the kepler.gl demo app+npm start+```++An demo app will be served at++```text+http://localhost:8080/+```++This is the demo app we hosted on [http://kepler.gl/\#/demo](http://kepler.gl/#/demo). By default, it serves non-minified source code inside the src directory.++#### Develop with deck.gl++When develop, upgrade, debug deck.gl, Demo app can load deck.gl directly from src++```text+// load deck.gl from node_modules/deck.gl/src, sub-modules from node_modules/@deck.gl/<module>/src+npm run start:deck++// load deck.gl src from the deck.gl folder parallel to kepler.gl+npm run start:deck-src+```++## Running Tests++We write unit and browser tests with [Tape](https://github.com/substack/tape) and [Enzyme](https://airbnb.io/enzyme/), and lint with [ESLint](https://eslint.org/). Make sure to run test before submitting your PR. To run all of the tests once with node:++```text+yarn test+```++To run separately++```text+# lint+yarn lint++# node tests+yarn test-node++# browser tests+yarn test-browser++# fast test (no linting)+yarn fast-test+```++To generate a coverage report++```text+yarn cover+```++## Coding Rules++To ensure consistency throughout the source code, keep these rules in mind as you are working:++* All features or bug fixes **must be tested** by one or more \[specs\]\[unit-testing\].+* All public API methods **must be documented** with using jsdoc. To see how we document our APIs, please check++ out the existing source code and see the section about [writing documentation](developers.md#documentation)++This project use Eslint together Prettier. The linter should automatically inform you if you break any rules \(like incorrect indenting, line breaking or if you forget a semicolon\). Before doing a pull request, make sure to run the linter.++```text+# To run the linter+yarn lint+```++## Git Commit Guidelines++To commit your changes, please follow our rules over how our git commit messages can be formatted. This leads to **more readable and unified messages** that are easy to follow. But also, we use the git commit messages to **generate the kepler.gl change log**.++### Commit Message Format++Each commit message consists of a **header** and a **body**. The header has a special format that includes a **type** and a **subject**. The **PR** \# will be auto-generated once the PR is merged.++```text+[<type>]<subject>(<pr>)+<BLANK LINE>+<body>++#e.g.+[Enhancement] Upgrade type-analyzer to pass 0/1 as integer (#317)++* Upgrade to [email protected]+* Add test+```++The **header** is mandatory and the **scope** of the header is optional.++Any line of the commit message cannot be longer 100 characters! This allows the message to be easier to read on GitHub as well as in various git tools.++### Revert++If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted. A commit with this format is automatically created by the [`git revert`](https://git-scm.com/docs/git-revert) command.++### Type++Must be one of the following, capitalized.++* **\[Feat\]**: A new feature+* **\[Enhancement\]**: An update of a existing feature+* **\[Bug\]**: A bug fix+* **\[Docs\]**: Documentation only changes+* **\[Style\]**: Changes that do not affect the meaning of the code \(white-space, formatting, missing++ semi-colons, typos, etc\)++* **\[Refactor\]**: A code change that neither fixes a bug nor adds a feature+* **\[Perf\]**: A code change that improves performance+* **\[Test\]**: Adding missing or correcting existing tests+* **\[Chore\]**: Changes to the build process or auxiliary tools and libraries such as documentation++ generation++### Subject++The subject contains succinct description of the change:++* use the imperative, present tense: "change" not "changed" nor "changes"+* don't capitalize first letter+* no dot \(.\) at the end++### Body++Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.++**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.++## Writing Documentation \(THIS PART IS NOT AVAILABLE YET\)++The Kepler.gl project uses [jsdoc](http://usejsdoc.org/)++This means that all the docs are stored inline in the source code and so are kept in sync as it changes.++There is also extra content \(the developer guide, error pages, the tutorial, and misceallenous pages\) that live inside the Kepler.gl repository as markdown files.++This means that since we generate the documentation from the source code, we can easily provide version-specific documentation by simply checking out a version of Kepler.gl and running the build.++### Building and viewing the docs locally++We build Api docs from scratch using [documentation.js](https://documentation.js.org/). It generates docs from jsdoc:++```text+yarn docs+```++### Writing jsdoc++You can find JSDoc instructions [here](http://usejsdoc.org/). Documentation.js is interested in the following block tags:++* `@param {type} name description` - describes a parameter of a function+* `@returns {type} description` - describes what a function returns+* `@property` - describes a property of an object+* `@description` - used to provide a description of a component in markdown+* `@example` - specifies an example.+* `@public` - Only methods with @public tag will be included in the docs++The `type` in `@param` and `@returns` must be wrapped in `{}` curly braces, e.g. `{Object|Array}`. Parameters can be made optional by _either_ appending a `=` to the type, e.g. `{Object=}`, _or_ by putting the `[name]` in square brackets. Default values are only possible with the second syntax by appending `=<value>` to the parameter name, e.g. `@param {boolean} [ownPropsOnly=false]`.++## Develop The kepler.gl Website++Make sure to export mapbox token in the same terminal before start the server.++```bash+ export MapboxAccessToken=<insert_your_token>+```++In order to start++```text+ yarn web+```++To checkout the build++```text+ cd website && yarn build+```++Publish on github pages **Authorized User Only**.++**important\* Before publish. Copy the mapbox token at** [**this link**](http://t.uber.com/kepler.gl-token)**. \(Only accessible by Uber developer\). Deploy will fail if token is missing**++```text+ export MapboxAccessToken=<insert_your_token>+ yarn deploy+```++### Testing environment using GH Pages++We currently host the demo-app on Github pages. We have provided a way to test github pages before pushing the branch to the actual repo. In order to test github pages with your changes, you need to satisfy the following requirements first:++* Make sure you have your own github pages \(username.github.io\) repo, [click here](https://pages.github.com/)+* In your local fork of kepler.gl, add your github pages repo to the list of git remotes by doing:++```bash+git remote add test [email protected]:<username>/<username>.github.io.git+```++With the above command, A new origin **test** will be created, and your own testing copy of gh pages will be push to it.++When everything is set up, run the following command:++```bash+yarn deploy:test+```++The above command will build the website and push to your gh-pages branch.+diff --git a/docs/README.md b/docs/README.mdindex 4d798228b..f83914d01 100644--- a/docs/README.md+++ b/docs/README.md@@ -1,3 +1,4 @@# kepler.glWelcome to kepler.gl.+diff --git a/docs/api-reference/README.md b/docs/api-reference/README.mdnew file mode 100644index 000000000..4271734c6--- /dev/null+++ b/docs/api-reference/README.md@@ -0,0 +1,37 @@+# API References++## Table of Content++* [Overview](./#overview)+* [Ecosystem](ecosystem.md)+ * [Component](ecosystem.md#component)+ * [Reducer and Forward Dispatcher](ecosystem.md#reducer-and-forward-dispatcher)+ * [Actions and Updaters](ecosystem.md#actions-and-updaters)+ * [Processors and Schema Manager](ecosystem.md#processors-and-schema-manager)+* [Get Started](get-started.md)+* Advanced Usage+ * [Using reducer plugin](advanced-usages/reducer-plugin.md)+ * [Custom reducer initial state](advanced-usages/custom-initial-state.md)+ * [Using updaters to modify kepler.gl state](advanced-usages/using-updaters.md)+ * [Forward actions](advanced-usages/forward-actions.md)+ * [Saving and loading maps with schema manager](advanced-usages/saving-loading-w-schema.md)+ * [Replace UI component](advanced-usages/replace-ui-component.md)+ * [Custom Mapbox Host](advanced-usages/custom-mapbox-host.md)+* API+ * [Components](components/overview.md)+ * [Reducers](reducers/overview.md)+ * [Actions and Updaters](actions/actions.md)+ * [Data Processor]()+ * [Schemas](schemas/overview.md)+ * [Cloud Providers](cloud-providers/)++## Overview++Kepler.gl is a **Redux-connected** component. You can embed kepler.gl in your App, which uses redux to manage its state. The basic implementation of kepler.gl reducer is simple. However, to make the most of it, it's recommended to have basic knowledge on:++* [React](https://reactjs.org/)+* [Redux](https://redux.js.org/) state container+* [React Redux connect](https://react-redux.js.org/)++To start out with kepler.gl, you simply need to add the Kepler.gl UI component and mount the Kepler.gl reducer. To give the user full access of all the functionalities of kepler.gl, this package also includes actions, schema managers and a set of utilities to load and save map data.+diff --git a/docs/api-reference/actions/README.md b/docs/api-reference/actions/README.mdnew file mode 100644index 000000000..7a0fbadc7--- /dev/null+++ b/docs/api-reference/actions/README.md@@ -0,0 +1,2 @@+# Actions and updaters+diff --git a/docs/api-reference/actions/actions.md b/docs/api-reference/actions/actions.mdindex 5e3326cd1..ec4beb24e 100644--- a/docs/api-reference/actions/actions.md+++ b/docs/api-reference/actions/actions.md@@ -1,90 +1,90 @@-<!-- Generated by documentation.js. Update this documentation by updating the source code. -->+# Actions### Table of Contents-- [forwardActions][1]- - [forwardTo][2]- - [isForwardAction][5]- - [unwrap][7]- - [wrapTo][9]-- [ActionTypes][12]-- [mapStyleActions][14]- - [addCustomMapStyle][15]- - [inputMapStyle][16]- - [loadCustomMapStyle][18]- - [loadMapStyleErr][20]- - [loadMapStyles][22]- - [mapConfigChange][24]- - [mapStyleChange][26]- - [requestMapStyles][28]- - [set3dBuildingColor][30]-- [main][32]- - [addDataToMap][33]- - [keplerGlInit][36]- - [receiveMapConfig][38]- - [resetMapConfig][41]-- [visStateActions][42]- - [addFilter][43]- - [addLayer][45]- - [applyCPUFilter][47]- - [enlargeFilter][49]- - [interactionConfigChange][51]- - [layerConfigChange][53]- - [layerTextLabelChange][55]- - [layerTypeChange][57]- - [layerVisConfigChange][59]- - [layerVisualChannelConfigChange][61]- - [loadFiles][63]- - [loadFilesErr][65]- - [onLayerClick][67]- - [onLayerHover][69]- - [onMapClick][71]- - [onMouseMove][72]- - [removeDataset][74]- - [removeFilter][76]- - [removeLayer][78]- - [reorderLayer][80]- - [setEditorMode][83]- - [setFilter][86]- - [setFilterPlot][88]- - [setMapInfo][90]- - [showDatasetTable][92]- - [toggleFilterAnimation][94]- - [toggleLayerForMap][96]- - [updateAnimationTime][98]- - [updateFilterAnimationSpeed][100]- - [updateLayerAnimationSpeed][102]- - [updateLayerBlending][104]- - [updateVisData][106]-- [uiStateActions][108]- - [addNotification][109]- - [cleanupExportImage][111]- - [hideExportDropdown][112]- - [openDeleteModal][113]- - [removeNotification][115]- - [setExportData][117]- - [setExportDataType][118]- - [setExportFiltered][120]- - [setExportImageDataUri][122]- - [setExportImageSetting][124]- - [setExportSelectedDataset][126]- - [setUserMapboxAccessToken][128]- - [showExportDropdown][130]- - [startExportingImage][132]- - [toggleMapControl][133]- - [toggleModal][135]- - [toggleSidePanel][137]-- [rootActions][139]- - [deleteEntry][140]- - [registerEntry][142]- - [renameEntry][144]-- [mapStateActions][146]- - [fitBounds][147]- - [togglePerspective][150]- - [toggleSplitMap][152]- - [updateMap][155]-- [layerColorUIChange][158]-- [setExportMapFormat][160]+* [forwardActions](actions.md#forwardactions)+ * [forwardTo](actions.md#forwardto)+ * [isForwardAction](actions.md#isforwardaction)+ * [unwrap](actions.md#unwrap)+ * [wrapTo](actions.md#wrapto)+* [ActionTypes](actions.md#actiontypes)+* [mapStyleActions](actions.md#mapstyleactions)+ * [addCustomMapStyle](actions.md#addcustommapstyle)+ * [inputMapStyle](actions.md#inputmapstyle)+ * [loadCustomMapStyle](actions.md#loadcustommapstyle)+ * [loadMapStyleErr](actions.md#loadmapstyleerr)+ * [loadMapStyles](actions.md#loadmapstyles)+ * [mapConfigChange](actions.md#mapconfigchange)+ * [mapStyleChange](actions.md#mapstylechange)+ * [requestMapStyles](actions.md#requestmapstyles)+ * [set3dBuildingColor](actions.md#set3dbuildingcolor)+* [main](actions.md#main)+ * [addDataToMap](actions.md#adddatatomap)+ * [keplerGlInit](actions.md#keplerglinit)+ * [receiveMapConfig](actions.md#receivemapconfig)+ * [resetMapConfig](actions.md#resetmapconfig)+* [visStateActions](actions.md#visstateactions)+ * [addFilter](actions.md#addfilter)+ * [addLayer](actions.md#addlayer)+ * [applyCPUFilter](actions.md#applycpufilter)+ * [enlargeFilter](actions.md#enlargefilter)+ * [interactionConfigChange](actions.md#interactionconfigchange)+ * [layerConfigChange](actions.md#layerconfigchange)+ * [layerTextLabelChange](actions.md#layertextlabelchange)+ * [layerTypeChange](actions.md#layertypechange)+ * [layerVisConfigChange](actions.md#layervisconfigchange)+ * [layerVisualChannelConfigChange](actions.md#layervisualchannelconfigchange)+ * [loadFiles](actions.md#loadfiles)+ * [loadFilesErr](actions.md#loadfileserr)+ * [onLayerClick](actions.md#onlayerclick)+ * [onLayerHover](actions.md#onlayerhover)+ * [onMapClick](actions.md#onmapclick)+ * [onMouseMove](actions.md#onmousemove)+ * [removeDataset](actions.md#removedataset)+ * [removeFilter](actions.md#removefilter)+ * [removeLayer](actions.md#removelayer)+ * [reorderLayer](actions.md#reorderlayer)+ * [setEditorMode](actions.md#seteditormode)+ * [setFilter](actions.md#setfilter)+ * [setFilterPlot](actions.md#setfilterplot)+ * [setMapInfo](actions.md#setmapinfo)+ * [showDatasetTable](actions.md#showdatasettable)+ * [toggleFilterAnimation](actions.md#togglefilteranimation)+ * [toggleLayerForMap](actions.md#togglelayerformap)+ * [updateAnimationTime](actions.md#updateanimationtime)+ * [updateFilterAnimationSpeed](actions.md#updatefilteranimationspeed)+ * [updateLayerAnimationSpeed](actions.md#updatelayeranimationspeed)+ * [updateLayerBlending](actions.md#updatelayerblending)+ * [updateVisData](actions.md#updatevisdata)+* [uiStateActions](actions.md#uistateactions)+ * [addNotification](actions.md#addnotification)+ * [cleanupExportImage](actions.md#cleanupexportimage)+ * [hideExportDropdown](actions.md#hideexportdropdown)+ * [openDeleteModal](actions.md#opendeletemodal)+ * [removeNotification](actions.md#removenotification)+ * [setExportData](actions.md#setexportdata)+ * [setExportDataType](actions.md#setexportdatatype)+ * [setExportFiltered](actions.md#setexportfiltered)+ * [setExportImageDataUri](actions.md#setexportimagedatauri)+ * [setExportImageSetting](actions.md#setexportimagesetting)+ * [setExportSelectedDataset](actions.md#setexportselecteddataset)+ * [setUserMapboxAccessToken](actions.md#setusermapboxaccesstoken)+ * [showExportDropdown](actions.md#showexportdropdown)+ * [startExportingImage](actions.md#startexportingimage)+ * [toggleMapControl](actions.md#togglemapcontrol)+ * [toggleModal](actions.md#togglemodal)+ * [toggleSidePanel](actions.md#togglesidepanel)+* [rootActions](actions.md#rootactions)+ * [deleteEntry](actions.md#deleteentry)+ * [registerEntry](actions.md#registerentry)+ * [renameEntry](actions.md#renameentry)+* [mapStateActions](actions.md#mapstateactions)+ * [fitBounds](actions.md#fitbounds)+ * [togglePerspective](actions.md#toggleperspective)+ * [toggleSplitMap](actions.md#togglesplitmap)+ * [updateMap](actions.md#updatemap)+* [layerColorUIChange](actions.md#layercoloruichange)+* [setExportMapFormat](actions.md#setexportmapformat)## forwardActions@@ -96,8 +96,8 @@ Returns an action dispatcher that wraps and forwards the actions to a specific i**Parameters**-- `id` **[string][162]** instance id-- `dispatch` **[Function][163]** action dispatcher+* `id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) instance id+* `dispatch` [**Function**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) action dispatcher**Examples**@@ -129,9 +129,9 @@ Whether an action is a forward action**Parameters**-- `action` **[Object][164]** the action object+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) the action object-Returns **[boolean][165]** boolean - whether the action is a forward action+Returns [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) boolean - whether the action is a forward action### unwrap@@ -139,21 +139,19 @@ Unwrap an action**Parameters**-- `action` **[Object][164]** the action object+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) the action object-Returns **[Object][164]** unwrapped action+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) unwrapped action### wrapTo-Wrap an action into a forward action that only modify the state of a specific-kepler.gl instance. kepler.gl reducer will look for signatures in the action to-determine whether it needs to be forwarded to a specific instance reducer.+Wrap an action into a forward action that only modify the state of a specific kepler.gl instance. kepler.gl reducer will look for signatures in the action to determine whether it needs to be forwarded to a specific instance reducer.wrapTo can be curried. You can create a curried action wrapper by only supply the `id` argumentA forward action looks like this-```js+```javascript{type: "@@kepler.gl/LAYER_CONFIG_CHANGE",payload: {@@ -174,8 +172,8 @@ A forward action looks like this**Parameters**-- `id` **[string][162]** The id to forward to-- `action` **[Object][164]** the action object {type: string, payload: \*}+* `id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) The id to forward to+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) the action object {type: string, payload: \*}**Examples**@@ -194,7 +192,7 @@ this.props.dispatch(wrapToMap1(togglePerspective()));Kepler.gl action types, can be listened by reducers to perform additional tasks whenever an action is called in kepler.gl-Type: [Object][164]+Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**Examples**@@ -225,156 +223,154 @@ export default createStore(reducers, {}, applyMiddleware(taskMiddleware))## mapStyleActions-Actions handled mostly by `mapStyle` reducer.-They manage the display of base map, such as loading and receiving base map styles,-hiding and showing map layers, user input of custom map style url.+Actions handled mostly by `mapStyle` reducer. They manage the display of base map, such as loading and receiving base map styles, hiding and showing map layers, user input of custom map style url.### addCustomMapStyle-Add map style from user input to reducer and set it to current style-This action is called when user click confirm after putting in a valid style url in the custom map style dialog.-It should not be called from outside kepler.gl without a valid `inputStyle` in the `mapStyle` reducer.-param {void}+Add map style from user input to reducer and set it to current style This action is called when user click confirm after putting in a valid style url in the custom map style dialog. It should not be called from outside kepler.gl without a valid `inputStyle` in the `mapStyle` reducer. param {void}-- **ActionTypes**: [`ActionTypes.ADD_CUSTOM_MAP_STYLE`][12]-- **Updaters**: [`mapStyleUpdaters.addCustomMapStyleUpdater`][166]+* **ActionTypes**: [`ActionTypes.ADD_CUSTOM_MAP_STYLE`](actions.md#actiontypes)+* **Updaters**: [`mapStyleUpdaters.addCustomMapStyleUpdater`](../reducers/map-style.md#mapstyleupdatersaddcustommapstyleupdater)### inputMapStyleInput a custom map style object-- **ActionTypes**: [`ActionTypes.INPUT_MAP_STYLE`][12]-- **Updaters**: [`mapStyleUpdaters.inputMapStyleUpdater`][167]+* **ActionTypes**: [`ActionTypes.INPUT_MAP_STYLE`](actions.md#actiontypes)+* **Updaters**: [`mapStyleUpdaters.inputMapStyleUpdater`](../reducers/map-style.md#mapstyleupdatersinputmapstyleupdater)**Parameters**-- `inputStyle` **[Object][164]**- - `inputStyle.url` **[string][162]** style url e.g. `'mapbox://styles/heshan/xxxxxyyyyzzz'`- - `inputStyle.id` **[string][162]** style url e.g. `'custom_style_1'`- - `inputStyle.style` **[Object][164]** actual mapbox style json- - `inputStyle.name` **[string][162]** style name- - `inputStyle.layerGroups` **[Object][164]** layer groups that can be used to set map layer visibility- - `inputStyle.icon` **[Object][164]** icon image data url-- `mapState` **[Object][164]** mapState is optional+* `inputStyle` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `inputStyle.url` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) style url e.g. `'mapbox://styles/heshan/xxxxxyyyyzzz'`+ * `inputStyle.id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) style url e.g. `'custom_style_1'`+ * `inputStyle.style` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) actual mapbox style json+ * `inputStyle.name` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) style name+ * `inputStyle.layerGroups` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) layer groups that can be used to set map layer visibility+ * `inputStyle.icon` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) icon image data url+* `mapState` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) mapState is optional### loadCustomMapStyleCallback when a custom map style object is received-- **ActionTypes**: [`ActionTypes.LOAD_CUSTOM_MAP_STYLE`][12]-- **Updaters**: [`mapStyleUpdaters.loadCustomMapStyleUpdater`][168]+* **ActionTypes**: [`ActionTypes.LOAD_CUSTOM_MAP_STYLE`](actions.md#actiontypes)+* **Updaters**: [`mapStyleUpdaters.loadCustomMapStyleUpdater`](../reducers/map-style.md#mapstyleupdatersloadcustommapstyleupdater)**Parameters**-- `customMapStyle` **[Object][164]**- - `customMapStyle.icon` **[string][162]**- - `customMapStyle.style` **[Object][164]**- - `customMapStyle.error` **any**+* `customMapStyle` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `customMapStyle.icon` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)+ * `customMapStyle.style` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `customMapStyle.error` **any**### loadMapStyleErrCallback when load map style error-- **ActionTypes**: [`ActionTypes.LOAD_MAP_STYLE_ERR`][12]-- **Updaters**: [`mapStyleUpdaters.loadMapStyleErrUpdater`][169]+* **ActionTypes**: [`ActionTypes.LOAD_MAP_STYLE_ERR`](actions.md#actiontypes)+* **Updaters**: [`mapStyleUpdaters.loadMapStyleErrUpdater`](../reducers/map-style.md#mapstyleupdatersloadmapstyleerrupdater)**Parameters**-- `error` **any**+* `error` **any**### loadMapStylesCallback when load map style success-- **ActionTypes**: [`ActionTypes.LOAD_MAP_STYLES`][12]-- **Updaters**: [`mapStyleUpdaters.loadMapStylesUpdater`][170]+* **ActionTypes**: [`ActionTypes.LOAD_MAP_STYLES`](actions.md#actiontypes)+* **Updaters**: [`mapStyleUpdaters.loadMapStylesUpdater`](../reducers/map-style.md#mapstyleupdatersloadmapstylesupdater)**Parameters**-- `newStyles` **[Object][164]** a `{[id]: style}` mapping+* `newStyles` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) a `{[id]: style}` mapping### mapConfigChangeUpdate `visibleLayerGroups`to change layer group visibility-- **ActionTypes**: [`ActionTypes.MAP_CONFIG_CHANGE`][12]-- **Updaters**: [`mapStyleUpdaters.mapConfigChangeUpdater`][171]+* **ActionTypes**: [`ActionTypes.MAP_CONFIG_CHANGE`](actions.md#actiontypes)+* **Updaters**: [`mapStyleUpdaters.mapConfigChangeUpdater`](../reducers/map-style.md#mapstyleupdatersmapconfigchangeupdater)**Parameters**-- `mapStyle` **[Object][164]** new config `{visibleLayerGroups: {label: false, road: true, background: true}}`+* `mapStyle` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) new config `{visibleLayerGroups: {label: false, road: true, background: true}}`### mapStyleChangeChange to another map style. The selected style should already been loaded into `mapStyle.mapStyles`-- **ActionTypes**: [`ActionTypes.MAP_STYLE_CHANGE`][12]-- **Updaters**: [`mapStyleUpdaters.mapStyleChangeUpdater`][172]+* **ActionTypes**: [`ActionTypes.MAP_STYLE_CHANGE`](actions.md#actiontypes)+* **Updaters**: [`mapStyleUpdaters.mapStyleChangeUpdater`](../reducers/map-style.md#mapstyleupdatersmapstylechangeupdater)**Parameters**-- `styleType` **[string][162]** the style to change to+* `styleType` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) the style to change to### requestMapStylesRequest map style style object based on style.url.-- **ActionTypes**: [`ActionTypes.REQUEST_MAP_STYLES`][12]-- **Updaters**: [`mapStyleUpdaters.requestMapStylesUpdater`][173]+* **ActionTypes**: [`ActionTypes.REQUEST_MAP_STYLES`](actions.md#actiontypes)+* **Updaters**: [`mapStyleUpdaters.requestMapStylesUpdater`](../reducers/map-style.md#mapstyleupdatersrequestmapstylesupdater)**Parameters**-- `mapStyles` **[Array][174]<[Object][164]>**+* `mapStyles` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>**### set3dBuildingColorSet 3d building layer group color-- **ActionTypes**: [`ActionTypes.SET_3D_BUILDING_COLOR`][12]-- **Updaters**: [`mapStyleUpdaters.set3dBuildingColorUpdater`][175]+* **ActionTypes**: [`ActionTypes.SET_3D_BUILDING_COLOR`](actions.md#actiontypes)+* **Updaters**: [`mapStyleUpdaters.set3dBuildingColorUpdater`](../reducers/map-style.md#mapstyleupdatersset3dbuildingcolorupdater)**Parameters**-- `color` **[Array][174]** [r, g, b]+* `color` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) \[r, g, b\]## main-Main kepler.gl actions, these actions handles loading data and config into kepler.gl reducer. These actions-is listened by all subreducers,+Main kepler.gl actions, these actions handles loading data and config into kepler.gl reducer. These actions is listened by all subreducers,### addDataToMap-Add data to kepler.gl reducer, prepare map with preset configuration if config is passed.-Kepler.gl provides a handy set of utils to parse data from different formats to the `data` object required in dataset. You rarely need to manually format the data obejct.+Add data to kepler.gl reducer, prepare map with preset configuration if config is passed. Kepler.gl provides a handy set of utils to parse data from different formats to the `data` object required in dataset. You rarely need to manually format the data obejct.-Use `KeplerGlSchema.getConfigToSave` to generate a json blob of the currents instance config.-The config object value will always have higher precedence than the options properties.+Use `KeplerGlSchema.getConfigToSave` to generate a json blob of the currents instance config. The config object value will always have higher precedence than the options properties.-Kepler.gl uses `dataId` in the config to match with loaded dataset. If you pass a config object, you need-to match the `info.id` of your dataset to the `dataId` in each `layer`, `filter` and `interactionConfig.tooltips.fieldsToShow`+Kepler.gl uses `dataId` in the config to match with loaded dataset. If you pass a config object, you need to match the `info.id` of your dataset to the `dataId` in each `layer`, `filter` and `interactionConfig.tooltips.fieldsToShow`-- **ActionTypes**: [`ActionTypes.ADD_DATA_TO_MAP`][12]-- **Updaters**: [`combinedUpdaters.addDataToMapUpdater`][176]+* **ActionTypes**: [`ActionTypes.ADD_DATA_TO_MAP`](actions.md#actiontypes)+* **Updaters**: [`combinedUpdaters.addDataToMapUpdater`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/reducers/composers.md#combinedupdatersadddatatomapupdater)**Parameters**-- `data` **[Object][164]**- - `data.datasets` **([Array][174]<[Object][164]> | [Object][164])** **\*required** datasets can be a dataset or an array of datasets- Each dataset object needs to have `info` and `data` property.- - `data.datasets.info` **[Object][164]** \-info of a dataset- - `data.datasets.info.id` **[string][162]** id of this dataset. If config is defined, `id` should matches the `dataId` in config.- - `data.datasets.info.label` **[string][162]** A display name of this dataset- - `data.datasets.data` **[Object][164]** **\*required** The data object, in a tabular format with 2 properties `fields` and `rows`- - `data.datasets.data.fields` **[Array][174]<[Object][164]>** **\*required** Array of fields,- - `data.datasets.data.fields.name` **[string][162]** **\*required** Name of the field,- - `data.datasets.data.rows` **[Array][174]<[Array][174]>** **\*required** Array of rows, in a tabular format with `fields` and `rows`- - `data.options` **[Object][164]**- - `data.options.centerMap` **[boolean][165]** `default: true` if `centerMap` is set to `true` kepler.gl will- place the map view within the data points boundaries. `options.centerMap` will override `config.mapState` if passed in.- - `data.options.readOnly` **[boolean][165]** `default: false` if `readOnly` is set to `true`- the left setting panel will be hidden- - `data.options.keepExistingConfig` **[boolean][165]** whether to keep exiting map data and associated layer filter interaction config `default: false`.- - `data.config` **[Object][164]** this object will contain the full kepler.gl instance configuration {mapState, mapStyle, visState}+* `data` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `data.datasets` **\(**[**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**> \|** [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**\)** **\*required** datasets can be a dataset or an array of datasets++ Each dataset object needs to have `info` and `data` property.++ * `data.datasets.info` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) -info of a dataset+ * `data.datasets.info.id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) id of this dataset. If config is defined, `id` should matches the `dataId` in config.+ * `data.datasets.info.label` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) A display name of this dataset+ * `data.datasets.data` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) **\*required** The data object, in a tabular format with 2 properties `fields` and `rows`+ * `data.datasets.data.fields` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>** **\*required** Array of fields,+ * `data.datasets.data.fields.name` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\*required** Name of the field,+ * `data.datasets.data.rows` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**>** **\*required** Array of rows, in a tabular format with `fields` and `rows`++ * `data.options` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `data.options.centerMap` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) `default: true` if `centerMap` is set to `true` kepler.gl will++ place the map view within the data points boundaries. `options.centerMap` will override `config.mapState` if passed in.++ * `data.options.readOnly` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) `default: false` if `readOnly` is set to `true`++ the left setting panel will be hidden++ * `data.options.keepExistingConfig` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) whether to keep exiting map data and associated layer filter interaction config `default: false`.+ * `data.config` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) this object will contain the full kepler.gl instance configuration {mapState, mapStyle, visState}**Examples**@@ -436,41 +432,40 @@ this.props.dispatch(Initialize kepler.gl reducer. It is used to pass in `mapboxApiAccessToken` to `mapStyle` reducer.-- **ActionTypes**: [`ActionTypes.INIT`][12]-- **Updaters**: [`mapStyleUpdaters.initMapStyleUpdater`][177]+* **ActionTypes**: [`ActionTypes.INIT`](actions.md#actiontypes)+* **Updaters**: [`mapStyleUpdaters.initMapStyleUpdater`](../reducers/map-style.md#mapstyleupdatersinitmapstyleupdater)**Parameters**-- `payload` **[Object][164]**- - `payload.mapboxApiAccessToken` **[string][162]** mapboxApiAccessToken to be saved to mapStyle reducer- - `payload.mapboxApiUrl` **[string][162]** mapboxApiUrl to be saved to mapStyle reducer.- - `payload.mapStylesReplaceDefault` **[Boolean][165]** mapStylesReplaceDefault to be saved to mapStyle reducer+* `payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `payload.mapboxApiAccessToken` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) mapboxApiAccessToken to be saved to mapStyle reducer+ * `payload.mapboxApiUrl` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) mapboxApiUrl to be saved to mapStyle reducer.+ * `payload.mapStylesReplaceDefault` [**Boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) mapStylesReplaceDefault to be saved to mapStyle reducer### receiveMapConfig-Pass config to kepler.gl instance, prepare the state with preset configs.-Calling `KeplerGlSchema.parseSavedConfig` to convert saved config before passing it in is required.+Pass config to kepler.gl instance, prepare the state with preset configs. Calling `KeplerGlSchema.parseSavedConfig` to convert saved config before passing it in is required.-You can call `receiveMapConfig` before passing in any data. The reducer will store layer and filter config, waiting for-data to come in. When data arrives, you can call `addDataToMap` without passing any config, and the reducer will try to match-preloaded configs. This behavior is designed to allow asynchronous data loading.+You can call `receiveMapConfig` before passing in any data. The reducer will store layer and filter config, waiting for data to come in. When data arrives, you can call `addDataToMap` without passing any config, and the reducer will try to match preloaded configs. This behavior is designed to allow asynchronous data loading.-It is also useful when you want to prepare the kepler.gl instance with some preset layer and filter settings.-**Note** Sequence is important, `receiveMapConfig` needs to be called **before** data is loaded. Currently kepler.gl doesn't allow calling `receiveMapConfig` after data is loaded.-It will reset current configuration first then apply config to it.+It is also useful when you want to prepare the kepler.gl instance with some preset layer and filter settings. **Note** Sequence is important, `receiveMapConfig` needs to be called **before** data is loaded. Currently kepler.gl doesn't allow calling `receiveMapConfig` after data is loaded. It will reset current configuration first then apply config to it.-- **ActionTypes**: [`ActionTypes.RECEIVE_MAP_CONFIG`][12]-- **Updaters**: [`mapStateUpdaters.receiveMapConfigUpdater`][178], [`mapStyleUpdaters.receiveMapConfigUpdater`][179], [`visStateUpdaters.receiveMapConfigUpdater`][180]+* **ActionTypes**: [`ActionTypes.RECEIVE_MAP_CONFIG`](actions.md#actiontypes)+* **Updaters**: [`mapStateUpdaters.receiveMapConfigUpdater`](../reducers/map-state.md#mapstateupdatersreceivemapconfigupdater), [`mapStyleUpdaters.receiveMapConfigUpdater`](../reducers/map-style.md#mapstyleupdatersreceivemapconfigupdater), [`visStateUpdaters.receiveMapConfigUpdater`](../reducers/vis-state.md#visstateupdatersreceivemapconfigupdater)**Parameters**-- `config` **[Object][164]** **\*required** The Config Object-- `options` **[Object][164]** **\*optional** The Option object- - `options.centerMap` **[boolean][165]** `default: true` if `centerMap` is set to `true` kepler.gl will- place the map view within the data points boundaries- - `options.readOnly` **[boolean][165]** `default: false` if `readOnly` is set to `true`- the left setting panel will be hidden- - `options.keepExistingConfig` **[boolean][165]** whether to keep exiting layer filter and interaction config `default: false`.+* `config` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) **\*required** The Config Object+* `options` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) **\*optional** The Option object+ * `options.centerMap` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) `default: true` if `centerMap` is set to `true` kepler.gl will++ place the map view within the data points boundaries++ * `options.readOnly` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) `default: false` if `readOnly` is set to `true`++ the left setting panel will be hidden++ * `options.keepExistingConfig` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) whether to keep exiting layer filter and interaction config `default: false`.**Examples**@@ -486,276 +481,272 @@ this.props.dispatch(receiveMapConfig(parsedConfig));Reset all sub-reducers to its initial state. This can be used to clear out all configuration in the reducer.-- **ActionTypes**: [`ActionTypes.RESET_MAP_CONFIG`][12]-- **Updaters**: [`mapStateUpdaters.resetMapConfigUpdater`][181], [`mapStyleUpdaters.resetMapConfigMapStyleUpdater`][182], [`mapStyleUpdaters.resetMapConfigMapStyleUpdater`][182], [`visStateUpdaters.resetMapConfigUpdater`][183]+* **ActionTypes**: [`ActionTypes.RESET_MAP_CONFIG`](actions.md#actiontypes)+* **Updaters**: [`mapStateUpdaters.resetMapConfigUpdater`](../reducers/map-state.md#mapstateupdatersresetmapconfigupdater), [`mapStyleUpdaters.resetMapConfigMapStyleUpdater`](../reducers/map-style.md#mapstyleupdatersresetmapconfigmapstyleupdater), [`mapStyleUpdaters.resetMapConfigMapStyleUpdater`](../reducers/map-style.md#mapstyleupdatersresetmapconfigmapstyleupdater), [`visStateUpdaters.resetMapConfigUpdater`](../reducers/vis-state.md#visstateupdatersresetmapconfigupdater)## visStateActions-Actions handled mostly by `visState` reducer.-They manage how data is processed, filtered and displayed on the map by operates on layers,-filters and interaction settings.+Actions handled mostly by `visState` reducer. They manage how data is processed, filtered and displayed on the map by operates on layers, filters and interaction settings.### addFilterAdd a new filter-- **ActionTypes**: [`ActionTypes.ADD_FILTER`][12]-- **Updaters**: [`visStateUpdaters.addFilterUpdater`][184]+* **ActionTypes**: [`ActionTypes.ADD_FILTER`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.addFilterUpdater`](../reducers/vis-state.md#visstateupdatersaddfilterupdater)**Parameters**-- `dataId` **[string][162]** dataset `id` this new filter is associated with+* `dataId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) dataset `id` this new filter is associated with-Returns **{type: ActionTypes.ADD_FILTER, dataId: dataId}**+Returns **{type: ActionTypes.ADD\_FILTER, dataId: dataId}**### addLayerAdd a new layer-- **ActionTypes**: [`ActionTypes.ADD_LAYER`][12]-- **Updaters**: [`visStateUpdaters.addLayerUpdater`][185]+* **ActionTypes**: [`ActionTypes.ADD_LAYER`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.addLayerUpdater`](../reducers/vis-state.md#visstateupdatersaddlayerupdater)**Parameters**-- `props` **[Object][164]** new layer props+* `props` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) new layer props-Returns **{type: ActionTypes.ADD_LAYER, props: props}**+Returns **{type: ActionTypes.ADD\_LAYER, props: props}**### applyCPUFilterTrigger CPU filter of selected dataset-- **ActionTypes**: [`ActionTypes.APPLY_CPU_FILTER`][12]-- **Updaters**: [`visStateUpdaters.applyCPUFilterUpdater`][186]+* **ActionTypes**: [`ActionTypes.APPLY_CPU_FILTER`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.applyCPUFilterUpdater`](../reducers/vis-state.md#visstateupdatersapplycpufilterupdater)**Parameters**-- `dataId` **([string][162] | Arrary<[string][162]>)** single dataId or an array of dataIds+* `dataId` **\(**[**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\| Arrary<**[**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**>\)** single dataId or an array of dataIds-Returns **{type: ActionTypes.APPLY_CPU_FILTER, dataId: [string][162]}**+Returns **{type: ActionTypes.APPLY\_CPU\_FILTER, dataId:** [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**}**### enlargeFilter-Show larger time filter at bottom for time playback (apply to time filter only)+Show larger time filter at bottom for time playback \(apply to time filter only\)-- **ActionTypes**: [`ActionTypes.ENLARGE_FILTER`][12]-- **Updaters**: [`visStateUpdaters.enlargeFilterUpdater`][187]+* **ActionTypes**: [`ActionTypes.ENLARGE_FILTER`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.enlargeFilterUpdater`](../reducers/vis-state.md#visstateupdatersenlargefilterupdater)**Parameters**-- `idx` **[Number][188]** index of filter to enlarge+* `idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) index of filter to enlarge-Returns **{type: ActionTypes.ENLARGE_FILTER, idx: idx}**+Returns **{type: ActionTypes.ENLARGE\_FILTER, idx: idx}**### interactionConfigChangeUpdate `interactionConfig`-- **ActionTypes**: [`ActionTypes.INTERACTION_CONFIG_CHANGE`][12]-- **Updaters**: [`visStateUpdaters.interactionConfigChangeUpdater`][189]+* **ActionTypes**: [`ActionTypes.INTERACTION_CONFIG_CHANGE`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.interactionConfigChangeUpdater`](../reducers/vis-state.md#visstateupdatersinteractionconfigchangeupdater)**Parameters**-- `config` **[Object][164]** new config as key value map: `{tooltip: {enabled: true}}`+* `config` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) new config as key value map: `{tooltip: {enabled: true}}`-Returns **{type: ActionTypes.INTERACTION_CONFIG_CHANGE, config: config}**+Returns **{type: ActionTypes.INTERACTION\_CONFIG\_CHANGE, config: config}**### layerConfigChangeUpdate layer base config: dataId, label, column, isVisible-- **ActionTypes**: [`ActionTypes.LAYER_CONFIG_CHANGE`][12]-- **Updaters**: [`visStateUpdaters.layerConfigChangeUpdater`][190]+* **ActionTypes**: [`ActionTypes.LAYER_CONFIG_CHANGE`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.layerConfigChangeUpdater`](../reducers/vis-state.md#visstateupdaterslayerconfigchangeupdater)**Parameters**-- `oldLayer` **[Object][164]** layer to be updated-- `newConfig` **[Object][164]** new config+* `oldLayer` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) layer to be updated+* `newConfig` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) new config-Returns **{type: ActionTypes.LAYER_CONFIG_CHANGE, oldLayer: oldLayer, newConfig: newConfig}**+Returns **{type: ActionTypes.LAYER\_CONFIG\_CHANGE, oldLayer: oldLayer, newConfig: newConfig}**### layerTextLabelChangeUpdate layer text label-- **ActionTypes**: [`ActionTypes.LAYER_TEXT_LABEL_CHANGE`][12]-- **Updaters**: [`visStateUpdaters.layerTextLabelChangeUpdater`][191]+* **ActionTypes**: [`ActionTypes.LAYER_TEXT_LABEL_CHANGE`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.layerTextLabelChangeUpdater`](../reducers/vis-state.md#visstateupdaterslayertextlabelchangeupdater)**Parameters**-- `oldLayer` **[Object][164]** layer to be updated-- `idx` **[Number][188]** \-`idx` of text label to be updated-- `prop` **[string][162]** `prop` of text label, e,g, `anchor`, `alignment`, `color`, `size`, `field`-- `value` **any** new value+* `oldLayer` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) layer to be updated+* `idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) -`idx` of text label to be updated+* `prop` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) `prop` of text label, e,g, `anchor`, `alignment`, `color`, `size`, `field`+* `value` **any** new value### layerTypeChangeUpdate layer type. Previews layer config will be copied if applicable.-- **ActionTypes**: [`ActionTypes.LAYER_TYPE_CHANGE`][12]-- **Updaters**: [`visStateUpdaters.layerTypeChangeUpdater`][192]+* **ActionTypes**: [`ActionTypes.LAYER_TYPE_CHANGE`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.layerTypeChangeUpdater`](../reducers/vis-state.md#visstateupdaterslayertypechangeupdater)**Parameters**-- `oldLayer` **[Object][164]** layer to be updated-- `newType` **[string][162]** new type+* `oldLayer` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) layer to be updated+* `newType` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) new type-Returns **{type: ActionTypes.LAYER_TYPE_CHANGE, oldLayer: oldLayer, newType: newType}**+Returns **{type: ActionTypes.LAYER\_TYPE\_CHANGE, oldLayer: oldLayer, newType: newType}**### layerVisConfigChangeUpdate layer `visConfig`-- **ActionTypes**: [`ActionTypes.LAYER_VIS_CONFIG_CHANGE`][12]-- **Updaters**: [`visStateUpdaters.layerVisConfigChangeUpdater`][193]+* **ActionTypes**: [`ActionTypes.LAYER_VIS_CONFIG_CHANGE`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.layerVisConfigChangeUpdater`](../reducers/vis-state.md#visstateupdaterslayervisconfigchangeupdater)**Parameters**-- `oldLayer` **[Object][164]** layer to be updated-- `newVisConfig` **[Object][164]** new visConfig as a key value map: e.g. `{opacity: 0.8}`+* `oldLayer` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) layer to be updated+* `newVisConfig` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) new visConfig as a key value map: e.g. `{opacity: 0.8}`-Returns **{type: ActionTypes.LAYER_VIS_CONFIG_CHANGE, oldLayer: oldLayer, newVisConfig: newVisConfig}**+Returns **{type: ActionTypes.LAYER\_VIS\_CONFIG\_CHANGE, oldLayer: oldLayer, newVisConfig: newVisConfig}**### layerVisualChannelConfigChangeUpdate layer visual channel-- **ActionTypes**: [`ActionTypes.LAYER_VISUAL_CHANNEL_CHANGE`][12]-- **Updaters**: [`visStateUpdaters.layerVisualChannelChangeUpdater`][194]+* **ActionTypes**: [`ActionTypes.LAYER_VISUAL_CHANNEL_CHANGE`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.layerVisualChannelChangeUpdater`](../reducers/vis-state.md#visstateupdaterslayervisualchannelchangeupdater)**Parameters**-- `oldLayer` **[Object][164]** layer to be updated-- `newConfig` **[Object][164]** new visual channel config-- `channel` **[string][162]** channel to be updated+* `oldLayer` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) layer to be updated+* `newConfig` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) new visual channel config+* `channel` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) channel to be updated-Returns **{type: ActionTypes.LAYER_VISUAL_CHANNEL_CHANGE, oldLayer: oldLayer, newConfig: newConfig, channel: channel}**+Returns **{type: ActionTypes.LAYER\_VISUAL\_CHANNEL\_CHANGE, oldLayer: oldLayer, newConfig: newConfig, channel: channel}**### loadFilesTrigger file loading dispatch `addDataToMap` if succeed, or `loadFilesErr` if failed-- **ActionTypes**: [`ActionTypes.LOAD_FILES`][12]-- **Updaters**: [`uiStateUpdaters.loadFilesUpdater`][195], [`visStateUpdaters.loadFilesUpdater`][196]+* **ActionTypes**: [`ActionTypes.LOAD_FILES`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.loadFilesUpdater`](../reducers/ui-state.md#uistateupdatersloadfilesupdater), [`visStateUpdaters.loadFilesUpdater`](../reducers/vis-state.md#visstateupdatersloadfilesupdater)**Parameters**-- `files` **[Array][174]<[Object][164]>** array of fileblob+* `files` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>** array of fileblob-Returns **{type: ActionTypes.LOAD_FILES, files: any}**+Returns **{type: ActionTypes.LOAD\_FILES, files: any}**### loadFilesErrTrigger loading file error-- **ActionTypes**: [`ActionTypes.LOAD_FILES_ERR`][12]-- **Updaters**: [`uiStateUpdaters.loadFilesErrUpdater`][197], [`visStateUpdaters.loadFilesErrUpdater`][198]+* **ActionTypes**: [`ActionTypes.LOAD_FILES_ERR`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.loadFilesErrUpdater`](../reducers/ui-state.md#uistateupdatersloadfileserrupdater), [`visStateUpdaters.loadFilesErrUpdater`](../reducers/vis-state.md#visstateupdatersloadfileserrupdater)**Parameters**-- `error` **any**+* `error` **any**-Returns **{type: ActionTypes.LOAD_FILES_ERR, error: [Object][164]}**+Returns **{type: ActionTypes.LOAD\_FILES\_ERR, error:** [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**}**### onLayerClickTrigger layer click event with clicked object-- **ActionTypes**: [`ActionTypes.LAYER_CLICK`][12]-- **Updaters**: [`visStateUpdaters.layerClickUpdater`][199]+* **ActionTypes**: [`ActionTypes.LAYER_CLICK`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.layerClickUpdater`](../reducers/vis-state.md#visstateupdaterslayerclickupdater)**Parameters**-- `info` **[Object][164]** Object clicked, returned by deck.gl+* `info` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Object clicked, returned by deck.gl-Returns **{type: ActionTypes.LAYER_CLICK, info: info}**+Returns **{type: ActionTypes.LAYER\_CLICK, info: info}**### onLayerHoverTrigger layer hover event with hovered object-- **ActionTypes**: [`ActionTypes.LAYER_HOVER`][12]-- **Updaters**: [`visStateUpdaters.layerHoverUpdater`][200]+* **ActionTypes**: [`ActionTypes.LAYER_HOVER`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.layerHoverUpdater`](../reducers/vis-state.md#visstateupdaterslayerhoverupdater)**Parameters**-- `info` **[Object][164]** Object hovered, returned by deck.gl+* `info` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Object hovered, returned by deck.gl-Returns **{type: ActionTypes.LAYER_HOVER, info: info}**+Returns **{type: ActionTypes.LAYER\_HOVER, info: info}**### onMapClickTrigger map click event, unselect clicked object-- **ActionTypes**: [`ActionTypes.MAP_CLICK`][12]-- **Updaters**: [`visStateUpdaters.mapClickUpdater`][201]+* **ActionTypes**: [`ActionTypes.MAP_CLICK`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.mapClickUpdater`](../reducers/vis-state.md#visstateupdatersmapclickupdater)-Returns **{type: ActionTypes.MAP_CLICK}**+Returns **{type: ActionTypes.MAP\_CLICK}**### onMouseMove-Trigger map mouse moveevent, payload would be-React-map-gl PointerEvent-[https://uber.github.io/react-map-gl/#/documentation/api-reference/pointer-event][202]+Trigger map mouse moveevent, payload would be React-map-gl PointerEvent [https://uber.github.io/react-map-gl/\#/documentation/api-reference/pointer-event](https://uber.github.io/react-map-gl/#/documentation/api-reference/pointer-event)-- **ActionTypes**: [`ActionTypes.MOUSE_MOVE`][12]-- **Updaters**: [`visStateUpdaters.mouseMoveUpdater`][203]+* **ActionTypes**: [`ActionTypes.MOUSE_MOVE`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.mouseMoveUpdater`](../reducers/vis-state.md#visstateupdatersmousemoveupdater)**Parameters**-- `evt` **[Object][164]** PointerEvent+* `evt` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) PointerEvent-Returns **{type: ActionTypes.MAP_CLICK}**+Returns **{type: ActionTypes.MAP\_CLICK}**### removeDatasetRemove a dataset and all layers, filters, tooltip configs that based on it-- **ActionTypes**: [`ActionTypes.REMOVE_DATASET`][12]-- **Updaters**: [`visStateUpdaters.removeDatasetUpdater`][204]+* **ActionTypes**: [`ActionTypes.REMOVE_DATASET`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.removeDatasetUpdater`](../reducers/vis-state.md#visstateupdatersremovedatasetupdater)**Parameters**-- `key` **[string][162]** dataset id+* `key` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) dataset id-Returns **{type: ActionTypes.REMOVE_DATASET, key: key}**+Returns **{type: ActionTypes.REMOVE\_DATASET, key: key}**### removeFilterRemove a filter from `visState.filters`, once a filter is removed, data will be re-filtered and layer will be updated-- **ActionTypes**: [`ActionTypes.REMOVE_FILTER`][12]-- **Updaters**: [`visStateUpdaters.removeFilterUpdater`][205]+* **ActionTypes**: [`ActionTypes.REMOVE_FILTER`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.removeFilterUpdater`](../reducers/vis-state.md#visstateupdatersremovefilterupdater)**Parameters**-- `idx` **[Number][188]** idx of filter to be removed+* `idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) idx of filter to be removed-Returns **{type: ActionTypes.REMOVE_FILTER, idx: idx}**+Returns **{type: ActionTypes.REMOVE\_FILTER, idx: idx}**### removeLayerRemove a layer-- **ActionTypes**: [`ActionTypes.REMOVE_LAYER`][12]-- **Updaters**: [`visStateUpdaters.removeLayerUpdater`][206]+* **ActionTypes**: [`ActionTypes.REMOVE_LAYER`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.removeLayerUpdater`](../reducers/vis-state.md#visstateupdatersremovelayerupdater)**Parameters**-- `idx` **[Number][188]** idx of layer to be removed+* `idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) idx of layer to be removed-Returns **{type: ActionTypes.REMOVE_LAYER, idx: idx}**+Returns **{type: ActionTypes.REMOVE\_LAYER, idx: idx}**### reorderLayerReorder layer, order is an array of layer indexes, index 0 will be the one at the bottom-- **ActionTypes**: [`ActionTypes.REORDER_LAYER`][12]-- **Updaters**: [`visStateUpdaters.reorderLayerUpdater`][207]+* **ActionTypes**: [`ActionTypes.REORDER_LAYER`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.reorderLayerUpdater`](../reducers/vis-state.md#visstateupdatersreorderlayerupdater)**Parameters**-- `order` **[Array][174]<[Number][188]>** an array of layer indexes+* `order` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**>** an array of layer indexes**Examples**@@ -765,18 +756,18 @@ Reorder layer, order is an array of layer indexes, index 0 will be the one at ththis.props.dispatch(reorderLayer([1, 0, 2, 3]));```-Returns **{type: ActionTypes.REORDER_LAYER, order: order}**+Returns **{type: ActionTypes.REORDER\_LAYER, order: order}**### setEditorModeSet the map mode-- **ActionTypes**: [`ActionTypes.SET_EDITOR_MODE`][12]-- **Updaters**: [`visStateUpdaters.setEditorModeUpdater`][208]+* **ActionTypes**: [`ActionTypes.SET_EDITOR_MODE`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.setEditorModeUpdater`](../reducers/vis-state.md#visstateupdatersseteditormodeupdater)**Parameters**-- `mode` **[string][162]** one of EDITOR_MODES+* `mode` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) one of EDITOR\_MODES**Examples**@@ -791,418 +782,413 @@ this.props.dispatch(setMapMode(EDITOR_MODES.DRAW_POLYGON));Update filter property-- **ActionTypes**: [`ActionTypes.SET_FILTER`][12]-- **Updaters**: [`visStateUpdaters.setFilterUpdater`][209]+* **ActionTypes**: [`ActionTypes.SET_FILTER`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.setFilterUpdater`](../reducers/vis-state.md#visstateupdaterssetfilterupdater)**Parameters**-- `idx` **[Number][188]** \-`idx` of filter to be updated-- `prop` **[string][162]** `prop` of filter, e,g, `dataId`, `name`, `value`-- `value` **any** new value-- `valueIndex` **[Number][188]** array properties like dataset require index in order to improve performance+* `idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) -`idx` of filter to be updated+* `prop` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) `prop` of filter, e,g, `dataId`, `name`, `value`+* `value` **any** new value+* `valueIndex` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) array properties like dataset require index in order to improve performance-Returns **{type: ActionTypes.SET_FILTER, idx: idx, prop: prop, value: value}**+Returns **{type: ActionTypes.SET\_FILTER, idx: idx, prop: prop, value: value}**### setFilterPlotSet the property of a filter plot-- **ActionTypes**: [`ActionTypes.SET_FILTER_PLOT`][12]-- **Updaters**: [`visStateUpdaters.setFilterPlotUpdater`][210]+* **ActionTypes**: [`ActionTypes.SET_FILTER_PLOT`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.setFilterPlotUpdater`](../reducers/vis-state.md#visstateupdaterssetfilterplotupdater)**Parameters**-- `idx` **[Number][188]**-- `newProp` **[Object][164]** key value mapping of new prop `{yAxis: 'histogram'}`+* `idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)+* `newProp` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) key value mapping of new prop `{yAxis: 'histogram'}`-Returns **{type: ActionTypes.SET_FILTER_PLOT, idx: any, newProp: any}**+Returns **{type: ActionTypes.SET\_FILTER\_PLOT, idx: any, newProp: any}**### setMapInfoSet the property of a filter plot-- **ActionTypes**: [`ActionTypes.SET_MAP_INFO`][12]-- **Updaters**: [`visStateUpdaters.setMapInfoUpdater`][211]+* **ActionTypes**: [`ActionTypes.SET_MAP_INFO`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.setMapInfoUpdater`](../reducers/vis-state.md#visstateupdaterssetmapinfoupdater)**Parameters**-- `info`-- `idx` **[Number][188]**-- `newProp` **[Object][164]** key value mapping of new prop `{yAxis: 'histogram'}`+* `info`+* `idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)+* `newProp` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) key value mapping of new prop `{yAxis: 'histogram'}`-Returns **{type: ActionTypes.SET_FILTER_PLOT, idx: any, newProp: any}**+Returns **{type: ActionTypes.SET\_FILTER\_PLOT, idx: any, newProp: any}**### showDatasetTableDisplay dataset table in a modal-- **ActionTypes**: [`ActionTypes.SHOW_DATASET_TABLE`][12]-- **Updaters**: [`visStateUpdaters.showDatasetTableUpdater`][212]+* **ActionTypes**: [`ActionTypes.SHOW_DATASET_TABLE`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.showDatasetTableUpdater`](../reducers/vis-state.md#visstateupdatersshowdatasettableupdater)**Parameters**-- `dataId` **[string][162]** dataset id to show in table+* `dataId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) dataset id to show in table-Returns **{type: ActionTypes.SHOW_DATASET_TABLE, dataId: dataId}**+Returns **{type: ActionTypes.SHOW\_DATASET\_TABLE, dataId: dataId}**### toggleFilterAnimationStart and end filter animation-- **ActionTypes**: [`ActionTypes.TOGGLE_FILTER_ANIMATION`][12]-- **Updaters**: [`visStateUpdaters.toggleFilterAnimationUpdater`][213]+* **ActionTypes**: [`ActionTypes.TOGGLE_FILTER_ANIMATION`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.toggleFilterAnimationUpdater`](../reducers/vis-state.md#visstateupdaterstogglefilteranimationupdater)**Parameters**-- `idx` **[Number][188]** idx of filter+* `idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) idx of filter-Returns **{type: ActionTypes.TOGGLE_FILTER_ANIMATION, idx: idx}**+Returns **{type: ActionTypes.TOGGLE\_FILTER\_ANIMATION, idx: idx}**### toggleLayerForMapToggle visibility of a layer in a split map-- **ActionTypes**: [`ActionTypes.TOGGLE_LAYER_FOR_MAP`][12]-- **Updaters**: [`visStateUpdaters.toggleLayerForMapUpdater`][214]+* **ActionTypes**: [`ActionTypes.TOGGLE_LAYER_FOR_MAP`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.toggleLayerForMapUpdater`](../reducers/vis-state.md#visstateupdaterstogglelayerformapupdater)**Parameters**-- `mapIndex` **[Number][188]** index of the split map-- `layerId` **[string][162]** id of the layer+* `mapIndex` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) index of the split map+* `layerId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) id of the layer-Returns **{type: ActionTypes.TOGGLE_LAYER_FOR_MAP, mapIndex: any, layerId: any}**+Returns **{type: ActionTypes.TOGGLE\_LAYER\_FOR\_MAP, mapIndex: any, layerId: any}**### updateAnimationTimeReset animation-- **ActionTypes**: [`ActionTypes.UPDATE_ANIMATION_TIME`][12]-- **Updaters**: [`visStateUpdaters.updateAnimationTimeUpdater`][215]+* **ActionTypes**: [`ActionTypes.UPDATE_ANIMATION_TIME`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.updateAnimationTimeUpdater`](../reducers/vis-state.md#visstateupdatersupdateanimationtimeupdater)**Parameters**-- `value` **[Number][188]** Current value of the slider+* `value` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) Current value of the slider-Returns **{type: ActionTypes.UPDATE_ANIMATION_TIME, value: value}**+Returns **{type: ActionTypes.UPDATE\_ANIMATION\_TIME, value: value}**### updateFilterAnimationSpeedChange filter animation speed-- **ActionTypes**: [`ActionTypes.UPDATE_FILTER_ANIMATION_SPEED`][12]-- **Updaters**: [`visStateUpdaters.updateFilterAnimationSpeedUpdater`][216]+* **ActionTypes**: [`ActionTypes.UPDATE_FILTER_ANIMATION_SPEED`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.updateFilterAnimationSpeedUpdater`](../reducers/vis-state.md#visstateupdatersupdatefilteranimationspeedupdater)**Parameters**-- `idx` **[Number][188]** `idx` of filter-- `speed` **[Number][188]** `speed` to change it to. `speed` is a multiplier+* `idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) `idx` of filter+* `speed` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) `speed` to change it to. `speed` is a multiplier-Returns **{type: ActionTypes.UPDATE_FILTER_ANIMATION_SPEED, idx: idx, speed: speed}**+Returns **{type: ActionTypes.UPDATE\_FILTER\_ANIMATION\_SPEED, idx: idx, speed: speed}**### updateLayerAnimationSpeedupdate trip layer animation speed-- **ActionTypes**: [`ActionTypes.UPDATE_LAYER_ANIMATION_SPEED`][12]-- **Updaters**: [`visStateUpdaters.updateLayerAnimationSpeedUpdater`][217]+* **ActionTypes**: [`ActionTypes.UPDATE_LAYER_ANIMATION_SPEED`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.updateLayerAnimationSpeedUpdater`](../reducers/vis-state.md#visstateupdatersupdatelayeranimationspeedupdater)**Parameters**-- `speed` **[Number][188]** `speed` to change it to. `speed` is a multiplier+* `speed` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) `speed` to change it to. `speed` is a multiplier-Returns **{type: ActionTypes.UPDATE_LAYER_ANIMATION_SPEED, speed: speed}**+Returns **{type: ActionTypes.UPDATE\_LAYER\_ANIMATION\_SPEED, speed: speed}**### updateLayerBlendingUpdate layer blending mode-- **ActionTypes**: [`ActionTypes.UPDATE_LAYER_BLENDING`][12]-- **Updaters**: [`visStateUpdaters.updateLayerBlendingUpdater`][218]+* **ActionTypes**: [`ActionTypes.UPDATE_LAYER_BLENDING`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.updateLayerBlendingUpdater`](../reducers/vis-state.md#visstateupdatersupdatelayerblendingupdater)**Parameters**-- `mode` **[string][162]** one of `additive`, `normal` and `subtractive`+* `mode` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) one of `additive`, `normal` and `subtractive`-Returns **{type: ActionTypes.UPDATE_LAYER_BLENDING, mode: mode}**+Returns **{type: ActionTypes.UPDATE\_LAYER\_BLENDING, mode: mode}**### updateVisDataAdd new dataset to `visState`, with option to load a map config along with the datasets-- **ActionTypes**: [`ActionTypes.UPDATE_VIS_DATA`][12]-- **Updaters**: [`visStateUpdaters.updateVisDataUpdater`][219]+* **ActionTypes**: [`ActionTypes.UPDATE_VIS_DATA`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.updateVisDataUpdater`](../reducers/vis-state.md#visstateupdatersupdatevisdataupdater)**Parameters**-- `datasets` **([Array][174]<[Object][164]> | [Object][164])** **\*required** datasets can be a dataset or an array of datasets- Each dataset object needs to have `info` and `data` property.- - `datasets.info` **[Object][164]** \-info of a dataset- - `datasets.info.id` **[string][162]** id of this dataset. If config is defined, `id` should matches the `dataId` in config.- - `datasets.info.label` **[string][162]** A display name of this dataset- - `datasets.data` **[Object][164]** **\*required** The data object, in a tabular format with 2 properties `fields` and `rows`- - `datasets.data.fields` **[Array][174]<[Object][164]>** **\*required** Array of fields,- - `datasets.data.fields.name` **[string][162]** **\*required** Name of the field,- - `datasets.data.rows` **[Array][174]<[Array][174]>** **\*required** Array of rows, in a tabular format with `fields` and `rows`-- `options` **[Object][164]**- - `options.centerMap` **[boolean][165]** `default: true` if `centerMap` is set to `true` kepler.gl will- place the map view within the data points boundaries- - `options.readOnly` **[boolean][165]** `default: false` if `readOnly` is set to `true`- the left setting panel will be hidden-- `config` **[Object][164]** this object will contain the full kepler.gl instance configuration {mapState, mapStyle, visState}--Returns **{type: ActionTypes.UPDATE_VIS_DATA, datasets: datasets, options: options, config: config}**+* `datasets` **\(**[**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**> \|** [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**\)** **\*required** datasets can be a dataset or an array of datasets++ Each dataset object needs to have `info` and `data` property.++ * `datasets.info` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) -info of a dataset+ * `datasets.info.id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) id of this dataset. If config is defined, `id` should matches the `dataId` in config.+ * `datasets.info.label` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) A display name of this dataset+ * `datasets.data` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) **\*required** The data object, in a tabular format with 2 properties `fields` and `rows`+ * `datasets.data.fields` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>** **\*required** Array of fields,+ * `datasets.data.fields.name` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\*required** Name of the field,+ * `datasets.data.rows` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**>** **\*required** Array of rows, in a tabular format with `fields` and `rows`++* `options` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `options.centerMap` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) `default: true` if `centerMap` is set to `true` kepler.gl will++ place the map view within the data points boundaries++ * `options.readOnly` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) `default: false` if `readOnly` is set to `true`++ the left setting panel will be hidden+* `config` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) this object will contain the full kepler.gl instance configuration {mapState, mapStyle, visState}++Returns **{type: ActionTypes.UPDATE\_VIS\_DATA, datasets: datasets, options: options, config: config}**## uiStateActions-Actions handled mostly by `uiState` reducer.-They manage UI changes in tha app, such as open and close side panel,-switch between tabs in the side panel, open and close modal dialog for exporting data / images etc.-It also manges which settings are selected during image and map export+Actions handled mostly by `uiState` reducer. They manage UI changes in tha app, such as open and close side panel, switch between tabs in the side panel, open and close modal dialog for exporting data / images etc. It also manges which settings are selected during image and map export### addNotificationAdd a notification to be displayed-- **ActionTypes**: [`ActionTypes.ADD_NOTIFICATION`][12]-- **Updaters**: [`uiStateUpdaters.addNotificationUpdater`][220]+* **ActionTypes**: [`ActionTypes.ADD_NOTIFICATION`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.addNotificationUpdater`](../reducers/ui-state.md#uistateupdatersaddnotificationupdater)**Parameters**-- `notification` **[Object][164]** The `notification` object to be added+* `notification` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) The `notification` object to be added### cleanupExportImageDelete cached export image-- **ActionTypes**: [`ActionTypes.CLEANUP_EXPORT_IMAGE`][12]-- **Updaters**: [`uiStateUpdaters.cleanupExportImage`][221]+* **ActionTypes**: [`ActionTypes.CLEANUP_EXPORT_IMAGE`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.cleanupExportImage`](../reducers/ui-state.md#uistateupdaterscleanupexportimage)### hideExportDropdownHide side panel header dropdown, activated by clicking the share link on top of the side panel-- **ActionTypes**: [`ActionTypes.HIDE_EXPORT_DROPDOWN`][12]-- **Updaters**: [`uiStateUpdaters.hideExportDropdownUpdater`][222]+* **ActionTypes**: [`ActionTypes.HIDE_EXPORT_DROPDOWN`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.hideExportDropdownUpdater`](../reducers/ui-state.md#uistateupdatershideexportdropdownupdater)### openDeleteModalToggle active map control panel-- **ActionTypes**: [`ActionTypes.OPEN_DELETE_MODAL`][12]-- **Updaters**: [`uiStateUpdaters.openDeleteModalUpdater`][223]+* **ActionTypes**: [`ActionTypes.OPEN_DELETE_MODAL`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.openDeleteModalUpdater`](../reducers/ui-state.md#uistateupdatersopendeletemodalupdater)**Parameters**-- `datasetId` **[string][162]** `id` of the dataset to be deleted+* `datasetId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) `id` of the dataset to be deleted### removeNotificationRemove a notification-- **ActionTypes**: [`ActionTypes.REMOVE_NOTIFICATION`][12]-- **Updaters**: [`uiStateUpdaters.removeNotificationUpdater`][224]+* **ActionTypes**: [`ActionTypes.REMOVE_NOTIFICATION`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.removeNotificationUpdater`](../reducers/ui-state.md#uistateupdatersremovenotificationupdater)**Parameters**-- `id` **[string][162]** `id` of the notification to be removed+* `id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) `id` of the notification to be removed### setExportDataWhether to including data in map config, toggle between `true` or `false`-- **ActionTypes**: [`ActionTypes.SET_EXPORT_DATA`][12]-- **Updaters**: [`uiStateUpdaters.setExportDataUpdater`][225]+* **ActionTypes**: [`ActionTypes.SET_EXPORT_DATA`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.setExportDataUpdater`](../reducers/ui-state.md#uistateupdaterssetexportdataupdater)### setExportDataTypeSet data format for exporting data-- **ActionTypes**: [`ActionTypes.SET_EXPORT_DATA_TYPE`][12]-- **Updaters**: [`uiStateUpdaters.setExportDataTypeUpdater`][226]+* **ActionTypes**: [`ActionTypes.SET_EXPORT_DATA_TYPE`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.setExportDataTypeUpdater`](../reducers/ui-state.md#uistateupdaterssetexportdatatypeupdater)**Parameters**-- `dataType` **[string][162]** one of `'text/csv'`+* `dataType` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) one of `'text/csv'`### setExportFilteredWhether to export filtered data, `true` or `false`-- **ActionTypes**: [`ActionTypes.SET_EXPORT_FILTERED`][12]-- **Updaters**: [`uiStateUpdaters.setExportFilteredUpdater`][227]+* **ActionTypes**: [`ActionTypes.SET_EXPORT_FILTERED`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.setExportFilteredUpdater`](../reducers/ui-state.md#uistateupdaterssetexportfilteredupdater)**Parameters**-- `payload` **[boolean][165]** set `true` to ony export filtered data+* `payload` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) set `true` to ony export filtered data### setExportImageDataUriSet `exportImage.setExportImageDataUri` to a dataUri-- **ActionTypes**: [`ActionTypes.SET_EXPORT_IMAGE_DATA_URI`][12]-- **Updaters**: [`uiStateUpdaters.setExportImageDataUri`][228]+* **ActionTypes**: [`ActionTypes.SET_EXPORT_IMAGE_DATA_URI`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.setExportImageDataUri`](../reducers/ui-state.md#uistateupdaterssetexportimagedatauri)**Parameters**-- `dataUri` **[string][162]** export image data uri+* `dataUri` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) export image data uri### setExportImageSettingSet `exportImage` settings: ratio, resolution, legend-- **ActionTypes**: [`ActionTypes.SET_EXPORT_IMAGE_SETTING`][12]-- **Updaters**: [`uiStateUpdaters.setExportImageSetting`][229]+* **ActionTypes**: [`ActionTypes.SET_EXPORT_IMAGE_SETTING`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.setExportImageSetting`](../reducers/ui-state.md#uistateupdaterssetexportimagesetting)**Parameters**-- `newSetting` **[Object][164]** {ratio: '1x'}+* `newSetting` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) {ratio: '1x'}### setExportSelectedDatasetSet selected dataset for export-- **ActionTypes**: [`ActionTypes.SET_EXPORT_SELECTED_DATASET`][12]-- **Updaters**: [`uiStateUpdaters.setExportSelectedDatasetUpdater`][230]+* **ActionTypes**: [`ActionTypes.SET_EXPORT_SELECTED_DATASET`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.setExportSelectedDatasetUpdater`](../reducers/ui-state.md#uistateupdaterssetexportselecteddatasetupdater)**Parameters**-- `datasetId` **[string][162]** dataset id+* `datasetId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) dataset id### setUserMapboxAccessTokenWhether we export a mapbox access token used to create a single map html file-- **ActionTypes**: [`ActionTypes.SET_USER_MAPBOX_ACCESS_TOKEN`][12]-- **Updaters**: [`uiStateUpdaters.setUserMapboxAccessTokenUpdater`][231]+* **ActionTypes**: [`ActionTypes.SET_USER_MAPBOX_ACCESS_TOKEN`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.setUserMapboxAccessTokenUpdater`](../reducers/ui-state.md#uistateupdaterssetusermapboxaccesstokenupdater)**Parameters**-- `payload` **[string][162]** mapbox access token+* `payload` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) mapbox access token### showExportDropdownHide and show side panel header dropdown, activated by clicking the share link on top of the side panel-- **ActionTypes**: [`ActionTypes.SHOW_EXPORT_DROPDOWN`][12]-- **Updaters**: [`uiStateUpdaters.showExportDropdownUpdater`][232]+* **ActionTypes**: [`ActionTypes.SHOW_EXPORT_DROPDOWN`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.showExportDropdownUpdater`](../reducers/ui-state.md#uistateupdatersshowexportdropdownupdater)**Parameters**-- `id` **[string][162]** id of the dropdown+* `id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) id of the dropdown### startExportingImageSet `exportImage.exporting` to true-- **ActionTypes**: [`ActionTypes.START_EXPORTING_IMAGE`][12]-- **Updaters**: [`uiStateUpdaters.startExportingImage`][233]+* **ActionTypes**: [`ActionTypes.START_EXPORTING_IMAGE`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.startExportingImage`](../reducers/ui-state.md#uistateupdatersstartexportingimage)### toggleMapControlToggle active map control panel-- **ActionTypes**: [`ActionTypes.TOGGLE_MAP_CONTROL`][12]-- **Updaters**: [`uiStateUpdaters.toggleMapControlUpdater`][234]+* **ActionTypes**: [`ActionTypes.TOGGLE_MAP_CONTROL`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.toggleMapControlUpdater`](../reducers/ui-state.md#uistateupdaterstogglemapcontrolupdater)**Parameters**-- `panelId` **[string][162]** map control panel id, one of the keys of: [`DEFAULT_MAP_CONTROLS`][235]+* `panelId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) map control panel id, one of the keys of: [`DEFAULT_MAP_CONTROLS`](actions.md#default_map_controls)### toggleModalShow and hide modal dialog-- **ActionTypes**: [`ActionTypes.TOGGLE_MODAL`][12]-- **Updaters**: [`uiStateUpdaters.toggleModalUpdater`][236]+* **ActionTypes**: [`ActionTypes.TOGGLE_MODAL`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.toggleModalUpdater`](../reducers/ui-state.md#uistateupdaterstogglemodalupdater)**Parameters**-- `id` **([string][162] | null)** id of modal to be shown, null to hide modals. One of:- [`DATA_TABLE_ID`][237]- - [`DELETE_DATA_ID`][238]- - [`ADD_DATA_ID`][239]- - [`EXPORT_IMAGE_ID`][240]- - [`EXPORT_DATA_ID`][241]- - [`ADD_MAP_STYLE_ID`][242]+* `id` **\(**[**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\| null\)** id of modal to be shown, null to hide modals. One of:- [`DATA_TABLE_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#data_table_id)+ * [`DELETE_DATA_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#delete_data_id)+ * [`ADD_DATA_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#add_data_id)+ * [`EXPORT_IMAGE_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#export_image_id)+ * [`EXPORT_DATA_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#export_data_id)+ * [`ADD_MAP_STYLE_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#add_map_style_id)### toggleSidePanelToggle active side panel-- **ActionTypes**: [`ActionTypes.TOGGLE_SIDE_PANEL`][12]-- **Updaters**: [`uiStateUpdaters.toggleSidePanelUpdater`][243]+* **ActionTypes**: [`ActionTypes.TOGGLE_SIDE_PANEL`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.toggleSidePanelUpdater`](../reducers/ui-state.md#uistateupdaterstogglesidepanelupdater)**Parameters**-- `id` **[string][162]** id of side panel to be shown, one of `layer`, `filter`, `interaction`, `map`+* `id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) id of side panel to be shown, one of `layer`, `filter`, `interaction`, `map`## rootActions-Root actions managers adding and removing instances in root reducer.-Under-the-hood, when a `KeplerGl` component is mounted or unmounted,-it will automatically calls these actions to add itself to the root reducer.-However, sometimes the data is ready before the component is registered in the reducer,-in this case, you can manually call these actions or the corresponding updater to add it to the reducer.+Root actions managers adding and removing instances in root reducer. Under-the-hood, when a `KeplerGl` component is mounted or unmounted, it will automatically calls these actions to add itself to the root reducer. However, sometimes the data is ready before the component is registered in the reducer, in this case, you can manually call these actions or the corresponding updater to add it to the reducer.### deleteEntry-Delete an instance from `keplerGlReducer`. This action is called under-the-hood when a `KeplerGl` component is **un-mounted** to the dom.-If `mint` is set to be `true` in the component prop, the instance state will be deleted from the root reducer. Otherwise, the root reducer will keep-the instance state and later transfer it to a newly mounted component with the same `id`+Delete an instance from `keplerGlReducer`. This action is called under-the-hood when a `KeplerGl` component is **un-mounted** to the dom. If `mint` is set to be `true` in the component prop, the instance state will be deleted from the root reducer. Otherwise, the root reducer will keep the instance state and later transfer it to a newly mounted component with the same `id`-- **ActionTypes**: [`ActionTypes.DELETE_ENTRY`][12]-- **Updaters**:+* **ActionTypes**: [`ActionTypes.DELETE_ENTRY`](actions.md#actiontypes)+* **Updaters**:**Parameters**-- `id` **[string][162]** the id of the instance to be deleted+* `id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) the id of the instance to be deleted### registerEntry-Add a new kepler.gl instance in `keplerGlReducer`. This action is called under-the-hood when a `KeplerGl` component is **mounted** to the dom.-Note that if you dispatch actions such as adding data to a kepler.gl instance before the React component is mounted, the action will not be-performed. Instance reducer can only handle actions when it is instantiated.+Add a new kepler.gl instance in `keplerGlReducer`. This action is called under-the-hood when a `KeplerGl` component is **mounted** to the dom. Note that if you dispatch actions such as adding data to a kepler.gl instance before the React component is mounted, the action will not be performed. Instance reducer can only handle actions when it is instantiated.-- **ActionTypes**: [`ActionTypes.REGISTER_ENTRY`][12]-- **Updaters**:+* **ActionTypes**: [`ActionTypes.REGISTER_ENTRY`](actions.md#actiontypes)+* **Updaters**:**Parameters**-- `payload` **[Object][164]**- - `payload.id` **[string][162]** **\*required** The id of the instance- - `payload.mint` **[boolean][165]** Whether to use a fresh empty state, when `mint: true` it will _always_ load a fresh state when the component is re-mounted.- When `mint: false` it will register with existing instance state under the same `id`, when the component is unmounted then mounted again. Default: `true`- - `payload.mapboxApiAccessToken` **[string][162]** mapboxApiAccessToken to be saved in `map-style` reducer.- - `payload.mapboxApiUrl` **[string][162]** mapboxApiUrl to be saved in `map-style` reducer.- - `payload.mapStylesReplaceDefault` **[Boolean][165]** mapStylesReplaceDefault to be saved in `map-style` reducer.+* `payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `payload.id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\*required** The id of the instance+ * `payload.mint` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) Whether to use a fresh empty state, when `mint: true` it will _always_ load a fresh state when the component is re-mounted.++ When `mint: false` it will register with existing instance state under the same `id`, when the component is unmounted then mounted again. Default: `true`++ * `payload.mapboxApiAccessToken` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) mapboxApiAccessToken to be saved in `map-style` reducer.+ * `payload.mapboxApiUrl` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) mapboxApiUrl to be saved in `map-style` reducer.+ * `payload.mapStylesReplaceDefault` [**Boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) mapStylesReplaceDefault to be saved in `map-style` reducer.### renameEntryRename an instance in the root reducer, keep its entire state-- **ActionTypes**: [`ActionTypes.RENAME_ENTRY`][12]-- **Updaters**:+* **ActionTypes**: [`ActionTypes.RENAME_ENTRY`](actions.md#actiontypes)+* **Updaters**:**Parameters**-- `oldId` **[string][162]** **\*required** old id-- `newId` **[string][162]** **\*required** new id+* `oldId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\*required** old id+* `newId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\*required** new id## mapStateActions-Actions handled mostly by `mapState` reducer.-They manage map viewport update, toggle between 2d and 3d map,-toggle between single and split maps.+Actions handled mostly by `mapState` reducer. They manage map viewport update, toggle between 2d and 3d map, toggle between single and split maps.### fitBoundsFit map viewport to bounds-- **ActionTypes**: [`ActionTypes.FIT_BOUNDS`][12]-- **Updaters**: [`mapStateUpdaters.fitBoundsUpdater`][244]+* **ActionTypes**: [`ActionTypes.FIT_BOUNDS`](actions.md#actiontypes)+* **Updaters**: [`mapStateUpdaters.fitBoundsUpdater`](../reducers/map-state.md#mapstateupdatersfitboundsupdater)**Parameters**-- `bounds` **[Array][174]<[Number][188]>** as `[lngMin, latMin, lngMax, latMax]`+* `bounds` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**>** as `[lngMin, latMin, lngMax, latMax]`**Examples**@@ -1215,8 +1201,8 @@ this.props.dispatch(fitBounds([-122.23, 37.127, -122.11, 37.456]));Toggle between 3d and 2d map.-- **ActionTypes**: [`ActionTypes.TOGGLE_PERSPECTIVE`][12]-- **Updaters**: [`mapStateUpdaters.togglePerspectiveUpdater`][245]+* **ActionTypes**: [`ActionTypes.TOGGLE_PERSPECTIVE`](actions.md#actiontypes)+* **Updaters**: [`mapStateUpdaters.togglePerspectiveUpdater`](../reducers/map-state.md#mapstateupdaterstoggleperspectiveupdater)**Examples**@@ -1229,12 +1215,12 @@ this.props.dispatch(togglePerspective());Toggle between single map or split maps-- **ActionTypes**: [`ActionTypes.TOGGLE_SPLIT_MAP`][12]-- **Updaters**: [`mapStateUpdaters.toggleSplitMapUpdater`][246], [`uiStateUpdaters.toggleSplitMapUpdater`][247], [`visStateUpdaters.toggleSplitMapUpdater`][248]+* **ActionTypes**: [`ActionTypes.TOGGLE_SPLIT_MAP`](actions.md#actiontypes)+* **Updaters**: [`mapStateUpdaters.toggleSplitMapUpdater`](../reducers/map-state.md#mapstateupdaterstogglesplitmapupdater), [`uiStateUpdaters.toggleSplitMapUpdater`](../reducers/ui-state.md#uistateupdaterstogglesplitmapupdater), [`visStateUpdaters.toggleSplitMapUpdater`](../reducers/vis-state.md#visstateupdaterstogglesplitmapupdater)**Parameters**-- `index` **[Number][188]?** index is provided, close split map at index+* `index` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**?** index is provided, close split map at index**Examples**@@ -1247,20 +1233,20 @@ this.props.dispatch(toggleSplitMap());Update map viewport-- **ActionTypes**: [`ActionTypes.UPDATE_MAP`][12]-- **Updaters**: [`mapStateUpdaters.updateMapUpdater`][249]+* **ActionTypes**: [`ActionTypes.UPDATE_MAP`](actions.md#actiontypes)+* **Updaters**: [`mapStateUpdaters.updateMapUpdater`](../reducers/map-state.md#mapstateupdatersupdatemapupdater)**Parameters**-- `viewport` **[Object][164]** viewport object container one or any of these properties `width`, `height`, `latitude` `longitude`, `zoom`, `pitch`, `bearing`, `dragRotate`- - `viewport.width` **[Number][188]?** Width of viewport- - `viewport.height` **[Number][188]?** Height of viewport- - `viewport.zoom` **[Number][188]?** Zoom of viewport- - `viewport.pitch` **[Number][188]?** Camera angle in degrees (0 is straight down)- - `viewport.bearing` **[Number][188]?** Map rotation in degrees (0 means north is up)- - `viewport.latitude` **[Number][188]?** Latitude center of viewport on map in mercator projection- - `viewport.longitude` **[Number][188]?** Longitude Center of viewport on map in mercator projection- - `viewport.dragRotate` **[boolean][165]?** Whether to enable drag and rotate map into perspective viewport+* `viewport` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) viewport object container one or any of these properties `width`, `height`, `latitude` `longitude`, `zoom`, `pitch`, `bearing`, `dragRotate`+ * `viewport.width` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**?** Width of viewport+ * `viewport.height` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**?** Height of viewport+ * `viewport.zoom` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**?** Zoom of viewport+ * `viewport.pitch` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**?** Camera angle in degrees \(0 is straight down\)+ * `viewport.bearing` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**?** Map rotation in degrees \(0 means north is up\)+ * `viewport.latitude` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**?** Latitude center of viewport on map in mercator projection+ * `viewport.longitude` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**?** Longitude Center of viewport on map in mercator projection+ * `viewport.dragRotate` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**?** Whether to enable drag and rotate map into perspective viewport**Examples**@@ -1273,524 +1259,23 @@ this.props.dispatch(updateMap({latitude: 37.75043, longitude: -122.34679, width:Set the color palette ui for layer color-- **ActionTypes**: [`ActionTypes.LAYER_COLOR_UI_CHANGE`][12]-- **Updaters**: [`visStateUpdaters.layerColorUIChangeUpdater`][250]+* **ActionTypes**: [`ActionTypes.LAYER_COLOR_UI_CHANGE`](actions.md#actiontypes)+* **Updaters**: [`visStateUpdaters.layerColorUIChangeUpdater`](../reducers/vis-state.md#visstateupdaterslayercoloruichangeupdater)**Parameters**-- `oldLayer` **[Object][164]** layer to be updated-- `prop` **[String][162]** which color prop-- `newConfig` **[object][164]** to be merged+* `oldLayer` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) layer to be updated+* `prop` [**String**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) which color prop+* `newConfig` [**object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) to be merged## setExportMapFormat-Set the export map format (html, json)+Set the export map format \(html, json\)-- **ActionTypes**: [`ActionTypes.SET_EXPORT_MAP_FORMAT`][12]-- **Updaters**: [`uiStateUpdaters.setExportMapFormatUpdater`][251]+* **ActionTypes**: [`ActionTypes.SET_EXPORT_MAP_FORMAT`](actions.md#actiontypes)+* **Updaters**: [`uiStateUpdaters.setExportMapFormatUpdater`](../reducers/ui-state.md#uistateupdaterssetexportmapformatupdater)**Parameters**-- `payload` **[string][162]** map format--[1]: #forwardactions--[2]: #forwardto--[3]: #parameters--[4]: #examples--[5]: #isforwardaction--[6]: #parameters-1--[7]: #unwrap--[8]: #parameters-2--[9]: #wrapto--[10]: #parameters-3--[11]: #examples-1--[12]: #actiontypes--[13]: #examples-2--[14]: #mapstyleactions--[15]: #addcustommapstyle--[16]: #inputmapstyle--[17]: #parameters-4--[18]: #loadcustommapstyle--[19]: #parameters-5--[20]: #loadmapstyleerr--[21]: #parameters-6--[22]: #loadmapstyles--[23]: #parameters-7--[24]: #mapconfigchange--[25]: #parameters-8--[26]: #mapstylechange--[27]: #parameters-9--[28]: #requestmapstyles--[29]: #parameters-10--[30]: #set3dbuildingcolor--[31]: #parameters-11--[32]: #main--[33]: #adddatatomap--[34]: #parameters-12--[35]: #examples-3--[36]: #keplerglinit--[37]: #parameters-13--[38]: #receivemapconfig--[39]: #parameters-14--[40]: #examples-4--[41]: #resetmapconfig--[42]: #visstateactions--[43]: #addfilter--[44]: #parameters-15--[45]: #addlayer--[46]: #parameters-16--[47]: #applycpufilter--[48]: #parameters-17--[49]: #enlargefilter--[50]: #parameters-18--[51]: #interactionconfigchange--[52]: #parameters-19--[53]: #layerconfigchange--[54]: #parameters-20--[55]: #layertextlabelchange--[56]: #parameters-21--[57]: #layertypechange--[58]: #parameters-22--[59]: #layervisconfigchange--[60]: #parameters-23--[61]: #layervisualchannelconfigchange--[62]: #parameters-24--[63]: #loadfiles--[64]: #parameters-25--[65]: #loadfileserr--[66]: #parameters-26--[67]: #onlayerclick--[68]: #parameters-27--[69]: #onlayerhover--[70]: #parameters-28--[71]: #onmapclick--[72]: #onmousemove--[73]: #parameters-29--[74]: #removedataset--[75]: #parameters-30--[76]: #removefilter--[77]: #parameters-31--[78]: #removelayer--[79]: #parameters-32--[80]: #reorderlayer--[81]: #parameters-33--[82]: #examples-5--[83]: #seteditormode--[84]: #parameters-34--[85]: #examples-6--[86]: #setfilter--[87]: #parameters-35--[88]: #setfilterplot--[89]: #parameters-36--[90]: #setmapinfo--[91]: #parameters-37--[92]: #showdatasettable--[93]: #parameters-38--[94]: #togglefilteranimation--[95]: #parameters-39--[96]: #togglelayerformap--[97]: #parameters-40--[98]: #updateanimationtime--[99]: #parameters-41--[100]: #updatefilteranimationspeed--[101]: #parameters-42--[102]: #updatelayeranimationspeed--[103]: #parameters-43--[104]: #updatelayerblending--[105]: #parameters-44--[106]: #updatevisdata--[107]: #parameters-45--[108]: #uistateactions--[109]: #addnotification--[110]: #parameters-46--[111]: #cleanupexportimage--[112]: #hideexportdropdown--[113]: #opendeletemodal--[114]: #parameters-47--[115]: #removenotification--[116]: #parameters-48--[117]: #setexportdata--[118]: #setexportdatatype--[119]: #parameters-49--[120]: #setexportfiltered--[121]: #parameters-50--[122]: #setexportimagedatauri--[123]: #parameters-51--[124]: #setexportimagesetting--[125]: #parameters-52--[126]: #setexportselecteddataset--[127]: #parameters-53--[128]: #setusermapboxaccesstoken--[129]: #parameters-54--[130]: #showexportdropdown--[131]: #parameters-55--[132]: #startexportingimage--[133]: #togglemapcontrol--[134]: #parameters-56--[135]: #togglemodal--[136]: #parameters-57--[137]: #togglesidepanel--[138]: #parameters-58--[139]: #rootactions--[140]: #deleteentry--[141]: #parameters-59--[142]: #registerentry--[143]: #parameters-60--[144]: #renameentry--[145]: #parameters-61--[146]: #mapstateactions--[147]: #fitbounds--[148]: #parameters-62--[149]: #examples-7--[150]: #toggleperspective--[151]: #examples-8--[152]: #togglesplitmap--[153]: #parameters-63--[154]: #examples-9--[155]: #updatemap--[156]: #parameters-64--[157]: #examples-10--[158]: #layercoloruichange--[159]: #parameters-65--[160]: #setexportmapformat--[161]: #parameters-66--[162]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String--[163]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function--[164]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object--[165]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean--[166]: ../reducers/map-style.md#mapstyleupdatersaddcustommapstyleupdater--[167]: ../reducers/map-style.md#mapstyleupdatersinputmapstyleupdater--[168]: ../reducers/map-style.md#mapstyleupdatersloadcustommapstyleupdater--[169]: ../reducers/map-style.md#mapstyleupdatersloadmapstyleerrupdater--[170]: ../reducers/map-style.md#mapstyleupdatersloadmapstylesupdater--[171]: ../reducers/map-style.md#mapstyleupdatersmapconfigchangeupdater--[172]: ../reducers/map-style.md#mapstyleupdatersmapstylechangeupdater--[173]: ../reducers/map-style.md#mapstyleupdatersrequestmapstylesupdater--[174]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array--[175]: ../reducers/map-style.md#mapstyleupdatersset3dbuildingcolorupdater--[176]: ../reducers/composers.md#combinedupdatersadddatatomapupdater--[177]: ../reducers/map-style.md#mapstyleupdatersinitmapstyleupdater--[178]: ../reducers/map-state.md#mapstateupdatersreceivemapconfigupdater--[179]: ../reducers/map-style.md#mapstyleupdatersreceivemapconfigupdater--[180]: ../reducers/vis-state.md#visstateupdatersreceivemapconfigupdater--[181]: ../reducers/map-state.md#mapstateupdatersresetmapconfigupdater--[182]: ../reducers/map-style.md#mapstyleupdatersresetmapconfigmapstyleupdater--[183]: ../reducers/vis-state.md#visstateupdatersresetmapconfigupdater--[184]: ../reducers/vis-state.md#visstateupdatersaddfilterupdater--[185]: ../reducers/vis-state.md#visstateupdatersaddlayerupdater--[186]: ../reducers/vis-state.md#visstateupdatersapplycpufilterupdater--[187]: ../reducers/vis-state.md#visstateupdatersenlargefilterupdater--[188]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number--[189]: ../reducers/vis-state.md#visstateupdatersinteractionconfigchangeupdater--[190]: ../reducers/vis-state.md#visstateupdaterslayerconfigchangeupdater--[191]: ../reducers/vis-state.md#visstateupdaterslayertextlabelchangeupdater--[192]: ../reducers/vis-state.md#visstateupdaterslayertypechangeupdater--[193]: ../reducers/vis-state.md#visstateupdaterslayervisconfigchangeupdater--[194]: ../reducers/vis-state.md#visstateupdaterslayervisualchannelchangeupdater--[195]: ../reducers/ui-state.md#uistateupdatersloadfilesupdater--[196]: ../reducers/vis-state.md#visstateupdatersloadfilesupdater--[197]: ../reducers/ui-state.md#uistateupdatersloadfileserrupdater--[198]: ../reducers/vis-state.md#visstateupdatersloadfileserrupdater--[199]: ../reducers/vis-state.md#visstateupdaterslayerclickupdater--[200]: ../reducers/vis-state.md#visstateupdaterslayerhoverupdater--[201]: ../reducers/vis-state.md#visstateupdatersmapclickupdater--[202]: https://uber.github.io/react-map-gl/#/documentation/api-reference/pointer-event--[203]: ../reducers/vis-state.md#visstateupdatersmousemoveupdater--[204]: ../reducers/vis-state.md#visstateupdatersremovedatasetupdater--[205]: ../reducers/vis-state.md#visstateupdatersremovefilterupdater--[206]: ../reducers/vis-state.md#visstateupdatersremovelayerupdater--[207]: ../reducers/vis-state.md#visstateupdatersreorderlayerupdater--[208]: ../reducers/vis-state.md#visstateupdatersseteditormodeupdater--[209]: ../reducers/vis-state.md#visstateupdaterssetfilterupdater--[210]: ../reducers/vis-state.md#visstateupdaterssetfilterplotupdater--[211]: ../reducers/vis-state.md#visstateupdaterssetmapinfoupdater--[212]: ../reducers/vis-state.md#visstateupdatersshowdatasettableupdater--[213]: ../reducers/vis-state.md#visstateupdaterstogglefilteranimationupdater--[214]: ../reducers/vis-state.md#visstateupdaterstogglelayerformapupdater--[215]: ../reducers/vis-state.md#visstateupdatersupdateanimationtimeupdater--[216]: ../reducers/vis-state.md#visstateupdatersupdatefilteranimationspeedupdater--[217]: ../reducers/vis-state.md#visstateupdatersupdatelayeranimationspeedupdater--[218]: ../reducers/vis-state.md#visstateupdatersupdatelayerblendingupdater--[219]: ../reducers/vis-state.md#visstateupdatersupdatevisdataupdater--[220]: ../reducers/ui-state.md#uistateupdatersaddnotificationupdater--[221]: ../reducers/ui-state.md#uistateupdaterscleanupexportimage--[222]: ../reducers/ui-state.md#uistateupdatershideexportdropdownupdater--[223]: ../reducers/ui-state.md#uistateupdatersopendeletemodalupdater--[224]: ../reducers/ui-state.md#uistateupdatersremovenotificationupdater--[225]: ../reducers/ui-state.md#uistateupdaterssetexportdataupdater--[226]: ../reducers/ui-state.md#uistateupdaterssetexportdatatypeupdater--[227]: ../reducers/ui-state.md#uistateupdaterssetexportfilteredupdater--[228]: ../reducers/ui-state.md#uistateupdaterssetexportimagedatauri--[229]: ../reducers/ui-state.md#uistateupdaterssetexportimagesetting--[230]: ../reducers/ui-state.md#uistateupdaterssetexportselecteddatasetupdater--[231]: ../reducers/ui-state.md#uistateupdaterssetusermapboxaccesstokenupdater--[232]: ../reducers/ui-state.md#uistateupdatersshowexportdropdownupdater--[233]: ../reducers/ui-state.md#uistateupdatersstartexportingimage--[234]: ../reducers/ui-state.md#uistateupdaterstogglemapcontrolupdater--[235]: #default_map_controls--[236]: ../reducers/ui-state.md#uistateupdaterstogglemodalupdater--[237]: ../constants/default-settings.md#data_table_id--[238]: ../constants/default-settings.md#delete_data_id--[239]: ../constants/default-settings.md#add_data_id--[240]: ../constants/default-settings.md#export_image_id--[241]: ../constants/default-settings.md#export_data_id--[242]: ../constants/default-settings.md#add_map_style_id--[243]: ../reducers/ui-state.md#uistateupdaterstogglesidepanelupdater--[244]: ../reducers/map-state.md#mapstateupdatersfitboundsupdater--[245]: ../reducers/map-state.md#mapstateupdaterstoggleperspectiveupdater--[246]: ../reducers/map-state.md#mapstateupdaterstogglesplitmapupdater--[247]: ../reducers/ui-state.md#uistateupdaterstogglesplitmapupdater--[248]: ../reducers/vis-state.md#visstateupdaterstogglesplitmapupdater--[249]: ../reducers/map-state.md#mapstateupdatersupdatemapupdater--[250]: ../reducers/vis-state.md#visstateupdaterslayercoloruichangeupdater+* `payload` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) map format-[251]: ../reducers/ui-state.md#uistateupdaterssetexportmapformatupdaterdiff --git a/docs/api-reference/actions/overview.md b/docs/api-reference/actions/overview.mddeleted file mode 100644index f8dc6ac4b..000000000--- a/docs/api-reference/actions/overview.md+++ /dev/null@@ -1,3 +0,0 @@-# Actions--...Coming soondiff --git a/docs/api-reference/advanced-usages/README.md b/docs/api-reference/advanced-usages/README.mdnew file mode 100644index 000000000..d92f42def--- /dev/null+++ b/docs/api-reference/advanced-usages/README.md@@ -0,0 +1,2 @@+# Advanced usages+diff --git a/docs/api-reference/advanced-usages/custom-initial-state.md b/docs/api-reference/advanced-usages/custom-initial-state.mdindex 82c287248..85ff89025 100644--- a/docs/api-reference/advanced-usages/custom-initial-state.md+++ b/docs/api-reference/advanced-usages/custom-initial-state.md@@ -4,7 +4,7 @@ For advanced users who wish to modify the initial state of kepler.gl reducer, keHere is an example modify `uiState` `initialState` to hide side panel, and selectively display map control button.-```js+```javascriptimport {combineReducers} from 'redux';import keplerGlReducer from 'kepler.gl/reducers';@@ -39,7 +39,5 @@ const reducers = combineReducers({});```-For full implementation, take a look at the [custom reducer example][custom-reducer-example]--[custom-reducer-example]: https://github.com/keplergl/kepler.gl/tree/master/examples/custom-reducer+For full implementation, take a look at the [custom reducer example](https://github.com/keplergl/kepler.gl/tree/master/examples/custom-reducer)diff --git a/docs/api-reference/advanced-usages/custom-mapbox-host.md b/docs/api-reference/advanced-usages/custom-mapbox-host.mdindex d7a8aa4ea..64b5ea64b 100644--- a/docs/api-reference/advanced-usages/custom-mapbox-host.md+++ b/docs/api-reference/advanced-usages/custom-mapbox-host.md@@ -1,7 +1,10 @@-### 1. Configuring Mapbox API hostname+# custom-mapbox-host++## 1. Configuring Mapbox API hostname+The KeplerGL component accepts an optional parameter `mapboxApiUrl` to override the default value of `https://api.mapbox.com`.-```js+```javascript<KeplerGlid="foo"mapboxApiAccessToken={token}@@ -10,9 +13,11 @@ The KeplerGL component accepts an optional parameter `mapboxApiUrl` to overrideheight={height}/>```-### 2. Overriding the default MapStyles+## 2. Overriding the default MapStyles+The default MapStyles KeplerGL uses might not be accessible to you, in this case you will need to provide MapStyle overrides. During construction of your component:-```js++```javascriptthis.token = '';this.apiHost = "https://api.mapbox.cn";this.mapStyles = [@@ -34,7 +39,8 @@ The default MapStyles KeplerGL uses might not be accessible to you, in this case```and In render:-```js++```javascript<KeplerGlid="foo"mapboxApiAccessToken={this.token}@@ -43,3 +49,4 @@ and In render:width={width}height={height}/>```+diff --git a/docs/api-reference/advanced-usages/forward-actions.md b/docs/api-reference/advanced-usages/forward-actions.mdindex 2eab6bee3..5272f2e15 100644--- a/docs/api-reference/advanced-usages/forward-actions.md+++ b/docs/api-reference/advanced-usages/forward-actions.md@@ -1,14 +1,14 @@# Forward Dispatch Actions-One of the biggest challenge of using local state is to dispatch actions that only modify a specific instance of the state. For instance, if we have 2 kepler.gl components in our app, one with id `foo` other with id `bar`. Our keplerGl reducer is going to be `keplerGl: {foo: …, bar …}`. When `foo` dispatches an action, it only needs to update the state of `foo`, hence we need a way to decorate the action that the root reducer only pass it down to instance reducer `foo`. To solve this, we provide a set of forward functions called `wrapTo`, `forwardTo` and `unwrap`. `wrapTo` wraps an action payload into an forward action by adding an address `_addr_` and a `_forward_` signature to its `meta`. The root reducer will check if the given action has that address and if so, `unwrap` the action and pass it to the correct instance reducer.+One of the biggest challenge of using local state is to dispatch actions that only modify a specific instance of the state. For instance, if we have 2 kepler.gl components in our app, one with id `foo` other with id `bar`. Our keplerGl reducer is going to be `keplerGl: {foo: …, bar …}`. When `foo` dispatches an action, it only needs to update the state of `foo`, hence we need a way to decorate the action that the root reducer only pass it down to instance reducer `foo`. To solve this, we provide a set of forward functions called `wrapTo`, `forwardTo` and `unwrap`. `wrapTo` wraps an action payload into an forward action by adding an address `_addr_` and a `_forward_` signature to its `meta`. The root reducer will check if the given action has that address and if so, `unwrap` the action and pass it to the correct instance reducer.**Here are the different options to dispatch forwarded actions to kepler.gl reducer.**-### 1. Use `forwardTo` to add a dispatch function to your component+## 1. Use `forwardTo` to add a dispatch function to your componentYou can add a dispatch function to your component that dispatches actions to a specific kepler.gl instance using connect.-```js+```javascript// componentimport KeplerGl from 'kepler.gl';import {connect} from 'react-redux';@@ -38,11 +38,11 @@ export default connect()(MapContainer);```-- 2. Use `wrapTo` to wrap action creator+* 1. Use `wrapTo` to wrap action creatorYou can also simply wrap an action into a forward action with the `wrapTo` helper-```js+```javascript// componentimport KeplerGl from 'kepler.gl';@@ -57,5 +57,5 @@ const MapContainer = ({dispatch}) => (<KeplerGl id="foo"/></div>);-```+diff --git a/docs/api-reference/advanced-usages/reducer-plugin.md b/docs/api-reference/advanced-usages/reducer-plugin.mdindex 12c3b0ae6..73a809a79 100644--- a/docs/api-reference/advanced-usages/reducer-plugin.md+++ b/docs/api-reference/advanced-usages/reducer-plugin.md@@ -4,7 +4,7 @@ For advanced users, who want to add additional action handler to kepler.gl reduc`Reducer.plugin` will allow advanced users to extend the kepler.gl reducer behavior. Here is an example of adding an additional action `HIDE_AND_SHOW_SIDE_PANEL` handler that modifies the `uiState`.-```js+```javascriptimport {combineReducers} from 'redux';import keplerGlReducer from 'kepler.gl/reducers';@@ -27,13 +27,12 @@ const reducers = combineReducers({Note that, reducer plugin **should not be used to override default kepler.gl actions** The following code will not change `SET_FILTER`, because plugins are handled after default actions.-```js+```javascriptconst customizedKeplerGlReducer = keplerGlReducer.plugin({[ActionTypes.SET_FILTER]: (state, action) => state});```-For full implementation, take a look at the [custom reducer example][custom-reducer-example]+For full implementation, take a look at the [custom reducer example](https://github.com/keplergl/kepler.gl/tree/master/examples/custom-reducer)-[custom-reducer-example]: https://github.com/keplergl/kepler.gl/tree/master/examples/custom-reducerdiff --git a/docs/api-reference/advanced-usages/replace-ui-component.md b/docs/api-reference/advanced-usages/replace-ui-component.mdindex 9f67f12ca..cc7d95b3e 100644--- a/docs/api-reference/advanced-usages/replace-ui-component.md+++ b/docs/api-reference/advanced-usages/replace-ui-component.md@@ -5,9 +5,10 @@ To allow customize a child component, the library author usually has to pass theAll you need to do is to create a component factory for the one you wish to replace, import the original component factory and call `injectComponents` at where `KeplerGl` is mounted. `injectComponents` will return a new `KeplerGl` component instance that renders the custom child component. This way we don’t have to keep track of hundreds of component as props and pass them all the way down. Dependency injection only happens once when `keplerGl` component is imported.## Factory+For each high level component in kepler.gl, we export a `factory`. A `factory` is a function that takes a set of `dependencies` and return a component instance. In this example below, the `MapContainerFactory` takes `MapPopover` and `MapControl` as dependencies and returns the `MapContainer` component instance. Not all components are exported as factories in kepler.gl at the moment, we are still testing this feature.-```js+```javascriptimport MapPopoverFactory from 'components/map/map-popover';import MapControlFactory from 'components/map/map-control';@@ -31,14 +32,13 @@ MapContainerFactory.deps = [MapPopoverFactory, MapControlFactory];A recipe is an array of default factory, and the one to replace it. `[defaultFactory, customFactory]`. To replace default component, user can import the existing component factory, call `injectComponents` and pass in the new recipe to get a new `KeplerGl` instance.-### Inject ComponentsIn kepler.gl, we create the app injector by calling provide with an array of default recipes. We then export a `injectComponents` function that user can call to inject a different recipe and returns a new kepler.gl instance.Here is an example of how to use `injectComponents` to replace default `PanelHeader`.-```js+```javascriptimport {injectComponents, PanelHeaderFactory} from 'kepler.gl/components';// define custom header@@ -56,18 +56,17 @@ const KeplerGl = injectComponents([const MapContainer = () => <KeplerGl id="foo"/>;```-## Pass custom component props-`injectComponents` allows user to render custom component, however, they usually also want to pass additional props to the customized component which current component injector doesn’t support. To enable passing additional props, we implemented a `withState`helper that passes additional props to the customized component. `withState` takes 3 arguments: `lenses`, `mapStateToProps` and `actionCreators`, They allows user to pass in kepler.gl instance state, state from other part of the app, and custom actions.--- `lense` - A getter function to get a piece of kepler.gl subreducer state. Kepler.gl exports lenses for all its sub-reducers. For instance when pass `mapStateLens` to `withState`, the component will receive `mapState` of current kepler.gl instance as a prop.+## Pass custom component props-- `mapStateToProps` - A wild card to play. You can pass a `mapStateToProps` function to get the state from any part of the app. If the lenses aren’t enough, use `mapStateToProps`.+`injectComponents` allows user to render custom component, however, they usually also want to pass additional props to the customized component which current component injector doesn’t support. To enable passing additional props, we implemented a `withState`helper that passes additional props to the customized component. `withState` takes 3 arguments: `lenses`, `mapStateToProps` and `actionCreators`, They allows user to pass in kepler.gl instance state, state from other part of the app, and custom actions.-- `actions` - action creators that will be passed to `bindActionCreators`.+* `lense` - A getter function to get a piece of kepler.gl subreducer state. Kepler.gl exports lenses for all its sub-reducers. For instance when pass `mapStateLens` to `withState`, the component will receive `mapState` of current kepler.gl instance as a prop.+* `mapStateToProps` - A wild card to play. You can pass a `mapStateToProps` function to get the state from any part of the app. If the lenses aren’t enough, use `mapStateToProps`.+* `actions` - action creators that will be passed to `bindActionCreators`.Here is an example of using `withState` helper to add reducer state and actions to customized component as additional props.-```js+```javascriptimport {withState, injectComponents, PanelHeaderFactory} from 'kepler.gl/components';import {visStateLens} from 'kepler.gl/reducers';diff --git a/docs/api-reference/advanced-usages/saving-loading-w-schema.md b/docs/api-reference/advanced-usages/saving-loading-w-schema.mdindex 05b1ef9ae..4c4a4de9b 100644--- a/docs/api-reference/advanced-usages/saving-loading-w-schema.md+++ b/docs/api-reference/advanced-usages/saving-loading-w-schema.md@@ -1,24 +1,25 @@# Saving and Loading Maps with Schema Manager-![Processor and Schema][processor-schema]+Kelper.gl provides a schema manager to save and load maps. It converts current map data and configuration into a smaller JSON blob. You can then load that JSON blob into an empty map by passing it to `addDataToMap`.The reason kepler.gl provides a Schema manager is to make it easy for users to connect the kepler.gl client app to any database, saving map data / config and later load it back. With the schema manager, a map saved in an older version can still be parsed and loaded with the latest kepler.gl library.-### Save map+## Save mapPass the **instanceState** to `SchemaManager.save()`-- `SchemaManager.save()` will output a JSON blob including data and config.+* `SchemaManager.save()` will output a JSON blob including data and config.Under the hood, `SchemaManager.save()` calls `SchemaManager.getDatasetToSave()` and `SchemaManager.getConfigToSave()`-- `SchemaManager.getDatasetToSave()` will output an array of dataset.-- `SchemaManager.getConfigToSave()` will output a JSON blob of the current config.++* `SchemaManager.getDatasetToSave()` will output an array of dataset.+* `SchemaManager.getConfigToSave()` will output a JSON blob of the current config.In the example blow, `foo` is the id of the KeplerGl instance to be save.-```js+```javascriptimport KeplerGlSchema from 'kepler.gl/schemas';const mapToSave = KeplerGlSchema.save(state.keplerGl.foo);@@ -31,16 +32,18 @@ const configToSave = KeplerGlSchema.getConfigToSave(state.keplerGl.foo);// configToSave = {version: '', config: {}}```-### Load map+## Load map+Pass saved data and config to `SchemaManager.load()`-- `SchemaManager.load()` will parsed saved config and data, apply version control, the output can then be passed to `addDataToMap` directly.++* `SchemaManager.load()` will parsed saved config and data, apply version control, the output can then be passed to `addDataToMap` directly.Under the hood, `SchemaManager.load()` calls `SchemaManager.parseSavedData()` and `SchemaManager.parseSavedConfig()`-- `SchemaManager.parseSavedData()` will output an array of parsed dataset.-- `SchemaManager.parseSavedConfig()` will output a JSON blob of the parsed config.+* `SchemaManager.parseSavedData()` will output an array of parsed dataset.+* `SchemaManager.parseSavedConfig()` will output a JSON blob of the parsed config.-```js+```javascriptimport KeplerGlSchema from 'kepler.gl/schemas';import {addDataToMap} from 'kepler.gl/actions';@@ -50,11 +53,11 @@ const mapToLoad = KeplerGlSchema.load(savedDatasets, savedConfig);this.props.dispatch(addDataToMap(mapToLoad));```-### Match config with another dataset+## Match config with another datasetOften times, people want to keep a map config as template, then load it with different datasets. To match a config with a different dataset, you need to make sure `data.id` in the new dataset matches the old one.-```js+```javascriptimport KeplerGlSchema from 'kepler.gl/schemas';import {addDataToMap} from 'kepler.gl/actions';@@ -82,4 +85,3 @@ const mapToLoad = KeplerGlSchema.load(newDatasets, config);this.props.dispatch(addDataToMap(mapToLoad));```-[processor-schema]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/api_load-save.pngdiff --git a/docs/api-reference/advanced-usages/using-updaters.md b/docs/api-reference/advanced-usages/using-updaters.mdindex 649d49787..241cc98e9 100644--- a/docs/api-reference/advanced-usages/using-updaters.md+++ b/docs/api-reference/advanced-usages/using-updaters.md@@ -1,12 +1,12 @@# Using Updaters-Updaters are state transition functions that mapped to actions. One action can map to multiple state updaters, each belongs to a subreducer.+Updaters are state transition functions that mapped to actions. One action can map to multiple state updaters, each belongs to a subreducer.This action-updater pattern allows a user to import a specific action updater in the app's root reducer and use it to directly modify kepler.gl’s state without dispatching the action. This will give user a lot of freedom to control over kepler.gl's state transition.To achieve the same result with `togglePerspective` updating kepler.gl's map perspective mode. You can import and dispatch kepler.gl action `togglePerspective`:-```js+```javascript// action and forward dispatcherimport {togglePerspective} from 'kepler.gl/actions';@@ -20,7 +20,7 @@ const MapContainer = ({dispatch}) => (or import the corresponding updater `mapStateUpdaters.togglePerspectiveUpdater` and call it inside the root reducer. The example below demos how to add a button outside kepler.gl component, and update the map perspective when click it.-```js+```javascriptimport keplerGlReducer, {mapStateUpdaters} from 'kepler.gl/reducers';// Root Reducer@@ -50,3 +50,4 @@ const composedReducer = (state, action) => {export default composedReducer;```+diff --git a/docs/api-reference/cloud-providers/overview.md b/docs/api-reference/cloud-providers/README.mdsimilarity index 81%rename from docs/api-reference/cloud-providers/overview.mdrename to docs/api-reference/cloud-providers/README.mdindex 1b8a8e733..55ff2dd07 100644--- a/docs/api-reference/cloud-providers/overview.md+++ b/docs/api-reference/cloud-providers/README.md@@ -1,4 +1,4 @@-# Cloud Providers+# Cloud providersThe kepler.gl application does not have a backend, however it offers integration point for optional commercial backends. Each backend can integrate with kepler by adding a "cloud provider" object to kepler's global list of cloud providers.@@ -6,40 +6,39 @@ These objects must implement certain minimal set of methods, and can optionallyThe set of methods available for cloud providers to implement is subject to change as new features are added to the front-end.-## Cloud Provider ObjectA "cloud provider" object provides:-- a name and an icon-- any service specific methods (such as `uploadFile`)-- a set of oauth2 methods to plug into the authentication flow and get access tokens++* a name and an icon+* any service specific methods \(such as `uploadFile`\)+* a set of oauth2 methods to plug into the authentication flow and get access tokensCloud-providers providers can implement the following properties| Field/method | Description | Required? |-| --- | --- | --- |+| :--- | :--- | :--- || `name` | Name of the provider | required |-| `displayName` | Display name |-| `icon` | React Element to render as Icon |-| `thumbnail` | Size of the thumbnail image of the map that required by the provider |+| `displayName` | Display name | |+| `icon` | React Element to render as Icon | |+| `thumbnail` | Size of the thumbnail image of the map that required by the provider | || `hasPrivateStorage` | To participate in kepler's build-in private map saving function | required || `hasSharingUrl` | To participate in kepler's build-in share map via URL function | required |-| `getShareUrl` | To show user the shared Url of the map |-| `getMapUrl` | To update browser location once a map has been saved / loaded |-| `getAccessToken` | To participate in kepler's built-in oauth login routes |-| `getUserName` | To display user name of the logged in user |+| `getShareUrl` | To show user the shared Url of the map | |+| `getMapUrl` | To update browser location once a map has been saved / loaded | |+| `getAccessToken` | To participate in kepler's built-in oauth login routes | |+| `getUserName` | To display user name of the logged in user | || `login` | Method called to perform user login | required || `logout` | Method called to logout an user | required || `uploadMap` | Method called to upload map to storage | required || `listMaps` | Method called to load a catalog of maps saved by the current user | required || `downloadMap` | MEthod called to download a specific map | required |-## Adding a new Cloud ProviderAn instance of the provider is added to array of cloud providers in the file `src/cloud-providers/providers.js` then passed to kepler.gl demo app. An example provider: [Dropbox Provider](https://github.com/keplergl/kepler.gl/blob/master/examples/demo-app/src/cloud-providers/dropbox-provider.js)-```js+```javascriptimport {Provider} from 'kepler.gl/cloud-providers';class MyProvider extends Provider {@@ -59,7 +58,7 @@ const App = () =>/>```-## Cloud Provider Instance Fields and Methods-See [Cloud Provider API](./cloud-provider.md)+See [Cloud Provider API](cloud-provider.md)+diff --git a/docs/api-reference/cloud-providers/cloud-provider.md b/docs/api-reference/cloud-providers/cloud-provider.mdindex 03b5a6b43..b317b981d 100644--- a/docs/api-reference/cloud-providers/cloud-provider.md+++ b/docs/api-reference/cloud-providers/cloud-provider.md@@ -1,21 +1,21 @@-<!-- Generated by documentation.js. Update this documentation by updating the source code. -->+# Cloud provider referecens### Table of Contents-- [Provider][1]- - [downloadMap][4]- - [getAccessToken][7]- - [getMapUrl][8]- - [getShareUrl][10]- - [getUserName][12]- - [hasPrivateStorage][13]- - [hasSharingUrl][14]- - [listMaps][15]- - [login][17]- - [logout][19]- - [uploadMap][21]-- [MapResponse][23]-- [Viz][25]+* [Provider](cloud-provider.md#provider)+ * [downloadMap](cloud-provider.md#downloadmap)+ * [getAccessToken](cloud-provider.md#getaccesstoken)+ * [getMapUrl](cloud-provider.md#getmapurl)+ * [getShareUrl](cloud-provider.md#getshareurl)+ * [getUserName](cloud-provider.md#getusername)+ * [hasPrivateStorage](cloud-provider.md#hasprivatestorage)+ * [hasSharingUrl](cloud-provider.md#hassharingurl)+ * [listMaps](cloud-provider.md#listmaps)+ * [login](cloud-provider.md#login)+ * [logout](cloud-provider.md#logout)+ * [uploadMap](cloud-provider.md#uploadmap)+* [MapResponse](cloud-provider.md#mapresponse)+* [Viz](cloud-provider.md#viz)## Provider@@ -23,13 +23,13 @@ The default provider class**Parameters**-- `props` **[object][27]**- - `props.name` **[string][28]**- - `props.displayName` **[string][28]**- - `props.icon` **ReactElement** React element- - `props.thumbnail` **[object][27]** thumbnail size object- - `props.thumbnail.width` **[number][29]** thumbnail width in pixels- - `props.thumbnail.height` **[number][29]** thumbnail height in pixels+* `props` [**object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `props.name` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)+ * `props.displayName` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)+ * `props.icon` **ReactElement** React element+ * `props.thumbnail` [**object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) thumbnail size object+ * `props.thumbnail.width` [**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) thumbnail width in pixels+ * `props.thumbnail.height` [**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) thumbnail height in pixels**Examples**@@ -48,7 +48,7 @@ This method will be called when user select a map to load from the storage map v**Parameters**-- `loadParams` **any** the loadParams property of each visualization object+* `loadParams` **any** the loadParams property of each visualization object**Examples**@@ -73,13 +73,13 @@ async downloadMap(loadParams) {}```-Returns **[MapResponse][30]** the map object containing dataset config info and format option+Returns [**MapResponse**](cloud-provider.md#mapresponse) the map object containing dataset config info and format option### getAccessTokenThis method is called to determine whether user already logged in to this provider-Returns **[boolean][31]** true if a user already logged in+Returns [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) true if a user already logged in### getMapUrl@@ -87,9 +87,9 @@ This method is called by kepler.gl demo app to pushes a new location to history,**Parameters**-- `fullURL` **[boolean][31]** Whether to return the full url with domain, or just the location (optional, default `true`)+* `fullURL` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) Whether to return the full url with domain, or just the location \(optional, default `true`\)-Returns **[string][28]** mapUrl+Returns [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) mapUrl### getShareUrl@@ -97,27 +97,27 @@ This method is called after user share a map, to display the share url.**Parameters**-- `fullUrl` **[boolean][31]** Whether to return the full url with domain, or just the location (optional, default `false`)+* `fullUrl` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) Whether to return the full url with domain, or just the location \(optional, default `false`\)-Returns **[string][28]** shareUrl+Returns [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) shareUrl### getUserNameThis method is called to get the user name of the current user. It will be displayed in the cloud provider tile.-Returns **[string][28]** true if a user already logged in+Returns [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) true if a user already logged in### hasPrivateStorageWhether this provider support upload map to a private storage. If truthy, user will be displayed with the storage save icon on the top right of the side bar.-Returns **[boolean][31]**+Returns [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)### hasSharingUrlWhether this provider support share map via a public url, if truthy, user will be displayed with a share map via url under the export map option on the top right of the side bar-Returns **[boolean][31]**+Returns [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)### listMaps@@ -141,137 +141,63 @@ async listMaps() {}```-Returns **[Array][32]<[Viz][33]>** an array of Viz objects+Returns [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Viz**](cloud-provider.md#viz)**>** an array of Viz objects### login-This method will be called when user click the login button in the cloud provider tile.-Upon login success, `onCloudLoginSuccess` has to be called to notify kepler.gl UI+This method will be called when user click the login button in the cloud provider tile. Upon login success, `onCloudLoginSuccess` has to be called to notify kepler.gl UI**Parameters**-- `onCloudLoginSuccess` **[function][34]** callbacks to be called after login success+* `onCloudLoginSuccess` [**function**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) callbacks to be called after login success### logout-This method will be called when user click the logout button under the cloud provider tile.-Upon login success, `onCloudLoginSuccess` has to be called to notify kepler.gl UI+This method will be called when user click the logout button under the cloud provider tile. Upon login success, `onCloudLoginSuccess` has to be called to notify kepler.gl UI**Parameters**-- `onCloudLogoutSuccess` **[function][34]** callbacks to be called after logout success+* `onCloudLogoutSuccess` [**function**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function) callbacks to be called after logout success### uploadMap-This method will be called to upload map for saving and sharing. Kepler.gl will package map data, config, title, description and thumbnail for upload to storage.-With the option to overwrite already saved map, and upload as private or public map.+This method will be called to upload map for saving and sharing. Kepler.gl will package map data, config, title, description and thumbnail for upload to storage. With the option to overwrite already saved map, and upload as private or public map.**Parameters**-- `param` **[Object][27]**- - `param.mapData` **[Object][27]** the map object- - `param.mapData.map` **[Object][27]** {datasets. config, info: {title, description}}- - `param.mapData.thumbnail` **[Blob][35]** A thumbnail of current map. thumbnail size can be defined by provider by this.thumbnail- - `param.options` **[Object][27]** (optional, default `{}`)- - `param.options.overwrite` **[boolean][31]** whether user choose to overwrite already saved map under the same name- - `param.options.isPublic` **[boolean][31]** whether user wish to share the map with others. if isPublic is truthy, kepler will call this.getShareUrl() to display an URL they can share with others+* `param` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `param.mapData` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) the map object+ * `param.mapData.map` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) {datasets. config, info: {title, description}}+ * `param.mapData.thumbnail` [**Blob**](https://developer.mozilla.org/docs/Web/API/Blob) A thumbnail of current map. thumbnail size can be defined by provider by this.thumbnail+ * `param.options` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) \(optional, default `{}`\)+ * `param.options.overwrite` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) whether user choose to overwrite already saved map under the same name+ * `param.options.isPublic` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) whether user wish to share the map with others. if isPublic is truthy, kepler will call this.getShareUrl\(\) to display an URL they can share with others## MapResponse-The returned object of `downloadMap`. The response object should contain: datasets: \[], config: {}, and info: {}-each dataset object should be {info: {id, label}, data: {...}}-to inform how kepler should process your data object, pass in `format`+The returned object of `downloadMap`. The response object should contain: datasets: \[\], config: {}, and info: {} each dataset object should be {info: {id, label}, data: {...}} to inform how kepler should process your data object, pass in `format`-Type: [Object][27]+Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)### Properties-- `map` **[Object][27]**- - `map.datasets` **[Array][32]<[Object][27]>**- - `map.config` **[Object][27]**- - `map.info` **[Object][27]**-- `format` **[string][28]** one of 'csv': csv file string, 'geojson': geojson object, 'row': row object, 'keplergl': datasets array saved using KeplerGlSchema.save+* `map` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `map.datasets` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>**+ * `map.config` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `map.info` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `format` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) one of 'csv': csv file string, 'geojson': geojson object, 'row': row object, 'keplergl': datasets array saved using KeplerGlSchema.save## Viz-Type: [Object][27]+Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)### Properties-- `id` **[string][28]** An unique id-- `title` **[string][28]** The title of the map-- `description` **[string][28]** The description of the map-- `imageUrl` **[string][28]** The imageUrl of the map-- `lastModification` **[number][29]** An epoch timestamp in milliseconds-- `privateMap` **[boolean][31]** Optional, whether if this map is private to the user, or can be accessed by others via URL-- `loadParams` **any** A property to be passed to `downloadMap`+* `id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) An unique id+* `title` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) The title of the map+* `description` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) The description of the map+* `imageUrl` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) The imageUrl of the map+* `lastModification` [**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) An epoch timestamp in milliseconds+* `privateMap` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) Optional, whether if this map is private to the user, or can be accessed by others via URL+* `loadParams` **any** A property to be passed to `downloadMap`-[1]: #provider--[2]: #parameters--[3]: #examples--[4]: #downloadmap--[5]: #parameters-1--[6]: #examples-1--[7]: #getaccesstoken--[8]: #getmapurl--[9]: #parameters-2--[10]: #getshareurl--[11]: #parameters-3--[12]: #getusername--[13]: #hasprivatestorage--[14]: #hassharingurl--[15]: #listmaps--[16]: #examples-2--[17]: #login--[18]: #parameters-4--[19]: #logout--[20]: #parameters-5--[21]: #uploadmap--[22]: #parameters-6--[23]: #mapresponse--[24]: #properties--[25]: #viz--[26]: #properties-1--[27]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object--[28]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String--[29]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number--[30]: #mapresponse--[31]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean--[32]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array--[33]: #viz--[34]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function--[35]: https://developer.mozilla.org/docs/Web/API/Blobdiff --git a/docs/api-reference/components/README.md b/docs/api-reference/components/README.mdnew file mode 100644index 000000000..5bb753d4e--- /dev/null+++ b/docs/api-reference/components/README.md@@ -0,0 +1,2 @@+# Components+diff --git a/docs/api-reference/components/overview.md b/docs/api-reference/components/overview.mdindex c09659849..2a717ac16 100644--- a/docs/api-reference/components/overview.md+++ b/docs/api-reference/components/overview.md@@ -1,3 +1,4 @@# Components...Coming soon+diff --git a/docs/api-reference/ecosystem.md b/docs/api-reference/ecosystem.mdindex ebc8ce169..019f2860d 100644--- a/docs/api-reference/ecosystem.md+++ b/docs/api-reference/ecosystem.md@@ -1,44 +1,44 @@+# Ecosystem+## EcosystemThe diagram below represents the data flow. Note that in most cases, you don't have to worry about action creators, forward dispatcher and state updaters, as they are handled under-the-hood by kepler.gl-![Data flow][data-flow]+## Component-The Kepler.gl component will call redux connect under the hood, and dispatch to the corresponding reducer instance.-To allow mounting of multiple instance of kepler.gl components in the same app, we implemented a local selector with forward dispatch system. The local selector will pass down the knowledge where the state of this instance lives, and the forward dispatch system will pass down a dispatch function that knows to dispatch action to the correct reducer instance. __Each kepler.gl component instance needs to have an unique id__.+The Kepler.gl component will call redux connect under the hood, and dispatch to the corresponding reducer instance.-Read more about [Component][components].+To allow mounting of multiple instance of kepler.gl components in the same app, we implemented a local selector with forward dispatch system. The local selector will pass down the knowledge where the state of this instance lives, and the forward dispatch system will pass down a dispatch function that knows to dispatch action to the correct reducer instance. **Each kepler.gl component instance needs to have an unique id**.+Read more about [Component](components/overview.md).## Reducer and Forward Dispatcher-![Forward Dispatcher][forward-dispatcher]+The kepler.gl root reducer that user mounted in their app is in fact a wrapper reducer that stored the child state and update them based on forwarded actions. If An action is not a forwarded action, it pass down to all child reducers.-When a KeplerGl component instance is mounted with the id `foo`, the wrapper reducer will add a kepler.gl local state in the root state at key `foo`.+When a KeplerGl component instance is mounted with the id `foo`, the wrapper reducer will add a kepler.gl local state in the root state at key `foo`.One of the biggest challenge of using local state is to dispatch actions that only modify a specific local state. For instance, if we have 2 kepler.gl components in our app, one with id `foo` other with id `bar`. Our keplerGl reducer is going to be `keplerGl: {foo: …, bar …}`. When foo dispatches an action, it only needs to update the state of foo, we need a way to decorate the action that the root reducer only pass it down to subreducer `foo`.-To solve this, kepler.gl has a forward dispatching system. It consists of a set of forward functions including `wrapTo`, `forwardTo` and `unwrap`. `wrapTo` wraps an action payload into an forward action by adding an address `_addr_` and a `_forward_` signature to its meta.+To solve this, kepler.gl has a forward dispatching system. It consists of a set of forward functions including `wrapTo`, `forwardTo` and `unwrap`. `wrapTo` wraps an action payload into an forward action by adding an address `_addr_` and a `_forward_` signature to its meta.Each kepler.gl component receives a forward dispatcher as a prop, which dispatches a forwarded action to the root reducer. The root reducer will check if the given action has that address and if so, unwrap the action and pass it to the child reducer.-Read more about [Reducers][reducers].-+Read more about [Reducers](reducers/overview.md).## Actions and Updaters+Actions in reducers are mapped to state transition functions. `UPDATE_MAP` is mapped to `updateMapUpdater`. An updater is the backbone of the redux reducer. It is a pure function that takes the previous state and an action, and returns the next state. `(oldState, action) => newState`. It describes how the state should transition upon receiving that action.here is a snippet of the map state reducer in kepler.gl.-```js+```javascript/* Action Handlers */const actionHandler = {- [ActionTypes.FIT_BOUNDS]: fitBoundsUpdater,- [ActionTypes.TOGGLE_PERSPECTIVE]: togglePerspectiveUpdater};/* Reducer */@@ -47,29 +47,15 @@ export default handleActions(actionHandler, INITIAL_MAP_STATE);This pattern allows a user to import a specific action updater in the app's root reducer and use it to directly modify kepler.gl’s state without dispatching the action. This will give user a lot of freedom to control over kepler.gl's state transition.-Read more about [Actions and Updaters][actions-updaters].-+Read more about [Actions and Updaters]().## Processors and Schema Manager-![Processor and Schema][processor-schema]+Processors and schema manager are useful helpers to get data in and out of kepler.gl. You can use `processCsvData(csv)` and `processGeojson(geojson)` to parse csv or geoJson file and pass it to `addDataToMap()` action.To save and reload the current map, you can call `KeplerGlSchema.save()` and pass it the instant state. It will return a json output containing map data and config. Pass this json file to `processKeplerglJSON()` and then `addDataToMap()` will reproduce the same map.-Read more about [Processors][processors] and [Schema Manager][schemas].---<!-- -->+Read more about [Processors]() and [Schema Manager](schemas/overview.md).-[basic-usage]: ./basic-usage.md-[advanced-usage]: ./advanced-usage.md-[components]: ./components/overview.md-[reducers]: ./reducers/overview.md-[actions-updaters]: ./actions/overview.md-[processors]: ./processors/overview.md-[schemas]: ./schemas/overview.md-[data-flow]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/api_data-flow.png-[forward-dispatcher]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/api_forward-dispatch.png-[processor-schema]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/api_load-save.pngdiff --git a/docs/api-reference/get-started.md b/docs/api-reference/get-started.mdindex 60c176d12..889f81aed 100644--- a/docs/api-reference/get-started.md+++ b/docs/api-reference/get-started.md@@ -1,26 +1,26 @@-## Get Started+# Get Started-### Installation+## Installation-Use <b>Node v6</b> and above, older node versions have not been tested+Use **Node v6** and above, older node versions have not been tested-```sh+```bashnpm install --save kepler.gl```-### Get Mapbox Token+## Get Mapbox TokenKepler.gl is built on top of [Mapbox GL](https://www.mapbox.com). A mapbox account and an access token are needed to use kepler.gl in your app. Get a [Mapbox Access Token](https://www.mapbox.com/help/define-access-token/) at mapbox.com.-### Basic Usage+## Basic Usage-![Basic Usage][basic-usage]+-#### 1. Mount reducer+### 1. Mount reducer-Kepler.gl uses [Redux](https://redux.js.org/) to manage its internal state, along with [react-palm](https://github.com/btford/react-palm) middleware to handle side effects. Mount kepler.gl reducer in your store, apply `taskMiddleware`.+Kepler.gl uses [Redux](https://redux.js.org/) to manage its internal state, along with [react-palm](https://github.com/btford/react-palm) middleware to handle side effects. Mount kepler.gl reducer in your store, apply `taskMiddleware`.-```js+```javascriptimport keplerGlReducer from 'kepler.gl/reducers';import {createStore, combineReducers, applyMiddleware} from 'redux';import {taskMiddleware} from 'react-palm/tasks';@@ -36,12 +36,12 @@ const reducer = combineReducers({// create storeconst store = createStore(reducer, {}, applyMiddleware(taskMiddleware));```-If you mount `keplerGlReducer` in another address instead of `keplerGl`, or it is not-mounted at root of your reducer, you will need to specify the path to it when you mount the component with the `getState` prop.-#### 2. Mount component+If you mount `keplerGlReducer` in another address instead of `keplerGl`, or it is not mounted at root of your reducer, you will need to specify the path to it when you mount the component with the `getState` prop.-```js+### 2. Mount component++```javascriptimport KeplerGl from 'kepler.gl';const Map = props => (@@ -53,14 +53,13 @@ const Map = props => ();```-#### 3. Add data to map--In order to interact with a kepler.gl instance and add new data to it, you can dispatch the __`addDataToMap`__ action from anywhere inside your app. It adds dataset(s) to a kepler.gl instance and updates the full configuration (mapState, mapStyle, visState).+### 3. Add data to map-Read more about [addDataToMap](./actions/actions.md#adddatatomap)+In order to interact with a kepler.gl instance and add new data to it, you can dispatch the **`addDataToMap`** action from anywhere inside your app. It adds dataset\(s\) to a kepler.gl instance and updates the full configuration \(mapState, mapStyle, visState\).+Read more about [addDataToMap](actions/actions.md#adddatatomap)-```js+```javascriptimport {addDataToMap} from 'kepler.gl/actions';this.props.dispatch(@@ -86,4 +85,3 @@ this.props.dispatch();```-[basic-usage]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/api_basic-usage.pngdiff --git a/docs/api-reference/processors.md b/docs/api-reference/processors.mdnew file mode 100644index 000000000..078c431fb--- /dev/null+++ b/docs/api-reference/processors.md@@ -0,0 +1,177 @@+# Processors++* [getFieldsFromData]()+* [processCsvData]()+* [processGeojson]()+* [processKeplerglJSON]()+* [processRowObject]()++## getFieldsFromData++Analyze field types from data in `string` format, e.g. uploaded csv. Assign `type`, `tableFieldIndex` and `format` \(timestamp only\) to each field++**Parameters**++* `data` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>** array of row object+* `fieldOrder` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) array of field names as string++**Examples**++```javascript+import {getFieldsFromData} from 'kepler.gl/processors';+const data = [{+ time: '2016-09-17 00:09:55',+ value: '4',+ surge: '1.2',+ isTrip: 'true',+ zeroOnes: '0'+}, {+ time: '2016-09-17 00:30:08',+ value: '3',+ surge: null,+ isTrip: 'false',+ zeroOnes: '1'+}, {+ time: null,+ value: '2',+ surge: '1.3',+ isTrip: null,+ zeroOnes: '1'+}];++const fieldOrder = ['time', 'value', 'surge', 'isTrip', 'zeroOnes'];+const fields = getFieldsFromData(data, fieldOrder);+// fields = [+// {name: 'time', format: 'YYYY-M-D H:m:s', tableFieldIndex: 1, type: 'timestamp'},+// {name: 'value', format: '', tableFieldIndex: 4, type: 'integer'},+// {name: 'surge', format: '', tableFieldIndex: 5, type: 'real'},+// {name: 'isTrip', format: '', tableFieldIndex: 6, type: 'boolean'},+// {name: 'zeroOnes', format: '', tableFieldIndex: 7, type: 'integer'}];+```++Returns [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>** formatted fields++## processCsvData++Process csv data, output a data object with `{fields: [], rows: []}`. The data object can be wrapped in a `dataset` and pass to [`addDataToMap`](actions/actions.md#adddatatomap)++**Parameters**++* `rawData` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) raw csv string++**Examples**++```javascript+import {processCsvData} from 'kepler.gl/processors';++const testData = `gps_data.utc_timestamp,gps_data.lat,gps_data.lng,gps_data.types,epoch,has_result,id,time,begintrip_ts_utc,begintrip_ts_local,date+2016-09-17 00:09:55,29.9900937,31.2590542,driver_analytics,1472688000000,False,1,2016-09-23T00:00:00.000Z,2016-10-01 09:41:39+00:00,2016-10-01 09:41:39+00:00,2016-09-23+2016-09-17 00:10:56,29.9927699,31.2461142,driver_analytics,1472688000000,False,2,2016-09-23T00:00:00.000Z,2016-10-01 09:46:37+00:00,2016-10-01 16:46:37+00:00,2016-09-23+2016-09-17 00:11:56,29.9907261,31.2312742,driver_analytics,1472688000000,False,3,2016-09-23T00:00:00.000Z,,,2016-09-23+2016-09-17 00:12:58,29.9870074,31.2175827,driver_analytics,1472688000000,False,4,2016-09-23T00:00:00.000Z,,,2016-09-23`++const dataset = {+ info: {id: 'test_data', label: 'My Csv'},+ data: processCsvData(testData)+};++dispatch(addDataToMap({+ datasets: [dataset],+ options: {centerMap: true, readOnly: true}+}));+```++Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) data object `{fields: [], rows: []}`++## processGeojson++Process GeoJSON [`FeatureCollection`](http://wiki.geojson.org/GeoJSON_draft_version_6#FeatureCollection), output a data object with `{fields: [], rows: []}`. The data object can be wrapped in a `dataset` and pass to [`addDataToMap`](actions/actions.md#adddatatomap)++**Parameters**++* `rawData` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) raw geojson feature collection++**Examples**++```javascript+import {addDataToMap} from 'kepler.gl/actions';+import {processGeojson} from 'kepler.gl/processors';++const geojson = {+ "type" : "FeatureCollection",+ "features" : [{+ "type" : "Feature",+ "properties" : {+ "capacity" : "10",+ "type" : "U-Rack"+ },+ "geometry" : {+ "type" : "Point",+ "coordinates" : [ -71.073283, 42.417500 ]+ }+ }]+};++dispatch(addDataToMap({+ datasets: {+ info: {+ label: 'Sample Taxi Trips in New York City',+ id: 'test_trip_data'+ },+ data: processGeojson(geojson)+ }+}));+```++Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) dataset containing `fields` and `rows`++## processKeplerglJSON++Process saved kepler.gl json to be pass to [`addDataToMap`](actions/actions.md#adddatatomap). The json object should contain `datasets` and `config`.++**Parameters**++* `rawData` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `rawData.datasets` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)+ * `rawData.config` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)++**Examples**++```javascript+import {addDataToMap} from 'kepler.gl/actions';+import {processKeplerglJSON} from 'kepler.gl/processors';++dispatch(addDataToMap(processKeplerglJSON(keplerGlJson)));+```++Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) datasets and config `{datasets: {}, config: {}}`++## processRowObject++Process data where each row is an object, output can be passed to [`addDataToMap`](actions/actions.md#adddatatomap)++**Parameters**++* `rawData` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>** an array of row object, each object should have the same number of keys++**Examples**++```javascript+import {addDataToMap} from 'kepler.gl/actions';+import {processRowObject} from 'kepler.gl/processors';++const data = [+ {lat: 31.27, lng: 127.56, value: 3},+ {lat: 31.22, lng: 126.26, value: 1}+];++dispatch(addDataToMap({+ datasets: {+ info: {label: 'My Data', id: 'my_data'},+ data: processRowObject(data)+ }+}));+```++Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) dataset containing `fields` and `rows`+diff --git a/docs/api-reference/processors/overview.md b/docs/api-reference/processors/overview.mddeleted file mode 100644index 6b7aa4b24..000000000--- a/docs/api-reference/processors/overview.md+++ /dev/null@@ -1,3 +0,0 @@-# Processors--...Coming soondiff --git a/docs/api-reference/processors/processors.md b/docs/api-reference/processors/processors.mddeleted file mode 100644index 10ac22b1b..000000000--- a/docs/api-reference/processors/processors.md+++ /dev/null@@ -1,223 +0,0 @@-<!-- Generated by documentation.js. Update this documentation by updating the source code. -->--### Table of Contents--- [getFieldsFromData][1]-- [processCsvData][4]-- [processGeojson][7]-- [processKeplerglJSON][10]-- [processRowObject][13]--## getFieldsFromData--Analyze field types from data in `string` format, e.g. uploaded csv.-Assign `type`, `tableFieldIndex` and `format` (timestamp only) to each field--**Parameters**--- `data` **[Array][16]<[Object][17]>** array of row object-- `fieldOrder` **[Array][16]** array of field names as string--**Examples**--```javascript-import {getFieldsFromData} from 'kepler.gl/processors';-const data = [{- time: '2016-09-17 00:09:55',- value: '4',- surge: '1.2',- isTrip: 'true',- zeroOnes: '0'-}, {- time: '2016-09-17 00:30:08',- value: '3',- surge: null,- isTrip: 'false',- zeroOnes: '1'-}, {- time: null,- value: '2',- surge: '1.3',- isTrip: null,- zeroOnes: '1'-}];--const fieldOrder = ['time', 'value', 'surge', 'isTrip', 'zeroOnes'];-const fields = getFieldsFromData(data, fieldOrder);-// fields = [-// {name: 'time', format: 'YYYY-M-D H:m:s', tableFieldIndex: 1, type: 'timestamp'},-// {name: 'value', format: '', tableFieldIndex: 4, type: 'integer'},-// {name: 'surge', format: '', tableFieldIndex: 5, type: 'real'},-// {name: 'isTrip', format: '', tableFieldIndex: 6, type: 'boolean'},-// {name: 'zeroOnes', format: '', tableFieldIndex: 7, type: 'integer'}];-```--Returns **[Array][16]<[Object][17]>** formatted fields--## processCsvData--Process csv data, output a data object with `{fields: [], rows: []}`.-The data object can be wrapped in a `dataset` and pass to [`addDataToMap`][18]--**Parameters**--- `rawData` **[string][19]** raw csv string--**Examples**--```javascript-import {processCsvData} from 'kepler.gl/processors';--const testData = `gps_data.utc_timestamp,gps_data.lat,gps_data.lng,gps_data.types,epoch,has_result,id,time,begintrip_ts_utc,begintrip_ts_local,date-2016-09-17 00:09:55,29.9900937,31.2590542,driver_analytics,1472688000000,False,1,2016-09-23T00:00:00.000Z,2016-10-01 09:41:39+00:00,2016-10-01 09:41:39+00:00,2016-09-23-2016-09-17 00:10:56,29.9927699,31.2461142,driver_analytics,1472688000000,False,2,2016-09-23T00:00:00.000Z,2016-10-01 09:46:37+00:00,2016-10-01 16:46:37+00:00,2016-09-23-2016-09-17 00:11:56,29.9907261,31.2312742,driver_analytics,1472688000000,False,3,2016-09-23T00:00:00.000Z,,,2016-09-23-2016-09-17 00:12:58,29.9870074,31.2175827,driver_analytics,1472688000000,False,4,2016-09-23T00:00:00.000Z,,,2016-09-23`--const dataset = {- info: {id: 'test_data', label: 'My Csv'},- data: processCsvData(testData)-};--dispatch(addDataToMap({- datasets: [dataset],- options: {centerMap: true, readOnly: true}-}));-```--Returns **[Object][17]** data object `{fields: [], rows: []}`--## processGeojson--Process GeoJSON [`FeatureCollection`][20],-output a data object with `{fields: [], rows: []}`.-The data object can be wrapped in a `dataset` and pass to [`addDataToMap`][18]--**Parameters**--- `rawData` **[Object][17]** raw geojson feature collection--**Examples**--```javascript-import {addDataToMap} from 'kepler.gl/actions';-import {processGeojson} from 'kepler.gl/processors';--const geojson = {- "type" : "FeatureCollection",- "features" : [{- "type" : "Feature",- "properties" : {- "capacity" : "10",- "type" : "U-Rack"- },- "geometry" : {- "type" : "Point",- "coordinates" : [ -71.073283, 42.417500 ]- }- }]-};--dispatch(addDataToMap({- datasets: {- info: {- label: 'Sample Taxi Trips in New York City',- id: 'test_trip_data'- },- data: processGeojson(geojson)- }-}));-```--Returns **[Object][17]** dataset containing `fields` and `rows`--## processKeplerglJSON--Process saved kepler.gl json to be pass to [`addDataToMap`][18].-The json object should contain `datasets` and `config`.--**Parameters**--- `rawData` **[Object][17]**- - `rawData.datasets` **[Array][16]**- - `rawData.config` **[Object][17]**--**Examples**--```javascript-import {addDataToMap} from 'kepler.gl/actions';-import {processKeplerglJSON} from 'kepler.gl/processors';--dispatch(addDataToMap(processKeplerglJSON(keplerGlJson)));-```--Returns **[Object][17]** datasets and config `{datasets: {}, config: {}}`--## processRowObject--Process data where each row is an object, output can be passed to [`addDataToMap`][18]--**Parameters**--- `rawData` **[Array][16]<[Object][17]>** an array of row object, each object should have the same number of keys--**Examples**--```javascript-import {addDataToMap} from 'kepler.gl/actions';-import {processRowObject} from 'kepler.gl/processors';--const data = [- {lat: 31.27, lng: 127.56, value: 3},- {lat: 31.22, lng: 126.26, value: 1}-];--dispatch(addDataToMap({- datasets: {- info: {label: 'My Data', id: 'my_data'},- data: processRowObject(data)- }-}));-```--Returns **[Object][17]** dataset containing `fields` and `rows`--[1]: #getfieldsfromdata--[2]: #parameters--[3]: #examples--[4]: #processcsvdata--[5]: #parameters-1--[6]: #examples-1--[7]: #processgeojson--[8]: #parameters-2--[9]: #examples-2--[10]: #processkeplergljson--[11]: #parameters-3--[12]: #examples-3--[13]: #processrowobject--[14]: #parameters-4--[15]: #examples-4--[16]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array--[17]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object--[18]: ../actions/actions.md#adddatatomap--[19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String--[20]: http://wiki.geojson.org/GeoJSON_draft_version_6#FeatureCollectiondiff --git a/docs/api-reference/reducers/README.md b/docs/api-reference/reducers/README.mdnew file mode 100644index 000000000..c1c61e085--- /dev/null+++ b/docs/api-reference/reducers/README.md@@ -0,0 +1,2 @@+# Reducers+diff --git a/docs/api-reference/reducers/combine.md b/docs/api-reference/reducers/combine.mdindex 48dd1889d..3d53bf177 100644--- a/docs/api-reference/reducers/combine.md+++ b/docs/api-reference/reducers/combine.md@@ -1,15 +1,13 @@-<!-- Generated by documentation.js. Update this documentation by updating the source code. -->+# combine### Table of Contents-- [combinedUpdaters][1]- - [addDataToMapUpdater][3]+* [combinedUpdaters](combine.md#combinedupdaters)+ * [addDataToMapUpdater](combine.md#adddatatomapupdater)## combinedUpdaters-Some actions will affect the entire kepler.lg instance state.-The updaters for these actions is exported as `combinedUpdaters`. These updater take the entire instance state-as the first argument. Read more about [Using updaters][5]+Some actions will affect the entire kepler.lg instance state. The updaters for these actions is exported as `combinedUpdaters`. These updater take the entire instance state as the first argument. Read more about [Using updaters](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/advanced-usage/using-updaters.md)**Examples**@@ -53,41 +51,27 @@ export default composedReducer;Combine data and full configuration update in a single action-- **Action**: [`addDataToMap`][6]+* **Action**: [`addDataToMap`](../actions/actions.md#adddatatomap)**Parameters**-- `state` **[Object][7]** kepler.gl instance state, containing all subreducer state-- `action` **[Object][7]**- - `action.payload` **[Object][7]** `{datasets, options, config}`- - `action.payload.datasets` **([Array][8]<[Object][7]> | [Object][7])** **\*required** datasets can be a dataset or an array of datasets- Each dataset object needs to have `info` and `data` property.- - `action.payload.datasets.info` **[Object][7]** \-info of a dataset- - `action.payload.datasets.info.id` **[string][9]** id of this dataset. If config is defined, `id` should matches the `dataId` in config.- - `action.payload.datasets.info.label` **[string][9]** A display name of this dataset- - `action.payload.datasets.data` **[Object][7]** **\*required** The data object, in a tabular format with 2 properties `fields` and `rows`- - `action.payload.datasets.data.fields` **[Array][8]<[Object][7]>** **\*required** Array of fields,- - `action.payload.datasets.data.fields.name` **[string][9]** **\*required** Name of the field,- - `action.payload.datasets.data.rows` **[Array][8]<[Array][8]>** **\*required** Array of rows, in a tabular format with `fields` and `rows`- - `action.payload.options` **[Object][7]** option object `{centerMap: true}`- - `action.payload.config` **[Object][7]** map config+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) kepler.gl instance state, containing all subreducer state+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `{datasets, options, config}`+ * `action.payload.datasets` **\(**[**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**> \|** [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**\)** **\*required** datasets can be a dataset or an array of datasets-Returns **[Object][7]** nextState+ Each dataset object needs to have `info` and `data` property.-[1]: #combinedupdaters+ * `action.payload.datasets.info` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) -info of a dataset+ * `action.payload.datasets.info.id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) id of this dataset. If config is defined, `id` should matches the `dataId` in config.+ * `action.payload.datasets.info.label` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) A display name of this dataset+ * `action.payload.datasets.data` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) **\*required** The data object, in a tabular format with 2 properties `fields` and `rows`+ * `action.payload.datasets.data.fields` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>** **\*required** Array of fields,+ * `action.payload.datasets.data.fields.name` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\*required** Name of the field,+ * `action.payload.datasets.data.rows` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**>** **\*required** Array of rows, in a tabular format with `fields` and `rows`-[2]: #examples+ * `action.payload.options` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) option object `{centerMap: true}`+ * `action.payload.config` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) map config-[3]: #adddatatomapupdater+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState-[4]: #parameters--[5]: ../advanced-usage/using-updaters.md--[6]: ../actions/actions.md#adddatatomap--[7]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object--[8]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array--[9]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Stringdiff --git a/docs/api-reference/reducers/map-state.md b/docs/api-reference/reducers/map-state.mdindex 2ce9ccf1c..e7908c5bb 100644--- a/docs/api-reference/reducers/map-state.md+++ b/docs/api-reference/reducers/map-state.md@@ -1,20 +1,19 @@-<!-- Generated by documentation.js. Update this documentation by updating the source code. -->+# map-state### Table of Contents-- [mapStateUpdaters][1]- - [fitBoundsUpdater][3]- - [INITIAL_MAP_STATE][5]- - [receiveMapConfigUpdater][7]- - [resetMapConfigUpdater][9]- - [togglePerspectiveUpdater][11]- - [toggleSplitMapUpdater][13]- - [updateMapUpdater][15]+* [mapStateUpdaters](map-state.md#mapstateupdaters)+ * [fitBoundsUpdater](map-state.md#fitboundsupdater)+ * [INITIAL\_MAP\_STATE](map-state.md#initial_map_state)+ * [receiveMapConfigUpdater](map-state.md#receivemapconfigupdater)+ * [resetMapConfigUpdater](map-state.md#resetmapconfigupdater)+ * [togglePerspectiveUpdater](map-state.md#toggleperspectiveupdater)+ * [toggleSplitMapUpdater](map-state.md#togglesplitmapupdater)+ * [updateMapUpdater](map-state.md#updatemapupdater)## mapStateUpdaters-Updaters for `mapState` reducer. Can be used in your root reducer to directly modify kepler.gl's state.-Read more about [Using updaters][17]+Updaters for `mapState` reducer. Can be used in your root reducer to directly modify kepler.gl's state. Read more about [Using updaters](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/advanced-usage/using-updaters.md)**Examples**@@ -53,149 +52,96 @@ export default composedReducer;Fit map viewport to bounds-- **Action**: [`fitBounds`][18]+* **Action**: [`fitBounds`](../actions/actions.md#fitbounds)**Parameters**-- `state` **[Object][19]**-- `action` **[Object][19]**- - `action.payload` **[Array][20]<[number][21]>** bounds as `[lngMin, latMin, lngMax, latMax]`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**>** bounds as `[lngMin, latMin, lngMax, latMax]`-Returns **[Object][19]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState-### INITIAL_MAP_STATE+### INITIAL\_MAP\_STATEDefault initial `mapState`#### Properties-- `pitch` **[number][21]** Default: `0`-- `bearing` **[number][21]** Default: `0`-- `latitude` **[number][21]** Default: `37.75043`-- `longitude` **[number][21]** Default: `-122.34679`-- `zoom` **[number][21]** Default: `9`-- `dragRotate` **[boolean][22]** Default: `false`-- `width` **[number][21]** Default: `800`-- `height` **[number][21]** Default: `800`-- `isSplit` **[boolean][22]** Default: `false`+* `pitch` [**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) Default: `0`+* `bearing` [**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) Default: `0`+* `latitude` [**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) Default: `37.75043`+* `longitude` [**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) Default: `-122.34679`+* `zoom` [**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) Default: `9`+* `dragRotate` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) Default: `false`+* `width` [**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) Default: `800`+* `height` [**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) Default: `800`+* `isSplit` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) Default: `false`### receiveMapConfigUpdaterUpdate `mapState` to propagate a new config-- **Action**: [`receiveMapConfig`][23]+* **Action**: [`receiveMapConfig`](../actions/actions.md#receivemapconfig)**Parameters**-- `state` **[Object][19]**-- `action` **[Object][19]**- - `action.payload` **[Object][19]** saved map config- - `action.payload.config` (optional, default `{}`)- - `action.payload.options` (optional, default `{}`)- - `action.payload.bounds` (optional, default `null`)+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) saved map config+ * `action.payload.config` \(optional, default `{}`\)+ * `action.payload.options` \(optional, default `{}`\)+ * `action.payload.bounds` \(optional, default `null`\)-Returns **[Object][19]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### resetMapConfigUpdaterreset mapState to initial State-- **Action**: [`resetMapConfig`][24]+* **Action**: [`resetMapConfig`](../actions/actions.md#resetmapconfig)**Parameters**-- `state` **[Object][19]** `mapState`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `mapState`-Returns **[Object][19]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### togglePerspectiveUpdaterToggle between 3d and 2d map.-- **Action**: [`togglePerspective`][25]+* **Action**: [`togglePerspective`](../actions/actions.md#toggleperspective)**Parameters**-- `state` **[Object][19]**+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)-Returns **[Object][19]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### toggleSplitMapUpdaterToggle between one or split maps-- **Action**: [`toggleSplitMap`][26]+* **Action**: [`toggleSplitMap`](../actions/actions.md#togglesplitmap)**Parameters**-- `state` **[Object][19]**+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)-Returns **[Object][19]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### updateMapUpdaterUpdate map viewport-- **Action**: [`updateMap`][27]+* **Action**: [`updateMap`](../actions/actions.md#updatemap)**Parameters**-- `state` **[Object][19]**-- `action` **[Object][19]**- - `action.payload` **[Object][19]** viewport+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) viewport-Returns **[Object][19]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState-[1]: #mapstateupdaters--[2]: #examples--[3]: #fitboundsupdater--[4]: #parameters--[5]: #initial_map_state--[6]: #properties--[7]: #receivemapconfigupdater--[8]: #parameters-1--[9]: #resetmapconfigupdater--[10]: #parameters-2--[11]: #toggleperspectiveupdater--[12]: #parameters-3--[13]: #togglesplitmapupdater--[14]: #parameters-4--[15]: #updatemapupdater--[16]: #parameters-5--[17]: ../advanced-usage/using-updaters.md--[18]: ../actions/actions.md#fitbounds--[19]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object--[20]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array--[21]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number--[22]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean--[23]: ../actions/actions.md#receivemapconfig--[24]: ../actions/actions.md#resetmapconfig--[25]: ../actions/actions.md#toggleperspective--[26]: ../actions/actions.md#togglesplitmap--[27]: ../actions/actions.md#updatemapdiff --git a/docs/api-reference/reducers/map-style.md b/docs/api-reference/reducers/map-style.mdindex 1c5db3749..6c89e6e86 100644--- a/docs/api-reference/reducers/map-style.md+++ b/docs/api-reference/reducers/map-style.md@@ -1,22 +1,21 @@-<!-- Generated by documentation.js. Update this documentation by updating the source code. -->+# map-style### Table of Contents-- [mapStyleUpdaters][1]- - [INITIAL_MAP_STYLE][3]- - [initMapStyleUpdater][5]- - [inputMapStyleUpdater][7]- - [loadCustomMapStyleUpdater][9]- - [loadMapStyleErrUpdater][11]- - [loadMapStylesUpdater][13]- - [mapConfigChangeUpdater][15]- - [mapStyleChangeUpdater][17]- - [resetMapConfigMapStyleUpdater][19]+* [mapStyleUpdaters](map-style.md#mapstyleupdaters)+ * [INITIAL\_MAP\_STYLE](map-style.md#initial_map_style)+ * [initMapStyleUpdater](map-style.md#initmapstyleupdater)+ * [inputMapStyleUpdater](map-style.md#inputmapstyleupdater)+ * [loadCustomMapStyleUpdater](map-style.md#loadcustommapstyleupdater)+ * [loadMapStyleErrUpdater](map-style.md#loadmapstyleerrupdater)+ * [loadMapStylesUpdater](map-style.md#loadmapstylesupdater)+ * [mapConfigChangeUpdater](map-style.md#mapconfigchangeupdater)+ * [mapStyleChangeUpdater](map-style.md#mapstylechangeupdater)+ * [resetMapConfigMapStyleUpdater](map-style.md#resetmapconfigmapstyleupdater)## mapStyleUpdaters-Updaters for `mapStyle`. Can be used in your root reducer to directly modify kepler.gl's state.-Read more about [Using updaters][21]+Updaters for `mapStyle`. Can be used in your root reducer to directly modify kepler.gl's state. Read more about [Using updaters](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/advanced-usage/using-updaters.md)**Examples**@@ -52,207 +51,142 @@ const composedReducer = (state, action) => {export default composedReducer;```-### INITIAL_MAP_STYLE+### INITIAL\_MAP\_STYLEDefault initial `mapStyle`#### Properties-- `styleType` **[string][22]** Default: `'dark'`-- `visibleLayerGroups` **[Object][23]** Default: `{}`-- `topLayerGroups` **[Object][23]** Default: `{}`-- `mapStyles` **[Object][23]** mapping from style key to style object-- `mapboxApiAccessToken` **[string][22]** Default: `null`-- `inputStyle` **[Object][23]** Default: `{}`-- `threeDBuildingColor` **[Array][24]** Default: `[r, g, b]`+* `styleType` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) Default: `'dark'`+* `visibleLayerGroups` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Default: `{}`+* `topLayerGroups` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Default: `{}`+* `mapStyles` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) mapping from style key to style object+* `mapboxApiAccessToken` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) Default: `null`+* `inputStyle` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Default: `{}`+* `threeDBuildingColor` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) Default: `[r, g, b]`### initMapStyleUpdater-Propagate `mapStyle` reducer with `mapboxApiAccessToken` and `mapStylesReplaceDefault`.-if mapStylesReplaceDefault is true mapStyles is emptied; loadMapStylesUpdater() will-populate mapStyles.+Propagate `mapStyle` reducer with `mapboxApiAccessToken` and `mapStylesReplaceDefault`. if mapStylesReplaceDefault is true mapStyles is emptied; loadMapStylesUpdater\(\) will populate mapStyles.-- **Action**: [`keplerGlInit`][25]+* **Action**: [`keplerGlInit`](../actions/actions.md#keplerglinit)**Parameters**-- `state` **[Object][23]**-- `action` **[Object][23]**- - `action.payload` **[Object][23]**- - `action.payload.mapboxApiAccessToken` **[string][22]**+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload.mapboxApiAccessToken` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)-Returns **[Object][23]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### inputMapStyleUpdaterInput a custom map style object-- **Action**: [`inputMapStyle`][26]+* **Action**: [`inputMapStyle`](../actions/actions.md#inputmapstyle)**Parameters**-- `state` **[Object][23]** `mapStyle`-- `action` **[Object][23]** action object- - `action.payload` **[Object][23]** inputStyle- - `action.payload.url` **[string][22]** style url e.g. `'mapbox://styles/heshan/xxxxxyyyyzzz'`- - `action.payload.id` **[string][22]** style url e.g. `'custom_style_1'`- - `action.payload.style` **[Object][23]** actual mapbox style json- - `action.payload.name` **[string][22]** style name- - `action.payload.layerGroups` **[Object][23]** layer groups that can be used to set map layer visibility- - `action.payload.icon` **[Object][23]** icon image data url- - `action.payload.inputStyle`- - `action.payload.mapState`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `mapStyle`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action object+ * `action.payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) inputStyle+ * `action.payload.url` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) style url e.g. `'mapbox://styles/heshan/xxxxxyyyyzzz'`+ * `action.payload.id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) style url e.g. `'custom_style_1'`+ * `action.payload.style` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) actual mapbox style json+ * `action.payload.name` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) style name+ * `action.payload.layerGroups` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) layer groups that can be used to set map layer visibility+ * `action.payload.icon` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) icon image data url+ * `action.payload.inputStyle`+ * `action.payload.mapState`-Returns **[Object][23]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### loadCustomMapStyleUpdaterCallback when a custom map style object is received-- **Action**: [`loadCustomMapStyle`][27]+* **Action**: [`loadCustomMapStyle`](../actions/actions.md#loadcustommapstyle)**Parameters**-- `state` **[Object][23]** `mapStyle`-- `action` **[Object][23]**- - `action.payload` **[Object][23]**- - `action.payload.icon` **[string][22]**- - `action.payload.style` **[Object][23]**- - `action.payload.error` **any**- - `action.payload.icon`- - `action.payload.style`- - `action.payload.error`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `mapStyle`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload.icon` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)+ * `action.payload.style` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload.error` **any**+ * `action.payload.icon`+ * `action.payload.style`+ * `action.payload.error`-Returns **[Object][23]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### loadMapStyleErrUpdaterCallback when load map style error-- **Action**: [`loadMapStyleErr`][28]+* **Action**: [`loadMapStyleErr`](../actions/actions.md#loadmapstyleerr)**Parameters**-- `state` **[Object][23]** `mapStyle`-- `action` **[Object][23]**- - `action.payload` **any** error+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `mapStyle`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` **any** error-Returns **[Object][23]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### loadMapStylesUpdaterCallback when load map style success-- **Action**: [`loadMapStyles`][29]+* **Action**: [`loadMapStyles`](../actions/actions.md#loadmapstyles)**Parameters**-- `state` **[Object][23]** `mapStyle`-- `action` **[Object][23]**- - `action.payload` **[Object][23]** a `{[id]: style}` mapping+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `mapStyle`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) a `{[id]: style}` mapping-Returns **[Object][23]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### mapConfigChangeUpdaterUpdate `visibleLayerGroups`to change layer group visibility-- **Action**: [`mapConfigChange`][30]+* **Action**: [`mapConfigChange`](../actions/actions.md#mapconfigchange)**Parameters**-- `state` **[Object][23]** `mapStyle`-- `action` **[Object][23]**- - `action.payload` **[Object][23]** new config `{visibleLayerGroups: {label: false, road: true, background: true}}`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `mapStyle`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) new config `{visibleLayerGroups: {label: false, road: true, background: true}}`-Returns **[Object][23]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### mapStyleChangeUpdaterChange to another map style. The selected style should already been loaded into `mapStyle.mapStyles`-- **Action**: [`mapStyleChange`][31]+* **Action**: [`mapStyleChange`](../actions/actions.md#mapstylechange)**Parameters**-- `state` **[Object][23]** `mapStyle`-- `action` **[Object][23]**- - `action.payload` **[string][22]**+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `mapStyle`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)-Returns **[Object][23]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### resetMapConfigMapStyleUpdaterReset map style config to initial state-- **Action**: [`resetMapConfig`][32]+* **Action**: [`resetMapConfig`](../actions/actions.md#resetmapconfig)**Parameters**-- `state` **[Object][23]** `mapStyle`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `mapStyle`-Returns **[Object][23]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState-[1]: #mapstyleupdaters--[2]: #examples--[3]: #initial_map_style--[4]: #properties--[5]: #initmapstyleupdater--[6]: #parameters--[7]: #inputmapstyleupdater--[8]: #parameters-1--[9]: #loadcustommapstyleupdater--[10]: #parameters-2--[11]: #loadmapstyleerrupdater--[12]: #parameters-3--[13]: #loadmapstylesupdater--[14]: #parameters-4--[15]: #mapconfigchangeupdater--[16]: #parameters-5--[17]: #mapstylechangeupdater--[18]: #parameters-6--[19]: #resetmapconfigmapstyleupdater--[20]: #parameters-7--[21]: ../advanced-usage/using-updaters.md--[22]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String--[23]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object--[24]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array--[25]: ../actions/actions.md#keplerglinit--[26]: ../actions/actions.md#inputmapstyle--[27]: ../actions/actions.md#loadcustommapstyle--[28]: ../actions/actions.md#loadmapstyleerr--[29]: ../actions/actions.md#loadmapstyles--[30]: ../actions/actions.md#mapconfigchange--[31]: ../actions/actions.md#mapstylechange--[32]: ../actions/actions.md#resetmapconfigdiff --git a/docs/api-reference/reducers/overview.md b/docs/api-reference/reducers/overview.mdindex 56cf408f3..3e93d0dd2 100644--- a/docs/api-reference/reducers/overview.md+++ b/docs/api-reference/reducers/overview.md@@ -1,26 +1,29 @@+# overview+## ReducersKepler.gl is a redux-connected component that utilizes redux to manage its state. The basic implementation of kepler.gl reducer is simple. However, to make the most of it, it's recommended to have basic knowledge on:-- [Redux][redux] state container-- [React][react]-- [React Redux connect][react-redux]-+* [Redux](https://redux.js.org/) state container+* [React](https://reactjs.org/)+* [React Redux connect](https://react-redux.js.org/)-![Compose-reducer][diagram-1]+-It is immportant to understand the relationship between __kepler.gl reducer__, __instance reducer__ and __subreducer__. Kepler.gl reducer is the root reducer that combines multiple instance reducer, which manages the state of each individual kepler.gl component. The instance reducer is consists of 4 subreducers, each manages an independent part of the state.+It is immportant to understand the relationship between **kepler.gl reducer**, **instance reducer** and **subreducer**. Kepler.gl reducer is the root reducer that combines multiple instance reducer, which manages the state of each individual kepler.gl component. The instance reducer is consists of 4 subreducers, each manages an independent part of the state.## KeplerGl ReducerTo connect kepler.gl components to your Redux app you'll need the following pieces from the kepler.gl package:-- Redux Reducer: `keplerGlReducer` imported from `kepler.gl/reducers`-- React Component: `KeplerGl` imported from `kepler.gl`-These are the only 2 pieces you need to get kepler.gl up and running in your app. When you mount kepler.gl reducer in your app reducer (with `combineReducers`), it will then managers __ALL__ KeplerGl component instances that you add to your app. Each kepler.gl instance state is stored in a instance reduccer.+* Redux Reducer: `keplerGlReducer` imported from `kepler.gl/reducers`+* React Component: `KeplerGl` imported from `kepler.gl`++These are the only 2 pieces you need to get kepler.gl up and running in your app. When you mount kepler.gl reducer in your app reducer \(with `combineReducers`\), it will then managers **ALL** KeplerGl component instances that you add to your app. Each kepler.gl instance state is stored in a instance reduccer.For instance, if you have 2 kepler.gl components in your App:-```js++```javascriptimport KeplerGl from 'kepler.gl';const MapApp = () => (@@ -32,7 +35,8 @@ const MapApp = () => (```Your redux state will be:-```js++```javascriptstate = {keplerGl: {foo: {},@@ -45,34 +49,28 @@ state = {## Instance Reducer-Each kepler.gl component state is stored in a instance reduccer. A instance reducer has 4 subreducers. __`visState`__, __`mapState`__, __`mapStyle`__ and __`uiState`__. Each of them managers a piece of state that is mostly self contained.-- __visState__ - Manages all data and visualization related state, including datasets, layers, filters and interaction configs. Some of the key updaters are `updateVisDataUpdater`, `layerConfigChangeUpdater`, `setFilterUpdater`, `interactionConfigChangeUpdater`.--- __mapState__ - Manages base map behavior including the viewport, drag rotate and toggle split maps. Key updates are `updateMapUpdater`, `toggleSplitMapUpdater` and `togglePerspectiveUpdater`.--- __mapStyle__ - Managers base map style, including setting base map style, toggling base map layers and adding custom base map style.--- __uiState__ - Managers all UI component transition state, including open / close side panel, current displayed panel etc. Note, ui state reducer is the only reducer that’s not saved in kepler.gl schema.+Each kepler.gl component state is stored in a instance reduccer. A instance reducer has 4 subreducers. **`visState`**, **`mapState`**, **`mapStyle`** and **`uiState`**. Each of them managers a piece of state that is mostly self contained.+* **visState** - Manages all data and visualization related state, including datasets, layers, filters and interaction configs. Some of the key updaters are `updateVisDataUpdater`, `layerConfigChangeUpdater`, `setFilterUpdater`, `interactionConfigChangeUpdater`.+* **mapState** - Manages base map behavior including the viewport, drag rotate and toggle split maps. Key updates are `updateMapUpdater`, `toggleSplitMapUpdater` and `togglePerspectiveUpdater`.+* **mapStyle** - Managers base map style, including setting base map style, toggling base map layers and adding custom base map style.+* **uiState** - Managers all UI component transition state, including open / close side panel, current displayed panel etc. Note, ui state reducer is the only reducer that’s not saved in kepler.gl schema.## Subreducer-The subreducers - __`visState`__, __`mapState`__, __`mapStyle`__ and __`uiState`__ - are assembled by a list of action handlers, each handler mapped to a state transition function named xxUpdater. For instance, here is a snippet of the map state reducer in kepler.gl:+The subreducers - **`visState`**, **`mapState`**, **`mapStyle`** and **`uiState`** - are assembled by a list of action handlers, each handler mapped to a state transition function named xxUpdater. For instance, here is a snippet of the map state reducer in kepler.gl:-```js+```javascript/* Action Handlers */const actionHandler = {- [ActionTypes.UPDATE_MAP]: updateMapUpdater,- [ActionTypes.FIT_BOUNDS]: fitBoundsUpdater,- [ActionTypes.TOGGLE_PERSPECTIVE]: togglePerspectiveUpdater};```-User can import a specific action handler in their root reducer and use it to directly modify kepler.gl’s state (without dispathcing a kepler.gl action). This will give user the full control over kepler.gl’s component state.+User can import a specific action handler in their root reducer and use it to directly modify kepler.gl’s state \(without dispathcing a kepler.gl action\). This will give user the full control over kepler.gl’s component state.Here is an example how you can listen to an app action `QUERY_SUCCESS` and call `updateVisDataUpdater` to load data into kepler.gl.-```js+```javascriptimport keplerGlReducer, {visStateUpdaters} from 'kepler.gl/reducers';// Root Reducer@@ -107,7 +105,4 @@ const composedReducer = (state, action) => {export default composedReducer;```-[redux]: https://redux.js.org/-[react]: https://reactjs.org/-[react-redux]: https://react-redux.js.org/-[diagram-1]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/api_reducers_compose-reducers.png+diff --git a/docs/api-reference/reducers/reducers.md b/docs/api-reference/reducers/reducers.mdindex 54055fdcc..1b1500599 100644--- a/docs/api-reference/reducers/reducers.md+++ b/docs/api-reference/reducers/reducers.md@@ -1,20 +1,19 @@-<!-- Generated by documentation.js. Update this documentation by updating the source code. -->+# reducers### Table of Contents-- [keplerGlReducer][1]- - [keplerGlReducer.initialState][3]- - [keplerGlReducer.plugin][6]-- [mapStateLens][9]-- [mapStyleLens][11]-- [providerStateLens][13]-- [uiStateLens][15]-- [visStateLens][17]+* [keplerGlReducer](reducers.md#keplerglreducer)+ * [keplerGlReducer.initialState](reducers.md#keplerglreducerinitialstate)+ * [keplerGlReducer.plugin](reducers.md#keplerglreducerplugin)+* [mapStateLens](reducers.md#mapstatelens)+* [mapStyleLens](reducers.md#mapstylelens)+* [providerStateLens](reducers.md#providerstatelens)+* [uiStateLens](reducers.md#uistatelens)+* [visStateLens](reducers.md#visstatelens)## keplerGlReducer-Kepler.gl reducer to be mounted to your store. You can mount `keplerGlReducer` at property `keplerGl`, if you choose-to mount it at another address e.g. `foo` you will need to specify it when you mount `KeplerGl` component in your app with `getState: state => state.foo`+Kepler.gl reducer to be mounted to your store. You can mount `keplerGlReducer` at property `keplerGl`, if you choose to mount it at another address e.g. `foo` you will need to specify it when you mount `KeplerGl` component in your app with `getState: state => state.foo`**Examples**@@ -38,20 +37,18 @@ export default createStore(reducer, initialState, applyMiddleware(taskMiddleware### keplerGlReducer.initialState-Return a reducer that initiated with custom initial state.-The parameter should be an object mapping from `subreducer` name to custom subreducer state,-which will be shallow **merged** with default initial state.+Return a reducer that initiated with custom initial state. The parameter should be an object mapping from `subreducer` name to custom subreducer state, which will be shallow **merged** with default initial state.Default subreducer state:-- [`visState`][19]-- [`mapState`][20]-- [`mapStyle`][21]-- [`uiState`][22]+* [`visState`](vis-state.md#INITIAL_VIS_STATE)+* [`mapState`](map-state.md#INITIAL_MAP_STATE)+* [`mapStyle`](map-style.md#INITIAL_MAP_STYLE)+* [`uiState`](ui-state.md#INITIAL_UI_STATE)**Parameters**-- `iniSt` **[Object][23]** custom state to be merged with default initial state+* `iniSt` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) custom state to be merged with default initial state**Examples**@@ -64,17 +61,11 @@ const myKeplerGlReducer = keplerGlReducer### keplerGlReducer.plugin-Returns a kepler.gl reducer that will also pass each action through additional reducers spiecified.-The parameter should be either a reducer map or a reducer function.-The state passed into the additional action handler is the instance state.-It will include all the subreducers `visState`, `uiState`, `mapState` and `mapStyle`.-`.plugin` is only meant to be called once when mounting the keplerGlReducer to the store.-**Note** This is an advanced option to give you more freedom to modify the internal state of the kepler.gl instance.-You should only use this to adding additional actions instead of replacing default actions.+Returns a kepler.gl reducer that will also pass each action through additional reducers spiecified. The parameter should be either a reducer map or a reducer function. The state passed into the additional action handler is the instance state. It will include all the subreducers `visState`, `uiState`, `mapState` and `mapStyle`. `.plugin` is only meant to be called once when mounting the keplerGlReducer to the store. **Note** This is an advanced option to give you more freedom to modify the internal state of the kepler.gl instance. You should only use this to adding additional actions instead of replacing default actions.**Parameters**-- `customReducer` **([Object][23] \| [Function][24])** A reducer map or a reducer+* `customReducer` **\(**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) **\|** [**Function**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)**\)** A reducer map or a reducer**Examples**@@ -104,95 +95,41 @@ const myKeplerGlReducer = keplerGlReducer## mapStateLens-Connect subreducer `mapState`, used with `injectComponents`. Learn more at-[Replace UI Component][25]+Connect subreducer `mapState`, used with `injectComponents`. Learn more at [Replace UI Component](../advanced-usages/replace-ui-component.md#pass-custom-component-props)**Parameters**-- `reduxState` **any**+* `reduxState` **any**## mapStyleLens-Connect subreducer `mapStyle`, used with `injectComponents`. Learn more at-[Replace UI Component][25]+Connect subreducer `mapStyle`, used with `injectComponents`. Learn more at [Replace UI Component](../advanced-usages/replace-ui-component.md#pass-custom-component-props)**Parameters**-- `reduxState` **any**+* `reduxState` **any**## providerStateLens-Connect subreducer `providerState`, used with `injectComponents`. Learn more at-[Replace UI Component][25]+Connect subreducer `providerState`, used with `injectComponents`. Learn more at [Replace UI Component](../advanced-usages/replace-ui-component.md#pass-custom-component-props)**Parameters**-- `reduxState` **any**+* `reduxState` **any**## uiStateLens-Connect subreducer `uiState`, used with `injectComponents`. Learn more at-[Replace UI Component][25]+Connect subreducer `uiState`, used with `injectComponents`. Learn more at [Replace UI Component](../advanced-usages/replace-ui-component.md#pass-custom-component-props)**Parameters**-- `reduxState` **any**+* `reduxState` **any**## visStateLens-Connect subreducer `visState`, used with `injectComponents`. Learn more at-[Replace UI Component][25]+Connect subreducer `visState`, used with `injectComponents`. Learn more at [Replace UI Component](../advanced-usages/replace-ui-component.md#pass-custom-component-props)**Parameters**-- `reduxState` **any**+* `reduxState` **any**-[1]: #keplerglreducer--[2]: #examples--[3]: #keplerglreducerinitialstate--[4]: #parameters--[5]: #examples-1--[6]: #keplerglreducerplugin--[7]: #parameters-1--[8]: #examples-2--[9]: #mapstatelens--[10]: #parameters-2--[11]: #mapstylelens--[12]: #parameters-3--[13]: #providerstatelens--[14]: #parameters-4--[15]: #uistatelens--[16]: #parameters-5--[17]: #visstatelens--[18]: #parameters-6--[19]: ./vis-state.md#INITIAL_VIS_STATE--[20]: ./map-state.md#INITIAL_MAP_STATE--[21]: ./map-style.md#INITIAL_MAP_STYLE--[22]: ./ui-state.md#INITIAL_UI_STATE--[23]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object--[24]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function--[25]: ../advanced-usages/replace-ui-component.md#pass-custom-component-propsdiff --git a/docs/api-reference/reducers/ui-state.md b/docs/api-reference/reducers/ui-state.mdindex 73f31446b..ac88098ae 100644--- a/docs/api-reference/reducers/ui-state.md+++ b/docs/api-reference/reducers/ui-state.md@@ -1,38 +1,37 @@-<!-- Generated by documentation.js. Update this documentation by updating the source code. -->+# ui-state### Table of Contents-- [uiStateUpdaters][1]- - [addNotificationUpdater][3]- - [cleanupExportImage][5]- - [DEFAULT_EXPORT_DATA][7]- - [DEFAULT_EXPORT_IMAGE][9]- - [DEFAULT_MAP_CONTROLS_FEATURES][11]- - [hideExportDropdownUpdater][13]- - [INITIAL_UI_STATE][15]- - [loadFilesErrUpdater][17]- - [loadFilesUpdater][19]- - [openDeleteModalUpdater][21]- - [removeNotificationUpdater][23]- - [setExportDataTypeUpdater][25]- - [setExportDataUpdater][27]- - [setExportFilteredUpdater][29]- - [setExportImageDataUri][31]- - [setExportImageSetting][33]- - [setExportSelectedDatasetUpdater][35]- - [showExportDropdownUpdater][37]- - [startExportingImage][39]- - [toggleMapControlUpdater][41]- - [toggleModalUpdater][43]- - [toggleSidePanelUpdater][45]- - [toggleSplitMapUpdater][47]-- [DEFAULT_EXPORT_HTML][49]-- [setUserMapboxAccessTokenUpdater][51]+* [uiStateUpdaters](ui-state.md#uistateupdaters)+ * [addNotificationUpdater](ui-state.md#addnotificationupdater)+ * [cleanupExportImage](ui-state.md#cleanupexportimage)+ * [DEFAULT\_EXPORT\_DATA](ui-state.md#default_export_data)+ * [DEFAULT\_EXPORT\_IMAGE](ui-state.md#default_export_image)+ * [DEFAULT\_MAP\_CONTROLS\_FEATURES](ui-state.md#default_map_controls_features)+ * [hideExportDropdownUpdater](ui-state.md#hideexportdropdownupdater)+ * [INITIAL\_UI\_STATE](ui-state.md#initial_ui_state)+ * [loadFilesErrUpdater](ui-state.md#loadfileserrupdater)+ * [loadFilesUpdater](ui-state.md#loadfilesupdater)+ * [openDeleteModalUpdater](ui-state.md#opendeletemodalupdater)+ * [removeNotificationUpdater](ui-state.md#removenotificationupdater)+ * [setExportDataTypeUpdater](ui-state.md#setexportdatatypeupdater)+ * [setExportDataUpdater](ui-state.md#setexportdataupdater)+ * [setExportFilteredUpdater](ui-state.md#setexportfilteredupdater)+ * [setExportImageDataUri](ui-state.md#setexportimagedatauri)+ * [setExportImageSetting](ui-state.md#setexportimagesetting)+ * [setExportSelectedDatasetUpdater](ui-state.md#setexportselecteddatasetupdater)+ * [showExportDropdownUpdater](ui-state.md#showexportdropdownupdater)+ * [startExportingImage](ui-state.md#startexportingimage)+ * [toggleMapControlUpdater](ui-state.md#togglemapcontrolupdater)+ * [toggleModalUpdater](ui-state.md#togglemodalupdater)+ * [toggleSidePanelUpdater](ui-state.md#togglesidepanelupdater)+ * [toggleSplitMapUpdater](ui-state.md#togglesplitmapupdater)+* [DEFAULT\_EXPORT\_HTML](ui-state.md#default_export_html)+* [setUserMapboxAccessTokenUpdater](ui-state.md#setusermapboxaccesstokenupdater)## uiStateUpdaters-Updaters for `uiState` reducer. Can be used in your root reducer to directly modify kepler.gl's state.-Read more about [Using updaters][53]+Updaters for `uiState` reducer. Can be used in your root reducer to directly modify kepler.gl's state. Read more about [Using updaters](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/advanced-usage/using-updaters.md)**Examples**@@ -71,510 +70,343 @@ export default composedReducer;Add a notification to be displayed-- **Action**: [`addNotification`][54]+* **Action**: [`addNotification`](../actions/actions.md#addnotification)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]**- - `action.payload` **[Object][55]**+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### cleanupExportImageDelete cached export image-- **Action**: [`cleanupExportImage`][56]+* **Action**: [`cleanupExportImage`](../actions/actions.md#cleanupexportimage)**Parameters**-- `state` **[Object][55]** `uiState`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState-### DEFAULT_EXPORT_DATA+### DEFAULT\_EXPORT\_DATADefault initial `exportData` settings-Type: [Object][55]+Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)#### Properties-- `selectedDataset` **[string][57]** Default: `''`,-- `dataType` **[string][57]** Default: `'csv'`,-- `filtered` **[boolean][58]** Default: `true`,-- `config` **[boolean][58]** deprecated-- `data` **[boolean][58]** used in modal config export. Default: `false`+* `selectedDataset` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) Default: `''`,+* `dataType` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) Default: `'csv'`,+* `filtered` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) Default: `true`,+* `config` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) deprecated+* `data` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) used in modal config export. Default: `false`-### DEFAULT_EXPORT_IMAGE+### DEFAULT\_EXPORT\_IMAGEDefault image export config-Type: [Object][55]+Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)#### Properties-- `ratio` **[string][57]** Default: `'SCREEN'`,-- `resolution` **[string][57]** Default: `'ONE_X'`,-- `legend` **[boolean][58]** Default: `false`,-- `imageDataUri` **[string][57]** Default: `''`,-- `exporting` **[boolean][58]** Default: `false`-- `error` **[boolean][58]** Default: `false`+* `ratio` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) Default: `'SCREEN'`,+* `resolution` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) Default: `'ONE_X'`,+* `legend` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) Default: `false`,+* `imageDataUri` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) Default: `''`,+* `exporting` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) Default: `false`+* `error` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) Default: `false`-### DEFAULT_MAP_CONTROLS_FEATURES+### DEFAULT\_MAP\_CONTROLS\_FEATURESA list of map control visibility and whether is it active.-Type: [Object][55]+Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)#### Properties-- `visibleLayers` **[Object][55]** Default: `{show: true, active: false}`-- `mapLegend` **[Object][55]** Default: `{show: true, active: false}`-- `toggle3d` **[Object][55]** Default: `{show: true}`-- `splitMap` **[Object][55]** Default: `{show: true}`+* `visibleLayers` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Default: `{show: true, active: false}`+* `mapLegend` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Default: `{show: true, active: false}`+* `toggle3d` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Default: `{show: true}`+* `splitMap` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Default: `{show: true}`### hideExportDropdownUpdaterHide side panel header dropdown, activated by clicking the share link on top of the side panel-- **Action**: [`hideExportDropdown`][59]+* **Action**: [`hideExportDropdown`](../actions/actions.md#hideexportdropdown)**Parameters**-- `state` **[Object][55]** `uiState`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState-### INITIAL_UI_STATE+### INITIAL\_UI\_STATEDefault initial `uiState`-Type: [Object][55]+Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)#### Properties-- `readOnly` **[boolean][58]** Default: `false`-- `activeSidePanel` **[string][57]** Default: `'layer'`-- `currentModal` **([string][57] | null)** Default: `'addData'`-- `datasetKeyToRemove` **([string][57] | null)** Default: `null`-- `visibleDropdown` **([string][57] | null)** Default: `null`-- `exportImage` **[Object][55]** Default: [`DEFAULT_EXPORT_IMAGE`][9]-- `exportData` **[Object][55]** Default: [`DEFAULT_EXPORT_DATA`][7]-- `mapControls` **[Object][55]** Default: [`DEFAULT_MAP_CONTROLS`][60]-- `activeMapIndex` **[number][61]** defines which map the user clicked on. Default: 0+* `readOnly` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean) Default: `false`+* `activeSidePanel` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) Default: `'layer'`+* `currentModal` **\(**[**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\| null\)** Default: `'addData'`+* `datasetKeyToRemove` **\(**[**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\| null\)** Default: `null`+* `visibleDropdown` **\(**[**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\| null\)** Default: `null`+* `exportImage` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Default: [`DEFAULT_EXPORT_IMAGE`](ui-state.md#default_export_image)+* `exportData` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Default: [`DEFAULT_EXPORT_DATA`](ui-state.md#default_export_data)+* `mapControls` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Default: [`DEFAULT_MAP_CONTROLS`](ui-state.md#default_map_controls)+* `activeMapIndex` [**number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) defines which map the user clicked on. Default: 0### loadFilesErrUpdaterHandles load file error and set fileLoading property to false-- **Action**: [`loadFilesErr`][62]+* **Action**: [`loadFilesErr`](../actions/actions.md#loadfileserr)**Parameters**-- `state`-- `error` **[Object][55]**- - `error.error`+* `state`+* `error` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `error.error`-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### loadFilesUpdaterFired when file loading begin-- **Action**: [`loadFiles`][63]+* **Action**: [`loadFiles`](../actions/actions.md#loadfiles)**Parameters**-- `state` **[Object][55]** `uiState`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### openDeleteModalUpdaterToggle active map control panel-- **Action**: [`openDeleteModal`][64]+* **Action**: [`openDeleteModal`](../actions/actions.md#opendeletemodal)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]**- - `action.payload` **[string][57]** dataset id+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) dataset id-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### removeNotificationUpdaterRemove a notification-- **Action**: [`removeNotification`][65]+* **Action**: [`removeNotification`](../actions/actions.md#removenotification)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]**- - `action.payload` **[String][57]** id of the notification to be removed+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**String**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) id of the notification to be removed-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### setExportDataTypeUpdaterSet data format for exporting data-- **Action**: [`setExportDataType`][66]+* **Action**: [`setExportDataType`](../actions/actions.md#setexportdatatype)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]**- - `action.payload` **[string][57]** one of `'text/csv'`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) one of `'text/csv'`-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### setExportDataUpdaterWhether to including data in map config, toggle between `true` or `false`-- **Action**: [`setExportData`][67]+* **Action**: [`setExportData`](../actions/actions.md#setexportdata)**Parameters**-- `state` **[Object][55]** `uiState`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### setExportFilteredUpdaterWhether to export filtered data, `true` or `false`-- **Action**: [`setExportFiltered`][68]+* **Action**: [`setExportFiltered`](../actions/actions.md#setexportfiltered)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]**- - `action.payload` **[boolean][58]**+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**boolean**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### setExportImageDataUriSet `exportImage.setExportImageDataUri` to a image dataUri-- **Action**: [`setExportImageDataUri`][69]+* **Action**: [`setExportImageDataUri`](../actions/actions.md#setexportimagedatauri)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]**- - `action.payload` **[string][57]** export image data uri+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) export image data uri-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### setExportImageSettingSet `exportImage.legend` to `true` or `false`-- **Action**: [`setExportImageSetting`][70]+* **Action**: [`setExportImageSetting`](../actions/actions.md#setexportimagesetting)**Parameters**-- `state` **[Object][55]** `uiState`-- `$1` **[Object][55]**- - `$1.payload`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `$1` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `$1.payload`-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### setExportSelectedDatasetUpdaterSet selected dataset for export-- **Action**: [`setExportSelectedDataset`][71]+* **Action**: [`setExportSelectedDataset`](../actions/actions.md#setexportselecteddataset)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]**- - `action.payload` **[string][57]** dataset id+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) dataset id-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### showExportDropdownUpdaterHide and show side panel header dropdown, activated by clicking the share link on top of the side panel-- **Action**: [`showExportDropdown`][72]+* **Action**: [`showExportDropdown`](../actions/actions.md#showexportdropdown)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]**- - `action.payload` **[string][57]** id of the dropdown+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) id of the dropdown-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### startExportingImageSet `exportImage.exporting` to `true`-- **Action**: [`startExportingImage`][73]+* **Action**: [`startExportingImage`](../actions/actions.md#startexportingimage)**Parameters**-- `state` **[Object][55]** `uiState`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### toggleMapControlUpdaterToggle active map control panel-- **Action**: [`toggleMapControl`][74]+* **Action**: [`toggleMapControl`](../actions/actions.md#togglemapcontrol)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]** action- - `action.payload` **[string][57]** map control panel id, one of the keys of: [`DEFAULT_MAP_CONTROLS`][60]- - `action.payload.panelId`- - `action.payload.index` (optional, default `0`)+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.payload` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) map control panel id, one of the keys of: [`DEFAULT_MAP_CONTROLS`](ui-state.md#default_map_controls)+ * `action.payload.panelId`+ * `action.payload.index` \(optional, default `0`\)-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### toggleModalUpdaterShow and hide modal dialog-- **Action**: [`toggleModal`][75]+* **Action**: [`toggleModal`](../actions/actions.md#togglemodal)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]**- - `action.payload` **([string][57] | null)** id of modal to be shown, null to hide modals. One of:- [`DATA_TABLE_ID`][76]- - [`DELETE_DATA_ID`][77]- - [`ADD_DATA_ID`][78]- - [`EXPORT_IMAGE_ID`][79]- - [`EXPORT_DATA_ID`][80]- - [`ADD_MAP_STYLE_ID`][81]+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` **\(**[**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\| null\)** id of modal to be shown, null to hide modals. One of:- [`DATA_TABLE_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#data_table_id)+ * [`DELETE_DATA_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#delete_data_id)+ * [`ADD_DATA_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#add_data_id)+ * [`EXPORT_IMAGE_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#export_image_id)+ * [`EXPORT_DATA_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#export_data_id)+ * [`ADD_MAP_STYLE_ID`](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/constants/default-settings.md#add_map_style_id)-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### toggleSidePanelUpdaterToggle active side panel-- **Action**: [`toggleSidePanel`][82]+* **Action**: [`toggleSidePanel`](../actions/actions.md#togglesidepanel)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]**- - `action.payload` **([string][57] | null)** id of side panel to be shown, one of `layer`, `filter`, `interaction`, `map`. close side panel if `null`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` **\(**[**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\| null\)** id of side panel to be shown, one of `layer`, `filter`, `interaction`, `map`. close side panel if `null`-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### toggleSplitMapUpdaterHandles toggle map split and reset all map control index to 0-- **Action**: [`toggleSplitMap`][83]+* **Action**: [`toggleSplitMap`](../actions/actions.md#togglesplitmap)**Parameters**-- `state`+* `state`-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState-## DEFAULT_EXPORT_HTML+## DEFAULT\_EXPORT\_HTML-Type: [Object][55]+Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)### Properties-- `exportMapboxAccessToken` **[string][57]** Default: null, this is used when we provide a default mapbox token for users to take advantage of-- `userMapboxToken` **[string][57]** Default: '', mapbox token provided by user through input field+* `exportMapboxAccessToken` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) Default: null, this is used when we provide a default mapbox token for users to take advantage of+* `userMapboxToken` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) Default: '', mapbox token provided by user through input field## setUserMapboxAccessTokenUpdaterwhether to export a mapbox access to HTML single page-- **Action**: [`setUserMapboxAccessToken`][84]+* **Action**: [`setUserMapboxAccessToken`](../actions/actions.md#setusermapboxaccesstoken)**Parameters**-- `state` **[Object][55]** `uiState`-- `action` **[Object][55]**- - `action.payload` **[string][57]**+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `uiState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.payload` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)-Returns **[Object][55]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState-[1]: #uistateupdaters--[2]: #examples--[3]: #addnotificationupdater--[4]: #parameters--[5]: #cleanupexportimage--[6]: #parameters-1--[7]: #default_export_data--[8]: #properties--[9]: #default_export_image--[10]: #properties-1--[11]: #default_map_controls_features--[12]: #properties-2--[13]: #hideexportdropdownupdater--[14]: #parameters-2--[15]: #initial_ui_state--[16]: #properties-3--[17]: #loadfileserrupdater--[18]: #parameters-3--[19]: #loadfilesupdater--[20]: #parameters-4--[21]: #opendeletemodalupdater--[22]: #parameters-5--[23]: #removenotificationupdater--[24]: #parameters-6--[25]: #setexportdatatypeupdater--[26]: #parameters-7--[27]: #setexportdataupdater--[28]: #parameters-8--[29]: #setexportfilteredupdater--[30]: #parameters-9--[31]: #setexportimagedatauri--[32]: #parameters-10--[33]: #setexportimagesetting--[34]: #parameters-11--[35]: #setexportselecteddatasetupdater--[36]: #parameters-12--[37]: #showexportdropdownupdater--[38]: #parameters-13--[39]: #startexportingimage--[40]: #parameters-14--[41]: #togglemapcontrolupdater--[42]: #parameters-15--[43]: #togglemodalupdater--[44]: #parameters-16--[45]: #togglesidepanelupdater--[46]: #parameters-17--[47]: #togglesplitmapupdater--[48]: #parameters-18--[49]: #default_export_html--[50]: #properties-4--[51]: #setusermapboxaccesstokenupdater--[52]: #parameters-19--[53]: ../advanced-usage/using-updaters.md--[54]: ../actions/actions.md#addnotification--[55]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object--[56]: ../actions/actions.md#cleanupexportimage--[57]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String--[58]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean--[59]: ../actions/actions.md#hideexportdropdown--[60]: #default_map_controls--[61]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number--[62]: ../actions/actions.md#loadfileserr--[63]: ../actions/actions.md#loadfiles--[64]: ../actions/actions.md#opendeletemodal--[65]: ../actions/actions.md#removenotification--[66]: ../actions/actions.md#setexportdatatype--[67]: ../actions/actions.md#setexportdata--[68]: ../actions/actions.md#setexportfiltered--[69]: ../actions/actions.md#setexportimagedatauri--[70]: ../actions/actions.md#setexportimagesetting--[71]: ../actions/actions.md#setexportselecteddataset--[72]: ../actions/actions.md#showexportdropdown--[73]: ../actions/actions.md#startexportingimage--[74]: ../actions/actions.md#togglemapcontrol--[75]: ../actions/actions.md#togglemodal--[76]: ../constants/default-settings.md#data_table_id--[77]: ../constants/default-settings.md#delete_data_id--[78]: ../constants/default-settings.md#add_data_id--[79]: ../constants/default-settings.md#export_image_id--[80]: ../constants/default-settings.md#export_data_id--[81]: ../constants/default-settings.md#add_map_style_id--[82]: ../actions/actions.md#togglesidepanel--[83]: ../actions/actions.md#togglesplitmap--[84]: ../actions/actions.md#setusermapboxaccesstokendiff --git a/docs/api-reference/reducers/vis-state.md b/docs/api-reference/reducers/vis-state.mdindex d51bb329e..a06bc363f 100644--- a/docs/api-reference/reducers/vis-state.md+++ b/docs/api-reference/reducers/vis-state.md@@ -1,45 +1,44 @@-<!-- Generated by documentation.js. Update this documentation by updating the source code. -->+# vis-state### Table of Contents-- [visStateUpdaters][1]- - [addFilterUpdater][3]- - [addLayerUpdater][5]- - [applyCPUFilterUpdater][7]- - [enlargeFilterUpdater][9]- - [INITIAL_VIS_STATE][11]- - [interactionConfigChangeUpdater][13]- - [layerClickUpdater][15]- - [layerHoverUpdater][17]- - [layerTypeChangeUpdater][19]- - [layerVisConfigChangeUpdater][21]- - [layerVisualChannelChangeUpdater][23]- - [loadFilesErrUpdater][25]- - [loadFilesUpdater][27]- - [mapClickUpdater][29]- - [receiveMapConfigUpdater][31]- - [removeDatasetUpdater][33]- - [removeFilterUpdater][35]- - [removeLayerUpdater][37]- - [reorderLayerUpdater][39]- - [resetMapConfigUpdater][41]- - [setFilterPlotUpdater][43]- - [setFilterUpdater][45]- - [setMapInfoUpdater][47]- - [showDatasetTableUpdater][49]- - [toggleFilterAnimationUpdater][51]- - [toggleLayerForMapUpdater][53]- - [toggleSplitMapUpdater][55]- - [updateAnimationTimeUpdater][57]- - [updateFilterAnimationSpeedUpdater][59]- - [updateLayerAnimationSpeedUpdater][61]- - [updateLayerBlendingUpdater][63]- - [updateVisDataUpdater][65]+* [visStateUpdaters](vis-state.md#visstateupdaters)+ * [addFilterUpdater](vis-state.md#addfilterupdater)+ * [addLayerUpdater](vis-state.md#addlayerupdater)+ * [applyCPUFilterUpdater](vis-state.md#applycpufilterupdater)+ * [enlargeFilterUpdater](vis-state.md#enlargefilterupdater)+ * [INITIAL\_VIS\_STATE](vis-state.md#initial_vis_state)+ * [interactionConfigChangeUpdater](vis-state.md#interactionconfigchangeupdater)+ * [layerClickUpdater](vis-state.md#layerclickupdater)+ * [layerHoverUpdater](vis-state.md#layerhoverupdater)+ * [layerTypeChangeUpdater](vis-state.md#layertypechangeupdater)+ * [layerVisConfigChangeUpdater](vis-state.md#layervisconfigchangeupdater)+ * [layerVisualChannelChangeUpdater](vis-state.md#layervisualchannelchangeupdater)+ * [loadFilesErrUpdater](vis-state.md#loadfileserrupdater)+ * [loadFilesUpdater](vis-state.md#loadfilesupdater)+ * [mapClickUpdater](vis-state.md#mapclickupdater)+ * [receiveMapConfigUpdater](vis-state.md#receivemapconfigupdater)+ * [removeDatasetUpdater](vis-state.md#removedatasetupdater)+ * [removeFilterUpdater](vis-state.md#removefilterupdater)+ * [removeLayerUpdater](vis-state.md#removelayerupdater)+ * [reorderLayerUpdater](vis-state.md#reorderlayerupdater)+ * [resetMapConfigUpdater](vis-state.md#resetmapconfigupdater)+ * [setFilterPlotUpdater](vis-state.md#setfilterplotupdater)+ * [setFilterUpdater](vis-state.md#setfilterupdater)+ * [setMapInfoUpdater](vis-state.md#setmapinfoupdater)+ * [showDatasetTableUpdater](vis-state.md#showdatasettableupdater)+ * [toggleFilterAnimationUpdater](vis-state.md#togglefilteranimationupdater)+ * [toggleLayerForMapUpdater](vis-state.md#togglelayerformapupdater)+ * [toggleSplitMapUpdater](vis-state.md#togglesplitmapupdater)+ * [updateAnimationTimeUpdater](vis-state.md#updateanimationtimeupdater)+ * [updateFilterAnimationSpeedUpdater](vis-state.md#updatefilteranimationspeedupdater)+ * [updateLayerAnimationSpeedUpdater](vis-state.md#updatelayeranimationspeedupdater)+ * [updateLayerBlendingUpdater](vis-state.md#updatelayerblendingupdater)+ * [updateVisDataUpdater](vis-state.md#updatevisdataupdater)## visStateUpdaters-Updaters for `visState` reducer. Can be used in your root reducer to directly modify kepler.gl's state.-Read more about [Using updaters][67]+Updaters for `visState` reducer. Can be used in your root reducer to directly modify kepler.gl's state. Read more about [Using updaters](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/api-reference/advanced-usage/using-updaters.md)**Examples**@@ -78,685 +77,483 @@ export default composedReducer;Add a new filter-- **Action**: [`addFilter`][68]+* **Action**: [`addFilter`](../actions/actions.md#addfilter)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.dataId` **[string][70]** dataset `id` this new filter is associated with+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.dataId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) dataset `id` this new filter is associated with-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### addLayerUpdaterAdd a new layer-- **Action**: [`addLayer`][71]+* **Action**: [`addLayer`](../actions/actions.md#addlayer)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.props` **[Object][69]** new layer props+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.props` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) new layer props-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### applyCPUFilterUpdaterWhen select dataset for export, apply cpu filter to selected dataset-- **Action**: [`applyCPUFilter`][72]+* **Action**: [`applyCPUFilter`](../actions/actions.md#applycpufilter)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]**- - `action.dataId` **[string][70]** dataset id+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.dataId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) dataset id-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### enlargeFilterUpdater-Show larger time filter at bottom for time playback (apply to time filter only)+Show larger time filter at bottom for time playback \(apply to time filter only\)-- **Action**: [`enlargeFilter`][73]+* **Action**: [`enlargeFilter`](../actions/actions.md#enlargefilter)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.idx` **[Number][74]** index of filter to enlarge+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) index of filter to enlarge-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState-### INITIAL_VIS_STATE+### INITIAL\_VIS\_STATEDefault initial `visState`-Type: [Object][69]+Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)#### Properties-- `layers` **[Array][75]**-- `layerData` **[Array][75]**-- `layerToBeMerged` **[Array][75]**-- `layerOrder` **[Array][75]**-- `filters` **[Array][75]**-- `filterToBeMerged` **[Array][75]**-- `datasets` **[Array][75]**-- `editingDataset` **[string][70]**-- `interactionConfig` **[Object][69]**-- `interactionToBeMerged` **[Object][69]**-- `layerBlending` **[string][70]**-- `hoverInfo` **[Object][69]**-- `clicked` **[Object][69]**-- `mousePos` **[Object][69]**-- `splitMaps` **[Array][75]** a list of objects of layer availabilities and visibilities for each map-- `layerClasses` **[Object][69]**-- `animationConfig` **[Object][69]**-- `editor` **[Object][69]**+* `layers` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)+* `layerData` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)+* `layerToBeMerged` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)+* `layerOrder` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)+* `filters` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)+* `filterToBeMerged` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)+* `datasets` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)+* `editingDataset` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)+* `interactionConfig` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `interactionToBeMerged` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `layerBlending` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)+* `hoverInfo` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `clicked` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `mousePos` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `splitMaps` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array) a list of objects of layer availabilities and visibilities for each map+* `layerClasses` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `animationConfig` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `editor` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)### interactionConfigChangeUpdaterUpdate `interactionConfig`-- **Action**: [`interactionConfigChange`][76]+* **Action**: [`interactionConfigChange`](../actions/actions.md#interactionconfigchange)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.config` **[Object][69]** new config as key value map: `{tooltip: {enabled: true}}`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.config` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) new config as key value map: `{tooltip: {enabled: true}}`-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### layerClickUpdaterTrigger layer click event with clicked object-- **Action**: [`onLayerClick`][77]+* **Action**: [`onLayerClick`](../actions/actions.md#onlayerclick)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.info` **[Object][69]** Object clicked, returned by deck.gl+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.info` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Object clicked, returned by deck.gl-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### layerHoverUpdaterTrigger layer hover event with hovered object-- **Action**: [`onLayerHover`][78]+* **Action**: [`onLayerHover`](../actions/actions.md#onlayerhover)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.info` **[Object][69]** Object hovered, returned by deck.gl+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.info` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) Object hovered, returned by deck.gl-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### layerTypeChangeUpdaterUpdate layer type. Previews layer config will be copied if applicable.-- **Action**: [`layerTypeChange`][79]+* **Action**: [`layerTypeChange`](../actions/actions.md#layertypechange)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.oldLayer` **[Object][69]** layer to be updated- - `action.newType` **[string][70]** new type+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.oldLayer` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) layer to be updated+ * `action.newType` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) new type-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### layerVisConfigChangeUpdaterUpdate layer `visConfig`-- **Action**: [`layerVisConfigChange`][80]+* **Action**: [`layerVisConfigChange`](../actions/actions.md#layervisconfigchange)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.oldLayer` **[Object][69]** layer to be updated- - `action.newVisConfig` **[Object][69]** new visConfig as a key value map: e.g. `{opacity: 0.8}`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.oldLayer` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) layer to be updated+ * `action.newVisConfig` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) new visConfig as a key value map: e.g. `{opacity: 0.8}`-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### layerVisualChannelChangeUpdaterUpdate layer visual channel-- **Action**: [`layerVisualChannelConfigChange`][81]+* **Action**: [`layerVisualChannelConfigChange`](../actions/actions.md#layervisualchannelconfigchange)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.oldLayer` **[Object][69]** layer to be updated- - `action.newConfig` **[Object][69]** new visual channel config- - `action.channel` **[string][70]** channel to be updated+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.oldLayer` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) layer to be updated+ * `action.newConfig` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) new visual channel config+ * `action.channel` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) channel to be updated-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### loadFilesErrUpdaterTrigger loading file error-- **Action**: [`loadFilesErr`][82]+* **Action**: [`loadFilesErr`](../actions/actions.md#loadfileserr)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.error` **any**+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.error` **any**-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### loadFilesUpdaterTrigger file loading dispatch `addDataToMap` if succeed, or `loadFilesErr` if failed-- **Action**: [`loadFiles`][83]+* **Action**: [`loadFiles`](../actions/actions.md#loadfiles)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.files` **[Array][75]<[Object][69]>** array of fileblob+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.files` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>** array of fileblob-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### mapClickUpdaterTrigger map click event, unselect clicked object-- **Action**: [`onMapClick`][84]+* **Action**: [`onMapClick`](../actions/actions.md#onmapclick)**Parameters**-- `state` **[Object][69]** `visState`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### receiveMapConfigUpdaterPropagate `visState` reducer with a new configuration. Current config will be override.-- **Action**: [`receiveMapConfig`][85]+* **Action**: [`receiveMapConfig`](../actions/actions.md#receivemapconfig)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.payload` **[Object][69]** map config to be propagated- - `action.payload.config` **[Object][69]** map config to be propagated- - `action.payload.option` **[Object][69]** {keepExistingConfig: true | false}- - `action.payload.config` (optional, default `{}`)- - `action.payload.options` (optional, default `{}`)+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.payload` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) map config to be propagated+ * `action.payload.config` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) map config to be propagated+ * `action.payload.option` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) {keepExistingConfig: true \| false}+ * `action.payload.config` \(optional, default `{}`\)+ * `action.payload.options` \(optional, default `{}`\)-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### removeDatasetUpdaterRemove a dataset and all layers, filters, tooltip configs that based on it-- **Action**: [`removeDataset`][86]+* **Action**: [`removeDataset`](../actions/actions.md#removedataset)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.key` **[string][70]** dataset id+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.key` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) dataset id-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### removeFilterUpdaterRemove a filter-- **Action**: [`removeFilter`][87]+* **Action**: [`removeFilter`](../actions/actions.md#removefilter)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.idx` **[Number][74]** index of filter to b e removed+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) index of filter to b e removed-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### removeLayerUpdaterremove layer-- **Action**: [`removeLayer`][88]+* **Action**: [`removeLayer`](../actions/actions.md#removelayer)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.idx` **[Number][74]** index of layer to b e removed+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) index of layer to b e removed-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### reorderLayerUpdaterReorder layer-- **Action**: [`reorderLayer`][89]+* **Action**: [`reorderLayer`](../actions/actions.md#reorderlayer)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.order` **[Array][75]<[Number][74]>** an array of layer indexes+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.order` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)**>** an array of layer indexes-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### resetMapConfigUpdaterreset visState to initial State-- **Action**: [`resetMapConfig`][90]+* **Action**: [`resetMapConfig`](../actions/actions.md#resetmapconfig)**Parameters**-- `state` **[Object][69]** `visState`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### setFilterPlotUpdaterSet the property of a filter plot-- **Action**: [`setFilterPlot`][91]+* **Action**: [`setFilterPlot`](../actions/actions.md#setfilterplot)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.idx` **[Number][74]**- - `action.newProp` **[Object][69]** key value mapping of new prop `{yAxis: 'histogram'}`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number)+ * `action.newProp` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) key value mapping of new prop `{yAxis: 'histogram'}`-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### setFilterUpdaterUpdate filter property-- **Action**: [`setFilter`][92]+* **Action**: [`setFilter`](../actions/actions.md#setfilter)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.idx` **[Number][74]** `idx` of filter to be updated- - `action.prop` **[string][70]** `prop` of filter, e,g, `dataId`, `name`, `value`- - `action.value` **any** new value-- `datasetId` **[string][70]** used when updating a prop (dataId, name) that can be linked to multiple datasets+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) `idx` of filter to be updated+ * `action.prop` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) `prop` of filter, e,g, `dataId`, `name`, `value`+ * `action.value` **any** new value+* `datasetId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) used when updating a prop \(dataId, name\) that can be linked to multiple datasets-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### setMapInfoUpdaterUser input to update the info of the map-- **Action**: [`setMapInfo`][93]+* **Action**: [`setMapInfo`](../actions/actions.md#setmapinfo)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.info` **[Object][69]** {title: 'hello'}+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.info` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) {title: 'hello'}-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### showDatasetTableUpdaterDisplay dataset table in a modal-- **Action**: [`showDatasetTable`][94]+* **Action**: [`showDatasetTable`](../actions/actions.md#showdatasettable)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.dataId` **[string][70]** dataset id to show in table+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.dataId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) dataset id to show in table-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### toggleFilterAnimationUpdaterStart and end filter animation-- **Action**: [`toggleFilterAnimation`][95]+* **Action**: [`toggleFilterAnimation`](../actions/actions.md#togglefilteranimation)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.idx` **[Number][74]** idx of filter+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) idx of filter-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### toggleLayerForMapUpdaterToggle visibility of a layer in a split map-- **Action**: [`toggleLayerForMap`][96]+* **Action**: [`toggleLayerForMap`](../actions/actions.md#togglelayerformap)**Parameters**-- `state` **[Object][69]**-- `action` **[Object][69]**- - `action.mapIndex` **[Number][74]** index of the split map- - `action.layerId` **[string][70]** id of the layer+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)+ * `action.mapIndex` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) index of the split map+ * `action.layerId` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) id of the layer-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### toggleSplitMapUpdaterToggle visibility of a layer for a split map-- **Action**: [`toggleSplitMap`][97]+* **Action**: [`toggleSplitMap`](../actions/actions.md#togglesplitmap)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.payload` **([Number][74] \| [undefined][98])** index of the split map+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.payload` **\(**[**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) **\|** [**undefined**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined)**\)** index of the split map-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### updateAnimationTimeUpdaterReset animation config current time to a specified value-- **Action**: [`updateAnimationTime`][99]+* **Action**: [`updateAnimationTime`](../actions/actions.md#updateanimationtime)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.value` **[Number][74]** the value current time will be set to+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.value` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) the value current time will be set to-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### updateFilterAnimationSpeedUpdaterChange filter animation speed-- **Action**: [`updateFilterAnimationSpeed`][100]+* **Action**: [`updateFilterAnimationSpeed`](../actions/actions.md#updatefilteranimationspeed)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.idx` **[Number][74]** `idx` of filter- - `action.speed` **[Number][74]** `speed` to change it to. `speed` is a multiplier+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.idx` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) `idx` of filter+ * `action.speed` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) `speed` to change it to. `speed` is a multiplier-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### updateLayerAnimationSpeedUpdaterUpdate animation speed with the vertical speed slider-- **Action**: [`updateLayerAnimationSpeed`][101]+* **Action**: [`updateLayerAnimationSpeed`](../actions/actions.md#updatelayeranimationspeed)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.speed` **[Number][74]** the updated speed of the animation+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.speed` [**Number**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number) the updated speed of the animation-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### updateLayerBlendingUpdaterupdate layer blending mode-- **Action**: [`updateLayerBlending`][102]+* **Action**: [`updateLayerBlending`](../actions/actions.md#updatelayerblending)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.mode` **[string][70]** one of `additive`, `normal` and `subtractive`+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.mode` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) one of `additive`, `normal` and `subtractive`-Returns **[Object][69]** nextState+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState### updateVisDataUpdaterAdd new dataset to `visState`, with option to load a map config along with the datasets-- **Action**: [`updateVisData`][103]+* **Action**: [`updateVisData`](../actions/actions.md#updatevisdata)**Parameters**-- `state` **[Object][69]** `visState`-- `action` **[Object][69]** action- - `action.datasets` **([Array][75]<[Object][69]> | [Object][69])** **\*required** datasets can be a dataset or an array of datasets- Each dataset object needs to have `info` and `data` property.- - `action.datasets.info` **[Object][69]** \-info of a dataset- - `action.datasets.info.id` **[string][70]** id of this dataset. If config is defined, `id` should matches the `dataId` in config.- - `action.datasets.info.label` **[string][70]** A display name of this dataset- - `action.datasets.data` **[Object][69]** **\*required** The data object, in a tabular format with 2 properties `fields` and `rows`- - `action.datasets.data.fields` **[Array][75]<[Object][69]>** **\*required** Array of fields,- - `action.datasets.data.fields.name` **[string][70]** **\*required** Name of the field,- - `action.datasets.data.rows` **[Array][75]<[Array][75]>** **\*required** Array of rows, in a tabular format with `fields` and `rows`- - `action.options` **[Object][69]** option object `{centerMap: true, keepExistingConfig: false}`- - `action.config` **[Object][69]** map config+* `state` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) `visState`+* `action` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) action+ * `action.datasets` **\(**[**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**> \|** [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**\)** **\*required** datasets can be a dataset or an array of datasets-Returns **[Object][69]** nextState+ Each dataset object needs to have `info` and `data` property.-[1]: #visstateupdaters+ * `action.datasets.info` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) -info of a dataset+ * `action.datasets.info.id` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) id of this dataset. If config is defined, `id` should matches the `dataId` in config.+ * `action.datasets.info.label` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) A display name of this dataset+ * `action.datasets.data` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) **\*required** The data object, in a tabular format with 2 properties `fields` and `rows`+ * `action.datasets.data.fields` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**>** **\*required** Array of fields,+ * `action.datasets.data.fields.name` [**string**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String) **\*required** Name of the field,+ * `action.datasets.data.rows` [**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**<**[**Array**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)**>** **\*required** Array of rows, in a tabular format with `fields` and `rows`-[2]: #examples+ * `action.options` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) option object `{centerMap: true, keepExistingConfig: false}`+ * `action.config` [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) map config-[3]: #addfilterupdater+Returns [**Object**](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object) nextState-[4]: #parameters--[5]: #addlayerupdater--[6]: #parameters-1--[7]: #applycpufilterupdater--[8]: #parameters-2--[9]: #enlargefilterupdater--[10]: #parameters-3--[11]: #initial_vis_state--[12]: #properties--[13]: #interactionconfigchangeupdater--[14]: #parameters-4--[15]: #layerclickupdater--[16]: #parameters-5--[17]: #layerhoverupdater--[18]: #parameters-6--[19]: #layertypechangeupdater--[20]: #parameters-7--[21]: #layervisconfigchangeupdater--[22]: #parameters-8--[23]: #layervisualchannelchangeupdater--[24]: #parameters-9--[25]: #loadfileserrupdater--[26]: #parameters-10--[27]: #loadfilesupdater--[28]: #parameters-11--[29]: #mapclickupdater--[30]: #parameters-12--[31]: #receivemapconfigupdater--[32]: #parameters-13--[33]: #removedatasetupdater--[34]: #parameters-14--[35]: #removefilterupdater--[36]: #parameters-15--[37]: #removelayerupdater--[38]: #parameters-16--[39]: #reorderlayerupdater--[40]: #parameters-17--[41]: #resetmapconfigupdater--[42]: #parameters-18--[43]: #setfilterplotupdater--[44]: #parameters-19--[45]: #setfilterupdater--[46]: #parameters-20--[47]: #setmapinfoupdater--[48]: #parameters-21--[49]: #showdatasettableupdater--[50]: #parameters-22--[51]: #togglefilteranimationupdater--[52]: #parameters-23--[53]: #togglelayerformapupdater--[54]: #parameters-24--[55]: #togglesplitmapupdater--[56]: #parameters-25--[57]: #updateanimationtimeupdater--[58]: #parameters-26--[59]: #updatefilteranimationspeedupdater--[60]: #parameters-27--[61]: #updatelayeranimationspeedupdater--[62]: #parameters-28--[63]: #updatelayerblendingupdater--[64]: #parameters-29--[65]: #updatevisdataupdater--[66]: #parameters-30--[67]: ../advanced-usage/using-updaters.md--[68]: ../actions/actions.md#addfilter--[69]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object--[70]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String--[71]: ../actions/actions.md#addlayer--[72]: ../actions/actions.md#applycpufilter--[73]: ../actions/actions.md#enlargefilter--[74]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number--[75]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array--[76]: ../actions/actions.md#interactionconfigchange--[77]: ../actions/actions.md#onlayerclick--[78]: ../actions/actions.md#onlayerhover--[79]: ../actions/actions.md#layertypechange--[80]: ../actions/actions.md#layervisconfigchange--[81]: ../actions/actions.md#layervisualchannelconfigchange--[82]: ../actions/actions.md#loadfileserr--[83]: ../actions/actions.md#loadfiles--[84]: ../actions/actions.md#onmapclick--[85]: ../actions/actions.md#receivemapconfig--[86]: ../actions/actions.md#removedataset--[87]: ../actions/actions.md#removefilter--[88]: ../actions/actions.md#removelayer--[89]: ../actions/actions.md#reorderlayer--[90]: ../actions/actions.md#resetmapconfig--[91]: ../actions/actions.md#setfilterplot--[92]: ../actions/actions.md#setfilter--[93]: ../actions/actions.md#setmapinfo--[94]: ../actions/actions.md#showdatasettable--[95]: ../actions/actions.md#togglefilteranimation--[96]: ../actions/actions.md#togglelayerformap--[97]: ../actions/actions.md#togglesplitmap--[98]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/undefined--[99]: ../actions/actions.md#updateanimationtime--[100]: ../actions/actions.md#updatefilteranimationspeed--[101]: ../actions/actions.md#updatelayeranimationspeed--[102]: ../actions/actions.md#updatelayerblending--[103]: ../actions/actions.md#updatevisdatadiff --git a/docs/api-reference/schemas/README.md b/docs/api-reference/schemas/README.mdnew file mode 100644index 000000000..c0dec5ac6--- /dev/null+++ b/docs/api-reference/schemas/README.md@@ -0,0 +1,2 @@+# Schemas+diff --git a/docs/api-reference/schemas/overview.md b/docs/api-reference/schemas/overview.mdindex 96f582ce2..736066b29 100644--- a/docs/api-reference/schemas/overview.md+++ b/docs/api-reference/schemas/overview.md@@ -1,3 +1,4 @@# Schemas...Coming Soon+diff --git a/docs/keplergl-jupyter/README.md b/docs/keplergl-jupyter/README.mdnew file mode 100644index 000000000..d8df89738--- /dev/null+++ b/docs/keplergl-jupyter/README.md@@ -0,0 +1,2 @@+# kepler.gl Jupyter+diff --git a/docs/keplergl-jupyter/user-guide.md b/docs/keplergl-jupyter/user-guide.mdindex a50aa39b7..7b0433c4a 100644--- a/docs/keplergl-jupyter/user-guide.md+++ b/docs/keplergl-jupyter/user-guide.md@@ -1,75 +1,84 @@- <h1>kepler.gl for Jupyter User Guide</h1>-- - [Install](#install)- - [1. Load kepler.gl Map](#1-load-keplergl-map)- - [`KeplerGl()`](#keplergl)- - [2. Add Data](#2-add-data)- - [`.add_data()`](#add_data)- - [`.data`](#data)- - [3. Data Format](#3-data-format)- - [`CSV`](#csv)- - [`GeoJSON`](#geojson)- - [`DataFrame`](#dataframe)- - [`GeoDataFrame`](#geodataframe)- - [`WKT`](#wkt)- - [4. Customize the map](#4-customize-the-map)- - [5. Save and load config](#5-save-and-load-config)- - [`.config`](#config)- - [6. Match config with data](#6-match-config-with-data)- - [7. Save Map](#7-save-map)- - [`.save_to_html()`](#save_to_html)- - [Demo Notebooks](#demo-notebooks)--<br></br>-## Install-### Prerequisites-- Python >= 2-- ipywidgets >= 7.0.0+# user-guide++## kepler.gl for Jupyter User Guide++* [Install](user-guide.md#install)+* [1. Load kepler.gl Map](user-guide.md#1-load-keplergl-map)+ * [`KeplerGl()`](user-guide.md#keplergl)+* [2. Add Data](user-guide.md#2-add-data)+ * [`.add_data()`](user-guide.md#add_data)+ * [`.data`](user-guide.md#data)+* [3. Data Format](user-guide.md#3-data-format)+ * [`CSV`](user-guide.md#csv)+ * [`GeoJSON`](user-guide.md#geojson)+ * [`DataFrame`](user-guide.md#dataframe)+ * [`GeoDataFrame`](user-guide.md#geodataframe)+ * [`WKT`](user-guide.md#wkt)+* [4. Customize the map](user-guide.md#4-customize-the-map)+* [5. Save and load config](user-guide.md#5-save-and-load-config)+ * [`.config`](user-guide.md#config)+* [6. Match config with data](user-guide.md#6-match-config-with-data)+* [7. Save Map](user-guide.md#7-save-map)+ * [`.save_to_html()`](user-guide.md#save_to_html)+* [Demo Notebooks](user-guide.md#demo-notebooks)++### Install++#### Prerequisites++* Python >= 2+* ipywidgets >= 7.0.0To install use pip:- $ pip install keplergl-+```text+$ pip install keplergl+```If you on Mac used `pip install` and running Notebook 5.3 and above, you don't need to run the following- $ jupyter nbextension install --py --sys-prefix keplergl # can be skipped for notebook 5.3 and above+```text+$ jupyter nbextension install --py --sys-prefix keplergl # can be skipped for notebook 5.3 and above- $ jupyter nbextension enable --py --sys-prefix keplergl # can be skipped for notebook 5.3 and above+$ jupyter nbextension enable --py --sys-prefix keplergl # can be skipped for notebook 5.3 and above+```If you are using Jupyter Lab, you will also need to install the JupyterLab extension. This require [node](https://nodejs.org/en/download/package-manager/#macos) `> 8.15.0`If you use [Homebrew](https://brew.sh/) on Mac:- $ brew install node@8+```text+$ brew install node@8+```Then install jupyter labextension.- $ jupyter labextension install @jupyter-widgets/jupyterlab-manager keplergl-jupyter+```text+$ jupyter labextension install @jupyter-widgets/jupyterlab-manager keplergl-jupyter+```**Prerequisites for JupyterLab:**-- Node > 8.15.0-- Python 3-- JupyterLab>=1.0.0-## 1. Load keplergl map-### `KeplerGl()`+* Node > 8.15.0+* Python 3+* JupyterLab>=1.0.0++### 1. Load keplergl map-- Input:- - __`height`__ _optional_ default: `400`+#### `KeplerGl()`- Height of the map display+* Input:+ * **`height`** _optional_ default: `400`- - __`data`__ `dict` _optional_+ Height of the map display- Datasets as a dictionary, key is the name of the dataset. Read more on [Accepted data format][data_format]+ * **`data`** `dict` _optional_- - __`config`__ `dict` _optional_- Map config as a dictionary. The `dataId` in the layer and filter settings should match the `name` of the dataset they are created under+ Datasets as a dictionary, key is the name of the dataset. Read more on [Accepted data format](user-guide.md#3-data-format)-The following command will load kepler.gl widget below a cell.-**The map object created here is `map_1` it will be used throughout the code example in this doc.**+ * **`config`** `dict` _optional_ Map config as a dictionary. The `dataId` in the layer and filter settings should match the `name` of the dataset they are created under+The following command will load kepler.gl widget below a cell. **The map object created here is `map_1` it will be used throughout the code example in this doc.**```python# Load an empty map@@ -78,9 +87,9 @@ map_1 = KeplerGl()map_1```-![empty map][empty_map]+-You can also create the map and pass in the data or data and config at the same time. Follow the instruction to [match config with data](match-config-w-data)+You can also create the map and pass in the data or data and config at the same time. Follow the instruction to [match config with data](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/keplergl-jupyter/match-config-w-data/README.md)```python# Load a map with data and config and height@@ -89,19 +98,19 @@ map_2 = KeplerGl(height=400, data={"data_1": my_df}, config=config)map_2```-![Load map with data and config][load_map_w_data]+-<br></br>+### 2. Add Data-## 2. Add Data-### `.add_data()`-- Inputs- - __`data`__ _required_ CSV, GeoJSON or DataFrame. Read more on [Accepted data format][data_format]- - __`name`__ _required_ Name of the data entry.+#### `.add_data()`++* Inputs+ * **`data`** _required_ CSV, GeoJSON or DataFrame. Read more on [Accepted data format](user-guide.md#3-data-format)+ * **`name`** _required_ Name of the data entry.`name` of the dataset will be the saved to the `dataId` property of each `layer`, `filter` and `interactionConfig` in the config.-kepler.gl expected the data to be **CSV**, **GeoJSON**, **DataFrame** or **GeoDataFrame**. You can call __`add_data`__ multiple times to add multiple datasets to kepler.gl+kepler.gl expected the data to be **CSV**, **GeoJSON**, **DataFrame** or **GeoDataFrame**. You can call **`add_data`** multiple times to add multiple datasets to kepler.gl```python# DataFrame@@ -120,9 +129,10 @@ with open('sf_zip_geo.json', 'r') as f:map_1.add_data(data=geojson, name='geojson')```-![Add data to map][map_add_data]+++#### `.data`-### `.data`Print the current data added to the map. As a `Dict````python@@ -132,13 +142,14 @@ map_1.data# 'data_3': '{"type": "FeatureCollecti...'}```-<br></br>+### 3. Data Format-## 3. Data Format-kepler.gl supports **CSV**, **GeoJSON**, Pandas **DataFrame** or GeoPandas **GeoDataFrame**.+kepler.gl supports **CSV**, **GeoJSON**, Pandas **DataFrame** or GeoPandas **GeoDataFrame**.++#### `CSV`-### `CSV`You can create a `CSV` string by reading from a CSV file.+```pythonwith open('csv-data.csv', 'r') as f:csvData = f.read()@@ -146,11 +157,11 @@ with open('csv-data.csv', 'r') as f:map_1.add_data(data=csvData, name='data_2')```-### `GeoJSON`-According to [GeoJSON Specification (RFC 7946)][geojson]: GeoJSON is a format for encoding a variety of geographic data structures. A GeoJSON object may represent a region of space (a `Geometry`), a spatially bounded entity (a Feature), or a list of Features (a `FeatureCollection`). GeoJSON supports the following geometry types: `Point`, `LineString`, `Polygon`, `MultiPoint`, `MultiLineString`, `MultiPolygon`, and `GeometryCollection`. Features in GeoJSON contain a Geometry object and additional properties, and a FeatureCollection contains a list of Features.+#### `GeoJSON`-kepler.gl supports all the GeoJSON types above excepts `GeometryCollection`. You can pass in either a single [`Feature`][features] or a [`FeatureCollection`][feature_collection]. You can format the `GeoJSON` either as a `string` or a `dict` type+According to [GeoJSON Specification \(RFC 7946\)](https://tools.ietf.org/html/rfc7946): GeoJSON is a format for encoding a variety of geographic data structures. A GeoJSON object may represent a region of space \(a `Geometry`\), a spatially bounded entity \(a Feature\), or a list of Features \(a `FeatureCollection`\). GeoJSON supports the following geometry types: `Point`, `LineString`, `Polygon`, `MultiPoint`, `MultiLineString`, `MultiPolygon`, and `GeometryCollection`. Features in GeoJSON contain a Geometry object and additional properties, and a FeatureCollection contains a list of Features.+kepler.gl supports all the GeoJSON types above excepts `GeometryCollection`. You can pass in either a single [`Feature`](https://tools.ietf.org/html/rfc7946#section-3.2) or a [`FeatureCollection`](https://tools.ietf.org/html/rfc7946#section-3.3). You can format the `GeoJSON` either as a `string` or a `dict` type```pythonfeature = {@@ -172,7 +183,7 @@ map_1.add_data(data=feature, name="feature")map_1.add_data(data=featureCollection, name="feature_collection")```-Geometries (Polygons, LindStrings) can be embedded into CSV or DataFrame with a [`GeoJSON`][geojson] Json string. Use the `geometry` property of a [`Feature`][features], which includes `type` and `coordinates`.+Geometries \(Polygons, LindStrings\) can be embedded into CSV or DataFrame with a [`GeoJSON`](https://tools.ietf.org/html/rfc7946) Json string. Use the `geometry` property of a [`Feature`](https://tools.ietf.org/html/rfc7946#section-3.2), which includes `type` and `coordinates`.```python# GeoJson Feature geometry@@ -194,8 +205,10 @@ df_with_geometry = pd.DataFrame({map_1.add_data(df_with_geometry, "df_with_geometry")```-### `DataFrame`-kepler.gl accepts [pandas.DataFrame][data_frame]+#### `DataFrame`++kepler.gl accepts [pandas.DataFrame](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html)+```pythondf = pd.DataFrame({'City': ['Buenos Aires', 'Brasilia', 'Santiago', 'Bogota', 'Caracas'],@@ -205,19 +218,21 @@ df = pd.DataFrame(w1.add_data(data=df, name='cities')```-### `GeoDataFrame`-kepler.gl accepts [geopandas.GeoDataFrame][geo_data_frame], it automatically converts the current `geometry` column from shapely to wkt string.+#### `GeoDataFrame`++kepler.gl accepts [geopandas.GeoDataFrame](https://geopandas.readthedocs.io/en/latest/data_structures.html#geodataframe), it automatically converts the current `geometry` column from shapely to wkt string.+```pythonurl = 'http://eric.clst.org/assets/wiki/uploads/Stuff/gz_2010_us_040_00_500k.json'country_gdf = geopandas.read_file(url)w1.add_data(data=country_gdf, name="state")```-![US state][geodataframe_map]+-### `WKT`+#### `WKT`-You can embed geometries (Polygon, LineStrings etc) into CSV or DataFrame using [`WKT`][wkt]+You can embed geometries \(Polygon, LineStrings etc\) into CSV or DataFrame using [`WKT`](https://dev.mysql.com/doc/refman/5.7/en/gis-data-formats.html#gis-wkt-format)```python# WKT@@ -231,21 +246,18 @@ df_w_wkt = pd.DataFrame({map_1.add_data(df_w_wkt, "df_w_wkt")```--<br></br>--## 4. Customize the map+### 4. Customize the mapInteract with kepler.gl and customize layers and filters. Map data and config will be stored locally to the widget state. To make sure the map state is saved, select `Widgets > Save Notebook Widget State`, before shutting down the kernel.-![Map interaction][map_interaction]+-<br></br>+### 5. Save and load config-## 5. Save and load config+#### `.config`-### `.config`you can print your current map configuration at any time.+```pythonmap_1.config## {u'config': {u'mapState': {u'bearing': 2.6192893401015205,@@ -255,31 +267,34 @@ map_1.config# u'longitude': -122.42590232651203,```-When the map is final, you can copy this config and load it later to reproduce the same map. Follow the instruction to [match config with data](match-config-w-data).-There are 2 ways to apply config to a map:+When the map is final, you can copy this config and load it later to reproduce the same map. Follow the instruction to [match config with data](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/keplergl-jupyter/match-config-w-data/README.md). There are 2 ways to apply config to a map:- 1. Directly apply config to the map.-```python-config = {- 'version': 'v1',- 'config': {- 'mapState': {- 'latitude': 37.76209132041332,- 'longitude': -122.42590232651203,- 'zoom': 12.32053899007826- }- ...- }-},-map_1.add_data(data=df, name='data_1')-map_1.config = config-```- 2. Load it when creating the map-```python-map_1 = KeplerGl(height=400, data={'data_1': my_df}, config=config)-```+1. Directly apply config to the map.++ ```python+ config = {+ 'version': 'v1',+ 'config': {+ 'mapState': {+ 'latitude': 37.76209132041332,+ 'longitude': -122.42590232651203,+ 'zoom': 12.32053899007826+ }+ ...+ }+ },+ map_1.add_data(data=df, name='data_1')+ map_1.config = config+ ```++2. Load it when creating the map++ ```python+ map_1 = KeplerGl(height=400, data={'data_1': my_df}, config=config)+ ```If want to load the map next time with this saved config, the easiest way to do is to save the it to a file and use the magic command **%run** to load it w/o cluttering up your notebook.+```python# Save map_1 config to a filewith open('hex_config.py', 'w') as f:@@ -289,32 +304,31 @@ with open('hex_config.py', 'w') as f:%run hex_config.py```-<br></br>-## 6. Match config with data+### 6. Match config with data+All layers, filters and tooltips are associated with a specific dataset. Therefore the `data` and `config` in the map has to be able to match each other. The `name` of the dataset is assigned to:- - `dataId` of `layer.config`,- - `dataId` of `filter`- - key in `interactionConfig.tooltip.fieldToShow`.+* `dataId` of `layer.config`,+* `dataId` of `filter`+* key in `interactionConfig.tooltip.fieldToShow`.-![Connect data and config][connect_data_config]+You can use the same config on another dataset with the same name and schema.-<br></br>-## 7. Save Map+### 7. Save MapWhen you click in the map and change settings, config is saved to widget state. Closing the notebook and reopen it will reload current map. However, you need to manually select `Widget > Save Notebook Widget State` before shut downing the kernel to make sure it will be reloaded.-![Save Widget State][save_widget_state]+-### `.save_to_html()`+#### `.save_to_html()`-- input- - **`data`**: _optional_ A data dictionary {"name": data}, if not provided, will use current map data- - **`config`**: _optional_ map config dictionary, if not provided, will use current map config- - **`file_name`**: _optional_ the html file name, default is `keplergl_map.html`- - **`read_only`**: _optional_ if `read_only` is `True`, hide side panel to disable map customization+* input+ * **`data`**: _optional_ A data dictionary {"name": data}, if not provided, will use current map data+ * **`config`**: _optional_ map config dictionary, if not provided, will use current map config+ * **`file_name`**: _optional_ the html file name, default is `keplergl_map.html`+ * **`read_only`**: _optional_ if `read_only` is `True`, hide side panel to disable map customizationYou can export your current map as an interactive html file.@@ -328,28 +342,12 @@ map_1.save_to_html(data={'data_1': df}, config=config, file_name='first_map.html# this will save map with the interaction panel disabledmap_1.save_to_html(file_name='first_map.html' read_only=True)```-# Demo Notebooks-- [Load kepler.gl](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/Load%20kepler.gl.ipynb): Load kepler.gl widget, add data and config-- [Geometry as String](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/Geometry%20as%20String.ipynb): Embed Polygon geometries as `GeoJson` and `WKT` inside a `CSV`-- [GeoJSON](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/GeoJSON.ipynb): Load GeoJSON to kepler.gl-- [DataFrame](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/DataFrame.ipynb): Load DataFrame to kepler.gl-- [GeoDataFrame](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/GeoDataFrame.ipynb): Load GeoDataFrame to kepler.gl--[jupyter_widget]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_widget.png-[empty_map]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_empty_map.png-[geodataframe_map]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_geodataframe.png-[map_interaction]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_custom_map.gif-[load_map_w_data]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_widget.png-[map_add_data]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_add_data.png-[connect_data_config]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_connect_data_w_config.png-[save_widget_state]: https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/jupyter_save_state.png--[wkt]: https://dev.mysql.com/doc/refman/5.7/en/gis-data-formats.html#gis-wkt-format-[geojson]: https://tools.ietf.org/html/rfc7946-[feature_collection]: https://tools.ietf.org/html/rfc7946#section-3.3-[features]: https://tools.ietf.org/html/rfc7946#section-3.2-[data_frame]: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html-[geo_data_frame]: https://geopandas.readthedocs.io/en/latest/data_structures.html#geodataframe--[match-config-w-data]: #match-config-with-data-[data_format]: #3-data-format++## Demo Notebooks++* [Load kepler.gl](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/Load%20kepler.gl.ipynb): Load kepler.gl widget, add data and config+* [Geometry as String](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/Geometry%20as%20String.ipynb): Embed Polygon geometries as `GeoJson` and `WKT` inside a `CSV`+* [GeoJSON](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/GeoJSON.ipynb): Load GeoJSON to kepler.gl+* [DataFrame](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/DataFrame.ipynb): Load DataFrame to kepler.gl+* [GeoDataFrame](https://github.com/keplergl/kepler.gl/blob/master/bindings/kepler.gl-jupyter/notebooks/GeoDataFrame.ipynb): Load GeoDataFrame to kepler.gl+diff --git a/docs/user-guides/README.md b/docs/user-guides/README.mdnew file mode 100644index 000000000..70b516d93--- /dev/null+++ b/docs/user-guides/README.md@@ -0,0 +1,2 @@+# User guides+diff --git a/docs/user-guides/a-introduction.md b/docs/user-guides/a-introduction.mdindex a0f921299..cfc3491cf 100644--- a/docs/user-guides/a-introduction.md+++ b/docs/user-guides/a-introduction.md@@ -2,65 +2,67 @@Kepler.gl is designed for geospatial data analysis. It allows technical and non-technical audiences to visualize trends in a city or region. With Kepler.gl, you can…-Visualize a large amount of location data in your browser.-Playback geo-temporal trends over time.-Explore, filter, and deeply engage with location data to gain insight+Visualize a large amount of location data in your browser. Playback geo-temporal trends over time. Explore, filter, and deeply engage with location data to gain insightSee the sample maps in the demo app for more examples.-+This guide will teach you how to perform data analysis in Kepler.gl by adding data to a map, creating layers, adding filters, and more.## Table of contents:-#### [Get Started](./j-get-started.md)+### [Get Started](j-get-started.md)-#### The kepler.gl workflow-* [Add data to the map](./b-kepler-gl-workflow/a-add-data-to-the-map.md)-* [Adding data layers](./b-kepler-gl-workflow/b-add-data-layers/a-adding-data-layers.md)-* [Create a layer](./b-kepler-gl-workflow/b-add-data-layers/b-create-a-layer.md)-* [Hide, edit and delete layers](./b-kepler-gl-workflow/b-add-data-layers/c-hide-edit-and-delete-layers.md)-* [Blend and rearrange layers](./b-kepler-gl-workflow/b-add-data-layers/d-blend-and-rearrange-layers.md)+### The kepler.gl workflow-#### Types of layers+* [Add data to the map](b-kepler-gl-workflow/a-add-data-to-the-map.md)+* [Adding data layers](b-kepler-gl-workflow/b-add-data-layers/a-adding-data-layers.md)+* [Create a layer](b-kepler-gl-workflow/b-add-data-layers/b-create-a-layer.md)+* [Hide, edit and delete layers](b-kepler-gl-workflow/b-add-data-layers/c-hide-edit-and-delete-layers.md)+* [Blend and rearrange layers](b-kepler-gl-workflow/b-add-data-layers/d-blend-and-rearrange-layers.md)-* [Point](./c-types-of-layers/a-point.md)-* [Arc](./c-types-of-layers/b-arc.md)-* [Line](./c-types-of-layers/c-line.md)-* [Grid](./c-types-of-layers/d-grid.md)-* [Polygon](./c-types-of-layers/e-polygon.md)-* [Cluster](./c-types-of-layers/f-cluster.md)-* [Icon](./c-types-of-layers/g-icon.md)-* [Hexbin](./c-types-of-layers/h-hexbin.md)-* [Heatmap](./c-types-of-layers/i-heatmap.md)-* [H3](./c-types-of-layers/j-h3.md)-* [Trip](./c-types-of-layers/k.trip.md)+### [Types of layers](c-types-of-layers-1/)-#### [Layer attributes](./d-layer-attributes.md)+* [Point](c-types-of-layers-1/a-point.md)+* [Arc](c-types-of-layers-1/b-arc.md)+* [Line](c-types-of-layers-1/c-line.md)+* [Grid](c-types-of-layers-1/d-grid.md)+* [Polygon](c-types-of-layers-1/e-polygon.md)+* [Cluster](c-types-of-layers-1/f-cluster.md)+* [Icon](c-types-of-layers-1/g-icon.md)+* [Hexbin](c-types-of-layers-1/h-hexbin.md)+* [Heatmap](c-types-of-layers-1/i-heatmap.md)+* [H3](c-types-of-layers-1/j-h3.md)+* [Trip](c-types-of-layers-1/k.trip.md)-#### [Layer color](./d-color-attributes.md)+### [Layer attributes](d-layer-attributes.md)-#### [Filters](./e-filters.md)+### [Layer color](l-color-attributes.md)-#### [Map styles](./f-map-styles.md#map-styles.md)-* [Base map styles](./f-map-styles.md#base-map-styles.md)-* [Map layers](./f-map-styles.md#map-layers.md)-* [Custom styles](./f-map-styles.md#custom-styles.md)+### [Filters](e-filters.md)-#### [Interactions](./g-interactions.md)-* [Tooltips](./g-interactions.md#tooltips)-* [Brushing](./g-interactions.md#brushing)-* [Display Coordinates](./g-interactions.md#display-coordinates)+### [Map styles](f-map-styles.md#map-styles.md)-#### [Map Settings](./m-map-settings.md)-* [View maps in 3d](./m-map-settings.md#view-maps-in-3d)-* [Display legend](./m-map-settings.md#display-legend)-* [Split maps](./m-map-settings.md#split-maps)+* [Base map styles](f-map-styles.md#base-map-styles.md)+* [Map layers](f-map-styles.md#map-layers.md)+* [Custom styles](f-map-styles.md#custom-styles.md)+### [Interactions](g-interactions.md)-#### [Time playback](./h-playback.md)+* [Tooltips](g-interactions.md#tooltips)+* [Brushing](g-interactions.md#brushing)+* [Display Coordinates](g-interactions.md#display-coordinates)-#### [Save and export](./k-save-and-export.md)+### [Map Settings](m-map-settings.md)++* [View maps in 3d](m-map-settings.md#view-maps-in-3d)+* [Display legend](m-map-settings.md#display-legend)+* [Split maps](m-map-settings.md#split-maps)++### [Time playback](h-playback.md)++### [Save and export](k-save-and-export.md)++### [FAQ](i-faq.md)-#### [FAQ](./i-FAQ.md)diff --git a/docs/user-guides/b-kepler-gl-workflow/README.md b/docs/user-guides/b-kepler-gl-workflow/README.mdnew file mode 100644index 000000000..879213aad--- /dev/null+++ b/docs/user-guides/b-kepler-gl-workflow/README.md@@ -0,0 +1,2 @@+# Kepler.gl workflow+diff --git a/docs/user-guides/b-kepler-gl-workflow/a-add-data-to-the-map.md b/docs/user-guides/b-kepler-gl-workflow/a-add-data-to-the-map.mdindex 966ed164c..e31af2a70 100644--- a/docs/user-guides/b-kepler-gl-workflow/a-add-data-to-the-map.md+++ b/docs/user-guides/b-kepler-gl-workflow/a-add-data-to-the-map.md@@ -1,88 +1,93 @@-# Add Data to the Map+# Add data to the Map## Ways to Add Data-- Open kepler.gl/demo. You should see the following prompt:-+* Open kepler.gl/demo. You should see the following prompt:-**kepler.gl is a pure client side app. Data lives only in your machine/browser. No information or maps is sent back up to our server.**+-- Choose one of three ways to add data to your map+**kepler.gl is a pure client side app. Data lives only in your machine/browser. No information or maps is sent back up to our server.**-| | |-|---|---|-| **Local files** | <span style="font-weight:normal">Upload CSV / GeoJSON files. Because data is only stored in your browser, there is a **250mb** limit on how much data Chrome allows you to upload into a browser. For datasets larger than **250mb** you should directly load them from a remote URL. See below.<span> |-| **From URL** | Directly load data or map json by pasting a remote URL. You can link it to CSV | JSON | Kepler.gl config json. Make sure the url contains the file extension. CORS policy must be defined on your custom url domain. |-| **Sample data** | Load one of kepler.gl’s sample datasets. The sample map data and config are directly loaded from [kepler.gl-data github][kepler.gl-data-github] repo |+* Choose one of three ways to add data to your map+| | | | |+| :--- | :--- | :--- | :--- |+| **Local files** | Upload CSV / GeoJSON files. Because data is only stored in your browser, there is a **250mb** limit on how much data Chrome allows you to upload into a browser. For datasets larger than **250mb** you should directly load them from a remote URL. See below. | | |+| **From URL** | Directly load data or map json by pasting a remote URL. You can link it to CSV | JSON | Kepler.gl config json. Make sure the url contains the file extension. CORS policy must be defined on your custom url domain. |+| **Sample data** | Load one of kepler.gl’s sample datasets. The sample map data and config are directly loaded from [kepler.gl-data github](https://github.com/uber-web/kepler.gl-data) repo | | |## Supported Projection Coordinate System-kepler.gl only supports **[Web Mercator]([https://en.wikipedia.org/wiki/Web_Mercator_projection) EPSG:3857 -- WGS84**.++kepler.gl only supports [**Web Mercator**](https://github.com/keplergl/kepler.gl/tree/f6f52361683304ed9d62029fbf268582543aebae/docs/user-guides/b-kepler-gl-workflow/[https:/en.wikipedia.org/wiki/Web_Mercator_projection/README.md) **EPSG:3857 -- WGS84**.Geometry coordinates should be presented with a geographic coordinate reference system, using the WGS84 datum, and with longitude and latitude units of decimal degrees.## Supported File Formats- - [CSV](#csv)- - [GeoJSON](#geojson)- - [kepler.gl Json](#kepler-gl-json): exported from kepler.gl. See [export map](https://github.com/keplergl/kepler.gl/blob/master/docs/user-guides/k-save-and-export.md#export-map-as-json)+* [CSV](a-add-data-to-the-map.md#csv)+* [GeoJSON](a-add-data-to-the-map.md#geojson)+* [kepler.gl Json](a-add-data-to-the-map.md#kepler-gl-json): exported from kepler.gl. See [export map](https://github.com/keplergl/kepler.gl/blob/master/docs/user-guides/k-save-and-export.md#export-map-as-json)### CSVCSV file should contain header row and multiple columns. Each row should be 1 feature. Each column should contain only 1 data type, based on which kepler.gl will use to create layers and filters.-| id | point_latitude | point_longitude | value | start_time-|---|---|---|---|----| a | 31.2384 | -127.30948 | 5 | 2019-08-01 12:00-| b | 31.2311 | -127.30231 | 11 | 2019-08-01 12:05-| c | 31.2334 | -127.30238 | 9 | 2019-08-01 11:55-+| id | point\_latitude | point\_longitude | value | start\_time |+| :--- | :--- | :--- | :--- | :--- |+| a | 31.2384 | -127.30948 | 5 | 2019-08-01 12:00 |+| b | 31.2311 | -127.30231 | 11 | 2019-08-01 12:05 |+| c | 31.2334 | -127.30238 | 9 | 2019-08-01 11:55 |#### 1. Data type detectionBecause CSV file content is uploaded as strings, kepler.gl will attempt to detect column data type by parsing a sample of data in each column. kepler.gl can detect-| type | data-|---|----|**_`boolean`_** | `True`, `False`|-|**_`date`_** | `2019-01-01`|-|**_`geojson`_** | **WKT string:** `POLYGON ((-74.158 40.835, -74.148 40.830, -74.151 40.832, -74.158 40.835))`, **or GeoJson String** `{"type":"Polygon","coordinates":[[[-74.158,40.835],[-74.157,40.839,[-74.148,40.830],[-74.150,40.833],[-74.151,40.832],[-74.158,40.835]]]}` |-|**_`integer`_** | `1`, `2`, `3`|-|**_`real`_** | `-74.158`, `40.832`|-|**_`string`_** | `hello`, `world` |-|**_`timestamp`_** | `2018-09-01 00:00`, `1570306147`, `1570306147000`|+| type | data |+| :--- | :--- |+| _**`boolean`**_ | `True`, `False` |+| _**`date`**_ | `2019-01-01` |+| _**`geojson`**_ | **WKT string:** `POLYGON ((-74.158 40.835, -74.148 40.830, -74.151 40.832, -74.158 40.835))`, **or GeoJson String** `{"type":"Polygon","coordinates":[[[-74.158,40.835],[-74.157,40.839,[-74.148,40.830],[-74.150,40.833],[-74.151,40.832],[-74.158,40.835]]]}` |+| _**`integer`**_ | `1`, `2`, `3` |+| _**`real`**_ | `-74.158`, `40.832` |+| _**`string`**_ | `hello`, `world` |+| _**`timestamp`**_ | `2018-09-01 00:00`, `1570306147`, `1570306147000` |-**Note:** Make sure to clean up values such as `N/A`, `Null`, `\N`. If your column contains mixed type, kepler.gl will treat it as **_`string`_** to be safe.+**Note:** Make sure to clean up values such as `N/A`, `Null`, `\N`. If your column contains mixed type, kepler.gl will treat it as _**`string`**_ to be safe.#### 2. Layer detection based on column names-kepler.gl will auto detect layer, if the column names follows certain naming convention. kepler.gl creates a point layer if your CSV has columns that are named `<name>_lat` and `<name>_lng` or `<name>_latitude` and `<name>_longitude`, or `<name>_lat` and `<name>_lon`.+kepler.gl will auto detect layer, if the column names follows certain naming convention. kepler.gl creates a point layer if your CSV has columns that are named `<name>_lat` and `<name>_lng` or `<name>_latitude` and `<name>_longitude`, or `<name>_lat` and `<name>_lon`.-| layer | auto create layer from column names-|---|----|**Point** | Point layer names have to be in pairs, and **ends with** `<foo>lat, <foo>lng`; `<foo>latitude, <foo>longitude`; `<foo>lat, <foo>lon`|-|**Arc**| If two points layers are detected, one arc layer will be created |-|**Icon**| A column named `icon` is present|-|**H3**| A column named `h3_id` or `hexagon_id` is present |-|**Polygon**| A column content contains `geojson` data types. Acceptable formats include [Well-Known Text](http://www.postgis.net/docs/ST_AsText.html) e.g. `POLYGON ((-74.158 40.835, -74.148 40.830, -74.151 40.832, -74.158 40.835))` and [GeoJSON Geometry](https://tools.ietf.org/html/rfc7946#appendix-A). e.g. `{"type":"LineString","coordinates":[[100.0, 0.0],[101.0, 1.0]]}`+| layer | auto create layer from column names |+| :--- | :--- |+| **Point** | Point layer names have to be in pairs, and **ends with** `<foo>lat, <foo>lng`; `<foo>latitude, <foo>longitude`; `<foo>lat, <foo>lon` |+| **Arc** | If two points layers are detected, one arc layer will be created |+| **Icon** | A column named `icon` is present |+| **H3** | A column named `h3_id` or `hexagon_id` is present |+| **Polygon** | A column content contains `geojson` data types. Acceptable formats include [Well-Known Text](http://www.postgis.net/docs/ST_AsText.html) e.g. `POLYGON ((-74.158 40.835, -74.148 40.830, -74.151 40.832, -74.158 40.835))` and [GeoJSON Geometry](https://tools.ietf.org/html/rfc7946#appendix-A). e.g. `{"type":"LineString","coordinates":[[100.0, 0.0],[101.0, 1.0]]}` |#### 3. Embed Geometries in CSV-Geometries (Polygons, Points, LindStrings etc) can be embedded into CSV as a `GeoJSON` or `WKT` formatted string.-##### `GeoJSON` String+Geometries \(Polygons, Points, LindStrings etc\) can be embedded into CSV as a `GeoJSON` or `WKT` formatted string.++**GeoJSON String**+Use the geometry of a Feature, which includes type and coordinates. It should be a JSON formatted string, with the `"` corrected escaped. More info on [String escape in csv](https://gpdb.docs.pivotal.io/43250/admin_guide/load/topics/g-escaping-in-csv-formatted-files.html)Example data.csv with GeoJSON-```txt++```textid,geometry1,"{""type"":""Polygon"",""coordinates"":[[[-74.158491,40.835947],[-74.157914,40.83902]]]}"```-##### `WKT`String-[The Well-Known Text (WKT)](https://dev.mysql.com/doc/refman/5.7/en/gis-data-formats.html#gis-wkt-format) representation of geometry values is designed for exchanging geometry data in ASCII form.+**WKTString**++[The Well-Known Text \(WKT\)](https://dev.mysql.com/doc/refman/5.7/en/gis-data-formats.html#gis-wkt-format) representation of geometry values is designed for exchanging geometry data in ASCII form.Example data.csv with WKT-```txt++```textid,geometry1,"POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7, 5 5))"```@@ -91,11 +96,11 @@ id,geometry#### 1. Feature types-- kepler.gl accepts GeoJSON formatted JSON that contains a single [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) object or a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) object. kepler.gl creates one **`Polygon`** layer per GeoJSON file.+* kepler.gl accepts GeoJSON formatted JSON that contains a single [Feature](https://tools.ietf.org/html/rfc7946#section-3.2) object or a [FeatureCollection](https://tools.ietf.org/html/rfc7946#section-3.3) object. kepler.gl creates one **`Polygon`** layer per GeoJSON file.- - A single GeoJSON Feature:+ * A single GeoJSON Feature:- ```json+ ```javascript{"type": "Feature","geometry": {@@ -115,9 +120,10 @@ id,geometry}```- - GeoJSON Feature Collection.- ```json- {+ * GeoJSON Feature Collection.++ ```javascript+ {"type": "FeatureCollection","features": [{"type": "Feature",@@ -143,34 +149,37 @@ id,geometry"prop0": "value0"}}]- }- ```+ }+ ```kepler.gl will render all features in one `Polygon` layer even though they have different geometry types. Acceptable geometry types are- - [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)- - [MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3)- - [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)- - [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5)- - [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)- - [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7).+ * [Point](https://tools.ietf.org/html/rfc7946#section-3.1.2)+ * [MultiPoint](https://tools.ietf.org/html/rfc7946#section-3.1.3)+ * [LineString](https://tools.ietf.org/html/rfc7946#section-3.1.4)+ * [MultiLineString](https://tools.ietf.org/html/rfc7946#section-3.1.5)+ * [Polygon](https://tools.ietf.org/html/rfc7946#section-3.1.6)+ * [MultiPolygon](https://tools.ietf.org/html/rfc7946#section-3.1.7).Feature properties will be parsed as columns. You can apply color, filters based on them.#### 2. Auto styling+kepler.gl will read styles from GeoJSON files. If you are a GeoJSON expert, you can add style declarations to feature properties. kepler.gl will use the declarations to automatically style your feature. The acceptable style properties are:- ```json++```javascript"properties": {"lineColor": [130, 154, 227],"lineWidth": 0.5,"fillColor": [255, 0, 0],"radius": 1 // Point}- ```+```++* See an example below:-- See an example below:-```json-{+ ```javascript+ {"type": "FeatureCollection","features": [{"type": "Feature",@@ -187,9 +196,8 @@ kepler.gl will read styles from GeoJSON files. If you are a GeoJSON expert, you"lineWidth": 0.1}}]-}-```-+ }+ ```### Load Map Using URL@@ -197,7 +205,7 @@ You load data or map through custom URL. It currently supports URLs with file exIn addition, this also by-passes 250mb file upload size limit which allows you to upload larger file to Kepler.-+### Use Kepler.gl’s Sample Maps@@ -205,25 +213,22 @@ The sample maps are a great option for new users to explore Kepler.gl and get a1. At the initial load prompt select “Try sample data” in the top right corner.-+-2. Choose from the options to load the sample map and explore the configurations applied.+1. Choose from the options to load the sample map and explore the configurations applied.-+### Add multiple datasetsTo add additional datasets to your map:-1. Click __Add More Data__ in the top right corner.--+1. Click **Add More Data** in the top right corner.-2. Choose one of the options above: upload a JSON/CSV file, or use Kepler.gl’s sample data.+-3. Repeat as needed. There is no limit on the number of datasets you can add. However, adding too many might cause its performance to suffer.+1. Choose one of the options above: upload a JSON/CSV file, or use Kepler.gl’s sample data.+2. Repeat as needed. There is no limit on the number of datasets you can add. However, adding too many might cause its performance to suffer.[Back to table of contents](../a-introduction.md)--[kepler.gl-data-github]: https://github.com/uber-web/kepler.gl-datadiff --git a/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/README.md b/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/README.mdnew file mode 100644index 000000000..1bc622d65--- /dev/null+++ b/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/README.md@@ -0,0 +1,2 @@+# Add data layers+diff --git a/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/a-adding-data-layers.md b/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/a-adding-data-layers.mdindex 66aff3011..094a2562f 100644--- a/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/a-adding-data-layers.md+++ b/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/a-adding-data-layers.md@@ -1,13 +1,14 @@# Adding Data Layers-The term "Layer" refers to a layer of data visualization. For example, you might add a point layer to visualize all the instances where taxi trips began, as in the map of New York City below.+The term "Layer" refers to a layer of data visualization. For example, you might add a point layer to visualize all the instances where taxi trips began, as in the map of New York City below.-+-Each blue dot represents the point (latitude and longitude). Layers work like paint—you can build up multiple layers to change the appearance of the canvas. You might create a second point layer to show trip drop-off locations. The map then looks like this:+Each blue dot represents the point \(latitude and longitude\). Layers work like paint—you can build up multiple layers to change the appearance of the canvas. You might create a second point layer to show trip drop-off locations. The map then looks like this:-+-Learn more about the [types of layers](../../c-types-of-layers.md) available in Kepler.gl.+Learn more about the [types of layers](../../c-types-of-layers-1/) available in Kepler.gl.[Back to table of contents](../../a-introduction.md)+diff --git a/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/b-create-a-layer.md b/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/b-create-a-layer.mdindex 028aa9f11..bf30114db 100644--- a/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/b-create-a-layer.md+++ b/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/b-create-a-layer.md@@ -1,18 +1,11 @@# Create a Layer-1. Click the Data Layers icon in the left navigation bar.---2. The Layers panel displays a list of existing layers and the name of the dataset the layers belong to (Sample Trip Data, in the example below). To create a new layer, click __Add Layer__ at the bottom of the menu.---3. If your map contains multiple datasets, you’ll be asked to select the data source for your new layer.---4. Select a layer type. Read about the different [types of layers].---5. Fill in the required columns and adjust the optional settings if desired.+1. Click the Data Layers icon in the left navigation bar. +2. The Layers panel displays a list of existing layers and the name of the dataset the layers belong to \(Sample Trip Data, in the example below\). To create a new layer, click **Add Layer** at the bottom of the menu. +3. If your map contains multiple datasets, you’ll be asked to select the data source for your new layer. +4. Select a layer type. Read about the different \[types of layers\]. +5. Fill in the required columns and adjust the optional settings if desired.6. Collapse the layer settings menu when finished.[Back to table of contents](../../a-introduction.md)+diff --git a/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/c-hide-edit-and-delete-layers.md b/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/c-hide-edit-and-delete-layers.mdindex 8344c50af..b3c478505 100644--- a/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/c-hide-edit-and-delete-layers.md+++ b/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/c-hide-edit-and-delete-layers.md@@ -1,10 +1,10 @@# Hide, Edit and Delete Layers-Each layer has its own tab in the __Data Layers__ menu:-+Each layer has its own tab in the **Data Layers** menu: -Click the __down arrow__ to open up the settings menu for that layer. Click the __trashcan__ to delete a layer. Click the __eye__ to toggle show/hide.+Click the **down arrow** to open up the settings menu for that layer. Click the **trashcan** to delete a layer. Click the **eye** to toggle show/hide.-__Note__: The colored line on the left of each layer tab represents what dataset that layer belongs to.+**Note**: The colored line on the left of each layer tab represents what dataset that layer belongs to.++[Back to table of contents](../../a-introduction.md)-[Back to table of contents](../../a-introduction.md)\ No newline at end of filediff --git a/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/d-blend-and-rearrange-layers.md b/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/d-blend-and-rearrange-layers.mdindex 9aa70932f..e67562a7e 100644--- a/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/d-blend-and-rearrange-layers.md+++ b/docs/user-guides/b-kepler-gl-workflow/b-add-data-layers/d-blend-and-rearrange-layers.md@@ -1,33 +1,30 @@# Blend and Rearrange Layers-<p align="center">- <b>Rearrange layers by dragging and dropping them in the Layers panel. The layers at the top of the list will be displayed in the foreground of the map.-</b>- <br><br>- <img src="https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image44.png" alt="Rearrange layers"/>++ **Rearrange layers by dragging and dropping them in the Layers panel. The layers at the top of the list will be displayed in the foreground of the map.**++ - <br><br>-</p>-<p align="center">- <b>Blend layers by selecting an option from the dropdown at the bottom of the Layers panel.</b>- <br><br>- <img src="https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/image10.png" alt="Blend layers"/>- <br><br>- <b>There are three different ways to blend layers: Normal, Additive, and Subtractive.</b>- <br><br>-</p>++ **Blend layers by selecting an option from the dropdown at the bottom of the Layers panel.**++ ++ **There are three different ways to blend layers: Normal, Additive, and Subtractive.**+## Normal Blending-Normal layer blending does not alter the color values of overlapping data points.-++Normal layer blending does not alter the color values of overlapping data points. ## Additive Blending-Additive blending adds the color values for overlapping data points. It makes layers, and particularly areas of high density, easier to visualize on a dark-colored map.-++Additive blending adds the color values for overlapping data points. It makes layers, and particularly areas of high density, easier to visualize on a dark-colored map. ## Subtractive Blending-Subtractive layer blending does not alter the color values of overlapping data points.-++Subtractive layer blending does not alter the color values of overlapping data points. [Back to table of contents](../../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers.md b/docs/user-guides/c-types-of-layers-1/README.mdsimilarity index 75%rename from docs/user-guides/c-types-of-layers.mdrename to docs/user-guides/c-types-of-layers-1/README.mdindex c9eae32d1..0caf28ac1 100644--- a/docs/user-guides/c-types-of-layers.md+++ b/docs/user-guides/c-types-of-layers-1/README.md@@ -1,16 +1,20 @@-# Types of Layers+# Types of layers++## Types of Layers++### Single Feature Layers-## Single Feature LayersSingle feature layers renders 1 feature-## Point-+### Point++Point layers draw points for a given event or object based on its location - latitude and longitude.-## Arc+### Arc-+Arc layers draw an arc between two points. They’re useful for visualizing the distance between two points as well as comparing distances in 3D. Note that arc layers don’t show routes between points, but simply the distance between the two points. The tallest arc represents the greatest distance.@@ -18,41 +22,41 @@ To draw arcs, your dataset must contain the latitude and longitude of two differLayer Attributes: Color/ Color Based On, Opacity, Stroke Width/ Stroke Based On, High Precision Rendering-## Line+### Line-+Line layers are the 2D version of arc layers. Both draw a line between two points to represent distance, but in a line layer, the drawing lies flat on the map.Layer Attributes: Color, Stroke, High Precision Rendering-## Hexbin+### Hexbin-+Hexbin aggregates points into hexagons. The counts can be represented through color and/or height.-Layer Attributes: Color/ Color Based On, Filter by Count Percentile, Opacity, Hexagon Radius (km), Coverage (Radius), Enable Height, Elevation Scale/ Height Based On, High Precision Rendering+Layer Attributes: Color/ Color Based On, Filter by Count Percentile, Opacity, Hexagon Radius \(km\), Coverage \(Radius\), Enable Height, Elevation Scale/ Height Based On, High Precision Rendering-## Heatmap+### Heatmap-+Heatmap is a graphical representation of data in which data values are represented as colors.Layer Attributes: Color, Opacity, Radius, Weight-## Cluster+### Cluster-+Cluster layers visualize aggregated data based on a geospatial radius.Layer Attributes: Color, Cluster Size-## Icon+### Icon-+Icon layers are a type of point layer. They allow you to differentiate between points by assigning icons to points based on a field. For example, you might use icons to differentiate between types of venues and points of interest.@@ -60,28 +64,27 @@ Layer Attributes: Color, Radius, Label, High Precision RenderingTo see the icon menu, create a new icon layer and click how to draw an icon layer:-+-## Grid+### Grid--+ Grids layers are similar to heatmaps. They show the density of points. They provide visual discrepancy in a map where multiple heatmap-style layers are present.Layer Attributes: Color, Radius, Height, High Precision Rendering-## GeoJSON+### GeoJSON--+ GeoJSON layers can display either paths, polygons or points. For example, a path GeoJSON layer can display data like trip routes. A polygon GeoJSON layer is essentially a [choropleth](https://en.wikipedia.org/wiki/Choropleth_map) layer and works best for rendering geofences. To add a GeoJSON layer, your dataset must contain geometry data.-# H3+## H3-+H3 layers visualize spatial data using [H3 Hexagonal Hierarchical Spatial Index](https://eng.uber.com/h3/).To use H3 layer, you need a `hex_id` in your dataset, which can be generated using [h3-js](https://github.com/uber/h3-js) from latitude, longitude and resolution.+diff --git a/docs/user-guides/c-types-of-layers-1/a-point.md b/docs/user-guides/c-types-of-layers-1/a-point.mdnew file mode 100644index 000000000..3eef37227--- /dev/null+++ b/docs/user-guides/c-types-of-layers-1/a-point.md@@ -0,0 +1,33 @@+# Point++++Point layers draw points for a given event or object.++**Layer Attributes**++* Basic+ * Columns:+ * Latitude+ * Longitude+ * Altitude \(optional\)+* Fill+ * Enable fill - enabled by default+ * Single color / color based on+ * Color scale+ * Opacity+* Outline+ * Enable outline+ * Single color / color based on+ * Color scale+ * Stroke width+* Radius+ * Single radius / radius based on+ * Fixed radius to meter+* Text,+ * Font Size+ * Font Color+ * Text Anchor++[Back to table of contents](../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers/b-arc.md b/docs/user-guides/c-types-of-layers-1/b-arc.mdsimilarity index 93%rename from docs/user-guides/c-types-of-layers/b-arc.mdrename to docs/user-guides/c-types-of-layers-1/b-arc.mdindex cc9bdb50c..5ddfe64fc 100644--- a/docs/user-guides/c-types-of-layers/b-arc.md+++ b/docs/user-guides/c-types-of-layers-1/b-arc.md@@ -1,9 +1,10 @@# Arc-+Arc layers draw an arc between two points. They’re useful for visualizing the distance between two points as well as comparing distances in 3D. Note that arc layers don’t show routes between points, but simply the distance between the two points. The tallest arc represents the greatest distance.To draw arcs, your dataset must contain the latitude and longitude of two different points for each arc.[Back to table of contents](../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers/c-line.md b/docs/user-guides/c-types-of-layers-1/c-line.mdsimilarity index 88%rename from docs/user-guides/c-types-of-layers/c-line.mdrename to docs/user-guides/c-types-of-layers-1/c-line.mdindex e5adee741..6efb5a8cd 100644--- a/docs/user-guides/c-types-of-layers/c-line.md+++ b/docs/user-guides/c-types-of-layers-1/c-line.md@@ -1,7 +1,8 @@# Line-+Line layers are the 2D version of arc layers. Both draw a line between two points to represent distance, but in a line layer, the drawing lies flat on the map.[Back to table of contents](../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers/d-grid.md b/docs/user-guides/c-types-of-layers-1/d-grid.mdsimilarity index 66%rename from docs/user-guides/c-types-of-layers/d-grid.mdrename to docs/user-guides/c-types-of-layers-1/d-grid.mdindex c6758dec5..a3a9ff14c 100644--- a/docs/user-guides/c-types-of-layers/d-grid.md+++ b/docs/user-guides/c-types-of-layers-1/d-grid.md@@ -1,8 +1,8 @@# Grid--+ Grids layers are similar to heatmaps. They show the density of points. They provide visual discrepancy in a map where multiple heatmap-style layers are present.[Back to table of contents](../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers/e-polygon.md b/docs/user-guides/c-types-of-layers-1/e-polygon.mdsimilarity index 60%rename from docs/user-guides/c-types-of-layers/e-polygon.mdrename to docs/user-guides/c-types-of-layers-1/e-polygon.mdindex b562a86bd..a33d6c6c2 100644--- a/docs/user-guides/c-types-of-layers/e-polygon.md+++ b/docs/user-guides/c-types-of-layers-1/e-polygon.md@@ -2,19 +2,15 @@Polygon layer can display [GeoJSON](https://tools.ietf.org/html/rfc7946) features. GeoJSON supports the following geometry types: `Point`, `LineString`, `Polygon`, `MultiPoint`, `MultiLineString`, `MultiPolygon`.-kepler.gl supports all the GeoJSON types above. You can pass in either a single [`Feature`][features] or a [`FeatureCollection`][feature_collection]+kepler.gl supports all the GeoJSON types above. You can pass in either a single [`Feature`](https://tools.ietf.org/html/rfc7946#section-3.2) or a [`FeatureCollection`](https://tools.ietf.org/html/rfc7946#section-3.3)-[feature_collection]: https://tools.ietf.org/html/rfc7946#section-3.3-[features]: https://tools.ietf.org/html/rfc7946#section-3.2++-+-----+A path GeoJSON layer can display data like trip routes or contours. Stroke color can be set with a numerical field.@@ -22,5 +18,5 @@ A polygon GeoJSON layer is essentially a [choropleth](https://en.wikipedia.org/wTo add a polygon layer, your dataset must contain geometry data.-[Back to table of contents](../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers/f-cluster.md b/docs/user-guides/c-types-of-layers-1/f-cluster.mdsimilarity index 81%rename from docs/user-guides/c-types-of-layers/f-cluster.mdrename to docs/user-guides/c-types-of-layers-1/f-cluster.mdindex 55b4e340e..8bfe4c086 100644--- a/docs/user-guides/c-types-of-layers/f-cluster.md+++ b/docs/user-guides/c-types-of-layers-1/f-cluster.md@@ -1,7 +1,8 @@# Cluster-+Cluster layers visualize aggregated data based on a geospatial radius.[Back to table of contents](../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers/g-icon.md b/docs/user-guides/c-types-of-layers-1/g-icon.mdsimilarity index 83%rename from docs/user-guides/c-types-of-layers/g-icon.mdrename to docs/user-guides/c-types-of-layers-1/g-icon.mdindex d3eafdd76..94607a9ca 100644--- a/docs/user-guides/c-types-of-layers/g-icon.md+++ b/docs/user-guides/c-types-of-layers-1/g-icon.md@@ -1,11 +1,12 @@# Icon-+Icon layers are a type of point layer. They allow you to differentiate between points by assigning icons to points based on a field. For example, you might use icons to differentiate between types of venues and points of interest.To see the icon menu, create a new icon layer and click how to draw an icon layer:-+[Back to table of contents](../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers/h-hexbin.md b/docs/user-guides/c-types-of-layers-1/h-hexbin.mdsimilarity index 90%rename from docs/user-guides/c-types-of-layers/h-hexbin.mdrename to docs/user-guides/c-types-of-layers-1/h-hexbin.mdindex 1b5f40fac..01f6b1e7f 100644--- a/docs/user-guides/c-types-of-layers/h-hexbin.md+++ b/docs/user-guides/c-types-of-layers-1/h-hexbin.md@@ -1,8 +1,8 @@# Hexbin-+Hexbin layers are similar to grid layers. They display distributions of aggregate metrics such as point count within each hexbin, average/max/min/median/sum of a numerical field, or mode/unique count of a string field. Both the color and height dimensions can encode data. Users can adjust the hexagon radius and the space between hexbins.-[Back to table of contents](../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers/i-heatmap.md b/docs/user-guides/c-types-of-layers-1/i-heatmap.mdsimilarity index 84%rename from docs/user-guides/c-types-of-layers/i-heatmap.mdrename to docs/user-guides/c-types-of-layers-1/i-heatmap.mdindex d81155976..a4918a092 100644--- a/docs/user-guides/c-types-of-layers/i-heatmap.md+++ b/docs/user-guides/c-types-of-layers-1/i-heatmap.md@@ -1,7 +1,8 @@# Heatmap-+Heatmap layers describe the intensity of data at geographical points through a colored overlap. The intensity can be weighted by a numerical field.[Back to table of contents](../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers-1/j-h3.md b/docs/user-guides/c-types-of-layers-1/j-h3.mdnew file mode 100644index 000000000..f375127df--- /dev/null+++ b/docs/user-guides/c-types-of-layers-1/j-h3.md@@ -0,0 +1,18 @@+# H3++++H3 layers visualize spatial data using [H3 Hexagonal Hierarchical Spatial Index](https://eng.uber.com/h3/).++To use H3 layer, you need a `hex_id` in your dataset, which can be generated using [h3-js](https://github.com/uber/h3-js) from latitude, longitude and resolution.++## Naming Convention++kepler.gl **auto generates** H3 layer from column: `hex_id`, `hexagon_id`++## Sample dataset:++hex\_id \| value \| \|----------\|:------:\| 89283082c2fffff \| 64 \| 8928308288fffff \| 73 \| 89283082c07ffff \| 65 \| 89283082817ffff \| 74 \| 89283082c3bffff \| 66 \| 89283082883ffff \| 76 \|++[Back to table of contents](../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers/k.trip.md b/docs/user-guides/c-types-of-layers-1/k.trip.mdsimilarity index 54%rename from docs/user-guides/c-types-of-layers/k.trip.mdrename to docs/user-guides/c-types-of-layers-1/k.trip.mdindex ba5527699..bbbb9ff0a 100644--- a/docs/user-guides/c-types-of-layers/k.trip.md+++ b/docs/user-guides/c-types-of-layers-1/k.trip.md@@ -2,18 +2,17 @@Trip layer can display animated path.-+-### How to use trip layer to animate path+## How to use trip layer to animate path-**Data format**-Currently trip layer support a special `geoJSON` format where the coordinate `linestring` has a 4th element denoting timestamp.+**Data format** Currently trip layer support a special `geoJSON` format where the coordinate `linestring` has a 4th element denoting timestamp.-In order to animate the path, the `geoJSON` data needs to contain `LineString` in its features' geometry, and the coordinates in the `LineString` need to have 4 elements in the format of `[longitude, latitude, altitude, timestamp]`, with the last element being a timestamp. Valid timestamp formats include unix in seconds such as `1564184363` or in milliseconds such as `1564184363000`.+In order to animate the path, the `geoJSON` data needs to contain `LineString` in its features' geometry, and the coordinates in the `LineString` need to have 4 elements in the format of `[longitude, latitude, altitude, timestamp]`, with the last element being a timestamp. Valid timestamp formats include unix in seconds such as `1564184363` or in milliseconds such as `1564184363000`.**Sample data**-```+```text{"type": "FeatureCollection","features": [@@ -39,34 +38,32 @@ In order to animate the path, the `geoJSON` data needs to contain `LineString` i**Layer attributes**-- Color+* ColorThe path can be colored by an attribute from the properties.- <img src="https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/k-trip-attribute-colors.png" width="256" title="Color Attribute">+ -- Stroke Width+* Stroke WidthStroke width can be set by an attribute from the properties.-- Trail Length+* Trail LengthTrail length determines how long it takes for a path to completely fade out in seconds. This can be adjusted using the slider. Short trail length retains few historical locations while long trail length retain more and show a longer tail.-- Animation speed+* Animation speedAnimation speed can be adjusted using the animation control at the bottom.**When there are multiple layers**-- Multiple trip layers- When you add multiple trip layers, the time range from all the layers will be combined and the animation control will span the entire time range of those layers.--- Multiple layers containing trip layer and other layers- Other static layers can be added besides the trip layers. Upon hiding the trip layer, its animation control will also hide, giving place to the filter control.+* Multiple trip layers When you add multiple trip layers, the time range from all the layers will be combined and the animation control will span the entire time range of those layers.+* Multiple layers containing trip layer and other layers Other static layers can be added besides the trip layers. Upon hiding the trip layer, its animation control will also hide, giving place to the filter control.**Export**To export an animated map, you can use a screen recording or gif capture tool. You can also export the map as an interactive HTML to open in the browser.[Back to table of contents](../a-introduction.md)+diff --git a/docs/user-guides/c-types-of-layers/a-point.md b/docs/user-guides/c-types-of-layers/a-point.mddeleted file mode 100644index d726db6da..000000000--- a/docs/user-guides/c-types-of-layers/a-point.md+++ /dev/null@@ -1,31 +0,0 @@-# Point----Point layers draw points for a given event or object.--__Layer Attributes__-- Basic- - Columns:- - Latitude- - Longitude- - Altitude (optional)-- Fill- - Enable fill - enabled by default- - Single color / color based on- - Color scale- - Opacity-- Outline- - Enable outline- - Single color / color based on- - Color scale- - Stroke width-- Radius- - Single radius / radius based on- - Fixed radius to meter-- Text,- - Font Size- - Font Color- - Text Anchor--[Back to table of contents](../a-introduction.md)diff --git a/docs/user-guides/c-types-of-layers/j-h3.md b/docs/user-guides/c-types-of-layers/j-h3.mddeleted file mode 100644index 3679cb199..000000000--- a/docs/user-guides/c-types-of-layers/j-h3.md+++ /dev/null@@ -1,22 +0,0 @@-# H3----H3 layers visualize spatial data using [H3 Hexagonal Hierarchical Spatial Index](https://eng.uber.com/h3/).--To use H3 layer, you need a `hex_id` in your dataset, which can be generated using [h3-js](https://github.com/uber/h3-js) from latitude, longitude and resolution.--### Naming Convention-kepler.gl __auto generates__ H3 layer from column: `hex_id`, `hexagon_id`--### Sample dataset:-hex_id | value |-|----------|:------:|-89283082c2fffff | 64 |-8928308288fffff | 73 |-89283082c07ffff | 65 |-89283082817ffff | 74 |-89283082c3bffff | 66 |-89283082883ffff | 76 |--[Back to table of contents](../a-introduction.md)diff --git a/docs/user-guides/d-layer-attributes.md b/docs/user-guides/d-layer-attributes.mdindex 01a551d81..ad0cea4e0 100644--- a/docs/user-guides/d-layer-attributes.md+++ b/docs/user-guides/d-layer-attributes.md@@ -1,26 +1,27 @@-# Layer Attributes+# Layer attributes-| Layer Attribute | Description | Available in |-| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------- |-| Color/Color based on | Choose the color of your layer or assign color based on a field from your dataset(s). | All layers |-| High-precision rendering | Activate high-precision rendering when zooming in closely on a layer. High-precision rendering sometimes results in a performance cost. | Point, Arc, Line, Icon, GeoJSON, Hexagon, Grid |-| Radius/Radius based on | Change the radius of points or assign radius values based on a field from your dataset(s). | Point, Icon, GeoJSON |-| Opacity | Change the transparency of a layer. 1 = opaque, 0 = invisible. | All layers |-| Cluster size | Change the granularity of clusters. The lower the numerical value, the smaller the geospatial radius that will be used to aggregate clusters. | Cluster |-| Radius range | Set a lower and upper threshold for projected radius size. | Point, Icon, Geojson, Cluster |-| Stroke width/stroke width based on | Change the thickness of lines and arcs, or assign a width based on a field from your dataset(s). | Arc, line, Geojson |-| Stroke width range | Set a lower and upper threshold for projected stroke width. | Arc, Line, Geojson |-| Grid size | Change the number of square kilometers covered by each grid square. | Grid |-| Color Palette | Choose from multiple, predefined or customized color palettes to apply to your layer. Predefined palettes are either Uber or ColorBrewer colors. | All layers |-| Color Scale | Choose either a quantile or quantized color scale. A quantile color scale is determined by rank, while a quantized color scale is determined by value. | All layers |-| Height based on | Assign grid square height based on a field from your dataset. | Grid, Hexagon |-| Filter by count percentile | Increase or decrease the number of grid squares by choosing a range of percentiles to display. | Grid, Hexagon |-| Coverage | Change what portion of each grid cell is covered by a color square. | Grid, Hexagon |-| Height Scale | Change the height of the grid squares or hexagons when in 3D mode. | Grid, Hexagon |-| Stroked | When activated, draws outlines around geoshapes. | GeoJSON, Point |-| Filled | When activated, geo shapes are filled in with colors. | GeoJSON |-| Extruded | In 3D mode, assign polygon height values based on some value from your dataset. | GeoJSON |-| Wireframe | Create outlines around extruded polygons. | GeoJSON |-| Stroke or radius based on | Control the radius/thickness of GeoJSON line and point features. | GeoJSON |+| Layer Attribute | Description | Available in |+| :--- | :--- | :--- |+| Color/Color based on | Choose the color of your layer or assign color based on a field from your dataset\(s\). | All layers |+| High-precision rendering | Activate high-precision rendering when zooming in closely on a layer. High-precision rendering sometimes results in a performance cost. | Point, Arc, Line, Icon, GeoJSON, Hexagon, Grid |+| Radius/Radius based on | Change the radius of points or assign radius values based on a field from your dataset\(s\). | Point, Icon, GeoJSON |+| Opacity | Change the transparency of a layer. 1 = opaque, 0 = invisible. | All layers |+| Cluster size | Change the granularity of clusters. The lower the numerical value, the smaller the geospatial radius that will be used to aggregate clusters. | Cluster |+| Radius range | Set a lower and upper threshold for projected radius size. | Point, Icon, Geojson, Cluster |+| Stroke width/stroke width based on | Change the thickness of lines and arcs, or assign a width based on a field from your dataset\(s\). | Arc, line, Geojson |+| Stroke width range | Set a lower and upper threshold for projected stroke width. | Arc, Line, Geojson |+| Grid size | Change the number of square kilometers covered by each grid square. | Grid |+| Color Palette | Choose from multiple, predefined or customized color palettes to apply to your layer. Predefined palettes are either Uber or ColorBrewer colors. | All layers |+| Color Scale | Choose either a quantile or quantized color scale. A quantile color scale is determined by rank, while a quantized color scale is determined by value. | All layers |+| Height based on | Assign grid square height based on a field from your dataset. | Grid, Hexagon |+| Filter by count percentile | Increase or decrease the number of grid squares by choosing a range of percentiles to display. | Grid, Hexagon |+| Coverage | Change what portion of each grid cell is covered by a color square. | Grid, Hexagon |+| Height Scale | Change the height of the grid squares or hexagons when in 3D mode. | Grid, Hexagon |+| Stroked | When activated, draws outlines around geoshapes. | GeoJSON, Point |+| Filled | When activated, geo shapes are filled in with colors. | GeoJSON |+| Extruded | In 3D mode, assign polygon height values based on some value from your dataset. | GeoJSON |+| Wireframe | Create outlines around extruded polygons. | GeoJSON |+| Stroke or radius based on | Control the radius/thickness of GeoJSON line and point features. | GeoJSON |++[Back to table of contents](a-introduction.md)-[Back to table of contents](./a-introduction.md)diff --git a/docs/user-guides/e-filters.md b/docs/user-guides/e-filters.mdindex 1cea889b5..f0e0925f5 100644--- a/docs/user-guides/e-filters.md+++ b/docs/user-guides/e-filters.md@@ -1,20 +1,16 @@# Filters-Add filters to your map to limit the data that is displayed. Filters must be based on the columns in your dataset.+Add filters to your map to limit the data that is displayed. Filters must be based on the columns in your dataset.To add a filter:-1. Select Filters from the right navigation bar.---2. The Filters panel displays the list of existing filters, color-coded by dataset. To create a new filter, Click __Add Filter__.--3. Choose a dataset, and then a field on which to filter your data. Filter values are defined by field data type (number, string, timestamp, etc.).--+1. Select Filters from the right navigation bar. +2. The Filters panel displays the list of existing filters, color-coded by dataset. To create a new filter, Click **Add Filter**.+3. Choose a dataset, and then a field on which to filter your data. Filter values are defined by field data type \(number, string, timestamp, etc.\). 4. Your filter is applied to your map as soon as you specify the field and value.-5. Delete a filter anytime by clicking the __trashcan__ to the right of the filter you wish to delete.+5. Delete a filter anytime by clicking the **trashcan** to the right of the filter you wish to delete.++**Note**: filters apply to all layers in the same dataset on your map.-__Note__: filters apply to all layers in the same dataset on your map.+[Back to table of contents](a-introduction.md)-[Back to table of contents](./a-introduction.md)diff --git a/docs/user-guides/f-map-styles.md b/docs/user-guides/f-map-styles.mdindex 4825faa36..5ce41715e 100644--- a/docs/user-guides/f-map-styles.md+++ b/docs/user-guides/f-map-styles.md@@ -1,62 +1,61 @@-# Map Styles+# Map styles-<!-- TOC -->+* [Base Map Styles](f-map-styles.md#base-map-styles)+* [Toggle Map Layers](f-map-styles.md#toggle-map-layers)+ * [Map Layers](f-map-styles.md#map-layers)+ * [Layer Order](f-map-styles.md#layer-order)+* [Custom Map Styles](f-map-styles.md#custom-map-styles)- - [Base Map Styles](#base-map-styles)- - [Toggle Map Layers](#toggle-map-layers)- - [Map Layers](#map-layers)- - [Layer Order](#layer-order)- - [Custom Map Styles](#custom-map-styles)--<!-- /TOC -->--+kepler.gl provide a set of [Mapbox](https://www.mapbox.com) basemap styles as background map, including 3D buildings! You can also add your own custom map sytle using the Mapbox style link.## Base Map Styles-Open the __Base Map panel__ to select from a list of default map styles.+Open the **Base Map panel** to select from a list of default map styles.-+-Open the __base map style__ drop down menu to change map color scheme and imagery. Options include:-- __Dark__: dark base map with light-colored text.-- __Light__: light base map with dark-colored text.+Open the **base map style** drop down menu to change map color scheme and imagery. Options include:++* **Dark**: dark base map with light-colored text.+* **Light**: light base map with dark-colored text.## Toggle Map Layers-+++### Map Layers-#### Map LayersHide and show water, buildings, roads, and more. Options include:-- __Labels__: shows labels for cities, neighborhoods, and so on.-- __Roads__: displays a translucent layer of road lines.-- __Borders__: shows state and continent borders.-- __Buildings__: shows building footprints.-- __Water__: displays bodies of water.-- __Land__: Shows parks, mountains, and other landscape features.-- __3d Building__: Shows 3D buildings on the map. 3D buildings are only visible in the 3D map view. Resolution automatically updates based on current map zoom level. Use the input below to edit 3D bulding color.-+* **Labels**: shows labels for cities, neighborhoods, and so on.+* **Roads**: displays a translucent layer of road lines.+* **Borders**: shows state and continent borders.+* **Buildings**: shows building footprints.+* **Water**: displays bodies of water.+* **Land**: Shows parks, mountains, and other landscape features.+* **3d Building**: Shows 3D buildings on the map. 3D buildings are only visible in the 3D map view. Resolution automatically updates based on current map zoom level. Use the input below to edit 3D bulding color.+-#### Layer Order-To control the order in which map imagery layers are displayed, toggle the move to top icon:+### Layer Order-.+To control the order in which map imagery layers are displayed, toggle the move to top icon:-__TIP__: Move labels to the top on maps with colored layers to keep the labels from being concealed.+.-+**TIP**: Move labels to the top on maps with colored layers to keep the labels from being concealed.+## Custom Map Styles-++To add a custom base map style, click the add map style button to open the custom map style modal, paste in the mapbox [style Url](https://www.mapbox.com/help/studio-manual-publish/#style-url). Note that you need to paste in your [mapbox access token](https://www.mapbox.com/account/) if your style is not [published](https://www.mapbox.com/help/studio-manual-publish/#style-url).+-+[Back to table of contents](a-introduction.md)-[Back to table of contents](./a-introduction.md)diff --git a/docs/user-guides/g-interactions.md b/docs/user-guides/g-interactions.mdindex c65881953..0be76c5d9 100644--- a/docs/user-guides/g-interactions.md+++ b/docs/user-guides/g-interactions.md@@ -1,60 +1,56 @@# Interactions-<!-- TOC -->- - [Tooltips](#tooltips)- - [Brushing](#brushing)- - [Display Coordinates](#display-coordinates)-<!-- /TOC -->+* [Tooltips](g-interactions.md#tooltips)+* [Brushing](g-interactions.md#brushing)+* [Display Coordinates](g-interactions.md#display-coordinates)-You can toggle customization options on your map, including tooltips, brush highlighting, map imagery (water, parks, etc.), and more.+You can toggle customization options on your map, including tooltips, brush highlighting, map imagery \(water, parks, etc.\), and more.-+To toggle customization options on your map:1. Open the Interactions menu by clicking the Interactions icon:--2. Click the switch next to the options you wish to activate/deactivate.-There are three types of interactions to choose from: __Tooltip__, __Brushing__ and __Coordinate__. Note that only one of tooltip and brushing can be on at a time.+There are three types of interactions to choose from: **Tooltip**, **Brushing** and **Coordinate**. Note that only one of tooltip and brushing can be on at a time.## Tooltips-tooltip displays metrics when hovering over a data point. You can choose which fields are displayed from the tooltip config menu.-+tooltip displays metrics when hovering over a data point. You can choose which fields are displayed from the tooltip config menu.- - __Image__ Image can be added to tooltip. If field name contains `<img>` and the field content contains `http` url+- |id| `<img>-tooltip` |- |---|---|- |1|`http://my-image.com/my-image-0.png`|- |2|`http://my-image.com/my-image-1.png`|+* **Image** Image can be added to tooltip. If field name contains `<img>` and the field content contains `http` url+ | id | `<img>-tooltip` |+ | :--- | :--- |+ | 1 | `http://my-image.com/my-image-0.png` |+ | 2 | `http://my-image.com/my-image-1.png` |- - __Web link__-Tooltip can be a clicable weblink. To add a web link as tooltip, add url starts with `http://` to the field content.+* **Web link**-+ Tooltip can be a clicable weblink. To add a web link as tooltip, add url starts with `http://` to the field content.+Tip: click a point to pin the tooltip info to the map. To unpin the tooltip, press the blue pin icon.--+## Brushing-- __Brush__: Brush allows you to highlight areas with the cursor. When brush is turned on, all layers darken. Only the portion you hover over with the cursor is illuminated. Brush works well with arc layers in particular.-+* **Brush**: Brush allows you to highlight areas with the cursor. When brush is turned on, all layers darken. Only the portion you hover over with the cursor is illuminated. Brush works well with arc layers in particular.-[Back to table of contents](./a-introduction.md)++[Back to table of contents](a-introduction.md)## Display Coordinates-+++When then on coordinate, a panel contains latitude and longitude will follow your mouse-When then on coordinate, a panel contains latitude and longitude will follow your mouse+[Back to table of contents](a-introduction.md)-[Back to table of contents](./a-introduction.md)diff --git a/docs/user-guides/h-playback.md b/docs/user-guides/h-playback.mdindex 8fe51f9bc..be77f0030 100644--- a/docs/user-guides/h-playback.md+++ b/docs/user-guides/h-playback.md@@ -1,17 +1,15 @@-# Playback+# Time playback-Follow these steps to create a playback video of an event:-1. Add a filter based on a time-related field, like timestamp.+Follow these steps to create a playback video of an event: 1. Add a filter based on a time-related field, like timestamp.-2. The playback window will appear on the bottom of the map. The bars are distribution graphs of all data points by time. Select the desired rolling time window:+1. The playback window will appear on the bottom of the map. The bars are distribution graphs of all data points by time. Select the desired rolling time window:-+-3. Press play to start the video. Click _1x_, _2x_, _4x_ on the top right to change the playback speed.+1. Press play to start the video. Click _1x_, _2x_, _4x_ on the top right to change the playback speed.+2. Choose custom y axis. You can click **Select Y Axis** to change the default distribution graph to a timesieries of selected column. An example use of this function is to show a speed vs. time graph of a given trip.-4. Choose custom y axis. You can click __Select Y Axis__ to change the default distribution graph to a timesieries of selected column. An example use of this function is to show a speed vs. time graph of a given trip.+-+[Back to table of contents](a-introduction.md)--[Back to table of contents](./a-introduction.md)diff --git a/docs/user-guides/i-FAQ.md b/docs/user-guides/i-faq.mdsimilarity index 74%rename from docs/user-guides/i-FAQ.mdrename to docs/user-guides/i-faq.mdindex d78a4da6a..cec5e3efd 100644--- a/docs/user-guides/i-FAQ.md+++ b/docs/user-guides/i-faq.md@@ -1,21 +1,28 @@# FAQ## Can I export my map to a video file?+Kepler.gl does not have built-in functionality for exporting video. It only allows you to export maps as an image. However, you can use screen capture softwares such as Quicktime Player, LICEcap, Giffy, and others to export your map.## How can I get data from my back-end service into Kepler.gl?+You can create a react redux app with kepler.gl as your map display component, requesting data with any kind of server-side calls. The kepler.gl demo app uses simple AJAX calls to load data from a URL.## Is there a limit on the number of datasets that can be added to a map?-There is no limit, but the more datasets you add, the more likely it is that performance will suffer.++There is no limit, but the more datasets you add, the more likely it is that performance will suffer.## What is the maximum file upload size?+Kepler.gl accepts files no larger than 250mb in chrome. You can load bigger files in safari, but performance will be limited.## How many layers can I add to a map?-There is no limit on the amount of layers you can add. However, note that the more layers you have on your map, the more likely it is that performance will suffer.++There is no limit on the amount of layers you can add. However, note that the more layers you have on your map, the more likely it is that performance will suffer.## Why does my layer color change during filtering?-When layer color is based on a numerical value (e.g, trip fare, distance, ETA), Kepler.gl recalculates the color scale based on filtered data. This is not the case for categorical values such as vehicle_name, cuisine_type and app version.-[Back to table of contents](./a-introduction.md)+When layer color is based on a numerical value \(e.g, trip fare, distance, ETA\), Kepler.gl recalculates the color scale based on filtered data. This is not the case for categorical values such as vehicle\_name, cuisine\_type and app version.++[Back to table of contents](a-introduction.md)+diff --git a/docs/user-guides/j-get-started.md b/docs/user-guides/j-get-started.mdindex f066654ca..4f25d1d76 100644--- a/docs/user-guides/j-get-started.md+++ b/docs/user-guides/j-get-started.md@@ -1,49 +1,46 @@-# Get Started+# Get startedKepler.gl is a tool designed for geospatial data analysis. This guide will help you get started creating visualizations in kepler.gl.+## 1\) Add Data to your Map-## 1) Add Data to your Map+-+Kepler.gl will prompt you to add data to your map as soon as you open the web page. Upload your own CSV or GEOJSON file, or add kepler.gl sample data. Sample data is a great way to explore and get familiar with kepler.gl’s features.-Kepler.gl will prompt you to add data to your map as soon as you open the web page. Upload your own CSV or GEOJSON file, or add kepler.gl sample data.-Sample data is a great way to explore and get familiar with kepler.gl’s features.+Read more about adding [Add data to the map](b-kepler-gl-workflow/a-add-data-to-the-map.md).-Read more about adding [Add data to the map](./b-kepler-gl-workflow/a-add-data-to-the-map.md).+## 2\) Add Layers--## 2) Add Layers--+Open the Data Layers menu to start building your visualization. Layers are simply data visualizations that can be built on top of one another. The map pictured above contains a GeoJSON path layer showing trip routes.If you’re new to kepler.gl, play around with the different settings for each type of layer. Layers of the same type can differ greatly in appearance depending on how they’re configured, opening up new possibilities for data analysis.-Learn more about [adding data layers](./b-kepler-gl-workflow/b-add-data-layers/a-adding-data-layers.md)-.+Learn more about [adding data layers](b-kepler-gl-workflow/b-add-data-layers/a-adding-data-layers.md) .-## 3) Add Filters+## 3\) Add Filters-+Add filters to your map to limit the data that is displayed. Filters must be based on the columns in your dataset. To create a new filter, open the Filter menu and click Add Filter. Note that filters apply to all layers and cannot be toggled on and off.-Learn more about [filters](./e-filters.md).+Learn more about [filters](e-filters.md).++## 4\) Customize Map Settings++-## 4) Customize Map Settings+Change the settings on your map in the Interactions and Base Map menus. Customization options include tooltips, brush highlighting, base map style, map imagery toggles \(water, parks, satellite image, etc.\), and many more.-+Read about [base map styles](f-map-styles.md), \[interactions\]\('./g-interactions.md'\) and [map settings](m-map-settings.md).-Change the settings on your map in the Interactions and Base Map menus. Customization options include tooltips, brush highlighting, base map style, map imagery toggles (water, parks, satellite image, etc.), and many more.+## 5\) Save and Export-Read about [base map styles](./f-map-styles.md), [interactions]('./g-interactions.md') and [map settings](./m-map-settings.md).+ Save your map as an image, export current map data, export current map as a json file to be load back into kepler.gl.-## 5) Save and Export--Save your map as an image, export current map data, export current map as a json file to be load back into kepler.gl.+Read about [Save and export](k-save-and-export.md).-Read about [Save and export](./k-save-and-export.md).+[Back to table of contents](a-introduction.md)-[Back to table of contents](./a-introduction.md)diff --git a/docs/user-guides/k-save-and-export.md b/docs/user-guides/k-save-and-export.mdindex c3de881f0..260597415 100644--- a/docs/user-guides/k-save-and-export.md+++ b/docs/user-guides/k-save-and-export.md@@ -1,79 +1,81 @@-# Save and Export+# Save and export-+kepler.gl is a client-side only application. In the demo app, the data you uploaded stays in your browser. Uber does not send or store any user data to any backends. This rule poses an limitation on how you can save and share your maps.However, in the demo app, you can:-- [Export map as an image](#export-image).-- [Export filtered or unfiltered data as a csv](#export-data).-- [Export Map](#export-map)-- [Share Public URL (Dropbox)](#export-dropbox)+* [Export map as an image](k-save-and-export.md#export-image).+* [Export filtered or unfiltered data as a csv](k-save-and-export.md#export-data).+* [Export Map](k-save-and-export.md#export-map)+* [Share Public URL \(Dropbox\)](k-save-and-export.md#export-dropbox)-## <a href="#export-image">Export Image</a>+## [Export Image](k-save-and-export.md#export-image)-+You can export the current map as an image. The export window will use the current map viewport, and the preview will show the entire exported map area. To adjust the viewport, you will have to close the export dialog. You can choose different export ratios or resolutions, and also to add a map legend.-## <a href="#export-data">Export Data</a>+## [Export Data](k-save-and-export.md#export-data)-+You can export map data as a csv file, with the option to export ONLY the filtered data or the entire dataset.-## <a href="#export-map">Export Map</a>-You can export the current map using two different formats. The __Export Map__ window provides two options:-- HTML: create a single html file loads and renders your current map.-- JSON: create a json file with your current map config and data.+## [Export Map](k-save-and-export.md#export-map)-### <a href="#export-html-map">Export Map as HTML</a>+You can export the current map using two different formats. The **Export Map** window provides two options:-+* HTML: create a single html file loads and renders your current map.+* JSON: create a json file with your current map config and data.-To save and export your current map as HTML file, click on __Export Map__ and subsequently on __Export__.-When prompted provide your own mapbox token to be used in the newly generated file. If you don't provide a Mapbox Token,-Kepler.gl will use a default one which can expire at anytime without any communication and therefore break your your existing map.+### [Export Map as HTML](k-save-and-export.md#export-html-map)++++To save and export your current map as HTML file, click on **Export Map** and subsequently on **Export**. When prompted provide your own mapbox token to be used in the newly generated file. If you don't provide a Mapbox Token, Kepler.gl will use a default one which can expire at anytime without any communication and therefore break your your existing map.#### How to update an exported map token-In order to edit the mapbox token in your html file you simply need to perform the following steps:-1. [Create a new mapbox token](https://docs.mapbox.com/help/how-mapbox-works/access-tokens/) or use your existing one.-2. Open the kepler.gl.map file with your favorite text editor.-3. Locate the following line in the exported file __kepler.gl.html__:++In order to edit the mapbox token in your html file you simply need to perform the following steps: 1. [Create a new mapbox token](https://docs.mapbox.com/help/how-mapbox-works/access-tokens/) or use your existing one. 2. Open the kepler.gl.map file with your favorite text editor. 3. Locate the following line in the exported file **kepler.gl.html**:+```javascript/*** Provide your MapBox Token**/const MAPBOX_TOKEN = 'CURRENT_TOKEN';```-4. Replace the current value a new valid token. The code should now look like the following:-```javascript- /**++1. Replace the current value a new valid token. The code should now look like the following:++ ```javascript+ /*** Provide your MapBox Token**/- const MAPBOX_TOKEN = 'pk.eyJ1IjoidWJlcmRh...';-```+ const MAPBOX_TOKEN = 'pk.eyJ1IjoidWJlcmRh...';+ ```++### [Export Map as JSON](k-save-and-export.md#export-json-map)-### <a href="#export-json-map">Export Map as JSON</a>-+-You can export the current map as a `json` file. This is useful when you are running your own kepler.gl application and want to load your map programmatticaly.-The JSON file includes:-- dataset: processed data to create used to render your map-- config: layer, filter, map style and interaction settings.-The map config includes the current layer, filter, map style and interaction settings.+You can export the current map as a `json` file. This is useful when you are running your own kepler.gl application and want to load your map programmatticaly. The JSON file includes:-**Note:** kepler.gl map config is coupled with loaded datasets. The __`dataId`__ key is used to bind layers, filters and tooltip settings to a specific dataset. If you try to upload a configuration with a dataset in your own kepler.gl app, you also need to make sure your dataset __`id`__ matches the __`dataId`__ in the config.+* dataset: processed data to create used to render your map+* config: layer, filter, map style and interaction settings.+ The map config includes the current layer, filter, map style and interaction settings.-## <a href="#export-dropbox">Share Public URL (Dropbox) </a>-+**Note:** kepler.gl map config is coupled with loaded datasets. The **`dataId`** key is used to bind layers, filters and tooltip settings to a specific dataset. If you try to upload a configuration with a dataset in your own kepler.gl app, you also need to make sure your dataset **`id`** matches the **`dataId`** in the config.-To export the current map into your Dropbox account, click on __Share Public Url__ and select Dropbox as your cloud storage.-Perform the authentication against Dropbox using your credentials. Once the authentication process is completed,-click on __Upload__ and Kepler.gl will push your current map onto your account.+## [Share Public URL \(Dropbox\)](k-save-and-export.md#export-dropbox)++++To export the current map into your Dropbox account, click on **Share Public Url** and select Dropbox as your cloud storage. Perform the authentication against Dropbox using your credentials. Once the authentication process is completed, click on **Upload** and Kepler.gl will push your current map onto your account.At the end of the process Kepler.gl will automatically generate a permalink for your work you can share with other users.-[Back to table of contents](./a-introduction.md)+[Back to table of contents](a-introduction.md)+diff --git a/docs/user-guides/l-color-attributes.md b/docs/user-guides/l-color-attributes.mdindex a9a260744..98b8fb2cd 100644--- a/docs/user-guides/l-color-attributes.md+++ b/docs/user-guides/l-color-attributes.md@@ -1,4 +1,4 @@-# Color Palettes+# Layer colorColor palettes pride both predefined and customized options and can be applied to either fill or stroke. Predefined palettes comes in diverging, sequential and qualitative types.@@ -6,16 +6,15 @@ To choose a palette:1. Expand layer pane and click on the color bar from either filled color or stroke color section. Click on the three dots to select the field to color by.-<img src="https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/l-color-attributes-0.png" alt="expand" width="500"/>+-2. To choose a custom palette, toggle on custom button. Click on each color to pick new color either by clicking on the color picker or inputting HEX/RGB values. Colors steps can be added, removed or shuffled.+1. To choose a custom palette, toggle on custom button. Click on each color to pick new color either by clicking on the color picker or inputting HEX/RGB values. Colors steps can be added, removed or shuffled.-<img src="https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/l-color-attributes-1.png" alt="toggle" width="300"/>-<img src="https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/l-color-attributes-2.png" alt="toggle" width="300"/>+ +3\) Your color is applied to your map as soon as you select the predefined palette or confirm the choices of customized colors.-3) Your color is applied to your map as soon as you select the predefined palette or confirm the choices of customized colors.+-<img src="https://d1a3f4spazzrp4.cloudfront.net/kepler.gl/documentation/l-color-attributes-3.png" alt="toggle" width="500"/>+[Back to table of contents](a-introduction.md)-[Back to table of contents](./a-introduction.md)diff --git a/docs/user-guides/m-map-settings.md b/docs/user-guides/m-map-settings.mdindex 2a4336b03..382892a7d 100644--- a/docs/user-guides/m-map-settings.md+++ b/docs/user-guides/m-map-settings.md@@ -1,49 +1,47 @@-# Map Settings+# Map settings-<!-- TOC -->- - [Split Maps](#split-maps)- - [View Maps in 3D](#view-maps-in-3d)- - [Display Legend](#display-legend)-<!-- /TOC -->+* [Split Maps](m-map-settings.md#split-maps)+* [View Maps in 3D](m-map-settings.md#view-maps-in-3d)+* [Display Legend](m-map-settings.md#display-legend)--+## Split MapsYou can display a side-by-side comparison of the same map area with different layers with the Split Map functionality.-+1. Enable this by clicking the Split Map icon in the top right corner of your map:---2. Toggle the layers visible in each map with the layer icon in the top right corner of each map.+-+1. Toggle the layers visible in each map with the layer icon in the top right corner of each map.-+-3. Zoom in and out on each map and the other will automatically mimic.++1. Zoom in and out on each map and the other will automatically mimic.## View Maps in 3D-View your map in 3D by clicking the 3D icon in the top right corner of your map-+View your map in 3D by clicking the 3D icon in the top right corner of your map-- __drag__: pan-- __cmd + drag__ (mac) or __ctrl + drag__ (win): rotate+-+* **drag**: pan+* **cmd + drag** \(mac\) or **ctrl + drag** \(win\): rotate+## Display Legend+View your map in 3D by clicking the 3D icon in the top right corner of your map:-+++-+[Back to table of contents](a-introduction.md)-[Back to table of contents](./a-introduction.md)diff --git a/examples/README.md b/examples/README.mdindex d9f6fdcec..ed1c3d842 100644--- a/examples/README.md+++ b/examples/README.md@@ -4,33 +4,31 @@ A list of examples to demonstrate adding `kepler.gl` to your app. Each of the exTo start each example, cd into the folder then run:-```+```textyarn --ignore-engines && yarn start```-- ### [demo-app][demo-app]+* \*\*\*\*[**demo-app**](demo-app.md)\*\*\*\*++ kepler.gl as a single page app, loading sample maps from remote url, saving map data to dropbox. This is also the source code of kepler.gl/\#/demo.- kepler.gl as a single page app, loading sample maps from remote url, saving map data to dropbox. This is also the source code of kepler.gl/#/demo.+* \*\*\*\*[**open-modal**](open-modal.md)\*\*\*\*-- ### [open-modal][open-modal]Open kepler.gl in a modal.-- ### [custom-reducer][custom-reducer]+* \*\*\*\*[**custom-reducer**](custom-reducer.md)\*\*\*\*+Customize kepler.gl reducer initial state, adding more actions using plugin.-- ### [umd-client][umd-client]+* \*\*\*\*[**umd-client**](umd-client.md)\*\*\*\*+A single html file loading kepler.gl-- ### [replace-component][replace-component]+* \*\*\*\*[**replace-component**](replace-component.md)\*\*\*\*+Example showing how to replace kepler.gl default components using `injectComponents` method.-- ### [custom-theme][custom-theme]- Customize kepler.gl theme by override current style properties.+* \*\*\*\*[**custom-theme**](custom-theme.md)\*\*\*\*+ Customize kepler.gl theme by override current style properties.-[custom-reducer]: custom-reducer-[demo-app]: demo-app-[open-modal]: open-modal-[umd-client]: umd-client-[replace-component]: replace-component-[custom-theme]: custom-themediff --git a/examples/custom-reducer.md b/examples/custom-reducer.mdnew file mode 100644index 000000000..49f94a356--- /dev/null+++ b/examples/custom-reducer.md@@ -0,0 +1,28 @@+# Customize kepler.gl Reducer++This example demos how to customize kepler.gl reducer 1. Customize reducer initialState by `keplerGlReducer.initialState` 2. Adding custom actions by `keplerGlReducer.plugins`++## Local dev++```text+npm install+```++or++```text+yarn --ignore-engines+```++add mapbox access token to node env++```text+export MapboxAccessToken=<your_mapbox_token>+```++then++```text+npm start+```+diff --git a/examples/custom-reducer/README.md b/examples/custom-reducer/README.mddeleted file mode 100644index 4a68e6b91..000000000--- a/examples/custom-reducer/README.md+++ /dev/null@@ -1,24 +0,0 @@-# Customize kepler.gl Reducer--This example demos how to customize kepler.gl reducer- 1. Customize reducer initialState by `keplerGlReducer.initialState`- 2. Adding custom actions by `keplerGlReducer.plugins`--### Local dev-```-npm install-```-or-```-yarn --ignore-engines-```--add mapbox access token to node env-```-export MapboxAccessToken=<your_mapbox_token>-```--then-```-npm start-```diff --git a/examples/custom-theme.md b/examples/custom-theme.mdnew file mode 100644index 000000000..6439f8570--- /dev/null+++ b/examples/custom-theme.md@@ -0,0 +1,30 @@+# Customize kepler.gl Theme++This example show how to customize Kepler.gl theme 1. Define an object \(theme\) to override Kepler.gl style 2. Pass the newly created object as prop to KeplerGl react component++## 1. Install++```bash+npm install+```++or++```bash+yarn --ignore-engines+```++## 2. Mapbox Token++add mapbox access token to node env++```bash+export MapboxAccessToken=<your_mapbox_token>+```++## 3. Start the app++```bash+npm start+```+diff --git a/examples/custom-theme/README.md b/examples/custom-theme/README.mddeleted file mode 100644index fa4b00563..000000000--- a/examples/custom-theme/README.md+++ /dev/null@@ -1,31 +0,0 @@-# Customize kepler.gl Theme--This example show how to customize Kepler.gl theme- 1. Define an object (theme) to override Kepler.gl style- 2. Pass the newly created object as prop to KeplerGl react component--#### 1. Install--```sh-npm install-```--or--```sh-yarn --ignore-engines-```---#### 2. Mapbox Token-add mapbox access token to node env--```sh-export MapboxAccessToken=<your_mapbox_token>-```--#### 3. Start the app--```sh-npm start-```diff --git a/examples/demo-app/README.md b/examples/demo-app.mdsimilarity index 75%rename from examples/demo-app/README.mdrename to examples/demo-app.mdindex 68209b619..24c171709 100644--- a/examples/demo-app/README.md+++ b/examples/demo-app.md@@ -2,28 +2,29 @@This is the src code of kepler.gl demo app. You can copy this folder out and run it locally.-#### 1. Install+## 1. Install-```sh+```bashnpm install```or-```sh+```bashyarn --ignore-engines```+## 2. Mapbox Token-#### 2. Mapbox Tokenadd mapbox access token to node env-```sh+```bashexport MapboxAccessToken=<your_mapbox_token>```-#### 3. Start the app+## 3. Start the app-```sh+```bashnpm start```+diff --git a/examples/node-app/README.md b/examples/node-app.mdsimilarity index 69%rename from examples/node-app/README.mdrename to examples/node-app.mdindex 0b29a3a6b..a1aaa1d47 100644--- a/examples/node-app/README.md+++ b/examples/node-app.md@@ -1,29 +1,30 @@# Node/Express-This example shows how to embed Kepler.gl in a node/express/webpack application.+This example shows how to embed Kepler.gl in a node/express/webpack application.-#### 1. Install+## 1. Install-```sh+```bashnpm install```or-```sh+```bashyarn --ignore-engines```+## 2. Mapbox Token-#### 2. Mapbox Tokenadd mapbox access token to node env-```sh+```bashexport MapboxAccessToken=<your_mapbox_token>```-#### 3. Start the app+## 3. Start the app-```sh+```bashnpm start```+diff --git a/examples/open-modal/README.md b/examples/open-modal.mdsimilarity index 71%rename from examples/open-modal/README.mdrename to examples/open-modal.mdindex 8e2e91e71..fca875531 100644--- a/examples/open-modal/README.md+++ b/examples/open-modal.md@@ -2,28 +2,29 @@Example showing how to open kepler.gl in a modal.-#### 1. Install+## 1. Install-```sh+```bashnpm install```or-```sh+```bashyarn --ignore-engines```+## 2. Mapbox Token-#### 2. Mapbox Tokenadd mapbox access token to node env-```sh+```bashexport MapboxAccessToken=<your_mapbox_token>```-#### 3. Start the app+## 3. Start the app-```sh+```bashnpm start```+diff --git a/examples/replace-component/README.md b/examples/replace-component.mdsimilarity index 75%rename from examples/replace-component/README.mdrename to examples/replace-component.mdindex 85595a4e9..bbb221e44 100644--- a/examples/replace-component/README.md+++ b/examples/replace-component.md@@ -2,28 +2,29 @@Example showing how to replace kepler.gl default components using `injectComponents` method.-#### 1. Install+## 1. Install-```sh+```bashnpm install```or-```sh+```bashyarn --ignore-engines```+## 2. Mapbox Token-#### 2. Mapbox Tokenadd mapbox access token to node env-```sh+```bashexport MapboxAccessToken=<your_mapbox_token>```-#### 3. Start the app+## 3. Start the app-```sh+```bashnpm start```+diff --git a/examples/umd-client/README.md b/examples/umd-client.mdsimilarity index 94%rename from examples/umd-client/README.mdrename to examples/umd-client.mdindex e06cb2400..1ee66b06a 100644--- a/examples/umd-client/README.md+++ b/examples/umd-client.md@@ -2,10 +2,11 @@A single html file loading kepler.gl. This html is loading kepler.gl and its dependencies from the script tags in the header. You can embed this html in your Medium or other single page blog page.+## Usage-### UsageAdd your own Mapbox access token to line 32:-```js++```javascriptconst MAPBOX_TOKEN = 'PROVIDE_MAPBOX_TOKEN';```diff --git a/todo.md b/todo.mdnew file mode 100644index 000000000..95bd56ccf--- /dev/null+++ b/todo.md@@ -0,0 +1,28 @@+# TODO++## Bugs++* Time playback slider sticking out after resize+* Heatmap frozen++## Refactor Tasks++* Refactor Layer configurator component so it works better with the layer API \[shan\]++## Feature++* Re-implement file upload to use event streaming \(no react-palm\) \[shan\]+* Input map style from mapbox style url \[shan\]+* Map style API to add custom map style \[shan\]+* Field type editor \[shan\]+* Export map \[javid, shan\]++## Remaining UI Update++* Free form color picker \[shan\]+* Vis config by channel UI \(add value switch\) \[shan\]++## Design Request++* More map styles \[erik\]+diff --git a/UPGRADE-GUIDE.md b/upgrade-guide.mdsimilarity index 56%rename from UPGRADE-GUIDE.mdrename to upgrade-guide.mdindex e8e54a65b..a5c39377f 100644--- a/UPGRADE-GUIDE.md+++ b/upgrade-guide.md@@ -1,19 +1,19 @@# Upgrade Guide-## Upgrade from v1.1 to v2.0-## Upgrade from v1.1.11 to v1.1.12### Breaking Changes#### Dependency Upgrade-- __react__ and __react-dom__: minimum required version is now `^16.3`-- __react-redux__ is upgraded to `^7.1.3`. If you have older version of `react-redux` in your app. You will have error loading kepler.gl, likely due to multiple version of `react-redux` installed.-- __react-palm__: required version is now `^3.1.2`.-- __react-route__: if you are using `react-router`, we suggest using `^3.2.5` to avoid `React 16.8` lifecycle deprecation warning in the console.+* **react** and **react-dom**: minimum required version is now `^16.3`+* **react-redux** is upgraded to `^7.1.3`. If you have older version of `react-redux` in your app. You will have error loading kepler.gl, likely due to multiple version of `react-redux` installed.+* **react-palm**: required version is now `^3.1.2`.+* **react-route**: if you are using `react-router`, we suggest using `^3.2.5` to avoid `React 16.8` lifecycle deprecation warning in the console.### Bug Fixes-- __Cluster Layer__: Fix incorrect cluster point count. Fix cluster layer missing in exported image.++* **Cluster Layer**: Fix incorrect cluster point count. Fix cluster layer missing in exported image.+